Current time: 22.09.2019, 13:24 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
Разные вопросы
» Спрашивайте - отвечаем
Author Message
PerryR Online

Posts: 69
Post: #946

I have a question regarding WoG/ERA. Probably it is already known but maybe someone can point me towards the solution.

When in battle and giving a creature HP with !!BM:H command in !?BF trigger. So this "extra" HP vanishes/resets when I afterward use the !!EA receiver to give abilities to this stack, so do all other bonuses, also a defense boost from the Stoneskin spell will vanish after using !!EA receiver.

What do you usually do to avoid this? Because there arise several problems with scripts like "21 wog - neutral units.erm"

Edit: Okay one solution is to just do it the other way round obviously, like use !?BA for !!EA manipulation and afterwards !?BF for !!BM, but that's just a workaround...
(This post was last modified: 28.04.2019 17:38 by PerryR.)
28.04.2019 17:26
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 11054
Post: #947

Not the worst workaround it is )


Скачать Герои 3 Эра и всё, что с ней связано
Поддержать проект
01.05.2019 14:59
Find all posts by this user Quote this message in a reply
PerryR Online

Posts: 69
Post: #948

I once more want to point out that there are problems using the !!EA battle receiver (or at least the way I do it, maybe I'am doing something wrong?)
Below you can find a test script.
The problem here is you set extra abilities with EA receiver than you start a fight. Retreat from that battle and now if you start a new battle the creatures will have wrong stats. Most likely they will carry the HP from the last battle you fought. Tested with clean ERA 2.77 assembly.
Best to witness if you first fight a pack of Gnolls -> Retreat and then fight some lvl 7 creature with 6 HP Sm


(This post was last modified: 18.05.2019 20:15 by PerryR.)
18.05.2019 20:10
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 11054
Post: #949

loop400. By the way, label names are local to trigger handler block !?XX before next !?XX, thus loop1 or [:forEachCreature] can be reused.

I will look into EA receiver, seems like a bug really.


Скачать Герои 3 Эра и всё, что с ней связано
Поддержать проект
19.05.2019 17:17
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 11054
Post: #950

Could you explain, what does
!!EAy2:F0/?y3; [Check for next available bonus line: y3]
mean?

0 is not a valid number for ability.
Even if it works, it seems that you search for the first empty line (ability 0 will never be found). Ok, but ability number to set up is generated randomly (y10) and thus can be non-unique. So instead of overwriting the same line for the same ability in case of random number collision, you always allocate the new one, right?

Apart from possible duplicated exp line, I see no errors in code.


Скачать Герои 3 Эра и всё, что с ней связано
Поддержать проект
19.05.2019 22:22
Find all posts by this user Quote this message in a reply
PerryR Online

Posts: 69
Post: #951

(19.05.2019 22:22)Berserker Wrote:  Could you explain, what does
!!EAy2:F0/?y3; [Check for next available bonus line: y3]
mean?

0 is not a valid number for ability.
Even if it works, it seems that you search for the first empty line (ability 0 will never be found). Ok, but ability number to set up is generated randomly (y10) and thus can be non-unique. So instead of overwriting the same line for the same ability in case of random number collision, you always allocate the new one, right?

Apart from possible duplicated exp line, I see no errors in code.

Yes that is how I understood it, I took from ERM manual
Quote: F$1/$2; If you set $1 to 0, you will find the first free bonus line.

So for every iteration, it searches the stack for free lines and sets a new random ability (always) which comes with y10(x1) in this case. Admittingly it misses some checks for double abilities or no free space but I don't think that is the core of the problem.
The question is how can the HP/Att/Def from one stack be transferred to another stack in the next battle, or how can I avoid it? And why does it only happen if I retreat? If the combat finishes normally there are no problems.

By the way, thanks for the hint with the local label names Sm , though they would be global and started to enumerate.
(This post was last modified: 19.05.2019 23:31 by PerryR.)
19.05.2019 23:19
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 11054
Post: #952

I need to investigate it further, wether it's a simple lack of EA clearing on retreat or some other sort of bug. Seems like the former variant.
Welcome Sm It's nice that someone read those boring changes.txt and used new feature.


Скачать Герои 3 Эра и всё, что с ней связано
Поддержать проект
20.05.2019 00:52
Find all posts by this user Quote this message in a reply
igrik Offline
Administrators

Posts: 1789
Post: #953

(28.04.2019 17:26)PerryR Wrote:  When in battle and giving a creature HP with !!BM:H command in !?BF trigger. So this "extra" HP vanishes/resets when I afterward use the !!EA receiver to give abilities to this stack, so do all other bonuses, also a defense boost from the Stoneskin spell will vanish after using !!EA receiver.
PerryR, try this plugin. Maybe he will solve the problem. (link)


Скачать HoMM3 ERA 2.8.3 (Repack: Rus & HD)
20.05.2019 12:19
Visit this user's website Find all posts by this user Quote this message in a reply
PerryR Online

Posts: 69
Post: #954

(20.05.2019 12:19)igrik Wrote:  
(28.04.2019 17:26)PerryR Wrote:  When in battle and giving a creature HP with !!BM:H command in !?BF trigger. So this "extra" HP vanishes/resets when I afterward use the !!EA receiver to give abilities to this stack, so do all other bonuses, also a defense boost from the Stoneskin spell will vanish after using !!EA receiver.
PerryR, try this plugin. Maybe he will solve the problem. (link)

No, unfortunately, it does not.
Stats are still reset if you give ability with EA. At the beginning of combat (BF) or during (BR) doesn't matter.
What does this plugin actually do?
20.05.2019 23:30
Find all posts by this user Quote this message in a reply
slater777 Offline

Posts: 65
Post: #955

Добрый день. Интересует вопрос по моддингу командиров. В каком файле указана привязка (ссылка на нахождение файлов) к озвучиванию действий командиров? Был бы благодарен, если бы кто-нибудь скинул ссылочку на статью по моддингу командиров (если таковая ещё где-нибудь осталась в живых)

UPD: Вопрос решён
(This post was last modified: 14.08.2019 12:42 by slater777.)
11.08.2019 15:21
Find all posts by this user Quote this message in a reply
slater777 Offline

Posts: 65
Post: #956

Подскажите, пожалуйста, что я делаю не так?
Заменил картинку спелла у Астрал Спирита (файл /mods/wog/data/zvs/lib.res/_b9_1.bmp) с контрудара на призыв:
Проверяю в игре, картинка не изменилась:
(This post was last modified: 21.08.2019 14:37 by slater777.)
21.08.2019 14:37
Find all posts by this user Quote this message in a reply
igrik Offline
Administrators

Posts: 1789
Post: #957

(21.08.2019 14:37)slater777 Wrote:  Подскажите, пожалуйста, что я делаю не так?
Заменил картинку спелла у Астрал Спирита (файл /mods/wog/data/zvs/lib.res/_b9_1.bmp) с контрудара на призыв:
Проверяю в игре, картинка не изменилась:
плагин wog native dialogs.dll изменяет использование этих файлов на один деф "Dlg_NPC1.def".
Редактируйте этот деф, либо отключайте плагин wog native dialogs.


Скачать HoMM3 ERA 2.8.3 (Repack: Rus & HD)
21.08.2019 15:47
Visit this user's website Find all posts by this user Quote this message in a reply
slater777 Offline

Posts: 65
Post: #958

igrik, благодарю.
21.08.2019 16:01
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-2019 MyBB Group