Current time: 23.03.2024, 14:29 Hello There, Guest! (LoginRegister)
Language: english | russian  

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

Posts: 1098
Post: #7921

Berserker, I don't get the idea. Is there any advantage of saving to ini instead of w51-w100? Ah, maybe it's better, since sometimes the player is too exciting and close the game after victory.

But still, timing issue. When would you suggest for saving data to in?

________

Thanks Berserker for discussing on Discord.
Here I need some more help with the script.
My plan is to save data of heroes from all heroes that are controlled by the current player and write down the player colour with them.

The reason for saving with player colour is:
Some campaigns are inconsistent. Data is required to save cross over more than 1 zone. For example, in Zone 1 you start with Inferno, Zone 2 with Dungeon, and in Zone 3 you got to choose either Inferno or Dungeon from Zone 1/2. The Player's colour helps you distinguish them as it's possible for you to have the same hero from both Zone 1/2.

I decide to pop up a msg asking whether loading data from ini for every single map, a check of player colour would be handy -> If the heroes owned by the current player as no data stored in ini, then such question would be completely skipped.
But still, I need to figure out the timing for clearing all the variables from ini. I will make it manually asking for each time starting a map (same with asking whether loading henchman data).

OK here comes the question: is there a good way to remove all data from ini? Do I have to loop through all colours/heroes and write data to reset?


________

Edit: I get new idea about the implementation. I will probably just create a menu when hotkey, in this menu, the player gets to choose from Saving henchman data/Loading henchman data and delete henchman data. After selecting any option, it leads to slot 1/slot 2/slot 3 for further operation. Looks like this is more reliable.


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 25.03.2021 21:27 by Archer30.)
24.03.2021 18:33
Find all posts by this user Quote this message in a reply
daemon_n Offline
Administrators

Posts: 4333
Post: #7922

Как передать в функцию текстовую переменную, чтобы затем её значение извлечь и использовать повторно?


Image: widget.png?style=banner2

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

Posts: 1285
Post: #7923

daemon_n, а что простое
!#VRz#:S^Hi^;
!?FU(One);
!!IF:M^%Z#^;
не подходит?


Карта-мод "Война на Холсте"
28.03.2021 14:16
Find all posts by this user Quote this message in a reply
daemon_n Offline
Administrators

Posts: 4333
Post: #7924

SergOz, нет, мне нужна переменная, передающая значение в функцию типа такого:



Image: widget.png?style=banner2

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

Posts: 5422
Post: #7925

daemon_n, передавай адрес такой текстовой переменной в ф-цию в виде числа, а уже в самой ф-ции читай по тому адресу содержимое текста
28.03.2021 15:23
Visit this user's website Find all posts by this user Quote this message in a reply
daemon_n Offline
Administrators

Posts: 4333
Post: #7926

Bes, посмотрел SN:X в справке, но так ничего и не вышло:


Последнее возвращает огромную пустоту


Image: widget.png?style=banner2

Новейший Heroes 3 Launcher
28.03.2021 15:47
Visit this user's website Find all posts by this user Quote this message in a reply
Raistlin Away
Moderators

Posts: 1348
Post: #7927

daemon_n, defNameAdress - это число.


Создал новый глобальный мод: WoG Ultra Edition
28.03.2021 16:22
Find all posts by this user Quote this message in a reply
Bes Offline

Posts: 5422
Post: #7928

28.03.2021 16:25
Visit this user's website Find all posts by this user Quote this message in a reply
daemon_n Offline
Administrators

Posts: 4333
Post: #7929

Bes, Raistlin, ребята, спасибо, получилось (как ни странно) 96-copy


Image: widget.png?style=banner2

Новейший Heroes 3 Launcher
28.03.2021 16:40
Visit this user's website Find all posts by this user Quote this message in a reply
Bes Offline

Posts: 5422
Post: #7930

в каком варианте получилось? покажи, для других будет тоже ответом на аналогичные вопросы
28.03.2021 16:43
Visit this user's website Find all posts by this user Quote this message in a reply
daemon_n Offline
Administrators

Posts: 4333
Post: #7931

Bes,


Image: widget.png?style=banner2

Новейший Heroes 3 Launcher
28.03.2021 16:57
Visit this user's website Find all posts by this user Quote this message in a reply
Raistlin Away
Moderators

Posts: 1348
Post: #7932

daemon_n, пожалуйста 148 Кстати, я ведь совершенно не посмотрел, что ты делаешь, и ответил не по теме... Прости 148


Создал новый глобальный мод: WoG Ultra Edition
28.03.2021 17:02
Find all posts by this user Quote this message in a reply
Bes Offline

Posts: 5422
Post: #7933

daemon_n, ты немного запутался (или я дезинформирую)
VRs^name^ - это текcтовая глобальная переменная (name). Для неё ДА, нельзя забывать s в коде подставлять

Но есть и возможность оперировать со строкой "на лету", без присваивания ей имени.
В таком случае в ERA просто используем ^name^ непосредственно в теле команды.
Потому мой вариант выше и был корректным, я намеренно так сделал, не привязывая к конкретной глобальной именованной переменной.

daemon_n, и самое главное, не забывай корректно использовать SN:X, когда манипулируешь с x-параметрами внутри триггера
Т.е. ты должен был бы сделать так, чтобы избежать странных вылетов

Я про это в справке в описании SN:X написал
(This post was last modified: 28.03.2021 17:08 by Bes.)
28.03.2021 17:04
Visit this user's website Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16449
Post: #7934

Нет, товарищи, так дело не пойдёт.
Bes, daemon_n, http://wforum.heroes35.net/showthread.ph...#pid123251


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

Posts: 4333
Post: #7935

Berserker, оп-па!!! А я что-то подобное видел, но думал, что передача текста напрямую возможна лишь в оригинальных ф-цияхYes
Супер132


Image: widget.png?style=banner2

Новейший Heroes 3 Launcher
28.03.2021 18:21
Visit this user's website 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