Current time: 22.11.2024, 07:46 Hello There, Guest! (LoginRegister)
Language: english | russian  

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

Posts: 1022
Post: #8401

Я хотел сделать так, что если в слоте 9 не артефакт 128, то со слота 9 тот артефакт в рюкзак упадёт, а вместо него встанет 128, но что-то проверка не идёт или я что-то не понимаю!

Quote:y3<>128 проверка на НЕ меч армаггеддона.
- да, я и хотел проверить на не меч армагеддона, что если там не меч, то то что бы там не было удалилось и в рюкзак, а меч остался бы на месте!

В слоте должен быть меч армагеддона 128
07.09.2021 19:18
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #8402

/y3<>128/y3<>-1/y3<>145
Если в слоте не меч армаггеддона, не пусто и не замок от сборного артефакта, то


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

Posts: 1022
Post: #8403

Quote:/y3<>128/y3<>-1/y3<>145
- не сработало. Только что испытал!!!! Как я и думал, что это не сработает!!! Разницы нет в моей записи &y1>0/y2>0/y3<>128 и в этой /y3<>128/y3<>-1/y3<>145!

/y3<>145 - я подозреваю что это условие почему то не выполняется?

Он просто-напросто не удалил тот артефакт что будет слоте 9 вместо меча армагеддона, хотя должен удалить!!!

P.S. два дня уже сижу с этим кодом и не могу понять почему же он так и не срабатывает Bad

Может эта проверка не так работает?
(This post was last modified: 07.09.2021 20:11 by fatsawhorse.)
07.09.2021 19:25
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1175
Post: #8404

Hi! What's the most efficient way of marking an obejct as visited for a hero?

I'm implementing Colosseum of the Magi (+2Pwr/Knl depending on choice) as a replacement for Arena. I suppose I have to do with global var like this?


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

Posts: 5422
Post: #8405

как по мне, это лучший вариант для ERAYes
07.09.2021 22:33
Visit this user's website Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1175
Post: #8406

Thanks, I believe so.

Script is done.

colosseum of the magi.erm

colosseum of the magi.json

Download both files


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

Posts: 4343
Post: #8407

Archer30, have you checked in Multiplayer? i mean try call replacement when instruction phase or after, but before GameEnter


Image: widget.png?style=banner2

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

Posts: 16657
Post: #8408

fatsawhorse, это все идею, что есть. Учитесь проверять гипотезы:


Archer30, brilliant code!


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

Posts: 1175
Post: #8409

daemon_n, checked with local mp via lan, it does work. Is there a better timing for object replacement?

Berserker, I'm so used to the convenience of ERA 3. Thank you all the effort you put on making script writters' lives easier 96-copy


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

Posts: 16657
Post: #8410

Archer30, !?FU(OnAfterErmInstructions) occurs before showing the map. Replacement here is really fast.


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

Posts: 4343
Post: #8411

Archer30, if replace ongameEnter, 2nd player get correct objects only after 1st player's turn end


Image: widget.png?style=banner2

Новейший Heroes Launcher
08.09.2021 02:33
Visit this user's website Find all posts by this user Quote this message in a reply
igrik Offline
Administrators

Posts: 2819
Post: #8412

(08.09.2021 00:03)Archer30 Wrote:  checked with local mp via lan, it does work. Is there a better timing for object replacement?
Archer30, why don't you use the replacement code from "WoG Scripts 2"?
In addition, this code works perfectly in multiplayer.

1) Main replacement function (Click to View)
2) Replacement example (Click to View)


game bug fixes extended.dll || My Plugins || My GitHub
08.09.2021 10:14
Visit this user's website Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1175
Post: #8413

igrik, the key difference is the use of OnAfterErmInstruction and patching 4893167, right? Works well, awesome! 132
But I'm not sure why is no redraw for UN:I, for me if not redrawn, the new object would not appear, even if !!UN:R1;

Berserker, daemon_n, great. Didn't know OnAfterErmInstruction is better. I made that but the game crashed. Now is fixed by igrik's patch.


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

Posts: 2819
Post: #8414

(08.09.2021 12:29)Archer30 Wrote:  But I'm not sure why is no redraw for UN:I, for me if not redrawn, the new object would not appear, even if !!UN:R1;
And why do we need to redraw at the map initialization stage, when the map has not yet been displayed?


game bug fixes extended.dll || My Plugins || My GitHub
08.09.2021 13:15
Visit this user's website Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #8415

igrik, did you try to set sound volume to 0 during replacement process instead?


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
08.09.2021 15:17
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