Current time: 23.04.2024, 16:16 Hello There, Guest! (LoginRegister)
Language: english | russian  

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

Posts: 1117
Post: #2311

There is a serious compatibility issue between era and HD mod.
Quote:HE:A2 can return wrong values after assembly/disassembling artifacts in the hero's backpack dialogue (HD mod feature).

To reproduce:
You would want to disassemble a combination artifact and assemble it back a few times in the HD backpack dialogue, and then check the HE:A2 value of the parts. If everything's correct, you would see that some parts become invisible to HE:A2.

To be more specific, try the following:
- Run my script
It gives Armor of the Damned to every hero in the backpack.
- Open the backpack of any hero and disassemble/assemble the AotD a few times
- Press 1 from the hero screen and check the statistics of HE:A1/HE:A2 results
Typically you would get this. As you see, there are difference between HE:A1/HE:A2 results, which should not happen:
The invisible artifacts to HE:A2 could be a nightmare to many scripts. I wonder if there is a way to update the HE:A2 value after assembling/disassembling arts in the backpack.


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 14.07.2023 14:56 by Archer30.)
14.07.2023 14:48
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #2312

Bersy,

I don't know what each plugin does, I used both and didn't notice errors while I often replay battle. But ok, put the one you think safe.

One thing I noticed is that field obstacles are modified from the original, sometimes, not always. I disabled HD mod still they are. Not something hard to overcome, but still annoying a few times.

Ok, waiting for the package, take your time.
14.07.2023 14:58
Find all posts by this user Quote this message in a reply
Berserker Online
Administrators

Posts: 16488
Post: #2313

Archer30, thanks for investigation, but it seems like HD mod bug, because HE:A2 uses hero structure and loops though all equipped and all backpack artifacts during counting.

erm.cpp

Code:
case 2: // A2/art/num/act - count artifacts
                  aflag=anum=0;
                  for(i=0;i<19;i++){
                    if((p->IArt[i][0]==art)&&(p->IArt[i][1]==arts)){
                      ++aflag; ++anum;
                    }
                  }
                  for(i=0;i<64;i++){
                    if((p->OArt[i][0]==art)&&(p->OArt[i][1]==arts)){ ++anum; }
                  }
                  Apply(&anum,4,&M,2);
                  Apply(&aflag,4,&M,3);
                  break;

Valery, could you upload those two plugins, say, on dropmefiles.com?

The game should have the same obstacles on battlefield (I use in-game generator for this purpose), otherwise it's looks like an issue. Could you reliably confirm the bug and do you have saved gamed before such battle?


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

Posts: 1117
Post: #2314

Berserker, this is weird. How come HE:A1 returns correct values? It doesn't get results from the hero structure?

Would be really good if you can take some time and check if png for replacing def frames works correctly 96-copy The feature is crucial to many scripts now.


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 15.07.2023 15:13 by Archer30.)
15.07.2023 15:11
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #2315

15.07.2023 19:08
Find all posts by this user Quote this message in a reply
Berserker Online
Administrators

Posts: 16488
Post: #2316

Archer30, as far as I see, HE:A1 uses the same data as HE:A2, but also supports 1000+ art numbers for spell scrolls. HE:A2 does not support 1000+ art IDs as spell scrolls. Further investigation will be required.

HE:Z?y1 base hero address

+0x68 - array of 19 equipped arts, each one is [art type: 4 bytes, art subtype: 4 bytes]
+0x100 - array of 64 backpack arts, each on is [art type: 4 bytes, art subtype: 4 bytes]

Seems like dumping and checking is required.

Valery, thanks.


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

Posts: 2270
Post: #2317

(16.07.2023 02:30)Berserker Wrote:  but also supports 1000+ art numbers for spell scrolls. HE:A2 does not support 1000+ art IDs as spell scrolls.

Вообще-то свитки - с 1001. 1000 = 0 - костыль для того, чтобы давать/забирать у героя книгу магии.

HE:A1 и HE:A2 являются сильно устаревшими командами и их использование в скриптах крайне не желательно. Например в ERA+ манипуляции с куклой и рюкзаком поддерживаются следующие:

!!HE:A4 - дать герою артефакт
!!HE:A5 - узнать количество артефактов у героя
!!HE:A6 - одет ли артефакт на куклу героя
!!HE:A7 - добавить артефакт в слот куклы
!!HE:A8 - удалить артефакт из слота куклы
!!HE:A9 - добавить артефакт в слот рюкзака
!!HE:A10 - удалить артефакт из слота рюкзака
!!HE:A11 - получить слот куклы с искомым артефактом
!!HE:A12 - получить слот рюкзака с искомым артефактом
!!HE:A13 - забрать артефакт у героя
!!HE:A14 - открыть диалог рюкзака героя
!!HE:A15 - получить содержимое слота куклы героя (низкоуровневый доступ)
!!HE:A16 - получить содержимое слота рюкзака героя (низкоуровневый доступ)

