Event Copier (YEP)

From Yanfly.moe Wiki
Jump to navigation Jump to search
Welcome to the wiki! This is where you can find resources from Yanfly.moe, Ækashics.moe,
Visustella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.


This is a plugin created for RPG Maker MV.

For help on how to install plugins, click here.

For help on how to update plugins, click here.

Got errors with your RPG Maker MV plugin? Click here.


Yanfly Engine Plugins

This plugin is a part of the Yanfly Engine Plugins library.


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.


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.



RPG Maker MV's editor is unable to allow for custom traits/properties that a game dev may wish to associate with a database object, event, map, etc. Notetags are used to work around such limitations by allowing the game dev to tag certain traits/properties using specific Notetags declared by the related plugin.

Here is a list of Notetag(s) that you may use.

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 to copy the event from.
  - Replace 'y' with the ID of the event to copy from that map.

  - - -

  <Copy Event: mapId, eventId>
  - Replace 'mapId' with the ID of the map to copy the event from.
  - Replace 'eventId' with the ID of the event 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


For advanced users who have an understanding of JavaScript, you can use the following features added by the plugin to further enhance what you can do with your game project.

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.


Version 1.01:
- Bypass the isDevToolsOpen() error when bad code is inserted into a script
call or custom Lunatic Mode code segment due to updating to MV 1.6.1.

Version 1.00:
- Finished Plugin!