Wake of Gods Forum | Форум Во Имя Богов

Full Version: Ошибки, баги и недочёты ERA
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Berserker, I must correct myself - the issue I mentioned above is specifically for HE:C0 (use for army type/quantity management)

To add a certain number of troops, we usually just use HE:C2. This command is dedicated for army increase that we don't have to worry about which exact slot to add/whether all the slots are full.

That is to say, when we change the stack amount of a slot using HE:C0, we expect the stack exp to stay the same for each unit.

Quote:Another issue is backward compatibility.
This is also my main concern, and I believe changing the default behaviour of HE:C0 only makes many scripts work as the scripters intended. But I understand this can be debatable.

At this point, I will use regular expression to search for every HE:C0 instance in mods and see if they need a correction. If that's done, it's no longer required to change the current HE:C0, as we are not likely to have more wrong written HE:C0 scripts anyway.

Edit: It seems CA:M2 (troop management in towns) uses the same implementation as HE:C0 here; changing the stack number preserves the total exp instead of exp of each unit. Guess we just leave as it is.
Archer30, CA:M2:
Code:
case 2: // M2/pos/$/$ охрана замка тип и кол-во
f((Mp->n[1]<0)||(Mp->n[1]>6)){ MError("\"!!CA:M\"-position out of range (0...6)."); RETURN(0) }
Apply(&dp->GuardsT[Mp->n[1]],4,Mp,2);
Apply(&dp->GuardsN[Mp->n[1]],4,Mp,3);

As you see, WoG simply does not change total stack exp counter, thus xp per single creature is adjusted automatically via runtime calculations.
Weird crash related to screen refreshing in a town

If you open a hero screen in a town and try to activate HE:C when the hero's army is full, the game would crash when you close your hero screen.

The crash is reproducible in a new game so no save game/debug folder provided.

Testing script

Testing process in a video
(29.04.2025 20:33)Archer30 Wrote: [ -> ]If you open a hero screen in a town and try to activate HE:C when the hero's army is full, the game would crash when you close your hero screen.

Там традиционно слетает иерархия менеджеров в памяти. Чтобы выйти без ошибки - нужно поменять иерархию пяти менеджеров игры. Иначе менеджер города пытается получить структуру города при обновлении экрана - а вместо неё 0. В обычном SoD/WoG/MoP этого бага нет - почему он именно в ЭРЕ и где там накосячено - никто не знает.

(29.04.2025 20:33)Archer30 Wrote: [ -> ]Testing script

Прокладка в виде экрана героя в скрипте - зачем? Добавлять/удалять монстров можно прямо в окне города с помощью UN:C например.
Короче, изучил проблему с глючащим ИИ. Проблема старая, решение прежнее "script00.erm. ZVSE !#UN:J4/32000;". Однако есть 2 вопроса.
1) При этом надо удалять "AI sod radius.bin " с которым ИИ глючит, или надо поставить другое значение в скрипте?
2) Проблема ИИ и землекопства решена? Если да, прошу ознакомить с решением.
Ethereal, То если на 64000 работает некорректно?
Berserker, в SoD 32000 же (и это максимальное значение). Что, там в "bin", 64000? Это многое объясняет.
Целая куча скриптов, использующих !!SN:H для установки описаний, крашат игру на выходе.
Самый яркий пример это 3 wog - secondary skill text.erm (там кроме !!SN:H вообще других ресиверов нет).
Краш происходит после нажатия на кнопку "Выйти из игры", и только без HD-мода.
Также может намертво зависнуть.
С HD-модом крашей нет, на Эре 3.9.21 крашей нет.
Может кто-то проверить?
Guru105, подтверждаю, стабильное зависание намертво при нажатии кнопки "Выйти из игры", и только без HD-мода, версия Эра - 3.9.26. С HD-модом зависания нет, версия HD-мод 5.5 R53. При зависании логи не пишутся вообще, есть только "log.txt". На Эра 3.9.21 v1 зависания нет, хоть без HD-мод, хоть с ним.
XEPOMAHT,
Quote:Прокладка в виде экрана героя в скрипте - зачем? Добавлять/удалять монстров можно прямо в окне города с помощью UN:C например.
This is a wrong claim. I didn't intend to manage troops in a town by using HE:C. It's just I have a script to execute HE:C in a hero screen, and this hero happens to be in a town, which results in a crash I reported.

Berserker, the crash of HE:C2 in a town still hasn't been resolved. Possible to have some help from you?
Archer30, I'm not working on h3 code currently, but crash report on version 3.9.26 could potentially help.
Reference URL's