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

Full Version: ERA III
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(27.08.2020 21:52)Berserker Wrote: [ -> ]helgtla, Будет что ещё досадное — сразу пиши )
Пример:
В 2.9.х такой пример работал корректно. Т.е. бой стартует с монстром (триггер ивент), монстру даётся герой, который ставит мины и пески (игрок их не видит и они для него враждебны- при попадании урон/остановка). В 3.0.3 - установленные мины/пески для игрока "свои"(игрок их видит и они не причиняют урона) , а для "защитника"-враждебны (урон+ остановка).
Такое поведение теперь(3.0.3) ТОЛЬКО при условии, что бой "навязан игре" (триггер ивент), в случае если бой стартует "стандартно" с монстра/монстра в гарнизоне (которым выдаётся герой)- всё работает корректно.
В принципе у себя я поправил подобное заменив ресиверы вызова мин/песков на !!BH1&v5183=6:Q0/90/0; !!BH1&v5183=6:Q1/106/0; с ними проблем нет.
Суть: !!BM21 в 3.0.3 "работает" только при стандартной инициализации битвы(в 2.9.х - работало всегда, независимо от того, что послужило началом сражения).
Команда !!UR#1/#2/#3:XXXX; - университет в X Y L. Университет - тип 104.
перестала работать
!!URx1/x2/x3:Sy1/?y2/?y3/?y4; - в игре пишет "wrong internal university index" (типа нерабочая зона) - если нажать ПКМ на "желтый" квадрат (клетка посещения), игра вылетает.
На 2.9.14 всё работало.

Есть предположение, что проблема с координатами или типа того. Мне кажется, по той же причине не работает улучшенное волшебство и сухопутная навигация, которые пропускают свои функции именно через точные координаты объектов.

Berserker, обновил сборку до Эры 3, называется, надеюсь, силы и время на все это есть36 Удачи!
daemon_n, на тестовой карте проверял? Всем спасибо, буду смотреть.
(30.08.2020 13:36)Archer30 Wrote: [ -> ]Hi Berserker,

There is a bug probably was originally from SoD that I hope to be resolved someday.

Wrong town description of random maps:
Image: hPN264E.png

As you see in the picture, blue is Conflux while the text description says it's Rampart, which is incorrect.
In fact, The type of town in the description is only related to player's colour (ie: Red - Castle, Blue - Rampart) instead of the actual choice the player made.

Apart from resolving this bug, a further request is to have these text exported to an external files so that it can be localized.

Method 1
Code:
_LHF_(RMG_PlayerTownSelection)
{
    c->eax = (*c->Local<INT8*>(4)) * 4;
    return EXEC_DEFAULT;
}
...
pi->WriteLoHook(0x54A4A2, RMG_PlayerTownSelection);
Method 2
Code:
bin patch @54A495
EB 03 90 90 90 F3 A4 8B 45 F0 8B 00 8D 95 DC FC FF FF C1 E0 02
Image: iJfNZnA.png

The description text is hardcoded in exe, it would be simplest to just rewrite it all with a hook using external json as text source starting at 54A2B0 and skipping to 54A4FA.
With so much effort and enlightenment from RK, my first bin patch is here.
rmg town info fix.bin
Code:
01 00 00 00 95 A4 54 00 15 00 00 00 EB 03 90 90 90 F3 A4 8B 45 F0 8B 00 8D 95 DC FC FF FF C1 E0 02
I know it has no use since RK is going to release his new mod about this. But this post is for remembering that for this patch I did not sleep last night. So many variants I tried and so many hours of testing, and it turned out my only mistake was forgetting to put the bin in ERAplugin\AfterWoG, instead it was in ERAplugin.
RoseKavalier, thank you very much for info.

Quote:Berserker, можно ведь скрыть как-то кнопки на карте приключений?
Не в курсе.

Archer30, congrats with hard success Rolleyes. Write here if you fail to apply binary patch again ))))
(02.09.2020 00:42)daemon_n Wrote: [ -> ]можно ведь скрыть как-то кнопки на карте приключений?

Попробовать вызывать содовские функции DlgItem_Enable и DlgItem_Disable для диалога карты приключений разве что, если делать без костылей.
Berserker, next time I will not fall into such simple mistake again 96-copy

I have got a new question here - In ERA 3, names of creatures loads from crtraits.txt, and after wogification it loads from zcrtrait.txt instead. Is there any benefit of using different files? Is there any other text resources using the same strategy (using different files after wogification)?
Archer30, all txt files are loaded before main window creation and are not reloaded anymore.
Look at Mods\WoG\Data\Redirections\Missing\era.json
You will find which files game uses, when it does not find requested resources. No zcrtrait => crtrait.txt there.
Berserker, thanks. It's pretty strange. I struggled with the Englsh creature names quite some time in scenario screen (right click on selected faction) with my localization mod loaded, and those names are all localized after starting a map. But now I can't reproduce it.
Maybe it's a failure of VFS. I should keep both zcrtrait.txt and crtraits.txt to prevent unexpected problem.

PS: Sometimes I extract txt in ...\mods\[mod name]\data to make some quick edit. I know it would interfere VFS. But even when I remove those txt, the VFS is frequently still messed up.
Archer30, if txt file is present in data, it will be loaded and used until you terminate Heroes 3 executable. VFS should not be the source of issue.
Berserker, не помогло - "волшебство" на университете всё ещё крашит.

Code:
EIP: Era.45567 (Erm.Hook_ZvsApply + 31 in Erm.pas on line 4979 offset 3). Code: C0000005

> Registers
EAX: D88EBEF8 (int: -661733640)
ECX: 00000000 (int: 0)
EDC: 1AB776B0 (int: 448231088, pint: 0x00000011 = 17)
EBX: 0748DC18 (int: 122215448, pint: 0x00000000)
ESP: 02D30A2C (int: 47385132, pint: 0x0748DE26 = 122215974)
EBP: 02D30A44 (int: 47385156, pint: 0x02D30A84 = 47385220)
ESI: 02D30CEC (int: 47385836, pint: 0x00000014 = 20)
EDI: 1AB77600 (int: 448230912, pint: 0x1AB77580 = 448230784)
Данный скрипт не рекомендуется использовать в реальных проектах. Он использует механизмы, которые могут быть изменены и позволяет памяти утекать.
По правой кнопке мыши на карте приключений циклически играет файл ACID.wav.

Berserker, 132 , таки сделал что хотел?
Bes, нет, это просто кирпичики, заменить нужно весь механизм, но по сути он состоит из функций и нескольких структур данных.
Reference URL's