Hi, I’m playing with an experimental map generation and I’m having some trouble figuring out how to change the player position. I started writting this post VERY confused but trying to explain it helped and I think I figured out! Still I would like to confirm it.
I’ve been able to make sense of the coordinate system for the file on the maps
folder: each subfolder (segment?) contains 32x32 files each one with 2x2 submaps of 12x12 tiles. So each file corresponds to an overmap tile.
But for the player position we need to take regions (180x180 overmap tiles) into account and it gets weird. Looking at {saveId}.sav
file I see:
-
"om_x"
/"om_y"
: these seemed to be the overmap region. I.e.: if on the overmap it saysLEVEL L, A'X, B'Y
then{ "om_x": A, "om_y: B }
. But it’s offset by 60 tiles or 2,5 overmap tiles. -
"levx"
/"levy"
: these seemed to be the submap index in the given region. Again, offset by 60 tiles / 2,5 overmap tiles.
Making the conversion of the 60 tiles to 2,5 overmap tiles I realized that this is exactly the size of the reality bubble. So if I understand correctly, the position saved on the {saveId}.sav
file is not the player position but the TOP-LEFT corner of the reality bubble, right?
EDIT: I found another weird thing. In {saveId}.sav
the "player": { "posx": X, "posy": Y }
values are always between 60 and 71. I think that’s because is the relative position from the top-left tile of the submap specified in "levx"
, `“levy”… right? O_o
Thanks!