I have implemented a new feature for Item Affixes.
Affixes are objects that you can attach to equips, and the affix properties are transferred to the equip including the name, parameters, and features. For example, if you have a prefix called “Fiery” and you attached it to a “Short Sword”, you will now have a “Fiery Short Sword” with extra parameter bonuses and features from the prefix.
A single equip can have up to one prefix and one suffix at the same time. For example, if we had a suffix called “of Sparkles” and you attached to your new “Fiery Short Sword”, this will result in a “Fiery Short Sword of Sparkles” with all of the bonuses from both affixes.
The new update allows you to modify the equip’s description. It uses something called “placeholder descriptions” which determine how the description will be modified. Continuing from our example above, suppose our Short Sword has the following description:
Here’s how it looks in-game:
Nothing too special. Very default RPG Maker.
Introducing Placeholder Descriptions
Turning to our database, we have two affixes, one prefix and one suffix respectively, as shown:
Take a look at the description: there’s a %s!
This is called a “string format specifier”, or in other words a placeholder for a string. What string does it get replaced with? Take a look at the following screenshots.
We start by adding the prefix to our Short Sword:
This is the same Short Sword that we had from before, except two things have changed:
- The word “Fiery ” has been added to it.
- The description has been modified.
How has it been modified? It took the base equip’s description and then replaced the placeholder!
Now what happens when we add a suffix? Given that it also uses a placeholder description, what would it use to fill in the placeholder? Here is our Short Sword with the Fiery prefix, with the ” of Sparkling” suffix added:
There’s a lot of things going on here
- The name of the suffix has been appended to the equip
- The name of the prefix is preserved
- The prefix’s description is preserved
- The suffix’s description is barely visible, but it’s there
One thing you should notice is the order that the descriptions have been modified: the prefix is applied first, followed by the suffix.
You can see that this screenshot looks pretty terrible. I could have made something more presentable, but it demonstrates something important that you need to know as well: without automatic word-wrapping descriptions, you will need to keep in mind the length of your descriptions and all of the possible combinations you could put together which may result in potentially very long strings that will end up getting cut off.
If you’re using affixes in your game and you are looking for a way to have your affixes modify the equip’s descriptions, this new feature provides you with some flexibility over how the description is applied.
Note that this operates on the “description” property of the equip.
This feature is built into the Item Affixes script.
Spread the Word
If you liked the post and feel that others could benefit from it, consider tweeting it or sharing it on whichever social media channels that you use. You can also follow @HimeWorks on Twitter or like my Facebook page to get the latest updates or suggest topics that you would like to read about. I also create videos showcasing various RPG Maker techniques on my Youtube channel.