Multiple Equip Types
This script allows you to assign multiple equip types to an equip. By default, each equip has only one equip type. For example, a sword is a “Weapon” equip type and can only be placed in “Weapon” slots. A wooden shield is a “Shield” equip type and can only be placed in “Shield” slots.
With multiple equip types, you can place an equip in any slot that it is compatible with. For example, you could create a slot called “left hand” and another slot called “right hand” and then specify that certain equips can only be held in your left hand, certain equips in your right hand, and certain equips in any hand.
Download
Script: download here
Required: Core Equip Slots, Custom Equip Types
Installation
Place this script below Custom Equip Types and above Main
Usage
Equip types can be specified using the following note-tag
<equip type: x>
Where x
is the equip type ID. These are defined in the Custom Equip Type
table that you set up.
Example
Suppose equip type 0 is left hand, and equip type 1 is right hand. You can specify that an equip can be placed in both left and right hands using the note-tags:
<equip type: 0> <equip type: 1>
Hi, do you think it would be possible to have the exact same functionalities, but for weapon types instead of equip types ?
I love it because that allows you the choice to drop shield in order to have some equipment (torch, for example) on the other hand,
I received a NoMethodError on line 133. It’s when I use the Luna Engine.
What if you take out Luna Engine?
I’ll try it now.
Yup. It was the Luna Engine breaking the script for some reason…
Put together a new project with only luna engine and the script, demonstrating the issue.
Then send me the project so I can look at it.
OK. I’ve got a Google Drive file of it. Here you go:
https://drive.google.com/folderview?id=0B2qqPiS0iIg9RTFfUXhHX0t4cXc&usp=sharing
File was corrupted. I’ll have to make a new one…
Now it works! You can use it now!
I’ve updated the script to do some additional checks in case things aren’t as expected. See if this works now.
It works now! Great job!
Hime, can i assign an armor/weapon with 3 or more types?
I tried with five types and a bug happened:
The armor shows to equip with the slots, but only equips the first. When i try to equip in another slot the armor just disappears. I use your custom slot/core equip scritps too.
Is that normal?
No, that is not normal. I have tried it right now where I tag a weapon with all 5 equip types, gave myself 5 copies of the weapon, and then equipped it top all 5 slots.
Verify that this occurs in a new project.
Hi Hime, I was looking for a script that did exactly this, and I’m eager to use it, but I’m getting an error every time I launch my game. The error goes as follows:
“Script ‘Core Equip Slots’ line 280: NoMethodError occured. undefined method ‘etype_id’ for #”
I’m not sure what the problem is. Could you help me out?
When I create a new project with only the required equip scripts, I don’t have that issue. Maybe it is a compatibility issue with another script?
Hi Hime, I was wonder if there was a way to check by slot id if anything is equipped at all.
You can check if
Where SLOT_ID is the ID of the slot. Remember that you need to subtract it by 1 to get the correct slot.
There may be some useful script calls here
http://himeworks.com/2013/10/utils-equip-checks/
Thanks, the game_actors[index].equips[slot] is exactly what I needed. I’m trying to fix a problem in an equipment scene that uses etype id instead of slot id. I’m not sure where you asked that but my email said someone asked that question.
This script solves a large problem I've been having with my project. By using this in conjunction with wtype_equipped?, skills can be made to have different follow ups depending on what a character has equipped in his/her offhand. For example, a swordsman that dual-wields a sword in the offhand can be made to have a chance to proc an offhand attack. On the other hand, if the offhand is equipped with a shield it can be designed to proc a shield bash. Now I just have to find a way to find the equivalent scriptcall for armor types. =P
Great script as usual! Very good for any project that utilizes flexible or permanent class changes.
If you're referring to my utility script for "equip checks" then it would be
atype_equipped?
orarmor_equipped?
depending on what you want to check.