This script introduces the concept of “item affixes”. Prefixes and suffixes may be assigned to your equips to provide additional parameter bonuses or features.
For example, you might have a prefix called “Fiery ” that gives a +20 bonus to ATK and adds a fire elemental damage. When your Short Sword has this prefix, its atk power will be higher than regular Short Swords and will deal more damage to targets that are weak against fire.
An item may have at most one prefix and one suffix.
- Selchar’s Random Equip Affixes
In the script editor, place this script below Instance Items and above Main
Prefixes and Suffixes are created as Armors into your database.
- Choose a name. You must manually add in the appropriate spaces before or after the name so it will be displayed properly in the game
- Choose parameter bonuses for your affix.
- Choose feature bonuses for your affix
- Setting a price increases the buy/sell value of the equip
Applying Placeholder Descriptions
Placeholder descriptions are special descriptions for your affixes. They allow you to add new text to an equip’s description without overwriting
the original description.
For example, if you add a prefix to an equip, you might want to show both the original equip’s description as well as the prefix’s description. To do this, use a special symbol: %s
The %s is the placeholder that will be replaced with the original equip’s description. So if you had a short sword with a description
Basic short sword.
and you had a prefix with the description
%s Adds fire elemental damage.
When the prefix is added to the short sword, the short sword will now have the resulting description
Basic short sword. Adds fire elemental damage.
For a more detailed description, take a look at this tutorial.
Note that if you would like to use regular % sign in your description, you must write %%.
Setting affixes to your equips
To set prefixes or suffixes, use the script calls
set_prefix(equip, prefix_id) set_suffix(equip, suffix_id)
Where the equip is an RPG::Weapon or RPG::Armor object, and the ID is just the ID of the affix in your armor database.