This script provides various note-tagging functionality. It implements the “Note Files” specification. It supports the following features
-Automatically loading external notes stored in text files -Note Sections -Explicitly loading external note files from your note box
This script adds functionality for handling external Note Files which are associated with an object.
It also adds Note Sections to your notes, allowing you to partition your note into different sections and quickly retrieve a block of text inside the notebox without having to parse the entire note yourself.
This scripts provides external note files for all objects that originally supported note boxes, as well as the following objects
External note files allow you to manage all extra notes in an organized fashion. Because you can reference the same note file from multiple objects, you can also re-use a single note.
This script should be placed above custom materials.
Suppose you wanted to add a note to the first drop of your enemy
tagging
You would begin by creating a note section in the enemy's note box
CODE
<note: drop_item 1> </note>
The 1 means you are adding this to the first drop item.
Now you want to actually do something with the note, as you would with any other note parsing. You will alias the `load_notetag` method defined for drop items
CODE
class RPG::Enemy::DropItem
alias: th_load_notetag :load_notetag def load_notetag p "Hi, it works" th_load_notetag end end
And this is basically how you would tag drop items. The same applies for enemy actions
CODE
<note: action 2> your note </note>
This will create a note for the second action.
Storing your notes in external files
This script supports external note files. There are two ways to access them.
1: Editing the note file associated with the object
note files
When you first run this script in test play, it will create a Notes folder in your Data folder. In the Notes folder you will see more folders, each corresponding to different types of data in your project.
The note directory is organized based on data type and data ID, so for example if you wanted to edit weapon 6, then you would go into the Weapons folder and look for weapon6.txt. Anything you type here will be automatically loaded into weapon 6's notes when the game starts.
Map events are stored in the specific Map folder, and each page of the event is stored with the event, under the appropriate page number. For example, page 4 of event 7 would be stored in
event7_page4.txt
Enemy drops and enemy actions can be found in the Enemies folder.
enemy5_drop3.txt would correspond to the third drop for enemy 5 enemy2_action1.txt would correspond to the first action of enemy 2
2: Explicit access
referencing note files
You can have multiple external note references in a single note box. Use the following tag:
CODE
<note_src: PATH> <note_src: PATH2>
All notes are located at "Data/Notes", and supports subfolders.
This applies to note sections as well. So for example if I wanted to add a new drop item to my slime, and I decided to store it in an external note whose path is "Data/Notes/Enemies/Slime/drops.txt", I would tag the drop section with
Where obj is some RPG::BaseItem object such as an actor, enemy, item, ...
This will return an array of NoteSection objects, which stores the name of the section, any extra arguments (as a string), as well as the note for the section, as defined below
CODE
class NoteSection
attr_accessor :name # the name of this section attr_accessor :ex_data # extra data that you might need, as a string attr_accessor :note # the contents of the note
def initialize(name, note, data="") @name = name @ex_data = data.strip @note = note.strip end end
You can decide how you want to work with this data. I don't have any ideas beyond enemy drop items and enemy actions so I can't give much help here.
X-M-O
Oct 28 2012, 09:40 PM
Great job on this script! ^^ We need more RGSS3 scripts, so thank you.
+5 Rev Points! =]
Tsukihime
Oct 29 2012, 06:01 PM
I post most of my stuff on rpgmakerwebs and rpgmakervxace
X-M-O
Oct 29 2012, 06:27 PM
I'm sure, lol. It is good to see it here as well though.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.