Current time: 14.04.2024, 13:38 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
ERA II
» WoG Era 2: Русская и Английская версии
Author Message
Valery Offline

Posts: 2196
Post: #2056

I had a single constant crash, when using "advanced map infos" mod, clicking on the left corner of a warrior tomb (this didn't occur in 2.46, tried). I changed the code to exit if no yellow square and now is going ok.
24.04.2015 16:03
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16471
Post: #2057

Could you show ERM code?


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

Posts: 2196
Post: #2058

24.04.2015 22:56
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16471
Post: #2059

Strange indeed. I'm checking WoG code, nothing changed there, should be no crashes, but I remember crashes related to object position in Phoenix. I had to set v2/v3/v4 to click coordinates, then substract 1 from v2, than search UN:U to find object of needed type and subtype from specified coordinates. And then I used v2/v3/v4 as canonical coordinates, not original click coordinates.

Make s stable crash savegame for me please. Just for future.


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

Posts: 2196
Post: #2060

Some objects have multiple square size, so if you code to respond on click-position, then click not on entrance, I get the erm dump thing.

But I think this is normal, even in 3.56 sorcery script, Fnord adds +1 or -1 to position if player clicks left/right (warrior tomb work that way). But this is not always possible; for example, prisons have one red/one yellow square then 2 empty squares, so is impossible to know where the player clicks. So I think must code exit if no yellow square.
24.04.2015 23:56
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16471
Post: #2061

Right, I see no perfect solution either. Of course, we can write low level function to find first yellow square, but may be not safe either.


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

Posts: 7107
Post: #2062

Berserker, не искушай меня, демон...
...
*проходит три часа усиленного реверсинга и скриптописания*
...
Координаты в v2/v3/v4 обновляются на правильные.

#erm #snippet #map #objects #coordinates #yellow


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
25.04.2015 03:23
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16471
Post: #2063

gamecreator, ага, вызвал-таки тебя Ab
Здорово! А что не так с кодом ZVS, он один и тот же для OB и WT при получении объекта? Меня это больше смущает.


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

Posts: 7107
Post: #2064

Я даже не смотрел туда. OB не центрируется на клетку входа автоматически. Сейчас проверил, WT тоже.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
25.04.2015 04:16
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16471
Post: #2065

Да, там одна и та же функция взятия адреса объекта из массива клеток карты. Почему вылетает — хз.


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

Posts: 7107
Post: #2066

Да потому что там мусорное значение в контрольном слове, из него и берётся номер артефакта. Вот игра и вылетает при попытке показать в сообщении несуществующий артефакт.
Или ты меня теперь спросишь почему там мусорное значение? Потому что настоящее значение там не нужно, да ещё и синхронизировать его каждый раз пришлось бы. Вместо этого Герои просто используют функцию 40AF10 для получения клетки с реальным контрольным словом.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
25.04.2015 11:11
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16471
Post: #2067

Понял, очень доступно, спасибо. Эта функция для любых объектов подходит ведь? Может вынести в команду?


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

Posts: 7107
Post: #2068

Должна. Можешь выносить (в OB:Y если не жалко: Y?$1/?$2/?$3 - получить координаты входа).


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
26.04.2015 01:45
Find all posts by this user Quote this message in a reply
Algor Away
Administrators

Posts: 3880
Post: #2069

Если мне не изменяет, есть объекты с двумя "входами". Как в этом случае?
Да, не изменяет: Оазис (2), Магический источник (2), Водоем (4!).


BattleHeroes Rus/Eng | ERA scripts (+ReMagic) Rus/Eng
26.04.2015 11:51
Visit this user's website Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #2070

Не знаю. Какой-нибудь да вернёт. Проверить можно так: посети один из входов в игре и наведи/ПКМ на клетку без входа. Если скажет то же, что и наведение/ПКМ на посещённой клетке - значит вернёт этот вход.
(да, все эти входы считаются отдельными объектами с т.з. посещения: магический источник или водоём можно посещать несколько раз, я давно уже это заметил)


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
26.04.2015 12:53
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