Current time: 21.11.2024, 20:27 Hello There, Guest! (LoginRegister)
Language: english | russian  

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

Posts: 16657
Post: #2101

Ok, thanks for info.


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

Posts: 1175
Post: #2102

Np 148

Reporting a critical bug of igrik's quest dialog plugin:

If you visit a Guard that is only available to another player, for example, Green player visits a Guard that can only be passed by Red, the Quest log is permanently locked, resulting in a CTD every time clikcing on it.

Image: kcQf2iB.png

Save game for testing


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 04.11.2022 04:17 by Archer30.)
01.11.2022 02:39
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1175
Post: #2103

Berserker, please remove SeerHut.txt from hmm35wog.pac in order to solve the problem above.

In ERA 3, this text file was added with meaningless edits, resulting in the buggy quest guard event written in Quest Log. That's the culprit for CTD opening quest logs. igrik's plugin has nothing to do with it.

Credit:
Cruel Tomato and Hawaiing for identifying the actual cause of the problem.


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

Posts: 16657
Post: #2104

Archer30, ok, thanks. I don't remember the origin of this file.


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

Posts: 1175
Post: #2105

Berserker, no problem. It was a pure coincident the guys found the actual cause of the problem without many tests. 96-copy


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

Posts: 1175
Post: #2106

I don't fully get the idea of the new VR:C syntax. Was trying to create an array of the new combination artifacts.


It looks like I am not allowed to re-declared my newCombiArtPieces with a new length.
Here I tried to set newCombiArt to 1, yet my newCombiArtPieces array has still got the size "4" from the its declaration when newCombiArt = 0.

Is this the intended behaviour?


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

Posts: 16657
Post: #2107

That's because !#VA arrays are static arrays, while you need dynamic array here. If array size differs on conditoin, then use dynamic array.

!!VR:C is not related to issue it all.

But you can also declare largest possible set array like artPieces[16] and declare numPieces:y var separately. Thus you effectively emulate dynamic array without any memory allocation/deallocation.


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

Posts: 1175
Post: #2108

By dynamic you mean SN:M series?

Getting confused again, how to declare numPieces:y seperately?

I ended up converting my code to SN:M


Is there any chance this code can be using VR:C array instead? Or any better implementation?

It is rather interesing that HE:A2 not working as expected under OnEquipArt. HE:A2 doesn't count the artifact being equipped (v998), which makes my code longer than expected.


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

Posts: 16657
Post: #2109

Something like that:



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

Posts: 1175
Post: #2110

Berserker, I get the idea, thanks! 132

Is it true that usually VR:C arrays are preferred than SN:M, as they use fewer system resources?


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 06.11.2022 22:44 by Archer30.)
06.11.2022 20:04
Find all posts by this user Quote this message in a reply
daemon_n Offline
Administrators

Posts: 4343
Post: #2111

Archer30, it is true)


Image: widget.png?style=banner2

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

Posts: 16657
Post: #2112

Archer30, if you don't use arrays in heavy loops, use whatever is simplier for your task. For heavy loops (100000+ iterations every turn, for instance), you MAY use static arrays in the most significant and most often called functions.

The task above is easily solved using static array and array index access syntax is quite readable numCombiArtPieces[i]. In complex cases use trigger local dynamical array. It's easy to create, fill, sort, pass to another function, etc.

Static arrays are for really simple tasks.


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

Posts: 2356
Post: #2113

Огромная просьба не использовать это в era.dll (проверял с версией 3.9.3)

Code:
HeroSpecsTable:             PHeroSpecsTable        = Ptr($7B4C40);

Т.к. в ERA+ данная таблица не используется, в итоге новые эровские ERM-команды Берсеркера, пытающиеся читать $7B4C40, читают мусор и скрипты работают с Ашибками.

Базовый адрес на данную таблицу находится в 679C80h. Используйте базовый адрес в режиме реального времени, а не копируйте его куда-то заранее, до того, как таблица будет перемещена, получая в итоге неправильный адрес!!!
23.11.2022 07:03
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #2114

XEPOMAHT, а нельзя ли в OnAfterStructsRelocations получить конечный адрес по базовому?


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

Posts: 2356
Post: #2115

(23.11.2022 13:34)Berserker Wrote:  а нельзя ли в OnAfterStructsRelocations получить конечный адрес по базовому?

Не рекомендуется, т.к. таблица может быть перемещена в любой момент времени, например маппер может создать собственную таблицу специализаций в ассоциативной памяти эры и подключить её к игре с помощью базового адреса в инструкции карты. Тифон патчит структуры после AfterWoG уже после всех патчей ЭРЫ в AfterWoG, а эровская обработка OnAfterStructsRelocations происходит имеено в эровском AfterWoG, а не где-то позже, из-за чего ЭРА не воспринимает данные из OnAfterStructsRelocations полностью (те же самые глюки со структурой монстров, где вперемешку используется и старый и новый адреса из-за позднего OnAfterStructsRelocations).
23.11.2022 14:54
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