RPG Maker MV

RPG Maker MV

MAKAIROSI Sep 11, 2018 @ 1:28pm
Change a map's ID ?
Is it possible? Because my map IDs are kinda messed up (like, one is 5, its next one is 13, etc.) due to copying/pasting when i wanted to change their order.

That was... before i found out that i could just drag and drop them. Which was right now.
Last edited by MAKAIROSI; Sep 11, 2018 @ 1:41pm
< >
Showing 1-11 of 11 comments
Why does it matter?
JohnDoeNews Sep 11, 2018 @ 1:57pm 
The only wau to chane it, is to make copys with higher id's, then delete the lower ID's and then copy them again. However, if you do that, you will have to redo all your doors and transfer commands
JohnDoeNews Sep 11, 2018 @ 1:58pm 
Oh drag and drop works, but won't change the ID. (so also won't change the doors/transfers)
MAKAIROSI Sep 11, 2018 @ 1:58pm 
It will help me with plugin commands that require the map's ID. For example if i want to change stuff in an entire branch of maps, it would be extremely useful to know for certain what the next map's ID is gonna be by just looking at the previous one's. For example i'm changing something on map ID 1, then i know the next map is 2, so i don't have to look for its ID every single time.
MAKAIROSI Sep 11, 2018 @ 2:04pm 
Originally posted by BigFatX:
The only wau to chane it, is to make copys with higher id's, then delete the lower ID's and then copy them again. However, if you do that, you will have to redo all your doors and transfer commands

Yeah i'm fine with changing the transfers. The plugin commands will be the actual pain. But i thought the sooner i do it the better. I'm making a sandbox game, so the most coding i've done is the mechanics, that don't require transfers. Then i thought i'd divide the maps to the intro and the actual game, and try to polish the intro and make it interesting, because the game starts real slow until you get the hang of it.

And, btw, i just bought the engine like a month ago? So i'm still learning it. I'm really happy with it though :)

Btw, i also looked for commands that change the map IDs (to put on an autorun) and didn't find any, but then i thought that would be silly, since they would completely bug out.
Last edited by MAKAIROSI; Sep 11, 2018 @ 2:07pm
Originally posted by MAKAIROSI:
It will help me with plugin commands that require the map's ID. For example if i want to change stuff in an entire branch of maps, it would be extremely useful to know for certain what the next map's ID is gonna be by just looking at the previous one's. For example i'm changing something on map ID 1, then i know the next map is 2, so i don't have to look for its ID every single time.
I must have had a brain fart. I completely forgot I argued for similar things regarding map ID before.

Map ID change is only possible in the editor as laid out above or by editing the map files directly, NOT in the game code.
MAKAIROSI Sep 12, 2018 @ 3:49am 
Originally posted by kittylitterproduction:
Originally posted by MAKAIROSI:
It will help me with plugin commands that require the map's ID. For example if i want to change stuff in an entire branch of maps, it would be extremely useful to know for certain what the next map's ID is gonna be by just looking at the previous one's. For example i'm changing something on map ID 1, then i know the next map is 2, so i don't have to look for its ID every single time.
I must have had a brain fart. I completely forgot I argued for similar things regarding map ID before.

Map ID change is only possible in the editor as laid out above or by editing the map files directly, NOT in the game code.

Haha it's fine. I guess i'll do it by copy-pasting, but how exactly is "editing the map files directly" possible ?
Originally posted by MAKAIROSI:
Originally posted by kittylitterproduction:
I must have had a brain fart. I completely forgot I argued for similar things regarding map ID before.

Map ID change is only possible in the editor as laid out above or by editing the map files directly, NOT in the game code.

Haha it's fine. I guess i'll do it by copy-pasting, but how exactly is "editing the map files directly" possible ?
The filenames for the maps have a simple mapXXX.json format. You can just change the filenames around to match your desired order.
Furthermore the mapinfos.json file contains the assignation of map ids to map files as well as their order and hierarchy.
MAKAIROSI Sep 21, 2018 @ 4:20pm 
Originally posted by kittylitterproduction:
Originally posted by MAKAIROSI:

Haha it's fine. I guess i'll do it by copy-pasting, but how exactly is "editing the map files directly" possible ?
The filenames for the maps have a simple mapXXX.json format. You can just change the filenames around to match your desired order.
Furthermore the mapinfos.json file contains the assignation of map ids to map files as well as their order and hierarchy.

Ok, so i opened the files in Atom and i think i got the gist of it. But just in case i'm wrong, let me ask here as well. Can i change the map's ID without changing the map's name? Will this new ID appear in the rpgmaker editor? If i set a value in the thousands, is that going to crash my game?

My game needs to store the map's ID in multiple occasions, having a different ID per combination. The combinations are literally 96 (more depending on whether i expand it or not), and i managed to get them DOWN to that number. So i thought the following:

ID=1. For choice 1, multiply 100. For sub-choice 1, add 10. For sub-sub-choice 1, add 1. So choice 1-1-1 will return the Map ID 1-1-1.

This way i may have a map ID, let's say, 843 (choices 8-4-3), with just a few lines of code, and just assign the map number to the actual map. If the actual map's ID is now 67 (for example), do i just go to map067.json and change its name to map843.json ?

Or do i open the mapinfos in Atom and find the map's ID 67 and change THAT to 843?

What's the fastest way to do it?
Frankly, I'd advise you to just make a little test project with five or six maps and then try out how the program reacts to various changes.
MAKAIROSI Oct 4, 2018 @ 4:48pm 
Originally posted by kittylitterproduction:
Frankly, I'd advise you to just make a little test project with five or six maps and then try out how the program reacts to various changes.

I did. I say it in another thread with other questions of mine xD


Before i say what i found out WARNING: DON'T CHANGE FILES UNLESS YOU KNOW WHAT YOU'RE DOING or it is a test and you don't care ruining it. like i did.

So what i found out is that the mapinfos.json stores new maps with their new id but only 1 number higher than the highest id already present. However deleting an already created map results in storing a "null," in the file. So if you have 3 maps and delete the second then you will have ids for 1 and 3 and "null," in place of the 2nd id. This way you can re-use the deleted id.

This means that to get the map id you want, you have to manually add as many "null," as the map ids you don't need. So if you have 3 maps and you want to skip to id 5, then you have to create a new map (id 4), go to the file, add a "null," between 3 and 4, then change 4's id to 5. Et voila, your map's id is now 5.

Now when we're talking about such small numbers it's faster to just copy-paste-delete. But what i wanted was to change my ids to 800+ (due to an algorithm i had in mind). That was impossible without messing with the files.

So i found a quick way to do it (well, the quickest was to think of a new algorithm). You can add "null," on the same line as well. So basically to skip 10s of map ids you can add "null, null, null,..., null, null" (let's say their number is 10), then copy that line and paste it 10 times and now you can make your next map (like explained above) with its ID being 100.

HOWEVER this gets real messy real fast. Since creating a new map will afterwards replace one of the "null," you created, you will be almost unable to read the file (you, the dev) and change anything manually. It might also result to unknown errors.

But that's what i found out anyway. Thanks though!
< >
Showing 1-11 of 11 comments
Per page: 1530 50

Date Posted: Sep 11, 2018 @ 1:28pm
Posts: 11