MV YEP Event Morph doesn't copy the notetag?


Is there any way I can get the event morpher to copy the notetag from the note box of the template event it's morphing into? If I copy and paste the template event directly on to the active map it reads the notetag but morphing into it from another event doesn't.

I have this bat monster template event. That notetag makes it float, but if I event morph into it it won't float.
the problem might not be in the notetag but in when it is read.

notetags themselves have absolutely no function and no effect, they always require a plugin to read them to react to them. But it depends on when a plugin reads a notetag - a lot of plugins do that only on specific situations, because that saves time when the data is stored otherwise.

I can easily see a specific plugin to check all events on a map when that map is entered, never bothering with reading notetags later - exactly because cloning and morphing events is not a regular case.
in such a case the event might have the correct notetag and the plugin that is supposed to read the notetag simply doesn't do it anymore.

so please tell (preferably with screenshots) what notetag you're trying to use, and what plugin (with link) is supposed to handle that notetag.
so please tell (preferably with screenshots) what notetag you're trying to use, and what plugin (with link) is supposed to handle that notetag.
Sure, it's Triacontane Floating Character. The notetag <FCAltitude:24> will make the event float at 24 units (pixels?) of altitude
You would change how you read meta data into a getter function.

In that function, check whether the event is flagged as morphed, and if yes, reference the database information for Yanfly.PreloadedMaps[ID] and return that meta data.
You would change how you read meta data into a getter function.

In that function, check whether the event is flagged as morphed, and if yes, reference the database information for Yanfly.PreloadedMaps[ID] and return that meta data.
Maybe, but if Andar is correct then the Event Morpher is actually copying the notetag and I just need to call a function from Triacontane's plugin to activate it.
Maybe, but if Andar is correct then the Event Morpher is actually copying the notetag
That's not how it works. Notetags aren't stored on an event (or any other game object). They're stored in the database entry for it.

So, for example, you would normally look at an event's "foobar" notetag via:
Code:
$dataMap.events[eventId].meta.foobar

The trick is that $dataMap only holds the data for the currently loaded map, and morphed events belong to specific other maps that you defined in the plugin parameter (unless you happen to also be on that map, but in that case I don't know why you'd be morphing instead of copying event pages).

If you look at the code for the Yanfly plugin, a morphed event has a morphed flag, variables that store the map and event ID that it's representing, and causes all native getter functions to redirect to the event in the preloaded map according to those variables to read the data from there.

Nothing is actually copied.

So you need to either find a point of reference to the instance of a Game_Event that you're looking at, then use the event() getter and proceed to the meta from there; or do what I said above and reference the event ID in Yanfly's preloaded map array (which is doing the same thing but from a different point of reference).
That's not how it works. Notetags aren't stored on an event (or any other game object). They're stored in the database entry for it.

So, for example, you would normally look at an event's "foobar" notetag via:
Code:
$dataMap.events[eventId].meta.foobar

The trick is that $dataMap only holds the data for the currently loaded map, and morphed events belong to specific other maps that you defined in the plugin parameter (unless you happen to also be on that map, but in that case I don't know why you'd be morphing instead of copying event pages).

If you look at the code for the Yanfly plugin, a morphed event has a morphed flag, variables that store the map and event ID that it's representing, and causes all native getter functions to redirect to the event in the preloaded map according to those variables to read the data from there.

Nothing is actually copied.

So you need to either find a point of reference to the instance of a Game_Event that you're looking at, then use the event() getter and proceed to the meta from there; or do what I said above and reference the event ID in Yanfly's preloaded map array (which is doing the same thing but from a different point of reference).
Ok, admittedly I hadn't looked at the event morpher code, so I didn't realize it was a redirect and all that was going on under the hood. But now I need to evaluate whether getting the meta data this way and trying to get Triacontane's plugin to read it is not a lot more steps than just running a Triacontane script call from the event page to make it float, especially if I don't need to evaluate that notetag for anything else.

Edit: I got the morphed event to float by bypassing the notebox altogether, and just put this.character(0).float(true, 24); on the morph template event page. But I will keep this in mind if I need to access the notebox for evaluation purposes. So issue solved, more or less.
Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/yep-event-morph-doesnt-copy-the-notetag.157236/