Если кому из скриптописцев интересно потестировать. 2.9.4+:
https://dropmefiles.com/KI4bK
Полный контроль над входом/выходом/переключением экранов героя и города. Отлов события постройки строения в городе.
[+] Added "OnBuildTownBuilding" event, occuring when current PC human or AI builds town building.
Parameters: x1 = Town ID, x2 = Building ID.
[+] Added "OnOpenTownScreen" and "OnCloseTownScreen" events with the only x1 parameter: ID of town,
that was entered initially. Towns may be switched between inside town screen without generating Enter/Leave events.
[+] Added "OnSwitchTownScreen" event (x1 = Town ID), occuring when player switches towns in town screen.
[+] Added "OnPreTownScreen" and "OnPostTownScreen" events (x1 = Town ID), occuring right before/after showing
town screen for particular town. Both events occur, whether town screen is opened/closed or switched.
They can be used to pre-change buildings/names/dwellings and revert changes afterwards, for instance.
[+] Events "OnOpenHeroScreen", "OnCloseHeroScreen" and "OnUpdateHeroScreen" now receive x1 = Hero ID parameter.
In "OnCloseHeroScreen" x1 is the same as in "OnOpenHeroScreen", thus it's the first hero, screen was opened for.
Hero screen dialog allows to switch between heroes, without generating new Open/Close events.
[+] Added "OnPreHeroScreen" and "OnPostHeroScreen" events (x1 = Hero ID), occuring right before/after showing
hero screen for particular hero. Both events occur, whether hero screen is opened/closed or switched.
They can be used to pre-change creatures/names/skills and revert changes afterwards, for instance.
[*] Events "OnEnterTown" and "OnLeaveTown" were renamed to "OnEnterTownHall" and "OnLeaveTownHall".