Custom Equip Types

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,076
First Language
English
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.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,551
Reaction score
6,880
First Language
German
Primarily Uses
RMMV
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...
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,076
First Language
English
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.
 
Last edited by a moderator:

Solistra

Veteran
Veteran
Joined
Aug 15, 2012
Messages
593
Reaction score
244
Primarily Uses
Why are you using a hash with numeric keys for configuration?


That's an array.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,076
First Language
English
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).
 
Last edited by a moderator:
Joined
Apr 30, 2012
Messages
215
Reaction score
35
First Language
Spanish
Primarily Uses
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...
 

Caedmon

Veteran
Veteran
Joined
Aug 9, 2012
Messages
248
Reaction score
16
First Language
English
Primarily Uses
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.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,076
First Language
English
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
 
Last edited by a moderator:

Caedmon

Veteran
Veteran
Joined
Aug 9, 2012
Messages
248
Reaction score
16
First Language
English
Primarily Uses
You are awesome Tsukihime!  You are taking over the spot of "Most Used Scripts" in my game :)
 

cooldoode325

Veteran
Veteran
Joined
Nov 12, 2013
Messages
48
Reaction score
1
First Language
English USA
Primarily Uses
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

Veteran
Veteran
Joined
Dec 14, 2012
Messages
97
Reaction score
24
First Language
English
Primarily Uses
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.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,076
First Language
English
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/
 
Last edited by a moderator:

Cephalophane

Villager
Member
Joined
Jan 12, 2014
Messages
26
Reaction score
6
Primarily Uses
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'?
 

Cephalophane

Villager
Member
Joined
Jan 12, 2014
Messages
26
Reaction score
6
Primarily Uses
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
 
Last edited by a moderator:

Optimized

Villager
Member
Joined
Feb 1, 2014
Messages
13
Reaction score
1
First Language
english
Primarily Uses
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?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,076
First Language
English
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.
 

Optimized

Villager
Member
Joined
Feb 1, 2014
Messages
13
Reaction score
1
First Language
english
Primarily Uses
Very cool thanks was at work Nd didn't have script Iinfront off me
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

stock analyst lady
Well, since I'm in lockdown, I guess it's finally time to get serious into rpgmaking... almost 20 years later.
Forbidden - You don't have permission to access /index.php on this server.

Forum statistics

Threads
95,745
Messages
931,524
Members
126,124
Latest member
FIL
Top