Current time: 24.11.2024, 22:33 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
ERA III
Author Message
Berserker Offline
Administrators

Posts: 16657
Post: #1021

Crash in on HE:F?/?/?/?/1 command.
Crash is in combo artifact handling, which hero wears. Like some plugin extends wog table incorrectly.

This is the table:
Code:
Byte ArtSlots[]={
// номер,+атака,+защита,+сила,+знания, занятые слоты ...
  0x81,21,21,21,21, 0,2,4,5,7,
  0x82,0,0,0,0,     2,7,
  0x83,0,0,0,0,     6,6,
  0x84,3,3,2,2,     0,3,4,
  0x85,0,0,0,0,     8,8,8,8,
  0x86,16,16,16,16, 0,1,2,3,4,6,6,7,
  0x87,9,9,8,8,     0,4,5,
  0x88,0,0,0,0,     2,
  0x89,0,0,0,0,     8,8,
  0x8A,0,0,0,0,     8,8,
  0x8B,0,0,0,0,     1,2,
  0x8C,0,0,0,0,     1,6,6,
  0x99 // последний
};

Combo Artifact ID, +attack, +defense, +spell power, +knowledge occupied slots
Table position is huge in code. It means either 0x99 value was overwritten by plugin or the whole table is corrupted.

I tried a few times, but no crash. Cannot reproduce.


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

Posts: 1175
Post: #1022

Berserker, The savegame was passed from a player, and I was able to reproduce, strange. :/

Could it be something from HD mod? I heard about HD handles combo artifacts and stuff, that's the main reason Third Upgrade Mod has its own hd_wog.dll.

______

Is it possible for you to raise the limit of HE:V? Currently, the limit is set to 0 - 31, objects with ID larger than 31 will result in ERM error. I believe this should be eliminated.
ERA handles objects like Garden of Revelation with more than 32 in a map quite well, Unleashed Editor by RoseKavalier also allows more than 32 of the objects to be added, the only remaining is the HE:V command.


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 10.03.2021 18:09 by Archer30.)
10.03.2021 14:31
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #1023

I didn't checked it without HD mod. We need the third tester. As far as I can see, crash should not occur unless WoG memory is corrupted. I loaded your savegame and didn't reproduce the crash. More testers, more experiments will be probably necessary.

HE:V limit is not changeable, because it's 4-bytes integer value with 32 bits (1 byte = 8 bits). Extra objects overwrite other objects bits and even memory after that bits.
In Hero structure exactly 10 integers of 32 bits each are allocated for storing visited objects flags (10 object types). This is hardcoded restriction, unless someone patches all places, where these fields are used.


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

Posts: 1175
Post: #1024

So you suggest that if a map is with more than 32 Garden of Revelation, data could be corrupted?

Hmmm...I think I need RoseKavalier to tell why he lifted this limit in his editor 102


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 10.03.2021 17:23 by Archer30.)
10.03.2021 17:23
Find all posts by this user Quote this message in a reply
RoseKavalier Offline

Posts: 118
Post: #1025

No corruption occurs from this, game code performs (garden_id % 32).
10.03.2021 17:38
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #1026

Archer30, RoseCavalier means, that corruption occurs actually. When you visit one garden, it overwrites "visited" flag of another one. 33-th garden shares "visited" flag with the first one. 34-th shares the "visited" flag with the second garden and so on. It may be suprising for knowledge stones, for instance.


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

Posts: 118
Post: #1027

It's not really corruption in the sense the word is usually used - it just creates 'duplicate' objects. Save game will be safe.

Data corruption would be Artifact Merchant overflowing to read hero's visited towns for example, that can crash the game.
10.03.2021 20:55
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1175
Post: #1028

RoseKavalier, so basically if a map has 70 Garden of Revelation, when you visit the No.0, No. 32, No. 64 would also be marked as visited, right?

Then I say it could be handy if HE:V could automatically convert ID>31 to the 0-31 range 102


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 21.04.2021 11:08 by Archer30.)
10.03.2021 21:04
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #1029

Archer30, ok, added to TODO. Though it's a crutch, buggy code will work now. Any positive value will succeed for HE:V.


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

Posts: 1175
Post: #1030

Berserker, Thanks!

A report about possible ERM engine issue. I know it's bad practice, but check this:

Image: 7WVksMe.png

Image: ogGeWgW.png

The first attempt does not return 50 but 0. Any idea?


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

Posts: 16657
Post: #1031

ERM receiver subcommands are executed one by one. It's not expression, stored in some temporary memory.

!!VRy1:S100 -y1 is the same as
Try


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

Posts: 1175
Post: #1032

Thanks! That explains.


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

Posts: 4343
Post: #1033

I don't see any issues. That's is fully arithmetic correct.


Image: widget.png?style=banner2

Новейший Heroes Launcher
11.03.2021 00:12
Visit this user's website Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #1034

daemon_n, a = 100 - a in most programming languages is evaluated as t = a. a = 100 - t.


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

Posts: 4343
Post: #1035

Berserker, я не понял твоё предложение, но повторю и своё по-русски.

Считаю, что ерм отработал правильно в примере от Archer30, потому не могу согласиться с тем, что там какая-то ошибка.


Image: widget.png?style=banner2

Новейший Heroes Launcher
11.03.2021 06:13
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