YEP.169 – Event Morpher – 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

Those familiar with RPG Maker will know that you can change the way events operate through different pages. However, what if you wanted one event to completely change into another, aka morph? By morphing an event into another event, the morphed event will completely replace all of its properties from pages, conditions, event commands, etc. with the event it morphed into.

This can allow for more progressive systems as the player goes through your game. From things like plants to mineral veins to new NPC’s hired to keep a store running afloat, by morphing an event, you give it a new purpose and ongoing functionality.

Furthermore, this plugin allows you to preserve any morphs you want, so that the next time the player loads your game, revisits the map with the morphed event, or simply comes back from battle, the morph changes remain.


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.

Those familiar with RPG Maker will know that you can change the way events operate through different pages. However, what if you wanted one event to completely change into another, aka morph? By morphing an event into another event, the morphed event will completely replace all of its properties from pages, conditions, event commands, etc. with the event it morphed into.

This can allow for more progressive systems as the player goes through your game. From things like plants to mineral veins to new NPC’s hired to keep a store running afloat, by morphing an event, you give it a new purpose and ongoing functionality.

Furthermore, this plugin allows you to preserve any morphs you want, so that the next time the player loads your game, revisits the map with the morphed event, or simply comes back from battle, the morph changes remain.

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


Instructions


Use the plugin parameter ‘Template Maps’ to select which maps your game will preload maps from. These maps will contain the events that you want other events to morph into. Any kind of event can be used as a morph template, from trigger events to auto run events to parallel events.

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 script calls with the respective Template Name will be updated accordingly.


Script Calls


To make events morph and change into something else, use the following script call code:

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Morph Event – Script Calls
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

Yanfly.MorphEvent(targetId, mapId, eventId, preserved)
– This will cause the target event to morph into the designated event.
– Replace ‘targetId’ with the ID of the target event you wish to morph.
– Replace ‘mapId’ with the ID of the map with the event to morph into.
– Replace ‘eventId’ with the ID of the event to morph the target into.
– Replace ‘preserved’ with ‘true’ or ‘false’ to preserve the morph.*

Example: Yanfly.MorphEvent(15, 1, 5, true);
– Event 15 on the current Map will change into Map 1, Event 5’s event.
– This event will be preserved.

Example: Yanfly.MorphEvent(20, 2, 10, false);
– Event 20 on the current Map will change into Map 2, Event 10’s event.
– This event will NOT be preserved.

– – –

Yanfly.MorphEventTemplate(targetId, template, preserved)
– This will cause the target event to morph based on the template name.
– Replace ‘targetId’ with the ID of the target event you wish to morph.
– Replace ‘template’ with a name from the ‘Template Names’ plugin param. This must be in ‘string’ form (surround the name with quotes).
– Replace ‘preserved’ with ‘true’ or ‘false’ to preserve the morph.*

Example: Yanfly.MorphEvent(15, ‘StrawberryPlant’, true);
– Event 15 on the current Map will change into event marked by the ‘StrawberryPlant’ template from the plugin parameters.
– This event will be preserved.

Example: Yanfly.MorphEvent(20, ‘MineralVein’, false);
– Event 20 on the current Map will change into event marked by the ‘MineralVein’ template from the plugin parameters.
– This event will NOT be preserved.

– – –

* Note: If a morph is preserved, it will remain morphed the next time the player reenters the map.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Morph Removal – Script Calls
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

Yanfly.RemoveMorph(targetId)
– This will remove any morphed (and preserved) effects from the target on the current map.
– Replace ‘targetId’ with the ID of the target event to remove morphing.

Example: Yanfly.RemoveMorph(15)
– The current map’s event 15 will have its morphed effects removed.
– All preserved morphing effects for this event will be removed.

– – –

Yanfly.RemovePreserveMorph(targetMapId, targetEventId)
– This will remove any preserved morphed effect from a target event located on different map.
– Replace ‘targetMapId’ with the ID of the map the target event is on.
– Replace ‘targetEventId’ with the ID of the target event.

Example: Yanfly.RemovePreserveMorph(10, 20)
– Map 10’s event 20 will have its morphed effects removed.
– All preserved morphing effects for this event will be removed.


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!