YEP.168 – Event Copier – RPG Maker MV

Yanfly Engine Plugins is a plugin library made for RPG Maker MV, a wonderful piece of software to help you make that role playing game of your dreams. You can find out more about RPG Maker MV here.

You can grab the plugin here:
English Dropbox
English Mirror

Support Team Yanfly on Patreon

Have you ever made an event template to copy and paste from? Good. That’s an efficient way to go about reproducing events that are repeatedly found in your game. But have you ever decided that you suddenly want to make a change to that event… after you’ve copied and pasted it a bunch of times already? Now you’ve gotta go hunt down every single one you’ve copied and replace it.
What a pain, right?

Well, the Event Copier will allow you to streamline that process. You make a template event, and any events that will use this plugin’s notetag will copy everything from that event in the most up to date version in-game. This will include the sprite graphics, the self switches (and self variables if you are using those), the conditions, the pages, the event commands, and even the new Notetags. The only things that won’t be copied over will be the ID,
X position, and Y position for obvious reasons.

This way, you can streamline your eventing process without having the need to finalize an event before mass producing it.


Introduction


WARNING: This plugin is best used with RPG Maker MV 1.5.0 or above! This is because the MV 1.5.0 editor allows for this plugin to be made in an orderly and efficient manner. Please make sure your RPG Maker MV software is up to date before using this plugin to make the most out of it.

Have you ever made an event template to copy and paste from? Good. That’s an efficient way to go about reproducing events that are repeatedly found in your game. But have you ever decided that you suddenly want to make a change to that event… after you’ve copied and pasted it a bunch of times already? Now you’ve gotta go hunt down every single one you’ve copied and replace it.

What a pain, right? Well, the Event Copier will allow you to streamline that process. You make a template event, and any events that will use this plugin’s notetag will copy everything from that event in the most up to date version in-game. This will include the sprite graphics, the self switches (and self variables if you are using those), the conditions, the pages, the event commands, and even the new Notetags. The only things that won’t be copied over will be the ID, X position, and Y position for obvious reasons.

This way, you can streamline your eventing process without having the need to finalize an event before mass producing it.

More information will be explained in the Instructions section of this plugin’s help file.


Instructions


First, set aside a dedicated map (or maps) that will be preloaded each time the game starts. Each preloaded map should contain various events that you wish to completely copy. These can range from templates to trigger events to autorun events to parallel events. Once you’ve made the map(s) you want to preload, open up the Plugin Manager and this plugin. Insert inside this plugin’s ‘Template Maps’ parameter the ID(s) of the map(s) you wish to use.

If you are using RPG Maker MV 1.5.0+ and wish to make use of template names, add them through the ‘Template Names’ plugin parameter. The data from the Template Names parameters can be changed and all events in-game that use notetags with the respective Template Name will be updated accordingly.


Notetags


To decide if an event will copy from a template map, please follow these instructions below and insert the desired notetag into the event’s notebox.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Event Notetags:
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

<Copy Event: Map x, Event y>
– Replace ‘x’ with the ID of the map you wish to copy the event from.
– Replace ‘y’ with the ID of the event you wish to copy from that map.

– – –

<Copy Event: mapId, eventId>
– Replace ‘mapId’ with the ID of the map you wish to copy the event from.
– Replace ‘eventId’ with the ID of the event you wish to copy from that map.

– – –

<Copy Event: template>
– Replace ‘template’ with a name from the ‘Template Names’ plugin param.
* This will require you to have version 1.5.0+ of RPG Maker MV. All of the Map ID and event ID data from the stored template will be used for this event. This notetag will also have the bonus of having custom Lunatic Code unique only to this template name.

– – –

When an event is copied, all data will be carried over, from the name of the map, to the graphics used, to the pages, their conditions, and all of the event commands. The only things that will NOT be copied over will be the original event’s ID, x positon, and y position.


Lunatic Mode – Pre and Post Copy Codes


Lunatic Mode requires version 1.5.0+ of RPG Maker MV. For those with JavaScript experience, you can throw in your own custom code to run upon the loading of a copied event. This can be found in the plugin’s parameters ‘PreCopy Code’ and ‘PostCopy Code’. If you are using Template Names, you can add in ‘PreCopy Code’ and ‘PostCopy Code’ unique to that template.

For Lunatic Mode, there are some unique variables that you can alter. They are the following:

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
PreCopy Codes
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

 *  Variables      Description
 * 
 *      mapId      ID of the map to be loaded.
 *    eventId      ID of the event to be loaded.
 *     target      The event before it's copied over.
 *     player      The player character.

Making changes to ‘mapId’ or ‘eventId’ will change the data that will be loaded for the target. However, if ‘mapId’ is changed, you must make sure that the map it’s being changed to is already preloaded or else the event will fail to be copied properly.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
PostCopy Codes
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

 *  Variables      Description
 * 
 *     target      The loaded event after copied over.
 *     player      The player character.

While the ‘mapId’ and ‘eventId’ variables are available, they cannot be changed and make an impact. You can, however, use them as a conditional check to determine what to do with the target event or player.


Happy RPG Making!


Happy RPG Making!


These plugins and Tips & Tricks ideas are made possible thanks to our creative patrons on Patreon! The majority of our Tips & Tricks, Plugins, and Lunatic Pack ideas are placed within the Patreon-exclusive Sample Project for quick and easy access! If you'd like to make a Plugin Suggestion, Yanfly's Patreon-based Suggestion Box a visit here:


If you have any bugs to report, visit the following link:


If you have any questions about Action Sequences, visit the following link:



Thank you!