[Desktop] Copy/Delete Maps In-Game - Sigony's Map Additions

Sigony

Crusader Masochist
Veteran
Joined
Aug 18, 2020
Messages
74
Reaction score
464
First Language
English
Primarily Uses
RMMV
Sigony's Map Additions
by Sigony
version 1.1

Introduction
This RMMV plugin allows you to copy and delete maps using plugin commands, meaning this can happen in-game. This has some powerful possibilities for those with imagination.

With great power comes great responsibility.

Important
This plugin manipulates your project's files and bugs are entirely possible. Before using this plugin, you should backup your data. I am not responsible for any loss that you incur from using this plugin. Use this plugin with caution.

The current version has only been tested to work for windows.
Linux and mac are untested, I would appreciate any tests for these.
Web and mobile do not work currently.


Download
You will need to save this file as "SigonyMapAdditions.js", or it will not work.
Click here to download

Potential Use Cases
  • Map instances (i.e. mystery dungeon)
  • Powerful when used with Shaz's Tile Changer.
  • Plugin creators who would like to generate new maps in-game may find that this plugin saves them lots of work.
Features
  • Copy a map using a plugin command.
  • Delete a map using a plugin command (mainly if you want to clean up instances)
INSTRUCTIONS

> To copy a map you can use the following plugin command format:
CopyMap mapId "mapName" variableForNewMapId parentId
  • mapId - this is the ID of the map that you wish to copy. A new map, with a different ID, will be created.
  • mapName - this is the name that appears in the editor, and is also the display name.
  • variableForNewMapId - this is the $gameVariable that will store the newly copied map's ID.
    • Once you copy the map, you might like to go to it, and so you can do this using events.
      • Event > Transfer Player > Designation with variables. (You will need to set some temporary values for x and y coord)
    • You do not need an endless list of variables to hold the mapIDs of every new map that you create in-game. You can be clever and juggle them a bit. To get you started look at: Event > Control Variables > GameData > MapID. The fact that the current map's ID is accessible allows you to store the ID of a map when you leave it. You can have a previousMap variable for example.
    • Make sure to keep track of if a mapID actually exists and know where it leads at any moment. When a map is deleted, and another created, the mapID will be re-used, and this might create some headaches for you if you aren't careful.
  • parentId - this allows you to make the generated map a child of the map with this parent ID, making it indented and able to be hidden with a spoiler in the editor, the purpose of which is to help reduce clutter in the editor and for you to organize the potentially large amount of maps you'll be dealing with. If you do not desire the copied map to be foldable, set the parentId to 0.
Example:
CopyMap 1 "Copied Map" 5 1
Note: If you copy a map in-game and it does not appear in your editor, it is because the editor hasn't updated its list. If you want to see your copied map in the editor, then feel free to close and re-open the editor.

> To delete a map you can use the following plugin command format:
DeleteMap mapId
  • mapId - The mapID of the map you wish to delete.
Example, accessing the value stored in variable 5:​
DeleteMap $gameVariables.value(5)

Note: Deletion is permanent. Deleting maps should be done with extreme caution. Again, make sure you backup any maps that are important to you. Make sure you know what you are deleting. Make sure you do any necessary cleanup of your variables. Make sure you do not try to transfer the player to a map that no longer exists.


Troubleshooting / Feedback
Please report any bugs that you have, and how to recreate the issue. Press F8 to open console, provide that if applicable.
Feedback is welcome. Suggestions are welcome.

Credit
Sigony

License
Credit me where applicable in your derivative works.
Redistribute by linking to this page.
Free for commercial use.
Free for personal use and non-commercial use.


Updates
v1.1 :: 22/08/2020 :: Fixed issue preventing windows deployment from working. Still needs work to be fully compatible with other platforms.

Todo
  • Allow changes to be save-file specific as opposed to global.
  • Make compatible with web
  • Make compatible with linux
  • Make compatible with mac
  • Make compatible with android/ios
 
Last edited:

ImaginaryVillain

High Cultist of the Sporkle
Veteran
Joined
Jun 22, 2019
Messages
822
Reaction score
4,730
First Language
Absurdism
Primarily Uses
RMMZ
Well this is a fascinating plugin. How does it deal with Web/Android/Linux/iOS deployed games? Can it still create the map files?
 

Sigony

Crusader Masochist
Veteran
Joined
Aug 18, 2020
Messages
74
Reaction score
464
First Language
English
Primarily Uses
RMMV
Well this is a fascinating plugin. How does it deal with Web/Android/Linux/iOS deployed games? Can it still create the map files?
No clue, let me test that.
EDIT: Deployment doesn't work. I'll have to figure out how to make the filesystem operations work with deployed games.
 

Sigony

Crusader Masochist
Veteran
Joined
Aug 18, 2020
Messages
74
Reaction score
464
First Language
English
Primarily Uses
RMMV
I believe it should be working for Windows.

Need to add save-specific changes, as opposed to global changes.
I don't have a linux or mac to test with, so I will simply wait for complaints on that front.
Web doesn't work. I am building an API that allows access to the filesystem for that, but it cannot be tested on localhost, as most browsers don't allow requests to localhost even with CORS.
I doubt mobile would work.

But I'm working on it. :)
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Not sure if it's true (and I won't judge or blame anyone if it is, really), but I heard from confident sources that you guys (and girls) really really like to
How is this new year for everyone? Hope you are well. Still deep in Covid in the US. Its like a vampire and refuses to die with even more strains. I need some holy water to kill it with.
in my game, what's known as HeadSpace is combining with the real world...
oh looks like the forums updated while I wasn't looking and we can put a banner now. Neat!
Treating this as a devlog

Forum statistics

Threads
107,663
Messages
1,031,239
Members
139,788
Latest member
coyoteandghost
Top