Modify Map note via script command

Hi everyone,

I would like to ask if anyone have ever attempted to modify the note box from the map setting thought a RPG Maker MZ script command.

I am currently trying to change the map note to <Overlay: Night> though an event. So the player will touch the event and this will automatically change the map note.

Thanks for your help!
Screenshot1.png
Code:
$dataMap.meta.Overlay = 'Night'

But just because you change this value on the fly does not mean every plugin in this will react to it. Some plugins read those tags once the map is loaded and don't listen to changes. Furthermore, this change will not be memorized.
as said above, there are problems with your idea.
the much better solution would be to change the data of whatever plugin reads the note directly, but for that you would have to link to that plugin so that someone could check its code.

Original thread: https://forums.rpgmakerweb.com/threads/modify-map-note-via-script-command.170004/