How to make a game mechanic work?

So here’s a question, i’m super new to the engine and I had a great idea for a game mechanic but I have no clue how to implement.

So basically I want to design a puzzle game around the idea of a young boy switching between reality and imagination to solve puzzles.So im looking for a way to switch, at will, a room from normal to crazy with different ways to interact in the different “worlds” .

The player should be able to switch to an almost identical looking room bursting with color at will, whilst keeping player position.


modern-day-tiles-03.png
3.png



As i mentioned, im super noob to RPG and i cannot work out a way to make this happen, if there is a way to make this work please can someone explain in detail??? Maybe even with some pics, or a demo??
Will the room's layout remain the same?
Will the room's layout remain the same?
Yes . Little items in the room might change and npc's will totally change.
If all the X/Y coordinates match between maps in the two worlds, I would think this is easy to accomplish.
If all the X/Y coordinates match between maps in the two worlds, I would think this is easy to accomplish.
could you please explain?
Here's what you can do. You can set a common event that first records a the player's map location in a variable and set a conditional branch with 'if player is in Map X, transfer player to Map Y.' You can even log the player's X and Y coordinates in two other variables and set the transfer to teleport to those co-ordinates.
The tricky part comes in how items in between areas will move, assuming moving one object in one location will move it in another. Having a script that saves event locations will be essential, though you can also have variables set for an event's X and Y co-ordinates that you can then use to transfer event locations to the proper location.
Having events that correspond with certain events on a different map should have the same event ID. Event 001 on Map A should also be Event 001 on Map B. Though, giving the events the same name will also potentially help. Bear in mind also that the more complex your maps become, the more variables you will need. If the player cannot return to a previous map at all, then you should reuse every variable you can. So let's say you have ten events for each map with ten variable pairs (twenty variables in total.) You would need to set each variable to the proper starting location for the next group of movable events. If previous maps can be visited, you will soon find that you will either need a lot of variables, or extremely careful managing of each variable to prevent potential issues.
This is, of course, without relying on scripts. Scripts could streamline things, or even make them trivial, but you would either need to hunt down the proper scripts, have someone make it for you, or make it yourself. Fortunately, ACE has a rather large selection of scripts for you to use at your leisure, though not all allow commercial use of these scripts, and some will require you to gain permission first. Having someone make a script will make things easier, but you will need to have a very clear description of what you need, and you may well end up needing to pay someone for their hard work if they don't do it for free. (Paying someone to make the script will essentially guarantee your ability to use it for commercial projects, as you have paid them for the work and the right to use it in commercial projects. Crediting them for their hard work is usually appreciated, if not expected.) Making the script yourself is the hardest if you don't know the Ruby programming language, and programming is never 'simple'.

Basically, you have a fascinating concept that would be amazing to implement, but it will be very time consuming no matter how you do it, and alas, I am too tired to figure out the best non-script method for doing this. I would suggest, before you get too heavy into making the game, to have a side test project where you experiment in different ways to achieve what you want.

EDIT: On another note, if you're not going to be moving items around, then a simple switch, or perhaps one variable, will make thing simple. Say you have a switch in one map that opens a door in another. Activate Switch 'Door 1', and Door 1 that corresponds with that switch will open if set to be open on Switch 'Door 1'.
Very cool idea.

To be clear and succinct about implementation - the "Control Variables" command can be used to set variables equal to the player's X and Y coordinates (it's under "Game Data -> Character" inside Control Variables), and can also record their current Map (it's under "Game Data -> Other" inside Control Variables). And the "Transfer Player" command can transfer the player to a place based on variables.

So, when the player wants to warp (you can use a Common Event to do this - I recommend using Hime's Custom Page Conditions script and detecting whether the player is holding a button, although it could also be done without scripts), the Common Event runs and it checks the current Map ID that you stored in the variable. Then, it modifies that variable to be a second ID for the "corresponding" map. For instance, if 'Real Kitchen' is Map 5 and 'Imaginary Kitchen' is Map 12, then if Variable #6 (Room Holder) is equal to 5, change it to 12. Finally, plug that new value and the original X and Y values into the Transfer Player command, and the warp will work perfectly.
you can potentially design two identical tilesets, with each tile being generically defined but having different looks, or one single tileset (half and half, and apply an intermediate step for conversion), and redraw the whole map at the moment of the transition.
I did pull that off once (the on-the-fly redraw) but I'm not sure about doing that for tilesets (I just did it for events).

if that is possible, you wouldn't need two different maps to interact in, it would be the same actual map, just differently dressed.
Yeah, if this is going to be essentially the same place then I'd go with the 'Change tileset' command (tab 3) with a few events set to a switch which is turned ON when you change so that you can have small variations. You'd have to set up your tile sheets in the sets with care, but a lot less hassle than other approaches.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-game-mechanic-work.103023/