Conditioned Traits
This simple script allows you to set level, skill and switch conditions to traits for actors, classes and enemies. Not flashy or sophisticated but it does the job.
Instructions
Use notetags in the desired database tab with the following syntax:
<trait_condition: x, y, z>
x = the trait number in the field (note that it starts at 0, not 1)
y = three possible strings: level (for actors), skill (actors and classes) and switch
z = either the level threshold or the switch/skill ID
Note for version 1.05: switch condition is available on equipment as well.
Posted on 09/12/2011, in RGSS3, RPG Maker VX Ace and tagged rgss3, script. Bookmark the permalink. 24 Comments.
Great job!
This adds a lot of versatility to traits. This inspires endless possibilities.
great! :3
I’m not sure why but the script stopped working with the full version of Ace. So I fixed it. Please download it again if you purchased the engine.
v1.03 – Important bug fix.
You say that the level option only works for actors. I can understand levels being an issue for enemies and equipment, but does this option work for classes?
Nope.
Classes don’t have levels, so even if I put a level tag on the classes, I’ll need to get the value from the actor.
I’m not very good at scripting, but is there an easy way to make these traits conditional based on skills so I have passive skills? For examaple, a skill ‘Crit% UP’ which gives the actor the trait ‘Crit Rate +5%’. I don’t want to have to make a load of switches for it. Thanks in advance 🙂
Well, that’s the kind of things more suited to a passive skills system but nevertheless, I’ve updated the script with this functionality. Just use <trait_condition: x, skill, y> where x is the trait number and y the skill ID.
Enjoy.
Oh wow! Thanks a lot!!! XD
Looks like i’m having a problem with this script. Whenever i make a conditioned trait and i start the game i get an error at line 199 says undefined method ‘<=' for false:FalseClass
I need more info. What exactly did you do?
I put in the actor’s notebox the following
then if this actor is in team, and i lauch the game, before it even starts i get that error.
I got the most updated release of the script as well.
ops it didnt show what i wrote… might be cause of the oh well its like this trait_condition: 0, level, 20
Forgot parenthesis when I updated last time =__=
I fixed it now.
Any tweak the the script so that you can put the note in the box for a class to learn a skill when the actor is a specific level via traits and then unlearns it when he changes subclasses? Kinda like how an Equipment Skill script makes the actor unlearn a skill if he removes the piece of equipment.
Reason for this is because I’m trying to make some of my actors skills class specific for their subclasses.
Subclasses? What are you even talking about?
Maybe he is talking about “Yanfly Class System” that adds subclasses to the players :O
Yeah, I guess I should of mentioned that lol. All Im attempting to do is have the actors learn skills through traits, and then when they change to a different class, they won’t know the skills any more.
Level condition only works for actors, not classes. You’d have to use switches for that and well, that’s not really what the script primary objective really is.
It’s not supposed to be a full skill learning system, so I won’t tweak it to work with subclasses I’m afraid.
Can you have multiple conditions for a single trait? (As in, say, requiring two or three skills or a learned skill and the actor being a certain level?)
It is possible to make this script compatible with “Runic Enchantment” (if i want use “trait_condition” on a rune in the Armors tab) ?
Great work! I was just trying to make a sort of summon system where if you have the summon of an element, you have added defense against that element. I was trying to make classes for every permutation ’til I found this script.
Pingback: YEA – Ace Menu Engine « Yanfly Channel