Reading Note Tag Via Script Call

Discussion in 'RPG Maker MV' started by RainbowGrenade, Jan 13, 2019.

  1. RainbowGrenade

    RainbowGrenade Paint Princess Veteran

    Messages:
    229
    Likes Received:
    126
    Location:
    California
    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.
     
    #1
  2. Poryg

    Poryg Pixie of the Emvee kingdom, Ham of a Hamster Veteran

    Messages:
    3,860
    Likes Received:
    9,673
    Location:
    Czech Republic
    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.
     
    #2
    RainbowGrenade likes this.
  3. Shaz

    Shaz Veteran Veteran

    Messages:
    37,579
    Likes Received:
    11,296
    Location:
    Australia
    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.
     
    #3
    RainbowGrenade likes this.
  4. RainbowGrenade

    RainbowGrenade Paint Princess Veteran

    Messages:
    229
    Likes Received:
    126
    Location:
    California
    First Language:
    English
    Primarily Uses:
    RMVXA
    Do you mean add a variable to the note tag itself?? I’m unclear on what you’re suggesting.
     
    #4
  5. Bex

    Bex Veteran Veteran

    Messages:
    1,211
    Likes Received:
    273
    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.
     
    #5
  6. RainbowGrenade

    RainbowGrenade Paint Princess Veteran

    Messages:
    229
    Likes Received:
    126
    Location:
    California
    First Language:
    English
    Primarily Uses:
    RMVXA
    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/
     
    #6
  7. Poryg

    Poryg Pixie of the Emvee kingdom, Ham of a Hamster Veteran

    Messages:
    3,860
    Likes Received:
    9,673
    Location:
    Czech Republic
    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.
     
    #7
  8. Shaz

    Shaz Veteran Veteran

    Messages:
    37,579
    Likes Received:
    11,296
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Yeah, he said read, but he actually does want to write/change them during the game.
     
    #8
  9. Bex

    Bex Veteran Veteran

    Messages:
    1,211
    Likes Received:
    273
    First Language:
    German
    Primarily Uses:
    RMMV
    Edit: I missread....
     
    #9
  10. RainbowGrenade

    RainbowGrenade Paint Princess Veteran

    Messages:
    229
    Likes Received:
    126
    Location:
    California
    First Language:
    English
    Primarily Uses:
    RMVXA
    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?
     
    #10

Share This Page