RPG Maker VX Ace
Feature Conditions
Introduction
This script allows you to add "feature conditions" to any objects that hold
features. These conditions are used to control whether the features from an
object are applied to your actor or not.
For example, suppose you have shield equips that have special elemental
immunities when the "guard" state is applied. You can add these features to
the shield and then use feature conditions to indicate that the "guard" state
must be applied before the features are transferred.
All feature conditions must be met in order for the features to be applied.
If no feature conditions are specified, then the features are applied by
default.
Note that feature conditions are applied to all features in an object and
currently cannot be applied to specific features within an object.
Features
Control when features should be applied to your actor or enemy
The Code
License Terms
Attribution 3.0 Unported - You must attribute the work in the manner specified by the author or licensor. Commerical use allowed.
Instructions
Installation
Place this script below Materials and above Main
Usage
To add a feature condition, use the notetag for any objects with features, such as Actors, Classes, Weapons, Armors, Enemies, or States. If you are using my Feature Manager, then it will be applied to skills and items as well.
<feature condition> FORMULA </feature condition>
For any valid ruby formula that returns true or false. Three variables are available for your convenience:
a - subject the feature applies to s - game switches v - game variables
By "subject" I refer to "actor" or "enemy". For example, a state can be applied
to both actors or enemies, so if the enemy has the state, then that enemy is
the subject. If the actor has the state, then that actor is the subject. Be
careful when writing your formulas.
Examples
Here are some quick examples of some conditions you might have
* Party has more than 5000 gold
$game_party.gold > 5000
* Actor’s level is between 20 and 40 (inclusively), if the subject is an actor
a.actor? && a.level => 20 && a.level <= 40
* State 23 is applied
a.state?(23)
Credits & Thanks
Hime Works
Terms & Conditions
* Free to use in commercial/non-commercial projects
* No real support. The script is provided as-is
* Will do bug fixes, but no compatibility patches
* Features may be requested but no guarantees, especially if it is non-trivial
* Credits to Tsukihime in your project
* Preserve this header