Changing a Note Tag with a script call?

Eff-n-Geoff

Veteran
Veteran
Joined
Oct 26, 2015
Messages
182
Reaction score
7
First Language
English
Hi there,


I am trying to cut down on the number of maps our game has in order to avoid the memory leak issue with some plugins and wondered if there is a way to change / overwrite a note tag with a script call? 
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
722
Reaction score
578
First Language
French
Primarily Uses
There is, but it's a bad idea.


The notetags are accessed by looking at the meta property of a data object.


You can change them simply by calling them. For example, accessing the <karma:> notetag of skill 1 and modifying it.


$dataSkills[1].meta.karma = 10; //this will set the notetag to 10, regardless of what it was previously or in editor


The problems are:


Data objects are not used per game file but rather for the game as a whole. Therefore, any modifications would impact all savefiles, not only the active one (and they wouldn't revert by loading an anterior save too).


Furthermore, data objects are not saved when the game closes, so upon restarting your game (closing and reopening the program itself) all changes would be lost.


You could theoretically deal with all those problems using a paralell common event that sets the notetags to what you want...


It's probably not worth the huge amount of problems you'll most likely create though.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,667
First Language
German
Primarily Uses
RMMV
additionally, with a lot of plugins changing the notetag dynamically will NOT change the plugin behaviour.


Notetags are used to transfer data from the database to the plugin - and a lot of plugins only load that data on new game, store it in their variable and then never look at the notetag again.


Changing the notetag will only change the plugin that needs the notetag when the plugin checks the notetag the next time - if it never does, no change to the notetag will ever be reflected in your game, even if it successfully changed the notetag.


It is a much better approach to check the plugins for the place where they store the data they read from the notetag and change those variables directly by script commands - but that requires someone who is able to read the code of plugins to specifically check each plugin that you want to change that way.


It's still the better solution for a lot of reasons, including the problems mentioned above.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,847
Messages
1,016,972
Members
137,561
Latest member
JaCrispy85
Top