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.
Whether it's a bug or not, I don't see any case UN:U returning the wrong number of towns would be favoured.
(04.12.2023 14:08)Archer30 Wrote: [ -> ]Whether it's a bug or not, I don't see any case UN:U returning the wrong number of towns would be favoured.

Not bug. But UN:U not support objects with two yellow cells - it is worked only on one. If you want towns count on map, don't use UN:U.
Герой не должен стоять на красной клетке, по идее.
Я думаю, скорее всего это вина забагованного скрипта, который его туда поставил, надо править сам скрипт.
Остальное следствия этого.
Согласен. Нельзя накладывать один объект поверх другого.
As I know there are two ways to put a hero in the red tile of a town.

- By bug of Flying spell. Sometimes the hero stays at the red tile after moving with Fly. I can't reproduce it now but it was reported from time to time.
- By scripts. We try to avoid this situation.

XEPOMAHT, thanks. Could you tell me what UN:C should be used to obtain the real town number? We don't have access to the Russian Erm help.
Yep, getNumTowns() function would be a stable solution.
(05.12.2023 03:37)Archer30 Wrote: [ -> ]thanks. Could you tell me what UN:C should be used to obtain the real town number? We don't have access to the Russian Erm help.

На Си - одна строчка кода:

Code:
GetTownsCount() {return ((_int_)((*(_dword_*)(((_ptr_)this) + 0x21618) - *(_dword_*)(((_ptr_)this) + 0x21614)) / 360));}

На вого-ассемблерной вставке так:

Code:
int GetCastleMapCount(void)
{
    STARTNA(__LINE__, 0)
    _CastleSetup_ *strt,*end;
    __asm{
        mov  eax,BASE
        mov  ecx,[eax]
        add  ecx,0x21614
        mov  eax,[ecx]
        mov  strt,eax
        mov  eax,[ecx+4]
        mov  end,eax
    }
    RETURN((end-strt)/360)
}

На ERM2 это как-то тоже можно написать...
Archer30,
Very cool thanks!

But in the end UN:U for finding next town still returns hero if he/she stucks in red
Archer30, mb cause if when it finds hero it checks object below? and it is probably town with new coord?
Hi Berserker, there is a weird bug report from the community. The log is a bit confusing.

Quote:Failed to write data at F8558D0E.
EIP: Era.50076 (AdvErm.GetSlot + 98 in AdvErm.pas on line 1220 offset 2). Code: C0000005

> Registers
EAX: 00000001 (int: 1)
ECX: 0000000A (int: 10)
EDX: 00000009 (int: 9)
EBX: H3era hd.00A5A008 (int: 10854408, pint: 0x00000000)
ESP: 02D359E8 (int: 47405544, pint: 0x02D3617C = 47407484)
EBP: 02D35C00 (int: 47406080, pint: 0x02D36168 = 47407464)
ESI: 00000001 (int: 1)
EDI: 02D35A00 (int: 47405568, pint: 0x02D36001 = 47407105)

> Callstack
H3era hd.007493CC
Era.64AD8 (Erm.ProcessErm + 2456 in Erm.pas on line 5802 offset 11)

Should that be an erm issue?

Download Debug here

According to my test, it has 95% chance to be related to Remagic (Era Scripts option) 102
According to write address, seems like Era memory corruption.
Berserker, should that be resolved on scripts or your end?
Memory corruption is scripts area. I think some UN:C or plugin write operation could do it. Maybe some buffer overflow in EEF function, but not Era core.
Archer30, try same w/o these suspisious hooks
Reference URL's