Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Query client language?

  1. #1
    Basic Member
    Join Date
    Dec 2016
    Posts
    10

    Query client language?

    Hi guys,

    Is it possible to query what language is the client using in a bot script?

    I want bot to be able to talk to players in their selected languages. Language is stored in one of the console variable but I don't know how to access it. Is there a proper way of doing it? Or maybe is it possible to use the chat wheels that auto converts languages?

    Thanks!

  2. #2
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,018
    I am pretty sure the language is stored in the steam client, not the DOTA client, but I could be wrong.
    The chat wheel doesn't have "language". That is the whole concept. The chat wheel uses ids and that id corresponds to a text label. The text label is then used by the localization converter to change to english, chinese, russian whatever else. There is no "text".
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  3. #3
    Basic Member
    Join Date
    Dec 2016
    Posts
    10
    I am pretty sure the language is stored in the steam client, not the DOTA client, but I could be wrong.
    The chat wheel doesn't have "language". That is the whole concept. The chat wheel uses ids and that id corresponds to a text label. The text label is then used by the localization converter to change to english, chinese, russian whatever else. There is no "text".
    Sorry for my English. Yes chat wheel is exactly what I want. I was thinking alternatively I could get the language and write something on my own. But I don't understand how to use chatwheel in the bot lua scripts, nor accessing the language variable...
    Last edited by seanjoeut; 10-21-2017 at 09:51 AM.

  4. #4
    Basic Member
    Join Date
    Dec 2016
    Posts
    10
    cl_language
    Default: english
    Others: russian, schinese, koreana, german, french, italian etc.
    Check \steamapps\common\dota 2 beta\game\dota\resource folder for all available languages
    The client does have localization files all over the place (panorama, vgui, resource)

    Better use the auto-translated phrases with the command: chatwheel_say X
    where X is a number from 0 to 86
    description in dota_english.txt from dota_chatwheel_message_Ok to dota_chatwheel_message_Zeus_Ult
    Thank you I think this is what I'm looking for. In the console I could see both cl_language and chatwheel_say. But I'm wondering is there a command to use them in the bot .lua script directly, or should I mine in the config files to find the language setting?

  5. #5
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,018
    The Chat wheel is not yet implemented, but several requests have been submitted. It is probably a low priority (if you will look at our requests there are some others that may be more important), however, the text chat has been implemented. I don't think it detects bot chat though. Only human chat. But you can make the bots write text chat in return
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  6. #6
    Basic Member aveyo's Avatar
    Join Date
    Aug 2012
    Location
    EU West
    Posts
    2,927
    I only see
    ActionImmediate_Chat( sMessage, bAllChat ) Have a bot say something in team chat, bAllChat true to say to all chat instead
    The was a discussion some time ago about a chatwheel / phrases function, seems not implemented yet.

    I don't think you can query anything from the client with bot scripts.

  7. #7
    Basic Member
    Join Date
    Dec 2016
    Posts
    10
    Quote Originally Posted by The Nomad View Post
    The Chat wheel is not yet implemented, but several requests have been submitted. It is probably a low priority (if you will look at our requests there are some others that may be more important), however, the text chat has been implemented. I don't think it detects bot chat though. Only human chat. But you can make the bots write text chat in return
    Hmm thought that was the case. Been thinking too much about chatting and not improving my bot... Thank you

  8. #8
    Basic Member
    Join Date
    Dec 2016
    Posts
    10
    Quote Originally Posted by aveyo View Post
    I only see
    ActionImmediate_Chat( sMessage, bAllChat ) Have a bot say something in team chat, bAllChat true to say to all chat instead
    The was a discussion some time ago about a chatwheel / phrases function, seems not implemented yet.

    I don't think you can query anything from the client with bot scripts.
    I'm too noob of a programmer to understand what I can or cannot do.. Thank you for answering

  9. #9
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,018
    Quote Originally Posted by seanjoeut View Post
    I'm too noob of a programmer to understand what I can or cannot do.. Thank you for answering
    You can make the bots write chat and can "read" what humans write. If you want to "read" bot chat, it's a bit more difficult, but not impossible.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  10. #10
    Basic Member
    Join Date
    Dec 2016
    Posts
    10
    Quote Originally Posted by The Nomad View Post
    You can make the bots write chat and can "read" what humans write. If you want to "read" bot chat, it's a bit more difficult, but not impossible.
    Yeah I just made the bots all chat what they are doing kind of like default bots. It feels like too many things can go wrong if I try to reading and parsing what the human writes.. But could you maybe give me a pointer how to? Is there a function that does that or do I need to take a course?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •