Iavra Note Files

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
859
First Language
German
Primarily Uses
Description


Allows to store notetags in text files and reference them from database objects and events.


Author


Iavra


Parameters


@param File Path
@desc Path of the file to load. Multiple files can be specified when separated by commas. Default: data/notes.json
@default data/notes.json

@param Notetag
@desc Tag used to load metdata from files. Default: textnote
@default textnote




How to Use


Note: This plugin has to be placed below everything else that deals with DataManager.extractMetadata().


Create one or more files and store their locations inside the "File Path" parameter, separated by comma. The files are formatted like this:


{
"key1" : "some notes",
"key2" : "some more notes",
"key3" : [
"notes with",
"linebreaks"
]
}


JSON itself doesn't allow real linebreaks inside Strings, but you can use an array, instead, which will automatically be converted to a single String with linebreaks.


Inside your database objects and events, you can reference these entries like this:


<textnote key1>


If "textnote" is already in use by another plugin or you want to use a different notetag, you can change it with the "Notetag" plugin parameter".


Terms of Use


Free to use for both commercial and non-commercial games. Please give credit.


Download


http://pastebin.com/e465Ucdf


Notes


The plugin originated from this request: http://forums.rpgmakerweb.com/index.php?/topic/49035-load-notesnotetags-from-text-files/
 
Last edited by a moderator:

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
631
Reaction score
348
First Language
English
Primarily Uses
N/A
Works wonderfully. Thanks again for taking on this request.
 

Bicept

Jack of Most Trades
Veteran
Joined
Oct 22, 2015
Messages
34
Reaction score
25
First Language
English
Primarily Uses
RMMV
This is great!
 

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
527
Reaction score
106
First Language
English
Primarily Uses
N/A
I've noticed a tendency of the game to hang upon initial (test) start after I've altered the JSON files associated with this plugin.

I am only guessing, as it seems totally intermittent, or I would spend time trying to isolate it. And it doesn't help now that I have all my note tags externalized, I can't play test without this plugin!

I was wondering if anyone else has experienced this.
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
859
First Language
German
Primarily Uses
Start-up might take a bit longer, since i'm loading additional files and replace all tags with their content. The only part that could really make the game "hang" (as in, not even showing the "Now Loading" text) would be in DataManager.extractMetadata(), but since this is only ever called inside an Ajax call, it shouldn't really affect the game.


The main problem here is, that i start loading my files the moment DataManager loads its own. extractMetadata is called, when a file has been loaded asynchronously and i need to make sure, that my files have already been loaded, so i pause the thread (in a pretty...rough way, i'll admit). All lags might be solved by adding a small wait to the loop, so it doesn't have the tendency to blow-up memory usage.


/edit: I fixed the issue by properly using callbacks instead of horrible, empty loops (don't do this...ever). I'll add comments and will update the plugin in the next few minutes.


//edit: The plugin has been updated. Please note, that it probably has to be placed below everything other plugin that deals with DataManager.extractMetadata() to work correctly (shouldn't be too many, if any).
 
Last edited by a moderator:

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
527
Reaction score
106
First Language
English
Primarily Uses
N/A
Thanks for the quick update!
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
859
First Language
German
Primarily Uses
Fixed a bug that caused the last version of this plugin to not work at all.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Writing out an idea for the No Travel Game Jam. I have a general plot and challenge written out, it's just a matter of filling the rest in and making it interesting.
A definite difficult time right now. How is everyone doing during this pandemic? I already have seen furloughs and layoffs.
Hollow 1977 wrote on Archeia's profile.
Hope you and your family are doing well during this difficult time. :)
My elderly neighbor whom I've been buying groceries for just got carried out of his home on a stretcher by guys with hazmat suits. Considering I've been his only point of contact for the past month it's probably safe to say my boss was right to tell me to stay home once I developed a mild cough after all.
Damn. All these new features to the forums. Takes some getting used to.

Forum statistics

Threads
95,642
Messages
930,674
Members
125,963
Latest member
highchloride
Top