- Dec 16, 2014
- Reaction score
- First Language
- German, English
- Primarily Uses
In the times I've made the shifts regarding notetag loading, this is what I've came up with:
So yes, you're right in that RPG Maker MV doesn't have a reliable location to safely load up custom notetag data. DataManager.postDatabaseLoaded would have been lovely if it existed. For that reason, I figured the earliest and safest place to load notetag data is within DataManager.isDatabaseLoaded where it will most likely not be overwritten.
- DataManager.extractMetaData fails to distinguish types of data.
- DataManager.onLoad loads strictly in the order of actors, classes, skills, items, weapons, armors, enemies, troops, states, animations, tilesets, common events, system, and types. This becomes a problem when you need an actor notetag to reference something in say, an enemy notetag.
- Scene_Boot.start is a no go for me because some plugins completely overwrite it.
- Scene_Boot.create also gets overwritten in some plugins.
- Scene_Boot.terminate occurs too late, in some instances where functions that fun in Scene_Boot.start already occur and require the note data.
The error most likely came from the person tampering with the JSON file as there should be a notedata entry for each database entry.
And what you consider to be bad practice, I consider to be perfectly fine. isDatabaseLoaded() should return true or false depending on if the entirity of the database is completely loaded, is it not? To me, I deem that the database is not completely loaded unless the notetag data within it is loaded and parsed. So unless my notetags, which I deem to be part of each and every database entry's data, are loaded, isDatabaseLoaded() returning true/false without my notetags loaded in there is delivering false information. If you are able to suggest a better timing for me to load notetags without encountering any of the above listed problems, I'll see to your suggestion.
And no, not really. I estimate that a good 99.99% of the plugins created now and within the future will not run DataManager.isDatabaseLoaded() any time past the initial opening steps. It's a one-to-two time run at best. This is because once the database is loaded, there is no further reason to check it again mid-game to see if it has been loaded.
Not quite, I've tried that before and sometimes, $data_ arrays reset themselves to their default editor state until isDatabaseLoaded is set true indefinitely.
my head hurts x(