RM Skill: Skilled
There are many games that have puzzles based on teleporting to the same spot, but to a different map, that allows you to do things unique to each world. A good example is Legend of Zelda, which allows you to teleport backwards and forwards through time, and allows you to solve time-based puzzles. Other games have a normal world and a shadow world, and so forth.
This tutorial will allow you to use a single skill which will teleport you between two different worlds. This tutorial can easily be edited to make many different worlds. My second world will the the Shadow World (yes, it is not original, but it does the job).
Although this was completed in 2k3, the event can be easily adapted to suit XP.
Firstly, you need to create as many maps as you want for different worlds. These maps need to have ID's that occur consecutively (one after the other), and need to be the same size. Both of these conditions are extremely important. Non-consecutive map IDs will mean that the teleport system will not work correctly, and different map sizes will mean that you will get in-game errors based on the player wanting to teleport to unavailable areas. Neither of these are desirable for us. Start off with two, which is quite simple.
Decorate the first map as you see fit, and copy the first map you created onto the second map. This will not copy events across. If you also copy events across separately, such as teleports, do not forget to edit them so that they teleport to the shadow-world equivalent of the original map destination, otherwise the system will not work properly.
Edit the second map, should you wish, so that it can allow the player to use this teleport feature to navigate past obstacles, such as walls, and encounter obstacles unique to each world, but feel free to make up your own puzzles.
Take the tileset used in the first map, export it, and open it in a paint-based program. Use a tinting feature on your map/picture so that it represents the world that you want - My Shadow World was a dark purple tint, but feel free to tint your map to however you see fit. However, make it so that it your two worlds are quite different in appearance. Save this edited file.
Import your edited tileset into RPG maker. In the map tab, increase the amount of maps within your game by one. Copy the map tileset file for your original map (the one you edited), and paste it into the new map space you created. Change the tileset represented to the new tileset you created for your secondary map. You should now have an identical map to the original, except that it is in the tint that you changed it to. You may wish to alter the passability of items for the different maps, but this is a personal choice. Rename your new map file so that you can tell what it is.
In your second map, the Shadow World map, change the map tileset to your new edited tileset. You should see your second map change immediately to the new tinted colour.
Now, you can create the event that will allow you to teleport between the two maps. This will work for any two maps, providing that they have consecutive ID's, and are done in the same manner that I outlined previously.
Create a parallel processing event in the common events area. Put in a key input processing button, and make it store any number key pressed into your chosen variable - call it "Num Key Pressed." Allow for movement while the key is being pressed. I will be making it so that if the player presses the zero key, which is equivalent to the number 10 in the variable list, the event will be activated, and the player will be able to teleport between the two worlds.
After this key input processing command, create a conditional branch that checks if the variable "Num Key Pressed" is equal to ten. This means that the player has pressed zero. To change the key pressed, just change the variable that you require. However, I suggest that you do not use 12, 14, 16 or 18 - these are also used as directional buttons, and do not always work when using the key input processing command. If the player has not pressed 0, or the key you have chosen, we do not want anything to occur, so put "End Event Processing" in the else condition.
Inside of this conditional branch, where they have pressed zero, create a switch called "Able to use skill" that checks if the skill to change between worlds can be used by the player - that they have earnt the right to use it. For the else handler, you may wish to write a message, such as "You are not able to use this skill yet."
If you wish for this skill to be used based on one of your heroes possessing the skill, make a call-based common event that checks if each potential party member posesses the skill, and, should one of them have the skill, turn the switch on. After the key input processing, run the common event.
Store the location of the hero in three variables - I was quite original, calling them "X Coord" "Y Coord" and "Map ID."
If you do not wish for the player to teleport in certain maps, create the conditional branches here. For example, if you do not want the player to teleport on your first map, run a conditional branch based on MAP ID = 1. If this is true, tell the player "You cannot use this skill here". Otherwise, run the rest of this event.
After the player has pressed zero, and is able to switch to your second world, and is not in one of your "cannot teleport maps", create a switch which checks which world the player is located in. Call this switch "Shadow World." Originally, the player will be located in the normal world, (with no switches on at the start of the game) so if our switch "Shadow World" is on, they are in the shadow world, and want to teleport to the normal world; otherwise, they wish to teleport to the shadow world.
If the switch is on, and the player is in your second map, the Shadow World, subtract one from your variable Map ID, which will make the variable equal to the normal world number. Then, you will need to turn the Shadow World Switch off. Then, do a variable-based teleport, using the "X Coord" "Y Coord" and "Map ID" variables.
You may wish to write some text, such as "Entering Shadow World", but this is a personal choice, and does not affect the event itself.
Copy the event above, and paste it in the else condition. However, you will need to add one from the Map ID to go from the normal world to the shadow world, turn the shadow World Switch on instead of off, and alter the text, should you have decided to include it. The variable-based teleport will be the identical.
You should now be able to teleport between worlds by pressing the zero button, provided that you have activated the switch that allows the players to teleport between worlds.
If the player teleports between worlds and finds himself stuck in a non-passable area of the map, such as in the middle of a wall, all they need to do is to use that same skill to teleport back to the world they came from.
I hope that this helps people create puzzle-based teleporting between two worlds. Apologies for not being able to illustrate the process required here, to make the tutorial simpler, but my computer with my files on it is not currently working.