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

Post Reply 
Threaded Mode | Linear Mode
Ваши вопросы по ERM-скриптам
Author Message
daemon_n Offline
Administrators

Posts: 4343
Post: #9121

AnT, триггер не существует, но хук поставить хитровыверенный можно)


Image: widget.png?style=banner2

Новейший Heroes Launcher
01.09.2023 12:28
Visit this user's website Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1175
Post: #9122

Is this legit? I executed an erm trigger (FU(OnBattleMouseHint))!


Basically what this script does is that I created a custom mouse cursor behaviour. When I hover my cursor over my Unicorn stack on its turn, the cursor would be changed to a spell book.
I also wanted when any of Ctrl/Shift/Alt is pressed, disable my script and restore the cursor to default.
My script above worked. But I don't know if it's okay to execute FU(OnBattleMouseHint) directly. Should I create a function under that trigger instead?

Btw, Berserker, x3 of FU(OnKeyPressed_Battle) doesn't seem to work, but i^key_down^ does.


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

Posts: 16657
Post: #9123

Probably, not a big deal if it works the right way.


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

Posts: 1175
Post: #9124

Cool!

Is there a syntax to check whether an input argument is a string or an integer?
Like:


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

Posts: 4343
Post: #9125

Archer30, i only can say that any string is more than 100000000 (or near at) iirc if don't express it with z(xVar:x);


Image: widget.png?style=banner2

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

Posts: 16657
Post: #9126

Archer30, not possible. String is converted to temporary ERT string and its index is passed. Thus argument is always a number.


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

Posts: 1175
Post: #9127

Is it possible to check if the current !?MR0/MR1 process is theoretical or real?


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

Posts: 16657
Post: #9128

I don't recall such possibility.


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

Posts: 1175
Post: #9129

It seems I need a hook for "real" MR0/MR1 for changing spell damage.


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

Posts: 16657
Post: #9130

I think, that trigger must behave the same way both for theoretical and real application.


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

Posts: 1175
Post: #9131

In most situation yes, but not for my case.

I created an artifact to block 50% of spell damage once per round. With MR0/MR1 my counter was increased even for theoretical process and thus the artifact could not work.


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

Posts: 16657
Post: #9132

Archer30, we would need both MR and your new hook in this case so, that both AI calculations and real damage would be the same.


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

Posts: 1175
Post: #9133

Berserker, the best solution would be hooking before the real MR and after real MR process to confirm a MR is really happening. But that requires two hooks, which I worry about the efficiency and I was lazy :D Maybe I would optimise later.


Latest ERA mods and scripts in development - My GitHub
20.09.2023 10:19
Find all posts by this user Quote this message in a reply
Georgv Offline

Posts: 30
Post: #9134

Всем привет ! Может кто подскажет - возможно ли сделать уменьшение морали или удачи вражеских войск от надетого на героя артефакта ? Сделал артефакты на минус мораль и удачу - пока придумал только у вражеского героя уменьшать, но хотелось бы по-человечески, чтобы и у нейтралов изменялась, и чтобы правильный текст выводился при клике на удачу/мораль монстра в бою, что минус от артефактов ?
(This post was last modified: 05.10.2023 01:23 by Georgv.)
05.10.2023 01:22
Find all posts by this user Quote this message in a reply
Raistlin Away
Moderators

Posts: 1349
Post: #9135

Georgv, правильный текст, насколько я помню, с помощью скрипта не сделать. Но уменьшение реализуется довольно просто - перебирай циклом (!!re) все отряды противника в триггере !?BF или каком-то аналогичном, срабатывающем в начале боя (главное - не !?ВА), и снижай мораль/удачу у них. Для этого подойдет команда ВМ:G.


Создал новый глобальный мод: WoG Ultra Edition
05.10.2023 08:18
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