RPG Maker Forums

I am new to coding in rpg maker and am trying to learn some to help me with my own idea, which is in its infancy. I was learning how to efficiently use notetags, reading tutorials and all, yet my testing has returned a 0 or nil. The idea is to have skill sets (Perception, Stealth, Bluff...) attached to each character via notetags and use those numbers as the core of their custom abilities Similar to D&D, for those who have played. However, I have received a 0, when using a single number and nil when trying a array. I do have coding experience in C++, C#, .net, Basic, and many others yet have not used them in many years and am rusty.


The script I've been tinkering with:


class RPG::Actor
  def Skill_Base
    if @note =~ /<Skillset: (.*)>/i
      $game_variables[1] == $1.to_i
      return true
    else
      return false
    end
  end
end


The notetag which is with the chacter itself and not the class:


<Skillset: 9>


And here is the event used to test it:


@>Conditional Branch: Script: $data_actors[1].Skill_Base
@>Text: -, -, Normal, Bottom
: : \V[1]
@>
: Else
@>
: Branch End
@>


Any help would be appreciated. Thanks in advance.

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