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

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

Posts: 4338
Post: #8791

fatsawhorse, можно же.

!!HE-1:Z?(heroStruct:y);
а там - смотреть по смещению, чтобы получить нужное заклинание и его силу


Image: widget.png?style=banner2

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

Posts: 1012
Post: #8792

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

Quote:!!HE-1:Z?(heroStruct:y);
а там - смотреть по смещению, чтобы получить нужное заклинание и его силу
- боюсь это для меня сложно! Я плохо работаю с поиском структуры и т. д. Самому мне подобного не составить.. В бою легко определить заклинания и для этого там множество ресиверов, а потом командой А0 его запретить! В открытом мире даже если мне помогут его через структуру определить, то всё равно я не смогу его запретить через BG:A0, так как это только для боя..

В идеале я вижу пока только один вариант самый подходящий (предложил wessonsm), к сожалению только для человека, но не для ИИ через тригер MG0 удалить а в MG1 снова дать магию и арты..

А кто знает как можно повлиять или даже лучше нейтрализовать во время боя действие таких артов как "Дух уныния" и "Песочные часы недоброго часа", а после поединка снова вернуть эти качества, присущие им, чтобы не удалять сами эти арты и после боя снова их не возвращать, если это можно вообще сделать простым скриптом?
(This post was last modified: 02.04.2022 11:20 by fatsawhorse.)
02.04.2022 11:19
Find all posts by this user Quote this message in a reply
fatsawhorse Offline

Posts: 1012
Post: #8793

Bes спасибо Вам также за примеры сравнения высокоскоростных циклов со старыми !!DO. Понятно пока всё, когда объясняют, но когда начинаю сам делать, то сразу становится всё не ясно. Каждый пример рассматривается в отдельности и вопросы всегда возникнут по ходу действия..

Как лучше сделать: если я хочу запретить использовать хождение по воде и полёт, то лучше мне артефакты 90 и 72 каким тригером снимать под землёй с героя (этих тригеров много. Могу всеми 12-ю снимать и лучше каким-то конкретным? Удалять или складывать в рюкзак всё-таки? Если удалять, то переменные не смогут столько запоминать и хранить результат, чтобы потом вернуть их на поверхности, так как героев много на карте (+ загрузки ко всему и т .д.), если складывать в рюкзак, но он же тоже заполняется!)..

!?MG0 и соответственно MG1 сработало на шляпу оратора только и на саму магию, а на крылья ангела и на сапоги левитации не действует, так как книга там не открывается! Есть предложение просто постоянно снимать при любом действии героя и складывать в рюкзак всегда, как вариант! Правильно ли это или нет?
(This post was last modified: 04.04.2022 14:30 by fatsawhorse.)
04.04.2022 14:22
Find all posts by this user Quote this message in a reply
wessonsm Offline

Posts: 779
Post: #8794

fatsawhorse, можно, только как это будет выглядеть в игре.
Одеваешь артефакт, смотришь героя - он снят.
А если я другой артефакт на этот слот надену? Куда потом старый одевать?
Как по мне, не очень хорошая идея. Лучше было бы отменять действие артефакта, не снимая, но здесь малой кровью не обойтись - кажется UN:C единственный выход, хотя могу и ошибаться.
04.04.2022 16:41
Find all posts by this user Quote this message in a reply
fatsawhorse Offline

Posts: 1012
Post: #8795

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

Quote:можно, только как это будет выглядеть в игре.
Одеваешь артефакт, смотришь героя - он снят.
А если я другой артефакт на этот слот надену? Куда потом старый одевать?
Как по мне, плохая идея.
- да, Вы правы, здесь я сам в недоумении, но с моими знаниями, если их можно так назвать, по иному не реализовать..

Quote:Лучше было бы отменять действие артефакта, не снимая, но здесь малой кровью не обойтись - кажется UN:C единственный выход, хотя могу и ошибаться.
- просто само действие не хотелось бы отменять через UN:С. Чтобы потом снова вернуть действия по UN:С даже порой приходилось не просто переигрывать сценарий на тестах, но и выходить вообще с игры и только тогда это снова вставало на место после использования блоков памяти и поэтому не сильно люблю я эти С - блоки памяти!

Я единственное только мог бы в 12 тригеров поставить функцию, которая бы сразу снимала с героя артефакт, если бы он его одел под землёй, а если у героя будет рюкзак занят, то артефакт снятый улетит в небытие! Для меня это вариант пока что только один (с моими знаниями по скриптописанию) но согласен с Вами, выглядеть будет просто дико!
04.04.2022 17:12
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1116
Post: #8796

Does it look like some MO receivers only work in particular situations? For several tests I had, MO:A had the following problem, while MO:G works fine, both on the same coordinate with the same stack.
I tried some traditional hacks - UN:O and UN:I, and it worked. Just takes too long to loop...I also have to use UN:P904/1 to skip weird erm errors at the end of replacements

