Iavra Note Files

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
862
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
644
Reaction score
378
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
540
Reaction score
110
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
862
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
540
Reaction score
110
First Language
English
Primarily Uses
N/A
Thanks for the quick update!
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
862
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 Profile Posts


finally, the B-tile is added to the forum and steam!
I hope my annual #DoItForHargon contest gets lots of entries this year (since a Playstation 5 is a pretty big prize lol) XD On further news - I'm back to game devving next week after hiatus cause of that tragedy of losing everything I own.
Rome Trastevere deserve a tileset. Mumble mumble...
Before the full time job, I can make 1 MZ plugin per day, even though it's still hard; With the full time job, making 1 such plugin per week becomes just as hard lol

Forum statistics

Threads
102,989
Messages
996,505
Members
134,463
Latest member
adafon
Top