Mind helping me dissect the map.json files?

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
180
Reaction score
54
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,577
Reaction score
3,783
First Language
Java's Crypt
Primarily Uses
RMMZ
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
180
Reaction score
54
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,577
Reaction score
3,783
First Language
Java's Crypt
Primarily Uses
RMMZ
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
180
Reaction score
54
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,577
Reaction score
3,783
First Language
Java's Crypt
Primarily Uses
RMMZ
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
180
Reaction score
54
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

I feel like banging my head against a wall every time I want to find that post that shows all the plugin header codes. Then I think "next time I find it, I'm going to bookmark it". Then I think "wait a minute ... maybe I bookmarked it last time because it took me so long to find it". Check bookmarks, and there it is :)
... a few of my main characters standing around doing nothing lol. I mostly wanted to see them together on screen.
Today I drove through my city of 100,000+ people during rush hour and the streets were nearly empty. Just so I could go get my favorite burger. There a dental assistant (she said that's her other job, even though I didn't ask) took my order and handed me a burger. I know it's bad out there... But wow, she's either atrocious with her money, or "it really be like that".

Forum statistics

Threads
107,815
Messages
1,032,411
Members
139,965
Latest member
specscart
Top