Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> Note Manager
Tsukihime
post Oct 28 2012, 07:23 PM
Post #1


Level 25
Group Icon

Group: Revolutionary
Posts: 561
Type: None
RM Skill: Undisclosed
Rev Points: 25




Note Manager
-Tsukihime

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

-Enemy Drops
-Enemy Actions
-Troops
-Animations
-Map Events
-Map Event Pages

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.

Download

Get it at Hime Works

Examples

Some scripts to demonstrate how it may be used

Usage

Note tagging

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

CODE
<note: drop_item 5>
  <note_src: Enemies/Slime/drops.txt>
</note>



Defining your own sections

This script also provides functionality for developers that wish to define their own note sections.
Actually, there isn't much to it.

defining sections
Suppose you asked your users to tag their note box with

CODE
<note: your_custom_section args*>
   your_note
</note>


You can retrieve this section using

CODE
obj.note_sections(:your_custom_section)


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.


This post has been edited by Tsukihime: Mar 19 2013, 10:19 AM


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   
 
Start new topic
Replies (1 - 3)
X-M-O
post Oct 28 2012, 09:40 PM
Post #2


Level 82
Group Icon

Group: Director
Posts: 6,347
Type: None
RM Skill: Undisclosed




Great job on this script! ^^
We need more RGSS3 scripts, so thank you. happy.gif

+5 Rev Points! =]


__________________________
Go to the top of the page
 
+Quote Post
   
Tsukihime
post Oct 29 2012, 06:01 PM
Post #3


Level 25
Group Icon

Group: Revolutionary
Posts: 561
Type: None
RM Skill: Undisclosed
Rev Points: 25




I post most of my stuff on rpgmakerwebs and rpgmakervxace


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   
X-M-O
post Oct 29 2012, 06:27 PM
Post #4


Level 82
Group Icon

Group: Director
Posts: 6,347
Type: None
RM Skill: Undisclosed




I'm sure, lol. It is good to see it here as well though. happy.gif


__________________________
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 23rd May 2013 - 07:49 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker