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

Post Reply 
Threaded Mode | Linear Mode
ERA III
Author Message
Archer30 Offline
Moderators

Posts: 1175
Post: #2446

Whether it's a bug or not, I don't see any case UN:U returning the wrong number of towns would be favoured.


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

Posts: 2356
Post: #2447

(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.
04.12.2023 17:26
Find all posts by this user Quote this message in a reply
wessonsm Offline

Posts: 792
Post: #2448

Герой не должен стоять на красной клетке, по идее.
Я думаю, скорее всего это вина забагованного скрипта, который его туда поставил, надо править сам скрипт.
Остальное следствия этого.
(This post was last modified: 04.12.2023 22:09 by wessonsm.)
04.12.2023 21:49
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #2449

Согласен. Нельзя накладывать один объект поверх другого.


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

Posts: 1175
Post: #2450

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.


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 05.12.2023 03:48 by Archer30.)
05.12.2023 03:37
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #2451

Yep, getNumTowns() function would be a stable solution.


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

Posts: 2356
Post: #2452

(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 это как-то тоже можно написать...
05.12.2023 08:39
Find all posts by this user Quote this message in a reply
daemon_n Offline
Administrators

Posts: 4343
Post: #2453

Archer30,


Image: widget.png?style=banner2

Новейший Heroes Launcher
05.12.2023 17:31
Visit this user's website Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1175
Post: #2454

Very cool thanks!

But in the end UN:U for finding next town still returns hero if he/she stucks in red


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

Posts: 4343
Post: #2455

Archer30, mb cause if when it finds hero it checks object below? and it is probably town with new coord?


Image: widget.png?style=banner2

Новейший Heroes Launcher
05.12.2023 19:10
Visit this user's website Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1175
Post: #2456

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


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

Posts: 16657
Post: #2457

According to write address, seems like Era memory corruption.


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

Posts: 1175
Post: #2458

Berserker, should that be resolved on scripts or your end?


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

Posts: 16657
Post: #2459

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.


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

Posts: 4343
Post: #2460

Archer30, try same w/o these suspisious hooks


Image: widget.png?style=banner2

Новейший Heroes Launcher
17.12.2023 00:01
Visit this user's website 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