Status
Not open for further replies.

Puppet Knight

Knight on a Crossbar
Regular
Joined
Aug 3, 2022
Messages
644
Reaction score
770
First Language
English
Primarily Uses
RMMZ
Looking for something hopefully straight forward to allow one armor to be used in different slots.

I've tried HIMEs and NIJIs MZ port but they crash out for me. Seem incompatible with my current plugin set up.


Any and all help would be great here.
 

Maliki79

Regular
Regular
Joined
Mar 13, 2012
Messages
1,034
Reaction score
517
First Language
English
Primarily Uses
RMMV
Looking at the code for MV (MZ might be different), I saw this:
JavaScript:
Window_EquipItem.prototype.includes = function(item) {
    if (item === null) {
        return true;
    }
    if (this._slotId < 0 || item.etypeId !== this._actor.equipSlots()[this._slotId]) {
        return false;
    }
    return this._actor.canEquip(item);
};

I think you can get the result you want by removing the etypeId stuff leaving:

JavaScript:
Window_EquipItem.prototype.includes = function(item) {
    if (item === null) {
        return true;
    }
    if (this._slotId < 0) {
        return false;
    }
    return this._actor.canEquip(item);
};

Again, I didn't test this at all and it may not work anyway with your custom Equipment stuff.
 

Puppet Knight

Knight on a Crossbar
Regular
Joined
Aug 3, 2022
Messages
644
Reaction score
770
First Language
English
Primarily Uses
RMMZ
Ill give it a try
 

Maliki79

Regular
Regular
Joined
Mar 13, 2012
Messages
1,034
Reaction score
517
First Language
English
Primarily Uses
RMMV
Cool. Please let me know how it goes.
 

Puppet Knight

Knight on a Crossbar
Regular
Joined
Aug 3, 2022
Messages
644
Reaction score
770
First Language
English
Primarily Uses
RMMZ
Cool. Please let me know how it goes.
It was proving to be above my pay grade:

I went the very different route instead of having the names of slots update based on what class is in use. Then using Gabes Equip Requirements plugin i can restrict when and where the armors i want can be used when ^_^/
 

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,960
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Some days I understand the internet....other days, not so much.
Me (on reddit): That's a cool picture!
Artist who drew it: Thank you!
Random user: You're welcome
200w.gif
So, I am getting really good at finding loop points for making audio seamlessly loop. I am rarely off lately and when I am, it is usually a split second or less.

A decade ago, I would kill to know how to do this. Not for game dev but back when I was actively making music for singing.
The terrifying online threats I shield my precious RM’ers from. BULK FRIDGE MAGNETS.

IMG_0501.jpeg
Was sick with a fever... slowly getting better.
I HATE SEOs! I do not want to add Reddit to every single search in order to find helpful content posted by actual humans.

Forum statistics

Threads
134,987
Messages
1,252,651
Members
177,890
Latest member
Sodagames
Top