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

[制作教程] Change Hero graphics depending on equipment

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

    连续签到: 2 天

    [LV.7]常住居民III

    4446

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 2026-7-6 19:41:16 | 显示全部楼层 |阅读模式
    This tutorial will show you step by step how to change your Hero's sprites (in-battle as well as overworld) and facesets depending on what equipment they currently wear.

    1.GRAPHICS
    First of all, you need to have graphics of your Hero's sprites and facesets wearing different kind of suits, and import them into your project. Make sure your graphics have the correct dimensions and are 256 colour PNG files.

    2. DATABASE
    Open your Database, under the Actors tab set your Hero's starting equipment and graphics. Go to the Classes tab and create entries for each of your Hero's suits. Go to the Animations 2 tab and create entries for each of your Hero's suits.

    Also, under the Item tab, create entries for all the suits you want your Hero to be able to equip.

    3. COMMON EVENTS

    In the Database under the Common Events tab, create entries called Update Sprites, Store Hero Data and Call Hero Data.

    4. UPDATE SPRITES

    Set the common event called Update Sprites trigger to a Parallel Process.

    Event Command -> Call Event

    Call Common Events: Store Hero Data.

    Event command -> Conditional Branch

    Variable: If Hero Suit is not equal to Current Hero Suit

    Create entries for both these variables; they will be set later in the tutorial.

    Event command -> Conditional Branch -> Tab 2

    If Hero has Suit 1 equipped... and check Execute Custom Handler if Condition Not Met.

    Event Command -> Change Actor Class

    Set Hero's class to the class corresponding to the equipped suit you selected in the Conditional Branch, and have no change occur to anything since we're only updating graphics.

    Event Command -> Change Actor Graphic

    Select your Hero and its correct sprite.

    Event Command -> Change Actor Faceset

    Select your Hero and its correct faceset.

    Event Command -> Change Equipment

    Select your Hero and make him change into the equipped suit.

    Branch End.

    Event Command: Control Variables

    Set Current Hero Suit equal to variable Hero Suit.

    Event Command -> Call Event

    Call Common Events: Call Hero Data.

    Event Command -> Wait

    Set Time 0x0.1 seconds to prevent lag.

    Under the Else of your Conditional Branch you put the same line of events for other suits for your Hero. This is an example of what it would look like for a Hero that has graphics for 2 different suits and 1 for if he isn't wearing any suit:





    5. STORE HERO DATA

    Set the common event called Store Hero Data trigger to None.

    Event Command -> Variable Operations

    Open Single Variable for the variables list. Next, make entries for all the variables you're going to need for this part:

    -Weapon

    -Shield

    -Helm

    -Accessory

    -EXP

    -Max HP

    -HP

    -MP

    Create variables events for each of these categories set equal to your Hero's individual stats and equipment pieces.

    Event Command -> Change HP

    Decrease your Hero's HP by variable Hero HP.

    Event Command -> Change MP

    Decrease your Hero's MP by variable Hero MP.

    Event Command -> Change EXP

    Decrease your Hero's EXP by variable Hero EXP.

    6. CALL HERO DATA

    Set the common event called Call Hero Data trigger to None.

    Event command -> Conditional Branch

    Variable: If Hero's equipment piece (do this for each piece of equipment) is not equal to 0.

    Event Command -> Change Equipment

    Change your Hero's equipment to the pieces you stored in each variable in step #5.

    Branch End.

    Event Command -> Change HP

    Increase your Hero's HP by variable Hero HP.

    Event Command -> Change MP

    Increase your Hero's HP by variable Hero MP.

    Event Command -> Change EXP

    Increase your Hero's HP by variable Hero EXP.

    Event command -> Conditional Branch

    Variable: If Hero's max HP is not equal to Hero's current HP.

    Event command -> Conditional Branch

    Variable: If Hero's current HP is not equal to 1.

    Event command -> Change HP

    Decrease your Hero's HP by 1.

    Branch End.

    7. TEST

    If you followed these steps correctly, it should be working now. If not, feel free to ask questions.


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-14 14:24 , Processed in 0.109684 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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