设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 98|回复: 0

[制作教程] Introducing Placeholder Affix Descriptions

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    前天 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    4456

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    22919
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    28269

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    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:



    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!

    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:



    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.

    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.


    本贴来自国际rpgmaker官方论坛作者:Tsukihime处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/introducing-placeholder-affix-descriptions.36366/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-7-14 15:46 , Processed in 0.099900 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表