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

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

Posts: 2196
Post: #4006

Ah ok, changing objects size will require objects list. Going to try that now.
10.05.2016 20:22
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #4007

It doesn't any longer crash but it doesn't delete all the blue bubbles. I have no clue why some remain on map, I see no obvious reason, like some on special terrains etc. Is random.
Here is the mod:

Safe SoD

It has also Jedi Story map in its maps folder, a map with 200 events on which I tested all the thing. Maybe when you have one minute to test it and see? Just check options "see map" and "see events" ON. Thanks for help.
(This post was last modified: 10.05.2016 20:42 by Valery.)
10.05.2016 20:38
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #4008

(10.05.2016 20:38)Valery Wrote:  It doesn't any longer crash but it doesn't delete all the blue bubbles. I have no clue why some remain on map, I see no obvious reason, like some on special terrains etc. Is random.
I found the reason. The most recently added object is not necessarily the first in the queue. So it may remove parts of other objects instead.
There are two ways to fix this that I can think of (in case someone is willing to do it):
1. Somehow make it to always be the first when placed.
2. Write a version of DelFirstObjectPic (from common.cpp) that would find and remove the object with maximum LType.
Maybe there is another solution. I'll do the second option later if there will be no fix by that time.
Also I don't know why it works with UN:D or if it has the same bug. I tried changing the object in the mod to the log (208/1) and it didn't help that much.


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

Posts: 2196
Post: #4009

Bersy wrote this script to find object ID when hero sitting on that object. Can't it be used as base to get a list of compiled objects on a square?


Also I noted that bubbles not being deleted can sometimes be on nothing -just plain terrain, so obviously there are only two objects there, the event (26) then the event graphic (63/27). I guess there isn't a way to delete the 63/27 part, right?
(This post was last modified: 10.05.2016 23:47 by Valery.)
10.05.2016 23:45
Find all posts by this user Quote this message in a reply
M.A.K.C. Offline

Posts: 472
Post: #4010

Можно ли на Эра написать следующий скрипт (как я его понимаю)
сначала на карте появляется объект (например 101/6) неиспользуемый сундук сокровищ (критерии отбора объекта такие, чтобы при его преобразовании на клетке с этим объектом не мог никто стоять, чтобы не было вылета). объект назовем портал.
Затем, этот объект, через 2дня преобразуется в случайный отряд монстров с ограничениями..
пример
можно так сделать?

И ещё вопрос. Можно ли вновь созданный объект, прописав его в текстовиках сделать жилищем? Скрипт, или где об этом почитать.
Заранее благодарен. (к сожалению, никак не получается написать скрипт самому, поэтому обращаюсь к знатокам).



Все свежие обновления я выкладываю на своем сайте здесь.
11.05.2016 02:12
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #4011

M.A.K.C., можно. И для этого даже не нужно ничего прописывать. Просто поставь на карту жилище. которое выглядит как твой объект.

(10.05.2016 23:45)Valery Wrote:  Bersy wrote this script to find object ID when hero sitting on that object. Can't it be used as base to get a list of compiled objects on a square?
It is completely unrelated.

(10.05.2016 23:45)Valery Wrote:  Also I noted that bubbles not being deleted can sometimes be on nothing -just plain terrain, so obviously there are only two objects there, the event (26) then the event graphic (63/27). I guess there isn't a way to delete the 63/27 part, right?
It is not on nothing, there is another object being displayed in that place. Look at bounding boxes in the editor.
The problem is not with objects. Your object in fact doesn't exist (search for object 63/27, you'll find none). What exists is its sprite. Each time the game needs to display something, it makes a record somewhere and inserts the number of that record into a list of what to display on the tile. It doesn't matter if there is one, ten or thirty object graphics occupying that tile, all will be displayed.


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

Posts: 2196
Post: #4012

ok, I get it, thanks for looking inside the problem. So for the moment there is nothing I can do more on this thing, but if one day you come with a solution, let me know, I think such feature will be nice.
11.05.2016 14:01
Find all posts by this user Quote this message in a reply
igrik Offline
Administrators

Posts: 2814
Post: #4013

gamecreator, расскажи в картце в чем проблема. А то с моим знанием английского языка я не уловил суть вопроса.
Я так понял, что локальное событие не удаляется после посещения?


game bug fixes extended.dll || My Plugins || My GitHub
11.05.2016 16:08
Visit this user's website Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #4014

Нет, посмотри в исходники Вога на функцию DelFirstObjectPic. В каждой клетке существует список отображаемых спрайтов. Когда Valery ставит свой объект, то он прописывается в случайное место в этом списке. Но функция DelFirstObjectPic всегда удаляет первый объект. Надо сделать чтобы он удалялся оттуда, так или иначе. После установки объекта поверх события сам объект фактически не существует, потому достаточно чтобы он не отображался.


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

Posts: 2814
Post: #4015

Quote:Надо сделать чтобы он удалялся оттуда, так или иначе
Посмотрел, но нормального решения предложить не могу, только костыль: пускай вызывает функцию DelFirstObjectPic 2-3 раза подряд.


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

Posts: 7107
Post: #4016

Это удалит и остальные спрайты в клетке. К тому же, там вполне может быть список из 20 элементов с искомым в центре.


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

Posts: 2814
Post: #4017

а как вообще выловить этот список? Чет я не совсем врубаюсь где он лежит. Допустим набросок, а что дальше


game bug fixes extended.dll || My Plugins || My GitHub
12.05.2016 00:20
Visit this user's website Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #4018

Список это массив. У тебя есть указатель на начало и конец.


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

Posts: 2814
Post: #4019

Я понимаю. Вопрос заключался в том, возможно ли этот массив прочитать и вытащить от туда нужный параметр на erm? И в каком формате там хранятся данные. Т.е. если это список (массив) отображаемых спрайтов, то лежат ли там указатели на *.def или *.pcx?


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

Posts: 7107
Post: #4020

struct ODraw{ Word LType; Word Code; };
Я не знаю что значат эти поля, но очевидно LType это номер в какой-то таблице. Чем больше номер, тем позже был добавлен объект.


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