Mind helping me dissect the map.json files?

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
175
Reaction score
52
First Language
English
Primarily Uses
RMMV
So what i am doing is trying to create a custom editor in game for making maps with the possibility of making a mod support system. however the main issue is the Map.json files, how are they structured?

Here is what i have been able to figure out on my own;
ovs7yzv7.png
through messing around with values in the file i have been able to find that the "data" array is directly attached to tiles, however i have no idea how this is structured as changing values in different locations have yielded odd or no results.

can you help me figure out what any of it means?
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,360
Reaction score
3,119
First Language
Portuguese
Primarily Uses
RMMV
Suppose the map has a total of 20 tiles, the data array would be organized like this:

0...19 = lower A tiles
20...39 = upper A tiles
40...59 = lower B tiles
60...79 = upper B tiles
80...99 = shadow information
100...119 = regions


Lower A layer = ground, walls and stuff
Upper A layer = grass and other A tiles that support transparency
Lower B layer = first B tile added
Upper B layer = second B tile added.

The tileIds follow a weird order, but I can explain it as well if you need.
 

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
175
Reaction score
52
First Language
English
Primarily Uses
RMMV
Suppose the map has a total of 20 tiles, the data array would be organized like this:

0...19 = lower A tiles
20...39 = upper A tiles
40...59 = lower B tiles
60...79 = upper B tiles
80...99 = shadow information
100...119 = regions


Lower A layer = ground, walls and stuff
Upper A layer = grass and other A tiles that support transparency
Lower B layer = first B tile added
Upper B layer = second B tile added.

The tileIds follow a weird order, but I can explain it as well if you need.
Wait so if the tileset used in the map has more than just A and B filled with stuff in the database would it continue after B?

And I would appreciate you telling me how the tile ids work! the rest of it seems straight forward, however for what i have in mind i would have to be able to set tileIDs
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,360
Reaction score
3,119
First Language
Portuguese
Primarily Uses
RMMV
There's no database info on the map file.

Here's a map of the tileIds:

0...255 = Tileset B
256...511 = Tileset C
512...767 = Tileset D
768...1023 = Tileset E


1536...2047 = Tileset A5
2048...2815 = Tileset A1
2816...4351 = Tileset A2
4352...5887 = Tileset A3
5888...8191 = Tileset A4

The A5,B,C,D and E tilesets are quite simple, although they are not aligned from left to right/top to bottom (each file has a specific order)
Autotiles are on increments of 48, as each one has 46 possible variations IIRC.
So the first tile on Tileset A1 is 2048, the second is 2096 and so on.

From the A1 tileset, the tile 2048 and every tile above 2240 will always be added to the first layer and never the second.
The tiles 2096, 2144 and 2192 are added to the second layer but they automatically add the 2048 tile to the first layer.

The left half of tileset A2 will always go on the lower layer, while the right half will go on the second layer.

A3, A4 and A5 tiles are all added to the first layer.


Edit: I understood your question now. When I said B tiles I meant all B,C,D and E as they are interchangeable.
 
Last edited:

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
175
Reaction score
52
First Language
English
Primarily Uses
RMMV
There's no database info on the map file.

Here's a map of the tileIds:

0...255 = Tileset B
256...511 = Tileset C
512...767 = Tileset D
768...1023 = Tileset E


1536...2047 = Tileset A5
2048...2815 = Tileset A1
2816...4351 = Tileset A2
4352...5887 = Tileset A3
5888...8191 = Tileset A4

The A5,B,C,D and E tilesets are quite simple, although they are not aligned from left to right/top to bottom (each file has a specific order)
Autotiles are on increments of 48, as each one has 46 possible variations IIRC.
So the first tile on Tileset A1 is 2048, the second is 2096 and so on.

From the A1 tileset, the tile 2048 and every tile above 2240 will always be added to the first layer and never the second.
The tiles 2096, 2144 and 2192 are added to the second layer but they automatically add the 2048 tile to the first layer.

The left half of tileset A2 will always go on the lower layer, while the right half will go on the second layer.

A3, A4 and A5 tiles are all added to the first layer.


Edit: I understood your question now. When I said B tiles I meant all B,C,D and E as they are interchangeable.
Thanks! That is pretty much exactly what i needed

(edit) by chance do you know how to load a map by file?
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,360
Reaction score
3,119
First Language
Portuguese
Primarily Uses
RMMV
Probably something with the StorageManager. I haven't used the base MV code in a while so I don't remember if it had a method to load files.
 

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
175
Reaction score
52
First Language
English
Primarily Uses
RMMV
Probably something with the StorageManager. I haven't used the base MV code in a while so I don't remember if it had a method to load files.
I think i will pursue that in another thread, however i appreciate your help with me understanding how the file is structured and i have actually been able to figure out how to make maps just through script with your help. this should be very useful when it comes to my goal of making a mod system.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

just spent FOREVER troubleshooting an issue with my keyboard... turns out the cord was just loose OTL
I count on someone one time, I let them promise something to me, and one week later it's complete silence as I'm completely let down. I hate everything.
Everytime I need to write dialogues I find myself writing new music pieces... what kind of trick is this?!
Me Being Dumb spending hrs trying to figure out Irenas Visual Novel busts plugin..lol. I'm probably missing something stupid and obvious xDD

let the journey begin >w>
X.X ok... I guess I'll just have to think about 48x48 a little differently. Its not "room for more work"..."its room for more detail!...yay"

Forum statistics

Threads
99,218
Messages
963,167
Members
130,807
Latest member
NotADev
Top