Introducing Placeholder Affix Descriptions

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.

What’s new?

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:

placeholderAffixDescriptions1

Here’s how it looks in-game:

placeholderAffixDescriptions3

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:

placeholderAffixDescriptions2

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:

placeholderAffixDescriptions4

This is the same Short Sword that we had from before, except two things have changed:

  1. The word “Fiery ” has been added to it.
  2. The description has been modified.

How has it been modified? It took the base equip’s description and then replaced the placeholder!

Placeholder Chaining

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:

placeholderAffixDescriptions5

There’s a lot of things going on here

  1. The name of the suffix has been appended to the equip
  2. The name of the prefix is preserved
  3. The prefix’s description is preserved
  4. 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.

Summary

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.

You may also like...

2 Responses

  1. Pablo Roberto “Jristz” Lezaeta Reyes says:

    Cool, loking for the description not give a hint on how those prefixes and afixes work.
    I mean, Mini-, Un-, Pre-,-ing,-ed.
    So, if I create and affix named Mini and add it to a Sword it will become “Mini Sword” but If I want if joint the words “Minisword” or change deppending on the letter (Sparkle+ing=Sparkling but NO Sparkleing) is not possible with the current scritpt, right?

    • Hime says:

      Correct, this script simply joins words together; it doesn’t provide rules for how they will be joined.

      I don’t know if there is a way to automatically determine whether a vowel should be dropped (shine ==> shining), or an extra letter should be added (eg: hit ==> hitting).

Leave a Reply

Your email address will not be published. Required fields are marked *