Skip to content

We are propping up the AI with workarounds.

User Avatar
#3
Auto-translated
Long

If you mean new buildings (dwellings, treasuries, etc.), you can set the AI to prioritize visiting these buildings using the SetAIHeroAttractor and SetAIPlayerAttractor functions. For example, if it's a treasury, the logic should include a check to see if the visiting hero belongs to the player or the AI. If it's a human player, a QuestionBoxForPlayers should appear, offering them to fight, etc. If it's an AI player, the reward and experience should be given without any pop-up windows or battles. Let's say an experienced human player can take this treasury on day 20. And if the goal is a strong AI, you can set a priority for the AI to visit this treasury on day 20+ with a hero of maximum level using the SetAIHeroAttractor function, where it will come and simulate clearing it (but in reality, it will get the reward for free).
Your idea is interesting, in terms of prioritizing at the right moment. Another question is how to determine these infamous 20 days? Technically, I know enough ways to handle the AI and its interactions (as I wrote above, I have a system that works quite well on test objects). Of course, you can do it through testing, but then most people who will be subjected to the difficult task of playing the first version of the map will experience pain in various places.
Question: Does the bot react to QuestionBoxForPlayers if it is sent to it? Or is there an exception when calling it on the bot? If the game automatically clicks "Ok" for it, that would be a good help. There must be a way to resolve this problem; the bot won't just stop because of a message.


Не уходи безропотно во тьму,
Будь яростней пред ночью всех ночей,
Не дай погаснуть свету своему!

Хоть мудрый знает – не осилишь тьму
Во мгле словами не зажжёшь лучей –
Не уходи безропотно во тьму.