Where are notetags located in the Js files? Can we change them in-game?

So my question is mainly in the title but i'll explain it here as well. What i want to know is where the functions for notetags are located in the js files and if there is a way (a script call?) to change a notetag of an item (for example) mid-game, (which in turn will affect a plugin that uses that notetag).

I don't mind if the new notetag will be saved when you save your game, because it will be reset every time i need it to change. At least for what i need it, it doesn't matter if it's saved or not.
scriptcall or plugin command should be implented if not done already.
so far I know to find the note tags, you need to find similair like this:

this.contents.drawText($dataMap.meta.mmName, 0, 0, this.co......

now at $dataMap.META.mmName, the META makes it work in the notefield.
depends in which notefield they mean and specify (MAP, EQUIPMENT, SKILLS etc.

if there is no plugin command or scriptcall, you need to add it.
scriptcall or plugin command should be implented if not done already.
so far I know to find the note tags, you need to find similair like this:

this.contents.drawText($dataMap.meta.mmName, 0, 0, this.co......

now at $dataMap.META.mmName, the META makes it work in the notefield.
depends in which notefield they mean and specify (MAP, EQUIPMENT, SKILLS etc.

if there is no plugin command or scriptcall, you need to add it.

Thanks a lot for your reply, it was quite informative. While i was looking into what you mentioned, I actually found an extremely simple way to change an item's notetag and it should work similarly to armors and weapons. You do it as so:
Code:
$dataItems[id].note = 'notetag';
If a plugin uses the notetag, however, you have to find which function actually checks the notetags, so that you can call it again. I tried it with yanfly's "more currencies" plugin to check if i can alter the cost of an item by altering its notetag and it worked! (I had to call 2 of his functions to re-check the items' notetags).

In my example, to test it, i made two events:

one with
Code:
$dataItems[1].note = '<Variable 481 Buy Price: 1>';
DataManager.processMCNotetagsI($dataItems);
DataManager.processMCNotetags1($dataItems, 0);
and the other one with
Code:
$dataItems[1].note = '<Variable 481 Buy Price: 2>';
DataManager.processMCNotetagsI($dataItems);
DataManager.processMCNotetags1($dataItems, 0);
I had a shop that had a potion inside (its id is '1'). So when i used the first event its cost was 1, while with the second event, its cost was 2. I mean, that's how i tested what i state above.

I've no idea if it's going to work for other plugins but it's certainly doable.
Notetags are stored into the .meta property of data objects.
Changing them in game is possible depending on the way the plugin handles them. If the plugin reads them at startup and then stores them, never to call them again changing them will achieve nothing. This is on a per plugin basis and can't have a generalized answer.

If the plugin reads the notetag every time it needs it then you can overwrite the relevant meta property by simply doing this:
Code:
$dataItems[itemId].meta.YOUR_NOTETAG_HERE = "new notetag"
This is however a terrible idea, because everything that starts with $data is only renewed on game startup and never saved. This means any change will transfer across all savefiles (yes, even prior ones) as long as the game is not closed, and will be forgotten once the game is closed.
Notetags are stored into the .meta property of data objects.
Changing them in game is possible depending on the way the plugin handles them. If the plugin reads them at startup and then stores them, never to call them again changing them will achieve nothing. This is on a per plugin basis and can't have a generalized answer.

If the plugin reads the notetag every time it needs it then you can overwrite the relevant meta property by simply doing this:
Code:
$dataItems[itemId].meta.YOUR_NOTETAG_HERE = "new notetag"
This is however a terrible idea, because everything that starts with $data is only renewed on game startup and never saved. This means any change will transfer across all savefiles as long as the game is not closed, and will be forgotten once the game is closed.

I know, it doesn't need to be saved for what i need it. It's actually for a pre-check system on shop interfaces, which always runs before a shop interface loads, so it will always alter the notetags when they are needed to be checked.

For example, it's like stating that shop1's item1 costs x, while shop2's item1 costs y. So you would always have to run the code before the shop1 or shop2 interfaces are loaded. So, in my case, this will work.

In other cases, you could run a common event at load and, combining it with switches, you can re-run the code that wasn't saved. I do this constantly to reload images in cache - i don't know how to load them on startup and all plugins i've found for that weren't doing what they were supposed to... so i just fadeout, show the images with 1 frame time distance from each other, and delete them again. DIY xD

Original thread: https://forums.rpgmakerweb.com/threads/where-are-notetags-located-in-the-js-files-can-we-change-them-in-game.119413/