Yanfly Event Copier - Pre and Post Copy Codes

Hello!

Plugin - http://yanfly.moe/2018/07/06/yep-168-event-copier-rpg-maker-mv/

Yanfly has a super useful plugin that copies events! So you can make all your changes to one event that is then copied across all the different maps that has a copy present.

In the lunatic section there is the option to add 'PreCopy Codes' & 'PostCopy Codes'
For those with JavaScript experience, you can throw in your own custom code to run upon the loading of a copied event.

Again this sounds useful! But there isn't much information on this bit. And I'm a bit unsure of the uses this would give? If anyone uses this feature i would be interested to hear what it can be used for 🙂

Thanks 😂
While I've used the Event Copier and the Event Spawner, I've not had to use the pre-load javascript. Where I think this could come in handy off the top of my head though is in the case of screen-colors or party member composition.

If your copied event will cause a screen tint, and you have it on multiple maps, I can see having it read a variable to get the current tint settings to set up an appropriate change. Another thought is to change a monster or event based on the active party members, and if built into the EventCopier: it could easily handle changing the monsters in an area based on some event where Harold revisits after he becomes SuperHarold.
Thanks for those examples! @Mrs_Allykat 😀
Would it be possible for anyone to give me aspecifix example for how one might write code for this? I've been trying to make copied events retain the direction of their original targets and the variable I'm trying to store it in seems to stay at 0 no matter what I try.

I've tried using 'target' with and without the $ and using it as substitution for a numberical eventID.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-event-copier-pre-and-post-copy-codes.106310/