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

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

Posts: 1098
Post: #8806

I tried to play with Berserker's Grand Manoeuvre script with a new implementation, and I encounter a problem.

Overall the script works, but my Grand Elves get extra turns for some reason. For example, when I have 7 stacks of Grand Elves, they act one by one from 1 to 4, and then after the end of the 4# stacks, it becomes the 1# stack's turn again.

Fie Checked several times and got completely confused. I will get some rest and try again, maybe.
Is changing stack turn OnBattleStackObtainsTurn too hacky?
Also, my attempt at ignoring the morale effect OnBattleActionEnd seems to be invalid. It triggers after Morale. Any better timing after calculating the distance of moving and before morale calculation?

________


Edit: Problem was solved after I replaced my 77006 with FU(OnBeforeBattleStackTurn), now it works flawlessly - almost! There is still a problem I can't seem to solve. I am looking for a timing "After knowing whether my Grand Elves stack moved by 1 hex, but before morale calculation", in short, I need to prevent the first 1 hex move to trigger morale. Is there a better way to do it than checking the position of the mouse click?

Note: I tried setting morale to 0 at OnBattleActionEnd, it is later than the morale check and thus was invalid.


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

Posts: 16449
Post: #8807

What's about OnBeforeBattleAction + set NO MORALE flag for moving without attack and restoring the flag after walking in OnAfterBattleAction?


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

Posts: 1098
Post: #8808

Berserker, It is doable, although setting the No Morale flag at OnBeforeBattleAction requires the info of whether the stack will move only 1 hex with this action - Is it true that this can only be done by checking mouse events? Somehow I feel it is not very safe, like having to check multiple conditions


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

Posts: 16449
Post: #8809

Right. We need to call distance calculation function with BG:D and BM:P first.


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

Posts: 1098
Post: #8810

I have two questions related to setting up stack exp abilities on the battlefield.

First question: What's the best approach to add a SE ability on the battlefield?
This code does work, it gives Bersker ability to all the creatures on the battlefield. The slot for the new ability is obtained by EA:F which I belive is safe enough. However, I found a problem with my code just now.
With each battle replay, I get one extra Bersker ability on stacks. I udnerstand this is because on battle replay the stack info is stored and used in the next battle. To resolve this, I can set a flag for battle replay and prevent excute my EA like this:
This works well. Although I wonder if there is any better approach to add an EA ability to a stack.

Second Question: Is there a way to prevent EA receiver from resetting BM values?
Just check my code above. I tried to add 200 defense to all the stack with BM:D. It failed unfortunately, becoz any EA received on a stack reset the stack's stats to its origianl (value from MA). If I put my BM:D after the execution of EA, the 200 defense would be correctly added. This makes me worried about mod compatiblity. It looks like we need to regulate the timing of using EA, otherwise it is fairy easy to break BM set by another author. Although I also don't get the point EA has to reset stats, is this really necessary for it to work? For my example, my EA only adds a new ability, it does not make sense that it also has to do with creature stats, right? 102


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

Posts: 16449
Post: #8811

1) Seems like someone like igrik should implement EA resets. I do it in mixed neutrals mod:


2) No way. WoG remembers original parameters and calculates new value as original + EA bonus.


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

Posts: 1098
Post: #8812

I see, thanks. I think the purposes of our codes are different, for adding a single SE ability, my attempt is ok.

Well, at least it is possible for ERA to store parameters before !!EA and restore after the execution of EA when the modification is just a new SE ability or remove one (which does not affect parameters at all), right?
If this can't be resolved, I believe "all the scriptwriters should unite". We have to restrict the use of EA for stacks, for example, use !!EA only on !?BF and !BM only after !?BF.


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

Posts: 16449
Post: #8813

Seems right if igrik has not other solution for replays.


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

Posts: 1009
Post: #8814

Здравствуйте..

1. Сейчас на данный момент в эре 3.0.5 не работает клавиша «S» на клавиатуре, но тут чудо случилось – нашёл я такой код в справочнике ERM, который эту самую клавишу снова оживляет, но этот код работает не совсем так как мне хотелось бы (ниже кода указал пожелания в его работе):
Для меня этот скрипт сложный в любом понимании! Сам не справлюсь.
Ребята, очень нужна помощь этот код откорректировать таким образом, чтобы при нажатии клавиши «S» на клавиатуре выходило в открывшимся окне сохранений пустое поля для моего сохранения как в любых версиях выше или ниже версии 3.0.5, а то всегда при нажатии «S» на клавиатуре и при пропуске хода появляется вместо пустого поля надпись цитата «1-красный – здесь ещё что-то написано.GM1». Я уже устал это всегда вытирать и писать то что мне нужно. (это очень сильно захламляет папку «GAMES» ненужными сохранениями, которые сами вырождаются и из-за этого не вижу своих собственных).

