Properly Use Other Note Tag Forms

Thanks to the other scripters, I was able to know how to use this:

<note tag> and this: <note tag: x, y, z>

but how can I implement the other note tags such as:

<action>

   damage: x

   text: x

   graphic: x

</action>

where damage is an integer / float, text is a string and graphic is an icon number from the iconset?

I also saw this kind of note tagging:

<quotation>

"This is a German Salad."

</quotation>

I have also tried to read some parts in Rubular but I don't exactly know how to use it.

Any help is much appreciated.
I'd say look at yanfly's scripts and see how he loaded those kind of tags... It involves splitting the note per break code and checking each one... It's not optimal but that's an easy way to start.

Else you could do multiple stage checks. Something like

Code:
if self.note =~ /<notetag>(.*)<end_notetag>/m  text = $1.to_s  if text =~ /<damage:(.*)>/    #dosomething_like:    p $1.to_s    #prints out the value of damage  end  if text =~ /<text:(.*)>/  #andsoon  endend
That needs to be separates ifs instead of if/elsifs so that it could process all of the tags inside the first tag..
Ahhh, of course, why didn't I think of that? Thanks and have a nice day 😀

Topic can be locked 😀

Original thread: https://forums.rpgmakerweb.com/threads/properly-use-other-note-tag-forms.38417/