Skip to content

Data transfer from one map to another between any maps

#7
Auto-translated
I saw you mentioned on YouTube, "It would be great if data from the map file (map.xdb), such as the position of objects at the end of the game, could be saved and loaded."
In theory, any information that can be accessed through scripts and outputted using "print" can be remembered, and then set again using scripts. But as I understand it, "SetGameVar" can also do this, right?
And what exactly is meant by the position of objects? Where the hero was standing? In theory, you can find out its coordinates through locations and teleport it using "SetObjectPosition." Or does this not work for heroes? And for other objects, like resources, you can probably also find out if they have been picked up, right? I think I saw "GetObjectsInRegion" in the manual. Of course, it turns out to be a complicated process, but is it theoretically possible?

By the way, do "SetGameVar" and "WarpToMap" also work in campaigns, or only in standard missions?
So, it seems I wasted my time creating my own DLL, since there was already a way to do this.

Regarding setting stats, is "delta-default" the only solution? I thought there should be a more "normal" way. It seems like the developers didn't finish the scripting API, or rather, they broke it for some reason, because I read that in older versions, "ChangeStat" used to set values normally, instead of adding to them. It's strange that after changing this function, the developers didn't add something like "SetStat."