Yeah
How to change map automatically, without transfering player
RPG Maker MZ SupportNo
(that's the lazy answer, in response to your lazy question)
If you want a better answer, write a better question. I can think of at least 4 completely different things that "change the map" might mean, and they are all done in different ways.
(that's the lazy answer, in response to your lazy question)
If you want a better answer, write a better question. I can think of at least 4 completely different things that "change the map" might mean, and they are all done in different ways.
I have put the question in the title, there is nothing I need to explain further. I wrote "Yes" because the site asked me to write a message. You don't need to be so rude, and I don't need a person like you in help (that's the rude answer, in response to your rude response)
you can't
So yes, you do need to explain further.
Do you mean going to a different map altogether?
Do you mean changing the tileset so the map transitions between seasons?
Do you mean changing to a different version of the same map (established buildings vs ruins)?
Do you mean making small changes to the map here and there, as if you are developing an area as your game progresses?
If you can't take the time to explain what you mean, I'll just close the thread.
Your posts are neither intelligently-written nor polite. Whether you realized it or not, your short question in the title heading was ambiguous, and having that pointed out to you is not being rude.
You might be accustomed to something like Reddit, but in actual Web forums, it is almost universal that you're expected to actually write in your post about what you need - I've never been someplace where writing a title and saying "title" or "yeah" would get a helpful response.
Also, I've never been someplace where using your second post to call a moderator (who is asking the correct, clarifying questions) rude was a smart idea.
As Shaz said, depending on what you actually want to accomplish, the answer ranges from "with this script call" to "you need this plugin" to "you can't do it, but you can fake it by doing this."
Why would you not want to use transfer to change maps?
Truly, it's a pain to constantly designate transfer coordinates. Especially when most maps will have a logical entry point. Where would I like to transfer? Gee, I dunno. Maybe by THE DOOR?!
When you're playtesting it doesn't really matter and (0,0) is sufficient. But it's kind of annoying when it's the world map and that's the middle of the ocean, and you have to ctrl+walk through everything to get to wherever. You can make a special map transfer common event. But of course, you're still developing the game. So you'll constantly have to update it as you go.
So how do we make RPG Maker more intuitive?
But! At least least they gave us metadata.
It's the "note" box you see in places around the database. Still called "memo" in the help file.
You can use it for more than just "notes to yourself", pfft.
You can insert metadata in these boxes which can be referenced in-game. However, there's a catch. To reference Map metadata you have to have the map loaded. We'd like to designate the obvious transfer coordinate in the note box, but it's a catch22 because we can't read it until we've loaded it by transferring somewhere on the map. Which defeats the purpose, right?
*wearing Morpheus shades*
What if I told you... you can transfer nowhere on a map? Just use nil coordinate values. If you did nothing else, the map data will load, and you might see a parallax. But the tilemap won't load because there's nowhere for the player to be.
Having nil coordinates is a handy condition trigger for a common event to snap the player into place according the the map's own metadata.
I name mine <warpX: value > and <warpY: value > but you can call it whatever you want.
That's the trick to metadata, using <keyname: value>.
So referencing the metadata in a script line would look something like this
Alright. There's a number of ways to apply this. So let's just say we're replacing the [Transfer Player...] event command with a common event. This common event will use the event interpreter code for [Transfer Player...] but we'll make it smarter by replacing the parameters.
So first
What am I looking at, I hear you asking. That's basically the [Transfer Player...] event command with no parameters. Normally when you look at it in the editor, the first option to pick is either a direct destination or one with variables, So the first parameter is 0 or 1, and we want to leave it 0.
Then you need the mapid, x, y, direction, and fade.
We want this to be automatic, right? So for Mapid, instead of a static value, let's use
$gameMap.regionId($gamePlayer.x,$gamePlayer.y).
Meaning, whatever regionid the player is standing on will correspond to the mapid they're transfering to. So if you're exiting stage left to map 2, then the edge of the map will be lined with Region 2 tiles.
For the X and Y parameters you can leave them blank. That'll transfer the player nowhere on the map, and you can let another parallel process autocorrect the player position based on the new maps metadata. OR, it might be designated in the old maps's metadata. The point is less data entry, right? Practically speaking, maps are subject to change during development. If you were to change an entrance point then changing the metadata on the map you're already on is a little easier. Not to mention way easier than changing numerous transfer events the old fashion way, which requires switching maps.
The remaining parameters for direction and fade are also negligible and can be left blank. Otherwise their values would start at 0 and count up corresponding the editor's selection.
0-retain 1-down 2-left 3-right 4-up | 0 - fade black 1- fade white 2- fade none.
So yeah. Your replacement [Transfer Player...] command might look like a common event with this simple script call
The last thing to do is create a Parallel Process to call the common event when the player steps on a transfer tile. Might as well make it a common event. Let's assume you're not using RegionId 0 for anything.
This Parallel Process will use a conditional branch script line:
So when the player step on a region tile that isn't 0, it'll call your other transfer player common event. And transfer them automatically. And save you god knows how many actions per click.
When you're playtesting it doesn't really matter and (0,0) is sufficient. But it's kind of annoying when it's the world map and that's the middle of the ocean, and you have to ctrl+walk through everything to get to wherever. You can make a special map transfer common event. But of course, you're still developing the game. So you'll constantly have to update it as you go.
So how do we make RPG Maker more intuitive?
AHAHAHAHA. no.
But! At least least they gave us metadata.
Oh you know. That thing that goes back to VX Ace. That has little to no documentation because the QA testers expect you to do their job for them...
It's the "note" box you see in places around the database. Still called "memo" in the help file.
You can use it for more than just "notes to yourself", pfft.
You can insert metadata in these boxes which can be referenced in-game. However, there's a catch. To reference Map metadata you have to have the map loaded. We'd like to designate the obvious transfer coordinate in the note box, but it's a catch22 because we can't read it until we've loaded it by transferring somewhere on the map. Which defeats the purpose, right?
*wearing Morpheus shades*
What if I told you... you can transfer nowhere on a map? Just use nil coordinate values. If you did nothing else, the map data will load, and you might see a parallax. But the tilemap won't load because there's nowhere for the player to be.
Having nil coordinates is a handy condition trigger for a common event to snap the player into place according the the map's own metadata.
I name mine <warpX: value > and <warpY: value > but you can call it whatever you want.
That's the trick to metadata, using <keyname: value>.
So referencing the metadata in a script line would look something like this
var = $dataMap.meta.warpXAlright. There's a number of ways to apply this. So let's just say we're replacing the [Transfer Player...] event command with a common event. This common event will use the event interpreter code for [Transfer Player...] but we'll make it smarter by replacing the parameters.
So first
this.command201([0,,,,,])What am I looking at, I hear you asking. That's basically the [Transfer Player...] event command with no parameters. Normally when you look at it in the editor, the first option to pick is either a direct destination or one with variables, So the first parameter is 0 or 1, and we want to leave it 0.
Then you need the mapid, x, y, direction, and fade.
We want this to be automatic, right? So for Mapid, instead of a static value, let's use
$gameMap.regionId($gamePlayer.x,$gamePlayer.y).
Meaning, whatever regionid the player is standing on will correspond to the mapid they're transfering to. So if you're exiting stage left to map 2, then the edge of the map will be lined with Region 2 tiles.
For the X and Y parameters you can leave them blank. That'll transfer the player nowhere on the map, and you can let another parallel process autocorrect the player position based on the new maps metadata. OR, it might be designated in the old maps's metadata. The point is less data entry, right? Practically speaking, maps are subject to change during development. If you were to change an entrance point then changing the metadata on the map you're already on is a little easier. Not to mention way easier than changing numerous transfer events the old fashion way, which requires switching maps.
The remaining parameters for direction and fade are also negligible and can be left blank. Otherwise their values would start at 0 and count up corresponding the editor's selection.
0-retain 1-down 2-left 3-right 4-up | 0 - fade black 1- fade white 2- fade none.
So yeah. Your replacement [Transfer Player...] command might look like a common event with this simple script call
this.command201([0,$gameMap.regionId($gamePlayer.x,$gamePlayer.y,$dataMap.meta.warpX,$dataMap.meta.warpY,,])The last thing to do is create a Parallel Process to call the common event when the player steps on a transfer tile. Might as well make it a common event. Let's assume you're not using RegionId 0 for anything.
This Parallel Process will use a conditional branch script line:
$gameMap.regionId($gamePlayer.x,$gamePlayer.y) != 0
So when the player step on a region tile that isn't 0, it'll call your other transfer player common event. And transfer them automatically. And save you god knows how many actions per click.
Huh... I used to do that a lot on VX Ace.
I usually made all the layers of my buildings on the very same dark maps that are at screen distances of each another so I don't have many many many map layers.
Just make certain one thing happening from a floor to another gets closed before switching. Like, a flooding in the basement getting to the top floor of a 10 story high building. Also... you have to watch out for SFX too per floor etc
I usually made all the layers of my buildings on the very same dark maps that are at screen distances of each another so I don't have many many many map layers.
Just make certain one thing happening from a floor to another gets closed before switching. Like, a flooding in the basement getting to the top floor of a 10 story high building. Also... you have to watch out for SFX too per floor etc
Original thread: https://forums.rpgmakerweb.com/threads/how-to-change-map-automatically-without-transfering-player.139343/