Auto-translated
It also works on the test Multiplayer map I created, although for this, it needs to be added to the map itself.
In the NHF mod, scripts in Multiplayer are handled this way. And to add these scripts to fan-made Multiplayer maps, they have a special program for that.
Also, there is another small bug: when a hero captures a dwelling, the recruitment window immediately pops up, but the question about rebuilding appears only after the hero exits this window. Thus, in the case of rebuilding, the hero gets the opportunity to recruit from both the original and the alternative building, and that's exactly what happens. Does anyone have any ideas on how to solve this problem? "Disabling" the buildings until the player touches them is also not an option, because in that case, the AI will ignore these buildings.
And another question, (probably even more noobish than the others, please forgive me) do all these scripts significantly load the game?
And does it depend on the length of the assigned values, i.e., should I make the assigned names as short as possible, or does it not matter at all?
However, without large cycles, you are unlikely to notice that the script takes a long time to execute.