Основная цель обращения на форум: как можно вместо этой злаполучной надписи реализовать то, что было ранее в героях, а именно пустое поле без любых надписей и символов, чтобы я вписывал любое своё сохранение и ничего не стирал. У меня соображения не хватит как этот код можно модернизировать для этого?

Заранее благодарю за помощь..

P.S. этот бы скрипт сильно мне облегчил бы пользование этой версией эры (версия 3.0.5).

2. Не основная цель, но хотелось бы разобраться: подскажите пожалуйста ещё, а можно ли как-то переименовывать сами заклинания без использования я переменных?
Я не нашёл! Bad

Могу первый вопрос выложить сюда в стол заказов за оплату http://wforum.heroes35.net/showthread.ph...&page=800, если будут желающие мне реализовать сохранение через "S" как было ранее во всех версиях или в некоторых поздних пока не погубили! Кстати, в версии 3.3.5 работает всё отлично через "S", но ту версию 3.3.5 я не могу использовать, так как не смог найти её полноценную! Пока версия 3.0.5 у меня Bad
(This post was last modified: 28.04.2022 19:28 by fatsawhorse.)
28.04.2022 16:42
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16449
Post: #8815

Опцию быстрых сохранений отключить не пробовали?


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

Posts: 1009
Post: #8816

Berserker здравствуйте..

Quote:Опцию быстрых сохранений отключить не пробовали?
. Перед тем как писать я все настройки проверил с ног до головы и не нашёл как отключить её Bad По моему эта функция встроенная и отключению не поддаётся. К сожалению нужно ломать скриптом Bad
(This post was last modified: 28.04.2022 20:24 by fatsawhorse.)
28.04.2022 20:23
Find all posts by this user Quote this message in a reply
daemon_n Offline
Administrators

Posts: 4333
Post: #8817

fatsawhorse, удали из 1-го вопроса всё междометия, вводные слова условные наклонения, эпитеты, метафоры и личные ощущения, тогда я пойму запрос и постараюсь ответить

2 - SN:H^spell^/(spellId)/0/^текст^; об этом есть информация в справке


Image: widget.png?style=banner2

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

Posts: 1098
Post: #8818

Hi! I am looking for a solution to check the damage of BM:K (of any timing it is used) and change it.

The ultimate purpose of my script is to create a raid boss with immunity to these BM:K damage from scripts by other authors. can't just let it die too easily 148 For this I need to set all BM:K to become 1 to make the boss tough as it should.


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 01.05.2022 10:08 by Archer30.)
01.05.2022 05:46
Find all posts by this user Quote this message in a reply
fatsawhorse Offline

Posts: 1009
Post: #8819

Здравствуйте daemon_n

Quote:2 - SN:H^spell^/(spellId)/0/^текст^; об этом есть информация в справке
- Bad у меня в справке на эру 3.0.5 этого не оказалось

Спасибо Вам за ответ на 2-й вопрос!

Если поможете мне с решением на 1-й вопрос, то переведу деньги на любой указанный Вами счёт.

Кратко скажу, что в ЭРЕ 3.0.5 не работает клавиша на клавиатуре "S" и это дело не в настройках!

Есть код ,что включает клавишу
Но там (в эре 3.0.5) простите за выражение, "какой-то бред" вместо пустого поля всегда. Надо реализовать вместо этих надписей пустое поля для собственноручного заполнения..
Может как-то это
переделать!

Если поможете то переведу деньги в течение часа..

P.S. было бы всё дело в настройках, то не обращался бы от отчаяния (не помогли не wog-настройки и не те, что рядом с миникартой)
(This post was last modified: 01.05.2022 12:40 by fatsawhorse.)
01.05.2022 12:36
Find all posts by this user Quote this message in a reply
wessonsm Offline

Posts: 779
Post: #8820

(01.05.2022 12:36)fatsawhorse Wrote:  Но там (в эре 3.0.5) простите за выражение, "какой-то бред" вместо пустого поля всегда. Надо реализовать вместо этих надписей пустое поля для собственноручного заполнения..

Насколько мне известно, сама Эра ничего не меняет в этом поле.
Скорее всего, это делает сторонний скрипт (или плагин).
Нужно просто найти его и удалить, возможно, он не привязан ни к какой опции, а включен по-умолчанию в сборке.
01.05.2022 15:33
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