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

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

Posts: 2196
Post: #4126

Have a question please, in ERM it says if/en are limited to 10 levels, means in same trigger I can use only 10 if/en structures? Just to be sure.
21.07.2016 13:02
Find all posts by this user Quote this message in a reply
igrik Offline

Posts: 2819
Post: #4127

No. It means attachments.


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

Posts: 2196
Post: #4128

Ok thanks.
21.07.2016 13:29
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #4129

Does anyone know how to store the absolute data of a square? Because if we add an object on that square then remove the object, the square will not return to initial state (ie it displayed first "dirt", now it displays nothing)

I would need to store initial data then restore it after manipulations, so there is nothing corrupted on that square. I assume the square is empty, no yellow trigger on.
27.07.2016 17:18
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #4130

There is no simple way. Only manually save every data structure related to that square. What kind of manipulation do you want to do?


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

Posts: 2196
Post: #4131

For example, if you place an object near water then remove it later, trying to land on that spot will crash the game. I had a lot of annoying problems in one of my map where the player can manually place teleporters and remove them later. So I suspect this problem to create corrupted squares later, which corrupts DO loops and so on.

Wondering is there is a way to get ALL infos about one square so we can restore later, regardless how we modded the square in between.
27.07.2016 23:39
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #4132

There is an object "Anchor Point" (type 3). It is automatically placed by the game near water, but apparently not when you remove objects via ERM. UN:O is really quite buggy, it doesn't even reset type/subtype.
As for getting all info. Let's say you do it, but then that tile may change in a way that you would want to keep (for example, some other objects getting into it from adjacent tiles). Then your saved state is useless, since it would revert all "good" changes.
I can write you some code that would simply save and restore raw tile data, but most likely it would make the game unstable or just crash it outright. Also saved data may remain valid just until game restart. Or until next game load.


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

Posts: 2196
Post: #4133

Ok thanks, if it makes the game unstable then better keep only as minor issue. I was hoping there is a way to get a square value before changing it then restore later, like flags for monsters or such.
28.07.2016 03:05
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #4134

If you say what exactly you want to accomplish, there is likely a better way to do it.


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

Posts: 2196
Post: #4135

For instance, I get a few reports about TEW4 map where people overuse a lot the feature place/remove teleporter and then month 3-4 a lot of loops give errors, creature banks (they show 0 monsters inside), monsters (they start to have artifact names), so this look as game data corruption. However my script restores the type and subtype of the square and even the UN:C (control word) value, so there may be missing another core detail.

Or when playing that map with another faction, where the manipulation of squares is not possible, such errors do not occur. Still, is an indirect guess of the suspected error, I am not sure, as players can do millions of other individual manipulations I didn't expect.
(This post was last modified: 28.07.2016 03:46 by Valery.)
28.07.2016 03:44
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #4136

Sounds like some object lists are overflowing. I don't know, is there a limit to the number of teleporters on a map? UN:I doesn't check limits (like how it's possible to place over 48 towns using ERM) and WoG code tends to not work properly with lists. What objects do you place with ERM? Also if you manually change type/subtype of a tile, then from and to what?
Restoring control word, you can do this no later than next !?GM1, otherwise it may cause problems for objects with limits.


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

Posts: 2196
Post: #4137

The player can place teleporters, but only 1/per month (2 on second month and so on), so is not the number of teleporters which overflows. However he can place/remove that teleporter as much as he wants so he can do that 1000 times a turn, changing 1000 squares if he wants.

When he places a teleporter I store that square OB:C in PO998:B0/$, check if other object or yellow square then place if check negative. When I remove teleporter I restore OB:C and set type/subtype to -1/-1. Personally I never had any error in all my tests, but I got twice reports and saves of corrupted loops when using this feature, as early as month 3.
(This post was last modified: 28.07.2016 12:45 by Valery.)
28.07.2016 12:43
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #4138

May I see the save? Do I need anything additional to play it?
Also you don't need to restore control word if you are clearing type/subtype anyway.


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

Posts: 2196
Post: #4139

SAVE, click end turn and watch the error cascade on day 1 of the week. Then all creature banks are corrupted.

You need only TEW 4 mod because of graphics. Ignore erm messages when loading save, is probably because he uses interface mods you don't have.

Thanks.
(This post was last modified: 28.07.2016 13:17 by Valery.)
28.07.2016 13:14
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #4140

(28.07.2016 12:43)Valery Wrote:  When he places a teleporter I store that square OB:C in PO998:B0/$
I noticed you also store some value for creature banks there. Is it possible that they corrupt each other?


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