edited July 2020 in ORK Support
Hello
I have a question about efficient Equipitem classification.

1. I want to classify Equipment as follows:
All items have Normal, Magic, Rare, and Unique Grade.
And the items are divided into two-handed sword, one-handed sword, bow, wand, and other types.

In this case, how do I create a tree structure in ork's editor Item Types?

After creating Normal,Magic,Rare,Unique-Grade in item Types(parent Type)
Do I need to set the two-handed sword, one-handed sword, bow, and wand types as subtypes for each grade?

In other words,
normal (ParentType)-normal-two-handed sword, normal-one-handed sword, normal-bow, normal-wand (subtypes)
Magic (ParentType)-Magic-two-handed sword, Magic-one-handed sword, Magic-bow, Magic-wand (subtypes)
etc...

As above, do I have to make numerous duplicate subtypes??

Otherwise...

Two-handed sword (parentType)-normal-two-handed sword, magic-two-handed sword,
One-handed sword (parentType)-Normal-one-handed sword, Magic-one-handed sword ...
Bow (parentType) etc.....
Wand (parentType)

Should I set the reverse as above??

2. Is there a way to access a subtype of one item type in a script?
For example, equipshortcut.itemtype.subtype == xxxx

3. Is there a way to know where an equip item can be equipped? (equippableOn item checked in editor)
(In the editor, how to know the item checked in Equipment Part Set 0 of one item through scripting;SearchMethod as a whole other than entering a specific index)
In other words, return only the checked items from the entire equipable on, block part list..
Because, I want to write the following code. pseudo-code:

if (equipableOn.LeftHand == true && equipableOn.RightHand)
twohanded = true;

4. In the type setting of the equip item in the editor, the part to set the subType cannot be found.
For example, I want to set BerserkAxe as "grade-unique (parentType), two-handed sword (subType)"
However, only one item type can be set (in editor).

Isn't the purpose of the item type the same as above?
Am I using it wrong?
Need advice!!
The answer is always helpful Thank you!!!


ps. equipItem.Setting.partSet[0].IsEquipableOn(part id)
This function seems to search by a specific id, but I want to retrieve all part ids and only return a specific part. Is it possible?
Post edited by KESHYAS on
  • 1) Well, it's up to you how you want to arrange your types, but the sub-types can only have one parent type each, i.e. you'll have to set up multiple of them if they're split into different types (normal, magic, etc.).

    2) In your setup, your equipment would be of the sub-type, so you'd get the parent type of that item type:
    ORK.ItemTypes.Get(equip.ItemTypeID).parentTypeID

    3) If you just want to get all equipment from the inventory that can be equipped on an equipment part, you can use the GetEquipmentByPart function in the inventory.
    Otherwise, you can check if a combatant can equip something in an equipment part via the equipShortcut.Settings.IsEquipableOn function, the out partSet used by it will contain all the equipment part information.

    4) An equipment only has one item type, the parent/sub-typing is handled by the item types. I.e. if you want to change an equipment's parent type, you have to use a separate item type that's a sub-type of the parent type you want.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.