Current time: 22.04.2024, 23:31 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
Ошибки, баги и недочёты ERA
» crash logs / errors / bugs of era
Author Message
Archer30 Offline
Moderators

Posts: 1117
Post: #736

Berserker, I don't think anything is working. Tried Magic Mirror and WoG commander block


Latest ERA mods and scripts in development - My GitHub
07.02.2024 17:13
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16488
Post: #737

Классические диалоги текстов с прокруткой разбивают текст на строки, каждая из которых отрисовывается отдельно. Соответственно, прокрутка идёт шагами построчно. Вот функция разбивки (0x4B58F0)

ApiJack.StdSplice(Ptr($4B58F0), @New_Font_TextToLines, ApiJack.CONV_THISCALL, 4);

Модуль Эры перехватывает её, очищает строки диалога и проводит свою разбивку с учётом тегов, выравниваний и изображений в тексте. Никакого отображения в левом верхнем углу не может быть в норме.

Собственно, вот все мои перехваты без учёта правки для китайского языка:

Code:
Core.Hook(@Hook_GetCharColor, Core.HOOKTYPE_BRIDGE, 8, Ptr($4B4F74));
Core.Hook(@Hook_BeginParseText, Core.HOOKTYPE_BRIDGE, 6, Ptr($4B5255));
Core.Hook(@Hook_CountNumTextLines, Core.HOOKTYPE_CALL, 5, Ptr($4B5275));
Core.Hook(@Hook_CountNumTextLines, Core.HOOKTYPE_CALL, 5, Ptr($4B52CA));
Core.Hook(@Hook_ScrollTextDlg_CreateLineTextItem, Core.HOOKTYPE_CALL, 5, Ptr($5BA547));
ApiJack.HookCode(Ptr($4B547B), @Hook_Font_DrawTextToPcx16_DetermineLineAlignment);
ApiJack.HookCode(Ptr($4B54EF), @Hook_Font_DrawTextToPcx16_End);
ApiJack.StdSplice(Ptr($4B5580), @New_Font_CountNumTextLines, ApiJack.CONV_THISCALL, 3);
ApiJack.StdSplice(Ptr($4B5680), @New_Font_GetLineWidth, ApiJack.CONV_THISCALL, 2);
ApiJack.StdSplice(Ptr($4B56F0), @New_Font_GetMaxLineWidth, ApiJack.CONV_THISCALL, 2);
ApiJack.StdSplice(Ptr($4B5770), @New_Font_GetMaxWordWidth, ApiJack.CONV_THISCALL, 2);
ApiJack.StdSplice(Ptr($4B57E0), @New_Font_GetTextWidthForBox, ApiJack.CONV_THISCALL, 3);
ApiJack.StdSplice(Ptr($4B58F0), @New_Font_TextToLines, ApiJack.CONV_THISCALL, 4);
// Fix TransformInputKey routine to allow entering "{" and "}"
Core.p.WriteDataPatch(Ptr($5BAFB5), ['EB08']);


Archer30, interesting. Is the issue preserved without HD mod?


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
07.02.2024 18:19
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1117
Post: #738

Berserker, the issue persists in pure era without other components.


Latest ERA mods and scripts in development - My GitHub
07.02.2024 18:50
Find all posts by this user Quote this message in a reply
XEPOMAHT Offline
Moderators

Posts: 2270
Post: #739

(07.02.2024 18:19)Berserker Wrote:  Модуль Эры перехватывает её, очищает строки диалога и проводит свою разбивку с учётом тегов, выравниваний и изображений в тексте. Никакого отображения в левом верхнем углу не может быть в норме.

ЭРА+ вызывает функцию 5BA360h в конструкторе диалога при обработке текстовика с DL и больше ничего не делает. На саму функцию не подаются никакие тэги и флаги, т.е. весь текст всегда отрисовывается одинаково, там можно задать шрифт и цвет, больше ничего. По-умолчанию, текст там отрисовывается с выравниванием слева, а не по середине, соотвественно, вставки типа "{~>ZWOGlogo.def:0:0 block}" так же отрисовывают только слева, центрирование там не работает, по крайней мере на ЭРЕ+. 105

Пример:

Image: image.jpg
(This post was last modified: 07.02.2024 21:08 by XEPOMAHT.)
07.02.2024 20:22
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16488
Post: #740

