Reading Note Tag Via Script Call

RainbowGrenade

Paint Princess
Veteran
Joined
Jan 21, 2013
Messages
229
Reaction score
126
First Language
English
Primarily Uses
RMVXA
Is this possible? I would like to use a script that allows for a specific customization I need through note tags, but not script calls or plugin commands. The issue being that I need to make these customization during play. I've reached out to the creator of the script, but it got me thinking about whether or not you could input those tags via a script call. I'm not very knowledgeable when it comes to how JavaScript works with the maker, but I'm interested in learning more, so I'd like to know if this is possible and how, as well as why it may not be. Thank you to anyone who takes the time to answer.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,038
Reaction score
10,258
First Language
Czech
Primarily Uses
RMMV
Editing notetags throughout playing is not a good idea. Wouldn't a variable be enough? Using Control variables-Script you can add anything you want to them.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,307
Reaction score
11,910
First Language
English
Primarily Uses
RMMV
Agreed.

MV uses object.meta.something to refer to note tags, but those are loaded when the game is first opened, and not again, unless the specific plugin says otherwise. And different plugins format them differently and read them differently, so it's not a one-size-fits-all.

This data is held at a global/database level, not at a game level. So if you were to change it midway through a game, then return to the title screen and start a new game, those changes would still be present because the database has not been reloaded. And if you were to change it midway through a game, then save and close, when you relaunch the game and continue from your save file, the changes would not be present because the database would be freshly loaded.

Metadata / note tags are not a good place to store information that you want to alter during the game. You are better off getting a plugin that stores the information in existing (or new) Game_Something objects, so it can be saved and loaded with the rest of your game progress, and so it doesn't affect other saved (or new) games. Such a plugin should also have script or plugin commands so you can use/change this data, which would be much easier than accessing/changing metadata in note tags via scripts/script calls.
 

RainbowGrenade

Paint Princess
Veteran
Joined
Jan 21, 2013
Messages
229
Reaction score
126
First Language
English
Primarily Uses
RMVXA
Editing notetags throughout playing is not a good idea. Wouldn't a variable be enough? Using Control variables-Script you can add anything you want to them.
Do you mean add a variable to the note tag itself?? I’m unclear on what you’re suggesting.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,312
Reaction score
315
First Language
German
Primarily Uses
RMMV
He said Read not Write, and input it to a Variable, not writing NoteTags.
Yeah the Question without the Headline can confuse. I have no clue how to check for Notetags.

Which Plugins are you using?
For what do you intend to use those Notetags?
Sorry i cant help with this.
 

RainbowGrenade

Paint Princess
Veteran
Joined
Jan 21, 2013
Messages
229
Reaction score
126
First Language
English
Primarily Uses
RMVXA
He said Read not Write, and input it to a Variable, not writing NoteTags.
Yeah the Question without the Headline can confuse. I have no clue how to check for Notetags.

Which Plugins are you using?
For what do you intend to use those Notetags?
Sorry i cant help with this.
I'm using TheUnproPro's minimap plugin, linked below. It includes an option to create a minimap using regions. You can assign minimap colors to the regions through note tags on maps or events, but due to the "random" nature of my dungeon, I would like to change the colors of certain regions to hide those areas on the minimap when I have them hidden from sight. The original version of this plugin had plugin commands to do this, and it worked great, however it caused some lag, which has been fixed in the updated version. The new version has had a lot of options stripped down, I'm assuming to make it less bulky. It's mostly note tags now, with just a few plugin commands.

Old version:
https://forums.rpgmakerweb.com/index.php?threads/minimap-plugin.66443/
New version:
https://rpgmakermv.co/threads/rpg-maker-mv-mini-map-plugin.4637/
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,038
Reaction score
10,258
First Language
Czech
Primarily Uses
RMMV
The plugin has been stripped of features, because these features caused glitches all over the place and the creator couldn't orientate in their code anymore, so they stripped them.
And no wonder about it.
If I want to rewrite mapData, I have to remember that anytime the mapData reloads, I need to redo the edits I made. Otherwise the changes are lost.
And since mapData reloads everytime we teleport or load the game, it'd require to save the changes somewhere and reload them with each load.
So you can of course edit metadata and notetags from within the game. However, unless you have saving disabled, it's useless for you, because these changes will get erased upon saving and loading.
So it would require a small custom plugin that would store these changes, save them and then load them upon reload.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,312
Reaction score
315
First Language
German
Primarily Uses
RMMV
Edit: I missread....
 

RainbowGrenade

Paint Princess
Veteran
Joined
Jan 21, 2013
Messages
229
Reaction score
126
First Language
English
Primarily Uses
RMVXA
The plugin has been stripped of features, because these features caused glitches all over the place and the creator couldn't orientate in their code anymore, so they stripped them.
And no wonder about it.
If I want to rewrite mapData, I have to remember that anytime the mapData reloads, I need to redo the edits I made. Otherwise the changes are lost.
And since mapData reloads everytime we teleport or load the game, it'd require to save the changes somewhere and reload them with each load.
So you can of course edit metadata and notetags from within the game. However, unless you have saving disabled, it's useless for you, because these changes will get erased upon saving and loading.
So it would require a small custom plugin that would store these changes, save them and then load them upon reload.
So, if the maps that will be edited have save disabled, as long as the note changes only happened on those maps and didn't need to be saved, would that system be plausible? I would only need to alter the maps for the dungeon levels, and those are set randomly each time you change floors. I wouldn't need those changes to last any longer than the player is on the map. Would this still cause errors?
 

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

Latest Threads

Latest Profile Posts

Okay... Embarking on the epic quest of sorting out my entire MTG collection... If you dont hear from me in a week I've prolly died in an avalanche of cards xD
I don't know where to put my self in my demo credits like rly ? directed by aniaaous ? i didn't made a single pixel or code .-.
Making progress on the pathfinding plugin:



That's a 1000x1000 grid (i.e. a map with 1 million tiles), finding a walkable path in ~1ms. Still have lots more testing to do with more complicated maps, but I'd say that's a pretty good start :kaopride:
It's good to be back making First Impression videos.

Forum statistics

Threads
93,532
Messages
913,259
Members
123,061
Latest member
1234567890-
Top