Posts from HoMM3 HD bug reports.
Auto-translated
(Василь Симоненко. Люди – прекрасні)

In the image, the hero on the left is the attacker, and the hero on the right is the one being attacked. As you can see, in addition to the different terrain, the obstacles on the battlefield are also set differently. The probability of desynchronization is almost 100%. As soon as someone stands on the opponent's invalid battlefield tile, or a unit with a bonus for that surface moves, desynchronization will occur.
I tested this bug in 4 different games, and the result was the same in all of them. It only appears when using the HD mod. I don't know from what time it started. Attached is a save file of the game where Tamika attacks Tunar, and the above-described issue occurs.
In the World Tree (WT) expansion, there is a script that changes the terrain in underground battles to the appropriate one; this is known as the Inferno script (it's the second-to-last one in the script91.erm file).
It works as follows: before the battle, it moves the coordinates of the battle location to the surface and changes the terrain type to the required one. After the battle, it restores the original terrain type on the surface.
It's likely that the coordinates of the battle didn't change on one side, which is why the battlefields are different.
I think it would be easier to fix this bug by patching the WT executable.
This script was one of the first I created, and it more or less handled its function when playing without the HD mod. Although, even then, bugs occurred, but I fixed it as I went along, as far as I remember.
It should be noted that this script is necessary for mirror maps, so it cannot be completely removed.
You could try asking Wizard how he solved the terrain type issue in underground battles for the SODO mirror map.
In my opinion, many WT incompatibilities with HD are easier to fix on the WT side if that's the goal. In particular, the incompatibility of HD with mirror maps. If necessary, the source code for the mirror map is still intact.
2 The_Mafia:
In the World Tree (WT) there is a script that changes the terrain in underground battles to the appropriate one; this is the so-called Inferno script (the second to last one in the script91.erm file).
It works as follows: before the battle, it moves the coordinates of the battle location to the surface and changes the terrain type to the required one; after the battle, it restores the old terrain type on the surface cell.
It is likely that on one side, the battle coordinates did not change, which is why the battlefields are different.
I think it would be easier to fix this bug by patching the WT executable. This script was one of the first I created, and it more or less coped with its function when playing without the HD mod. Although, even then, bugs occurred, but I corrected it as I remember.
It should be noted that this script is necessary for mirror templates, so it cannot be completely removed.
You can try asking Wizard how he solved the terrain type problem in underground battles for the Sodo mirror.
In my opinion, many WT incompatibilities with HD are easier to fix on the WT side if that is the goal. In particular, the incompatibility of HD with mirror templates. If anything, the source code for the mirror is still intact.
Thank you. I will try to figure it out.
PS
I assumed that since the bug occurs when the mod is enabled, it is the mod that affects it, in which case I will have to patch the mod itself, possibly its DLLs, and not the executable. That's why I wrote here.
PS 2
Moreover, there is another bug with automatic battles; the essence of it is that when using the mod, after a quick battle with neutrals, you can end up in a new battle on the surface, even though you are in a dungeon. Similar symptoms. I will provide a detailed description of the bug with saves and screenshots later.
Moreover, there is also a bug with the automatic battle.
последняя версия - 5.0 RC96 (19.09.2020)
последнее видео: https://www.youtube.com/watch?v=u70wC0DJ7I8
полное подробное описание
PS
I assumed that since the bug occurs when a mod is connected, it means the mod is influencing it, and in that case, I would have to patch the mod itself, possibly its DLLs and not the executable. That's why I wrote here.
You need to patch the executable, ignoring the HD version. Then, you can see if there are any bugs. You need to find the code where the ground for the underground battle is set and substitute the correct type. The current implementation is a potential source of bugs, so it's better to do it properly right away, rather than waiting for changes in the HD version.
The_Mafia, there's not much point in patching HD. I'm currently a bit busy developing new features for HD 5.0 and in general. Perhaps after the release, or maybe right before the release of 5.0, I'll work on the WoG/ERA module for HD and remove everything unnecessary from it (everything that has been dragging on since the time when the code for SoD/HoTA/WoG ERA was one). It is quite likely that the problem will disappear; if not, we will still figure it out.
Okay, I'll wait.
Maybe you've heard, I've started working on WT. I reassembled the project (rewrote the chat and transferred the old code). Currently, the guys are testing it, and it seems to be working. To see this version, you need to replace the asmwt.dll file with this one: http://heroeswt.net/download/asmwt.dll
This version has almost everything that was there, except for the Overlord's Hut and template selection. Therefore, at the moment, the game is only possible through the HD mod.
We were actually planning to make HD built into WT, but first, we need to fix the bugs.
If needed, I can make changes to the WT code. For example, remove duplicate functionality such as automatic battles, timers, etc.
With ASM's permission, I'm publishing the code: https://bitbucket.org/theDevilYouKnow/wt_delphi/src
In general, if you need anything regarding WT, feel free to contact me.
icq: 681350680
After that, all saves disappeared!!!!!!!!!!!!!!!!!!!!

