Read ingame chat.

This is a discussion on Read ingame chat. within the DotA 2 Hacks board part of the DotA 2 category; Hey, i want to make a program which translates the chat via google for the players.
My problem is that ...

Read ingame chat.

Hey, i want to make a program which translates the chat via google for the players.
My problem is that im not that good with memory reading. Is there an adress or a pointer or something which includes the last chat message?

Wait, what?
You want to write an external problem that reads the very last chat message in DotA 2, then exports those information to translate.google.com, reads it our from there afterwards and prints it into a console application or whatever?
If so, good luck o_O

Yep, I've picked Europe West, US East&West and still get games with full of russians. They should play on their own realm or on China servers or maybe Europe East. But honestly, the matchmaking in DotA2 is terrible anyway.

It isn't if you can read out the last message and I tried a bit a round with packets and ofc there is a packet with the chat messages.
The only problem is that I dont know how to read that packet without wireshark.

its obviously not impossible, but a lot of things to do when you want to do it right...

i'll give you some ideas:
backtrace the "chatMessageReceived" function by analyzing what function calls something like "printToChat" or "appendToChatLog"
then hook that function, pass the chat message to your own function that checks whether the chat message needs to be translated and if so pass it to a function that translates it from "detect language" to english. then manipulate the received message to point to your translated message and let the game render it. alternatively you could just translate every message into english or your native language of course... but for both variants keep in mind google translator won't understand dota-slang so you will have a hard time to decide whether the received message should be translated or not.
also keep threading in mind as fetching the translated data will take quite some time and freeze the game if you don't.

it's a lot of stuff you need to know and do and when you don't know how to reverse the functions yourself or how you would implement parts of this, this project is too far off your knowledge to be honest.

The Following User Says Thank You to juvlarN For This Useful Post:

I would make a menue that lists all players and you can check the russians so it only translates those.
Because when my friend writes fast "fasdt cometo me i needd yo help pls thewn we can ganmk top" i dont want this to be interpreted as brazilian or whatever and translated into shit.
You could filter out common dota words too so google dont messes it all up.