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

[制作教程] [Tutorial] 姫Hime’s Core – Equip Slots

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

    连续签到: 2 天

    [LV.7]常住居民III

    4447

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    Ever felt like the default equipment slots are too limited? Ever felt like you want to gear up your character to the teeth? Maybe your main character is a three-armed mutant and you want to equip him/her with 3 weapons? Or you are wanted to be able to equip a weapon on each and every equipment slot possible? Well, this script is the answer to your prayers.

    Table of Contents


    • What is Hime’s Core – Equip Slots script?
    • How to install Hime’s Core – Equip Slots script?
    • How to use Hime’s Core – Equip Slots in your own game?
    • Add-ons to Hime's Core – Equip SlotsCustom Equip Types – set up custom slot types
    • Multiple Equip Types – allows you to place an equip in multiple slots
    • Equip Slot Sealing – allows you to seal custom equip slots
    • Equip Slot Fixing – allows you to fix custom equip slots
    • Utils: Change Equip – script calls to change equips, if the event editor can’t help
    • Dynamic Equip Slots – add or remove equip slots during the game

    Notes:


    • Any of the icons used in this tutorial belongs to Blizzard Entertainment. You may not ask me for permission to use them in your game and I never claim ownership over them.
    • Hime's scripts are free to use in non-commercial projects. Please contact Hime if you wish to use these scripts in a commercial projects. The Terms of Use can be found here, and you can contact Hime directly by clicking here.




    What is Hime’s Core – Equip Slots script?

    This script allows us to customize our actors' equipment slots. We can choose exactly which slots we want to have available for each actor/class. We can also choose how many (or how few) of each slots we want to have for each class/actor. With a simple reordering of a few numbers in the script, you can easily change the order of how the equipment show up in your equipment window.

    Each actor comes with 5 equipment slots in RPGmaker; weapon, shield, head, body, and accessory. You are limited to one equipment in each slot and you cannot add additional equipment slot. The seal equip feature allows us to disable some equipment slots, but they will still be visible in-game. This can be frustrating for fussy individuals such as me.

    Some people might prefer Yanfly's Equipment script, but it feels like Hime's Core Equip Slots script (along with all the add-ons) is easier to use.





    How to install Hime’s Core – Equip Slots script?

    Get the script from Hime’s website, open the script editor (F11) and insert it under the “▼ Materials section” and above the “▼ Main Process section”. It is the same as any other script. Remember to give the script the appropriate name so that you can find it easily when installing add-on to this script later. Even though most of the add-on does not require you to do so, it is a good idea to place the add-on scripts below the Core script, some add-on will require you to do this so pay attention to the requirement of each add-on.

    How to use Hime’s Core – Equip Slots in your own game?

    Before we start, I would like to mention that this is just the core scripts, therefore the functionality is limited. This script can allow you to have multiple equipment for each slot, changing the order of which equipment slot show up first and hide the ones we want to seal. You are bound to the equipment slot rule; you cannot equip something into an equipment slot that they do not belong toRefer to the add-ons if you are looking for more advanced functions.

    By default, there are five equip slots: weapons, shields, headgear, bodygear, and accessory. And thus, each of these slot comes with their own type ID. What this means is that the first equipment slot (slot ID = 0) will only accept equipment of type 0, the second equipment slot (slot ID = 1) will only accept equipment of type 1, and so on. Here's the default equipment type ID and the default equipment slot ID:


    • 0 - weapon
    • 1 - shield
    • 2 - headgear
    • 3 - bodygear
    • 4 - accessory
    These are built-in and you cannot change it with the Core Equip Slots script. You will need to look at Hime's Custom Equip Types add-on to change any of that.

    Go to Script Editor (Click Tools > Script Editor or press F11), find the script and go to line 90. The section underneath Configuration is the only section that you need to worry about.





     

    Here we can change the order the weapon/armor show up in our equipment. Maybe we want to show the character's armor before the character's weapon. We can easily do that by re-arranging the numbers located within the the square brackets for Sort_OrderRemember to include all the slots available! We cannot leave out any of the available slot or we will run into error.





     





     

    Now that we got the script and the slot order sorted, we will move on to tagging the actors, classes, weapons and armors. First, we will need to go to our game's database to insert the note tags. If you are unsure what/where to insert the note tags, open the Database window (click on Tools > Database, or press F9), and refer to the image below





    The note tag for the Actors and the Class tab is <equip slot: x>, where x is the equip type number for the equipment that fits that slot. Note tags added to the class tab will serve as the default equipment slot for that particular class. You can overwrite this and create a unique character by individually tagging each actors in the actor tab.

    If the Paladin class has the following note tags:

    <equip slot: 0><equip slot: 1><equip slot: 4>This means that the Paladin class can only equip a weapon, a shield and an accessory. If we want to open up other equipment slot for a particular actor we do so by adding more tags.

    By tagging the actor with these tags:

    <equip slot: 0><equip slot: 0><equip slot: 0><equip slot: 2><equip slot: 2><equip slot: 4>This means that the actor will have 3 weapon slots, 2 helmet slots and 1 accessory slot no matter what class the character changed to. I would personally avoid tagging actor individually, unless I am absolutely sure that's the way that character functions.

    We can also expand on the Actor tag further to include the actor's starting equipment using <equip slot: x w1> or <equip slot: x a1>. We use 'w' for weapon and 'a' for armor. <equip slot: x w1> simply means that we will try insert weapon, whose ID = 1, into equipment slot x. <equip slot: x a1> means that we will try to insert armor, whose ID = 1, into equipment slot x. The number we use depends on which weapon/armor that we want to try to insert to equipment slot x.

     

     





     





     

    Add-ons to Hime's Core – Equip Slots


    • Custom Equip Types – set up custom slot types
    • Multiple Equip Types – allows you to place an equip in multiple slots
    • Equip Slot Sealing – allows you to seal custom equip slots
    • Equip Slot Fixing – allows you to fix custom equip slots
    • Utils: Change Equip – script calls to change equips, if the event editor can’t help
    • Dynamic Equip Slots – add or remove equip slots during the game



    Custom Equip Types Add-on

    SpoilerRequirement(s): None.

    Maybe you are not satisfied with the limited default equipment slot. Maybe you want to include other slots such as cape, boots, gloves, belt, shoulder guard, etc.Or maybe you are not satisfied with how RPGmaker name the equipment slots.This add-on to Hime's Core Equip Slots script is your solution.

    This script allows you to create custom equipment types and equipment slots with their own names. Combined with the Core Equip Slot script to create more slots for your actors and class, you can fully customize what each actor/class can wear and how they are presented in-game.

    How to use this Add-on?

    Step 1: To start off, get the script from here, open the script editor (F11) and insert it under the “▼ Materials section” and above the “▼ Main Process section”. I recommend putting this underneath Hime's Core Equip Slot script just for the sake of good organization.

     





     





     





     





     

     

    To change the amount of equipment slot for each equipment type, all we have to do is to have multiple lines of <equip slot: x> in the class or in the actor tab:





     





     





     





     





     





     





     

    That's about it for the Custom Equip Type script.





    Multiple Equip Types Add-on

    SpoilerRequirement(s): Hime's Core Equip Slot script, Hime's Multiple Equip Types script

    Ever came across a situation where you want to create a weapon that can go in either the weapon or the shield slot? There are ways to do so using only the Custom Equip Types Add-on above, but it can get really messy. Okay, let's be serious. It is impossible without this add-on.

    How to use this add-on?

    Step 1: To start off, get the script from here, open the script editor (F11) and insert it under the “▼ Materials section” and above the “▼ Main Process section”. Make sure that this script comes after Hime's Core Equip Slot script and Hime's Multiple Equip Slot script.





     

     





     





    Equip Slot Sealing Add-on

    SpoilerRequirement(s): none

    Can be used for: Actor, Class, Weapon, Armor, States

    By default, we can seal equipment slot using the Seal Equip feature, but this is only limited to the default equipment types (weapon, shield, headgear, bodygear, and accessory). We will need another solution if we want to seal our custom equipment slot. This script will let you achieve just that.

    How to use this add-on?

    Step 1: To start off, get the script from here, open the script editor (F11) and insert it under the “▼ Materials section” and above the “▼ Main Process section”. There are no requirement about whether you should put this script in the script editor.





     





     





     









    Equip Slot Fixing Add-on

    SpoilerRequirement(s): none

    Can be used for: Actor, Class, Weapon, Armor, States

    By default, we can also fix equipment slot by using the Fix Equip feature, but that is only limited to the default equipment slots (weapon, shield, headgear, bodygear, and accessory). If we have custom equipment slots, we will need this script to fix them. Once a gear slot is fixed, the player will not be able to change the equipment in that slot manually till the fix is gone. Since equipment slots are permanently fixed if you used the <fix etype: x> note tag for your actor/class, you might ask "How can I change equipment if they are fixed?", I will get to that after this.

    How to use this add-on?

    Step 1: To start off, get the script from here, open the script editor (F11) and insert it under the “▼ Materials section” and above the “▼ Main Process section”. There are no requirement about whether you should put this script in the script editor.

     





     





     







     

     

     

    Utils: Change Equips Add-on

    SpoilerRequirement(s): none

    Can be used in: Event, Common Event

     





    How to use this add-on?

    To start off, get the script from here, open the script editor (F11) and insert it under the “▼ Materials section” and above the “▼ Main Process section”. There are no requirement about whether you should put the script in the script editor.

    Remember how we have the ability to fix equipment slot using Hime's Equip Slot Fixing script, so that the players cannot change their equipment manually? You can use this Change Equip script and change the equipment is fixed slot through script call. There are two different groups of script call that we can use:


    • Specifying a particular slot ID
    • Specifying a particular etype ID
    This can be a little confusing, so please pay attention. There is a subtle difference between the ID number used for the two methods!!!

    Changing equipment by specifying a particular slot ID

    Changing equipment by specifying a particular slot ID can be done through the following script calls:

    Actor ID, actor_id, is the ID number of the actor involved. By default, the player is using the actor with the ID number 1.
    Slot ID, slot_id, is based on how you order your equipment slot using the previous script, Hime's Core Equip Type script.
    Item ID, weapon_id or armor_id, is the ID number of the equipment you want to equip. Refer to the image below.

    equip_weapon(actor_id, slot_id, weapon_id)equip_armor(actor_id, slot_id, armor_id)remove_equip(actor_id, slot_id)















    Changing equipment by specifying etype ID

    SpoilerChanging equipment by specifying a particular etype ID can be done through the following script calls:

    equip_weapon_by_etype(actor_id, etype_id, weapon_id)equip_armor_by_etype(actor_id, etype_id, armor_id)Actor ID, actor_id, is the ID number of the actor involved. By default, the player is using the actor with the ID number 1.
    Equipment type ID, etype_id, is based on the value assigned to each slot using Hime's Custom Equip Type script. Refer to the image below.
    Item ID, weapon_id or armor_id, is the ID number of the equipment you want to equip.

















    If the weapon/armor you specified in your script call does not exist, then nothing will happen.






    Dynamic Equipment Slot Add-on

    SpoilerRequirement(s): Hime's Core Equip Slot script

    Can be used in: Event, Common Event

    With this add-on, you can increase or decrease the number of equipment slot that your actor has through a script call:


    • add_equip_slot(actor_id, etype_id)
    • remove_equip_slot(actor_id, etype_id)
    It is relatively easy to use, however you have to be careful about using this with the Change Equip add-on's method of changing equipment by particular ID. Remember these methods in the previous add-on?

    equip_weapon(actor_id, slot_id, weapon_id)equip_armor(actor_id, slot_id, armor_id)remove_equip(actor_id, slot_id)The slot_id is determined by how the order of equipment that show up, since this, dynamic equipment slot add-on, adds and re-arranges your equipment slots, it will interfere with the slot ordering. I will provide an example for this shortly.

    How to use this add-on?

    To start off, get the script from here, open the script editor (F11) and insert it under the “▼ Materials section” and above the “▼ Main Process section”. Make sure this script is below Hime's Core Script in the script editor.

    Then all you need to do is to set up the NPC event page and use the script call to add/remove equipment slot(s).





     





     





     





     










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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-14 14:35 , Processed in 0.093935 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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