Everything looks so wrong 112


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 07.04.2022 19:07 by Archer30.)
07.04.2022 19:06
Find all posts by this user Quote this message in a reply
wessonsm Offline

Posts: 779
Post: #8797

Archer30, I don't know how to avoid ERM errors in this case, but I do know how to speed up the loop with UN:O and UN:I.
You need to use UN:O with 5 parameters and UN:I with 9 parameters, where the last parameter 0 means no redraw:
Redraw is on by default and slows down the script a lot in this case.
After the cycle ends, you can redraw the screen once.
07.04.2022 19:32
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1116
Post: #8798

wessonsm, thanks! In fact I plan to do the replacement at PI to boost the replacement (and it doesn't require to put this many parameters to skip redrawing?). The script is for showing how ridiculous MO currently is. Replacement should not be required for monster arts...

I may also try PO (setting art number) and !$OB54 to set up the monster artifact


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 07.04.2022 19:51 by Archer30.)
07.04.2022 19:47
Find all posts by this user Quote this message in a reply
wessonsm Offline

Posts: 779
Post: #8799

Apparently the receiver hasn't changed since wog 3.58.

Perhaps with !!OB:C it would be possible to change the monster's settings without resorting to UN:O, UN:I or !!PO.

But it seems to be more difficult than just removing the monster and reinstalling it.
Please note that monsters with MO:A B M settings have a limited number range of 0..255, exceeding this number may cause errors, or some monsters will have the same settings.
07.04.2022 20:02
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1116
Post: #8800

wessonsm, if I know how to deal with OB:C...102

____


I tried with igrik's "new style of replacing". It worked really well, the replacement on !?PI is fast and reliable. However, just recently I found that replacing a monster stack at !?PI is not possible. I tried all kinds of formats for the UN:O/UN:I commands, none of them works. The crashes at attempting to execute UN:I.

Is there any particular reason why monster stacks are different?

Edit: The best result of all for now is the format of wessonsm's recommendation
However, there is still "Map drawing error" showing at the start of the game, nothing more than that though. False alarm from HD?


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

Posts: 779
Post: #8801

Archer30, I also get a "map drawing error" error when trying to replace monsters in !?PI, but only the first time I start the game.
If after that you exit to the main menu and start a new game, there is no error.

I don't know the reason yet.

For some reasons that I will add later (it takes time), I believe that using !!PO will be a better solution than giving artifacts to monsters using !!MO:A.

Quote:False alarm from HD?
Without HD, the game crashes at this moment.
09.04.2022 11:36
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1116
Post: #8802

wessonsm, I'v rewritten the monster drops artifacts scripts with PO:V0, anyone interested can find it here
https://github.com/daemon1995/era_gaming...efacts.erm

I can't reproduce the crash without HD. Just in case, I have moved the timing of monster replacement to OnEveryDay, which is used in the Hi-level monster script
https://github.com/daemon1995/era_gaming...nsters.erm


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

Posts: 779
Post: #8803

Archer30, good job!
According to OB:C control words, there is a very useful article by Mihanik, I translated it with Google translator:
https://dropmefiles.com/kLs66
We are interested in type 54 (monster):

What follows from here?
The control word contains all of the monster settings available via !!MO, except for !!MO:A B M.
Instead, we have a unique monster id (bits 19-26) that has a value in the range 0-255.
From this it is clear that the MO:ABM settings are stored in a separate memory area, and the specified id is required to access them.

On random maps, monsters do not have additional settings, so ABM commands do not work for them.

If you put a monster on the map with the UN:I command, a new free number is allocated to it. I don't know the exact mechanism for this, and simply setting bits 19-26 and 31 with OB:C doesn't seem to work as I first thought.

If you put too many monsters, after 255 the numbers will start to repeat.
It doesn't seem to mean anything if we don't change the monster settings with MO:A B M commands, and we can put as many monsters as we want in this way.
But if you change the settings, then there are all sorts of collisions.

What else can be useful?
For example, you can choose not to disable error messages,
and instead check the 31st bit in the control word:
09.04.2022 17:56
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1116
Post: #8804

wessonsm, awesome guide! Thank you so much for sending the translated document! Your finding of OB:C is also pretty useful.

Clearly OB:C is much better than playing with UN:P904/905. I would update my script with the "new" method.


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 10.04.2022 15:59 by Archer30.)
10.04.2022 10:30
Find all posts by this user Quote this message in a reply
wessonsm Offline

Posts: 779
Post: #8805

Archer30, don’t mention it.
It's not my finding, this guide is included in the Russian ERM-Help.
10.04.2022 11: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-2024 MyBB Group