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

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

Posts: 1104
Post: #2086

Hi Berserker, I notice that BA1 do not trigger when BA:D1 is used on BA0. This is kinda unexpected.

In fact there are a couple of scripts, I find broken when BA:D1 is used. If ERA could trigger BA1 regardless of the presence of BA:D1, the issue would be fixed.

Can we make it this way?


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

Posts: 16471
Post: #2087

Right, because battle is cancelled and really it does not happen on defender side.
Nope, already met this behavior and it's quite correct. If no battle starts on attacker side, then nothing to send to "defender" side.


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

Posts: 1104
Post: #2088

Berserker, sorry for messing up legacy erm trigger names, I mean FU(OnBeforeBattleUniversal) and FU(OnAfterBattleUniversal). I thought they always come in pairs, until recently I find out BA:D1 is the exception.

As I see, many script writters are not aware not this. For example, one author sets up global vars OnBeforeBattleUniversal and reset those vars to default stats/0 OnAfterBattleUniversal. This works fine in most of the case, yet it break when we have BA:D1. The OnAfterBattleUniversal does not trigger and variables are not initialised correctly. Should all the variable resets moved to OnBeforeBattleUniversal instead?


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

Posts: 16471
Post: #2089

Right, they are not paired. It's a bit strange, but really if you cancel battle, it does not start and it does not finish, everything is right.

Yep, it's really not obvious, but having AfterBattle without battle will produce script bugs too. Anyway, we will have to check if battle was cancelled or not in every script Bad


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

Posts: 4338
Post: #2090

!?FU(OnPreTownScreen);
2 бага:

1) срабатывает только если типы городов при смене отличаются.
Если нет, то триггер пропускается
ключевая проверка на типы сменяющихся городов, как я понял, находится здесь 0x5C6E17
достаточно сменить EAX на -1 (а лучше на -2, так как дальше есть проверка на -1 перед вызовом на 0x5C6E1F), и триггер сработает;

2) не срабатывает при переключении городов на стрелочки на клавиатуре


Image: widget.png?style=banner2

Новейший Heroes 3 Launcher
23.10.2022 03:02
Visit this user's website Find all posts by this user Quote this message in a reply
XEPOMAHT Offline
Moderators

Posts: 2271
Post: #2091

Ещё один то-ли баг, то ли фича эровских кнопок: в экране героя они срабатывают только на тип клика 13. Остальные типы кликов полностью игнорируются, что в общем-то печально... Т.е. код непосредственно на нажатие эровской кнопки применить увы нельзя. Зачем так ограничен функционал эровских кнопок по сравнению с оригинальными содовскими - совершенно не понятно. 112
25.10.2022 05:01
Find all posts by this user Quote this message in a reply
daemon_n Offline
Administrators

Posts: 4338
Post: #2092

XEPOMAHT, пкм (14) тоже работать должен


Image: widget.png?style=banner2

Новейший Heroes 3 Launcher
25.10.2022 06:14
Visit this user's website Find all posts by this user Quote this message in a reply
XEPOMAHT Offline
Moderators

Posts: 2271
Post: #2093

(25.10.2022 06:14)daemon_n Wrote:  пкм (14) тоже работать должен

На ПКМ там стандартная эровская реакция - вывод текста из *.btm, потому данный тип клика не нужен (там всё равно нет возможности отмены вывода текста, а может быть в дебрях кода эры оно где-то и есть...). Ну фиг с этим - использую тип клика 13 вместо 12 - немного некорректно, ну с этим сейчас ничего не сделать кроме как ставить свою кнопку с НУЖНЫМИ флагами, а эра похоже ставит немного не те какие нужно флаги, закрывая доступ моддеру к установке кастомного флага - то же самое, что и в случае с индексом кнопки, что очень не удобно (например тип 12 будет нужен, если в экране героя игроку что-то нужно будет перетаскивать из эровской кнопки, тащить с заменой курсора можно из содовского элемента диалога, а вот из эровского - уже фиг, возможно это намёк на то, чтобы моддеры ставили свои кнопки сами...).
25.10.2022 06:39
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16471
Post: #2094

XEPOMAHT, Эра ничего не ставит. Ставил плагин buttons.dll от МОРа, для которого я лишь написал обвязку. Его исходники открыты. Могу найти и загрузить.


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

Posts: 2271
Post: #2095

(25.10.2022 06:51)Berserker Wrote:  Ставил плагин buttons.dll от МОРа, для которого я лишь написал обвязку. Его исходники открыты. Могу найти и загрузить.

Загрузи если не сложно. Т.к. хуки buttons.dll не показывает в логе патчера, возможно я мог записать свои хуки поверх хуков из buttons.dll из-за чего часть функционала buttons.dll и не работает (например в экране города buttons.dll ничего не выводит по ПКМ, приходится делать это Тифоном).
25.10.2022 07:34
Find all posts by this user Quote this message in a reply
daemon_n Offline
Administrators

Posts: 4338
Post: #2096

XEPOMAHT, плагин же buttons.era


Image: widget.png?style=banner2

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

Posts: 16471
Post: #2097



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

Posts: 2271
Post: #2098

(25.10.2022 09:08)Berserker Wrote:  Хватай Sm
https://dropmefiles.com/itocW

Спасибо. Буду использовать в ERA+.
25.10.2022 16:06
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16471
Post: #2099

Это исходник buttons.era, пожалуйста.


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

Posts: 1104
Post: #2100

A WoG bug:

When a commander with Block ability active (Defense + Speed) attacks a stack processed with Fire Shield, there is a chance to trigger Block with the Fire Shield damage. Once Trigger, the Block animation would be played on both the commander and the stack with Fire Shield.

It seems to be a visual bug only. The correct way would be to play the animation only for the commander. Although it is also questionable whether Fire Shield could be considered as Physical damage that can be blocked by the commander.

Btw, I recreated Block ability with erm. I think this script has the perfect behaviour imo. It seems to me that the timing for triggering commander's Block is like at MF1, while I coded my scirpt with OnStackToStackDamage.


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 29.10.2022 06:29 by Archer30.)
29.10.2022 06:23
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