Geoff the Medio wrote:Pretty neat, and seemingly useful. Seems to work for me. Nice that it's just an AI .py file change.
It's a bit awkward to have to send it to a particular AI, though... For me, only AI_5 responds to "help", and messages sent directly to one of the others get no response. (Click an AI name in the empires list to specify chat message recipients...)
Chat sends messages to all AI but only first response. AI did not know if chat to all or only for him.
Also, the list of AI ids is coloured, seemingly to better identify them. But the AI colours in the list of ids doesn't match the corresponding AI names, which is a bit weird... so perhaps it would be useful to also include the AI name in the list of IDs to make it clear that the number in an AI name isn't the same as its "debug" id?
OK, chat dialog looks strange. I don't like that AI_? in it.
It would also be preferable to have the debug init chat messages be looked up in the stringtable before being sent to the player.
I don't expect to see it release build. So why it should be translated?
Can you use this mechanism to force an AI to issue an order (or send an arbitrary chat message or diplomacy message)? A means to tell the debugged AI to not end its turn as soon as possible, or to otherwise interrupt the next normal turn-playing-in-response-to-server-update sequence would be useful.
I think it is has same rights as generateOrders but triggers form other place. I expect, you can call any code from freeOrionAIInterface. I expect that then you call chat generateOrders is already finished. You can change variable in chat and access it in generateOrders.
upd. patch attached
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0