{~>ZWOGlogo.def:0:0 block align=center} пробовал?


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
07.02.2024 21:20
Find all posts by this user Quote this message in a reply
XEPOMAHT Offline
Moderators

Posts: 2270
Post: #741

(07.02.2024 21:20)Berserker Wrote:  {~>ZWOGlogo.def:0:0 block align=center} пробовал?

Попробовал, безрезультатно. Так же рисуется только слева.
07.02.2024 21:29
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16488
Post: #742

А {~>ZWOGlogo.def:0:0 align=center} + перевод строки?


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
08.02.2024 00:34
Find all posts by this user Quote this message in a reply
XEPOMAHT Offline
Moderators

Posts: 2270
Post: #743

(08.02.2024 00:34)Berserker Wrote:  А {~>ZWOGlogo.def:0:0 align=center} + перевод строки?

Там с переводом строки и написано, иначе строчка начнётся прямо за def-ом.
08.02.2024 06:35
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1117
Post: #744

Berserker, it is not about the cache.

005A9626 This triggers when the bug happens (meaning ERA tries to load a new def). But whatever SN:R sets, the def name preserves the last one used in the pervious battle.

!!SN:B works here


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 08.02.2024 07:18 by Archer30.)
08.02.2024 06:43
Find all posts by this user Quote this message in a reply
XEPOMAHT Offline
Moderators

Posts: 2270
Post: #745

Так же при попытке отрисовки в диалогах несуществующих кадров из def, которые ставит ЭРА, вместо пропуска отрисовки движок ЭРЫ всё равно пытается что-то отрисовывать, подавая мусор на HD_WOG.dll, которая не выдерживает такой наглости и вылетает (т.к. Бараторч поставил проверки только на несуществующие def-ы, а на несуществующие спрайты у него проверок нет, поэтому наверное такая оплошность моддеров, добавляющих def-ы в диалоги, может ложиться на плечи Берсеркера).

08.02.2024 14:00
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1117
Post: #746

Dens of Thieves generate on mismatched terrains

So this happens a lot to me and I decided to improve it.
Image: qtktsXS.png
There are 3 types of Dens of Thieves in ERA. Now the first two will be generated on any terrain except for Snow, and the snowy one will only be generated on Snow.

Download fixed zaobjts.txt

I believe there are other small mistakes in zaobjts.txt. Not sure what they are but Grossmaestro should have a full list Sm


Latest ERA mods and scripts in development - My GitHub
15.02.2024 09:19
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1117
Post: #747

FU(OnPreTownScreen) doesn't trigger in some of the cases switching between town screens

Not necessarily a bug, but this is inconvenient and confusing. FU(OnPreTownScreen), sounds like it would trigger before any town screen shows/updates, but not for the following cases:
- Teleporting from one inferno to another with Castle Gate (Infernoe building)
- Switching among owned towns on the town screen by pressing arrow keys on the keyboard

I use a hook @005C70E5 for the replacement of FU(OnPreTownScreen) and it seems to be fine so far, without the two issues mentioned here.


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 21.02.2024 18:46 by Archer30.)
18.02.2024 17:06
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16488
Post: #748

It seems, that switching between towns does not involve new dialog creation. Existing dialog is updated.
Maybe 005C70E5 should be added as some OnBeforeShowTownScreen event


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
18.02.2024 21:20
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1117
Post: #749

Loading during a battle (HD mod feature) resets AI thinking radius value (UN:J4) to 4096

If you load a save game during combat, the AI thinking radius value is reset to 4096 after finishing loading the save game. This 4096 value even persists for the ERA instance - if you start a new game after this radius buggy, the thinking radius would still be 4096.

Exiting to the main menu during battle doesn't seem to have such a bug.

Tested with no mods except for HD mod and a script to check UN:J4 value.

The problem itself is fixable with patches. But I wonder why it would happen. Could there be anything else broken by this HD feature?


Latest ERA mods and scripts in development - My GitHub
21.02.2024 18:37
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16488
Post: #750

Seems like the number of bugs is big enough to not use this feature or disable the button for Era.


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
21.02.2024 23:31
Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Forum Jump:

Powered by MyBB Copyright © 2002-2024 MyBB Group