RPG Maker Forums

So, I have managed to use text from skill notetags as data before (see below), using examples from scriptors.


But this data has always been based on numerical digits and not arrays, and I'm not really experienced with or can comprehend enough of Regexp processes to figure this out myself.


#Tag items and skills with <armor ignore: x>
#A value of 50 means that an opponent's armor rating will only be
half as effective.
#Do not include the percentage symbol.
module TH
  module Armor_Ignores
    
    Regex = /<armor[-_ ]ignore:\s*(\d+)>/i
  end
end
#===============================================================================
# ** Rest of script
#===============================================================================
module RPG
 class UsableItem < BaseItem
    def armor_ignore
      return @armor_ignore unless @armor_ignore.nil?
      load_notetag_armor_ignore
      return @armor_ignore
    end
    
    def load_notetag_armor_ignore
      res = self.note.match(TH::Armor_Ignores::Regex)
      @armor_ignore = res ? res[1].to_i : 0
    end
  end
end


With this script tidbit example I just posted, I could use in a formula 'item.armor_ignore' for additional processes.


I know that the adjustment to be made would have to be at the

Regex = /<armor[-_ ]ignore:\s*(\d+)>/i
part.


I would like to be able to tag in a skill notetag <secondary effects: [data]>


So if I were to use 'item.secondary_effects' in a formula, it would return the [data] array in the skill's notetag.


An example of an application of this would be for me to make [data] into, say,


[["Poison", 0.3, [1,2], physical, true], ["Burn", 0.15, [1,2], magical, false]]


"Poison" would be the display name for the secondary effect in the battle log, '0.3' would be the base chance of the ailment, [1,2] would be the stat influences of Attack and Luck respectively (meaning that the ATK stat would be normally influential in the effect chance, and the LUK stat would be twice as influential in the effect chance), 'physical' would mean that the chance would be multiplied by the target's Physical damage rate, and 'true' would dictate that the chance would be increased if the skill ended up being critical.

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,547
Members
137,835
Latest member
yetisteven
Top