Hi
Berserker, found an issue - OnHeroTransfer doesn't seem to trigger.
Also, is there a way to check whether a zone is the first zone of a campaign? (Alternatively, is there a trigger only for the start of the 2nd+ campaign zone?)
I have trouble with this issue for campaign like RoE - Dungeon and Devils. This is a campaign with 3 zones, you can select your starting zone between zone 1 and zone 2 (by clicking on the map). If you choose 2nd zone as your start, then 1st would be your second zone. Here's the problem -> henchman data should be initialized in the first zone (instead of loading data from w51 - w100 or ini). Any idea?
Note: From my code, w51 - w100 are generated at wining and they are only cleared when the client is terminated. If a player starts a new campaign after winning a zone, w51 - w100 could be wrongly transferred to the new campaign (due to lacking check of the first zone)
Quote:OnHeroTransfer doesn't seem to trigger.
You need new campaign started from scratch. I checked it. Recheck, please.
I would not use any indexes at all.
The issue with garbage in w50..w101 and first campaign map is unsolvable. Just clear anything except those, protected by OnHeroTransfer trigger.
Retested, still, nope.
My best guess is that this event is defined in Era Erm Framework, you somehow forget to update the script there?
How is OnHeroTransfer useful in the first place? Comparing with OnAfterErmInsruction. I need more info to understand:
Quote:Just clear anything except those, protected by OnHeroTransfer trigger.
Also, is ClearIniCache suppose to remove anything from the target? Didn't do anything from my end though.
Sent all info to discrod.
To fully rewrite the whole ini file:
1) Delete ini file using DeleteFile
2) ClearIniCache to remove ini data from memory
3) WriteIni
4) Save ini
В Эре 3.4.0 будут анимированные def-ы в DL-диалогах. Вплоть до 10 дефов могут быть анимированными. Достаточно в поле имя дефа, где обычно стоит «Def», дописать "animated" => "Def animated". Ну а группу, группу кадров можно выбрать? Можно )

Файл по
данной ссылке защищён авторским правом и запрещён к скачиванию.
Ходят слухи, что если нужно указать группу кадров и индекс кадра, то в индекс кадра прописывают Группу * 100000 + Индекс кадра.
Бесконечно можно смотреть на три вещи: как горит огонь, как течет вода и как сменяет кадр за кадром resource.def

Hi
Berserker, the animated def feature is really amazing!
And I'm happy to say that now I have figured out most of the henchman carryover feature.
But there is still an issue with OnTransferHero - it doesn't get called each time needed. The ERA commander carryover feature has the same issue as well. For campaigns like RoE - Dungeon and Devils (Oh, here you are again!). You are able to configure your campaign:
1st zone: Choose from Inferno or Dungeon Faction (by clicking on the map)
2nd zone: Choose from Inferno or Dungeon Faction (can't select, must use the faction that was left)
3rd zone: Choose from Inferno or Dungeon Faction (by selecting from campaign bonus - will use hero from zone 1/2 depending on the selection)
Alright, so the problem is when you are at the 3rd zone and select heros from the first zone, the commanders, the henchman data (with my code) are lost (while hero level still gets carried). But if you select heroes from the 2nd, they got carried over.
Possible to fix?

Quote:Бесконечно можно смотреть на три вещи: как горит огонь, как течет вода и как сменяет кадр за кадром resource.def
Или artifact.def )
Archer30, thanks.
Quote:But there is still an issue with OnTransferHero - it doesn't get called each time needed. The ERA commander carryover feature has the same issue as well.
Right, it's because I hook at WoG code for commander transferring. I'll see, what can be done, but do not promise anything )
Nice structured code! Formatted it a bit:
(06.04.2021 05:40)daemon_n Wrote: [ -> ]Бесконечно можно смотреть на три вещи: как горит огонь, как течет вода и как сменяет кадр за кадром resource.def 
То есть, теперь в окошки мода Расширенных описаний существ вместо изображений можно вставлять анимированные def-ы юнитов, как в Форте города?
Sandris, я бы хотел сказать "да", но анимация будет не такой, как в форте. Разве что подготовить свои дефы, где будут расставлены кадры в нужном порядке, поскольку оригинальные - лишь заготовки для полноценных анимаций.
Sandris, конкретно существа анимируются в форте по спец. алгоритму, прыгая по группам. А у меня/ZVS анимация последовательная по конкретной группе.
Я имел ввиду пересобрать DEF-ы существ именно под анимацию в окне мода, оставив только один тип действия с последовательными кадрами в цикле (движение, кривляние...).
Sandris, в таком случае можно.