Custom Equip Types

● ARCHIVED · READ-ONLY
Started by Tsukihime 20 posts View original ↗
  1. This script allows you to create custom equip types with their own equip slot names. You can then assign custom equip types to different items.



    Download

    Get it at Hime Works!

    Installation

    Place this script below Materials and above Main

    Usage

    In the configuration section, set up the Equip_Types table with the custom

    equip types. Each equip type is given a unique number and a name.



    To assign a custom equip type to an item, note-tag it with

    <equip type: x>Where x is one of the equip type ID's that you have set up in the table.
  2. Just a question: what are the main differences between this new "core: equip slots" series and your older "equip manager"?

    From what I've seen so far you're optimizing and modularising the functions, but haven't yet ported all functions to the new variants.

    Originally I planned to use your equip manager, but that was before you started this new script series for equipment. Since my game is still in the planning stage, I could change to the new approach without problems, but I would like to know if you plan to rewrite all of the old options or if you plan to implement only some of them, going in a different direction with the new equip scripts...
  3. There are two key differences in design.


    1. Core: Equip slots abstracts equip slots into its own entity while preserving the interface, which means I don't have to overwrite any methods beyond initialization. Therefore, increased compatibility between scripts.


    2. Whether an equip can be equipped or not is based on two things:


    -equip type, which determines whether the slot can take it or not


    -armor/weapon type, which determines whether the actor can equip it


    The equip manager eliminated the equip type and performed all checks based on the armor/weapon type.


    The Equip Slots still use the default checks.


    The only function that remains is the type checking, and have thought of a way to implement it.
  4. Why are you using a hash with numeric keys for configuration?


    That's an array.
  5. Easier to read for users (don't have to count or enter comments)

    No need to use sequential numbers.

    Thinking of using symbols as well for clarity in note-tags (easier to read)

    Code:
    <equip type: boots>
    Separating the input from the data: I could map them to an array internally (though in this case as you have noted it doesn't make a difference so I just left it as that).
  6. Sorry to bother you Tsukihime,i got an error in the line 423:

    comparision with nil failed,when i tried to use the equip slot 7 with other slots in a character,excuse me for my bad English and thanks for this great script.

    PD:

    The error only appears if you use the slot 7 along with other slot,standalone works fine...
  7. Check Core Equip Slots and make sure Slot_Order has all of the equip type ID's.
  8. Oops! Thanks you Tsukihihime,it is fixed now.
  9. Tsukihime,

       Is there a way to make an equip slot have multiple options?  Let's say my character has the choice of equipping a ring or taking an extra herb into battle.  It would add for a little more strategy than always giving the accessory only slot.  I would like the same for weapons too.  You could carry an extra weapon into battle but it would be in place of your item.
  10. I will write it as a separate script as an add-on for my "core equip slots" script.


    It will be an add-on because it WILL be incompatible with a number of equip-related scripts out there.


    https://github.com/Hime-Works/Requests/issues/28
  11. You are awesome Tsukihime!  You are taking over the spot of "Most Used Scripts" in my game :)
  12. Hello!

    I was wondering if it's possible to seal an equip slot when equipping certain items.

    For example: My game uses Gems, Orbs, and Badges. I want the player to be able to wear 1 at a time. So when the player equips "Gem", the player can no longer equip an Orb/Badge. 

    Thanks!
  13. cooldoode325 said:
    Hello!

    I was wondering if it's possible to seal an equip slot when equipping certain items.

    For example: My game uses Gems, Orbs, and Badges. I want the player to be able to wear 1 at a time. So when the player equips "Gem", the player can no longer equip an Orb/Badge.

    Thanks!
    Wouldn't this be possible by simply making them all equip to the same slot?

    Eg. Make slot 'misc', then note tag all gems/orbs/badges as misc. That way you can only equip one.

    Of course, if you intend to allow multiple gems/orbs/badges to be equipped at once (but only same types), this wouldn't work.
  14. cooldoode325 said:
    Hello!


    I was wondering if it's possible to seal an equip slot when equipping certain items.


    For example: My game uses Gems, Orbs, and Badges. I want the player to be able to wear 1 at a time. So when the player equips "Gem", the player can no longer equip an Orb/Badge. 


    Thanks!
    Halrawk's suggestion would work if all you need is for one of those things to seal all other "same slots", and is guaranteed to work (well, much better than throwing in another script)


    However, for anything more complex you will need to use scripts.


    I've written something before that may help


    http://himeworks.com/2013/04/11/equippable-limits/
  15. Suppose I had an actor who only uses one type of equip — let's say medals, for instance — could I use this script in order to allow all of their equip slots to be fitted with the same thing? e.g., rather than 'Weapon', 'Armour', etc., they have 'Medal', 'Medal', 'Medal'?
  16. Ah, thank you for the heads-up! Much appreciated.

    edit: it took me thirty seconds to accomplish what I wanted with that script — thank you
  17. Hey man I'm looking to give one of my characters a different set of equipment slots than others (because he is a hound) is this possible via your script?
  18. Yes. You would use this script to define custom slot types, and then use the core equip slots to set the slots for that character.
  19. Very cool thanks was at work Nd didn't have script Iinfront off me