Всё тоже самое может быть реализовано с помощью Era Erm Framework в базовой версии ERA, для тех, кто не хочет использовать ERA+.
(This post was last modified: 16.07.2023 07:12 by XEPOMAHT.)
16.07.2023 07:10
Find all posts by this user Quote this message in a reply
Berserker Online
Administrators

Posts: 16488
Post: #2318

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


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

Posts: 2270
Post: #2319

(16.07.2023 15:37)Berserker Wrote:  но что с ними не так в плане реализации?

1. Не поддерживаются сборные артефакты, т.е. что там под "замочками" - потребуется нагрузить ERM-код допскриптами, которые просто так никто не напишет.
2. Костыли со свитками, когда надо отнимать/прибавлять 1001. В ERA+ ERM выдаёт данные артефакта 2 числами вместо 1.
3. Костыли с рюкзаком, когда слоты рюкзака и слоты куклы - 1 массив, аналогично свиткам, хотя логически должно быть 2 массива. В ERA+ команды на рюкзак и куклу - отдельные команды.
4. Недоработанность старых команд - в хелпе про это написано, например автоматически не определяется слот на кукле, куда добавляется артефакт, на замочки он не проверяет, команда не оповещает о true или false при добавлении/отнятии артефактов.
5. Нельзя ставить замочки на слоты - в ERA+ можно.
6. Нельзя записывать пользовательскую информацию в данные слота артефакта - в ERA+ можно.
и т.д...
(This post was last modified: 16.07.2023 16:58 by XEPOMAHT.)
16.07.2023 16:57
Find all posts by this user Quote this message in a reply
Berserker Online
Administrators

Posts: 16488
Post: #2320

Valery, I'm looking for alternative to bat-file installer, which sometimes performs unreliably.


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

Posts: 2196
Post: #2321

No hurry, take what is best. I will visit here every year until is done 118
(This post was last modified: 17.07.2023 05:27 by Valery.)
17.07.2023 04:45
Find all posts by this user Quote this message in a reply
Berserker Online
Administrators

Posts: 16488
Post: #2322

Valery, you wan't wait! Testing )

Quote:1. Не поддерживаются сборные артефакты, т.е. что там под "замочками" - потребуется нагрузить ERM-код допскриптами, которые просто так никто не напишет
В моём понимании нужно два разных API. С одной стороны, замочки не являются более самостоятельными артефактами, а с другой — остаются частями. Напомни, игра ведь считывает бонусы только с настроек сборного артефакта? Бывшие части игнорируются?


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

Posts: 2270
Post: #2323

(17.07.2023 15:47)Berserker Wrote:  С одной стороны, замочки не являются более самостоятельными артефактами, а с другой — остаются частями.

Замочки не являются артефактами. Их спрайт хранится в Artifact.def в самом конце, а артефактами их сделал WoG, чтобы не переделывать код игры. Спрайт замочка показывается в окне диалоге, но в структуре героя в запертых слотах никаких артефактов нет.

(17.07.2023 15:47)Berserker Wrote:  Напомни, игра ведь считывает бонусы только с настроек сборного артефакта? Бывшие части игнорируются?

Бонус считывается со сборного артефакта и со всех его компонентов. Игра проходит по массиву из 160 байтов, где каждый байт - 0 или 1. Т.е. можно сделать, например, сборный артефакт, который будет состоять из всех 160 артефактов и все их бонусы будут работать, т.к. проверка на артефакт учитывает его нахождение в сборнике по массиву компонентов сборного артефакта.
18.07.2023 14:01
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #2324

Bersy

Quick savings worked fine in TEW3 map but in Alexander the Great it gives me this error, what should I add?

Image: Untitled-2.jpg
18.07.2023 21:30
Find all posts by this user Quote this message in a reply
Berserker Online
Administrators

Posts: 16488
Post: #2325

I see. It uses key constants from Era Erm Framework now, which is not loaded by "load only these scripts.txt". Replaced them with key codes.
Try this one:
https://dropmefiles.com/F7NYs

XEPOMAHT, то есть правильно бы было иметь виртуальную куклу героя, где вместо замочков — реальные артефакты. Так срабатывали бы проверки на них.


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
18.07.2023 22:44
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