Current time: 30.04.2024, 06:33 Hello There, Guest! (LoginRegister)
Language: english | russian  

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

Posts: 1126
Post: #8416

igrik, thanks! I lost one parameter in my script and got confused Dash1 now it sorts out

I used i^colmagi_%(hero)_%v998_%v999_%v1000^ to store the visiting status of my script. It's better to be replaced with OB:C value I think. Fewer variable, more reliable


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

Posts: 2814
Post: #8417

(08.09.2021 15:17)Berserker Wrote:  igrik, did you try to set sound volume to 0 during replacement process instead?
Берс, я и по русски неплохо понимаю Ab
Нет, не пытался даже (чёто не подумал об этом). Хотя у меня игра почти всегда в режиме без звука, так что я думаю установка громкости в 0 не сработает.


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

Posts: 2275
Post: #8418

(08.09.2021 17:04)igrik Wrote:  Хотя у меня игра почти всегда в режиме без звука, так что я думаю установка громкости в 0 не сработает.

На 100% не сработает, проверялось ещё 5 лет назад в ERA+, вообще не знаю, отчего Берсеркер не добавил фикс бага в саму era.dll, чтобы скриптёрам не думать о применении "!!UN:C4893167/2/24555;" в ERM вообще никогда. 148
(This post was last modified: 08.09.2021 17:35 by XEPOMAHT.)
08.09.2021 17:34
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16500
Post: #8419

XEPOMAHT, в чём баг-то?


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

Posts: 1126
Post: #8420

Is it possible to make a pyramid re-visitable? Rolleyes

Trying to change how the AI hehave with pyramid type objects


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

Posts: 16500
Post: #8421

Checked OB:C?


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

Posts: 1126
Post: #8422

Yes, at first it was confusing, but now I get the idea.

Just by randomly checked a few pyramids, before and after visiting

Table of pyramid data (incompleted)
OB:C value before, After, Spell given, Spell ID for Green player
Quote:-2047969, -2040354, Fly, 6
-1802209, -1794594, Magic Mirror, 36
-1548257, -1540642, Earth Elem., 67
-1540065, -1532450, Water Elem., 68
-1531873, -1524258, Air Elem., 69
From these data it's easy to conclude the OB:C value for Pyramid,
1. Difference between before and after visiting: 7615
2. Difference between two spell IDs: 8192

Think I'm able to make a function for changing Pyramid spell and visitng status now Spiteful

If I want to push a pyramid or other wog object to be visited by AI, I only need to change the OB:C value to one of the unvisited value on AI's turn, and change it back to the orignal value on human's. That sounds a bit inefficient though...


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

Posts: 16500
Post: #8423

Try with another player color.

11111111111000001100000000011111
11111111111000001101110111011110

11111111111010001000000000011111
11111111111010001001110111011110

0b100100 = 68, water elen

Seems like the first bit is Can Be Visited 011101110 is some other info.

11101110 seems to be Can Be Visited flags, 1 bit per each player


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

Posts: 2275
Post: #8424

(08.09.2021 19:40)Berserker Wrote:  в чём баг-то?

Озвучку объектов карты нельзя менять при удалении объектов с карты, когда сама озвучка ещё не инициализирована. Т.е. перед инструкцией карты должна включаться заглушка Игрика, а перед показом карты - выключаться.

(08.09.2021 21:22)Archer30 Wrote:  From these data it's easy to conclude the OB:C value for Pyramid,
1. Difference between before and after visiting: 7615
2. Difference between two spell IDs: 8192

Think I'm able to make a function for changing Pyramid spell and visitng status now Spiteful

If I want to push a pyramid or other wog object to be visited by AI, I only need to change the OB:C value to one of the unvisited value on AI's turn, and change it back to the orignal value on human's. That sounds a bit inefficient though...

Лет 10 назад как всё было разобрано, докуметировано и даже используется в MoP и ERA+:

Quote:ТИП 63. ПИРАМИДА
БИТ 0: ЕСТЬ ЛИ СТРАЖИ — PM:V.
БИТЫ 1-4 ИГНОРИРУЮТСЯ И ОБЫЧНО ЗАПОЛНЕНЫ.
БИТЫ 5-12: КАКИМИ ИГРОКАМИ ПОСЕЩЕНО (ПОБИТНО, ФОРМАТ E) — PM:P.
БИТЫ 13-20: НОМЕР ЗАКЛИНАНИЯ (0..255) — PM:S.
БИТЫ 21-31 ИГНОРИРУЮТСЯ И ОБЫЧНО ЗАПОЛНЕНЫ.

Не стоит изобретать велосипед.
08.09.2021 21:59
Find all posts by this user Quote this message in a reply
Archer30 Online
Moderators

Posts: 1126
Post: #8425

interesting. Totally forgot about players.

So my table was for green player.
When I try with orange, the value before visiting is the same, while after is different

Orange
Quote:-2047969, -2047426, Fly, 6

Edit:
Quote:Лет 10 назад как всё было разобрано...
Nice! 132 I completely forgot about PM receiver. I will read more about those


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

Posts: 1013
Post: #8426

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

Вы правы, это моя неточность! Я потом только понял, когда выключил компьютер и отправил уже письмо на форум..

Прошу прощения, это моя ошибка. Я не точно провёл проверку и из-за этого всё не работало! Я по разбирался дома и сумел правильно всё реализовать..

Спасибо Вам Berserker за поправку..
(This post was last modified: 09.09.2021 19:24 by fatsawhorse.)
09.09.2021 19:00
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16500
Post: #8427

fatsawhorse, на здоровье!


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

Posts: 1126
Post: #8428

Somehow I remember that SN:W variables are auto initialised at the start of the game. Is it true?


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

Posts: 16500
Post: #8429

At the start of the game, all associative memory is cleared, thus no SN:W variables exists. Non-existing variables act as if they have 0 or ^^ value.


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

Posts: 1126
Post: #8430

Can it possibly be wrong? Unsure

I write a new script "Warehouse of Mithril", it looks like i^waremith_lang^ starts with 95452

Download the testing mod


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 14.09.2021 00:32 by Archer30.)
13.09.2021 23:52
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