Status
Not open for further replies.

Puppet Knight

Knight on a Crossbar
Veteran
Joined
Aug 3, 2022
Messages
411
Reaction score
221
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

Veteran
Veteran
Joined
Mar 13, 2012
Messages
982
Reaction score
495
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
Veteran
Joined
Aug 3, 2022
Messages
411
Reaction score
221
First Language
English
Primarily Uses
RMMZ
Ill give it a try
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
982
Reaction score
495
First Language
English
Primarily Uses
RMMV
Cool. Please let me know how it goes.
 

Puppet Knight

Knight on a Crossbar
Veteran
Joined
Aug 3, 2022
Messages
411
Reaction score
221
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
45,996
Reaction score
16,804
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

imgur links are back!
now I CAN keep getting away with NOT replacing them with updated renders!
yay!
I forgot RPG Maker even existed. Such good memories. Might boot up steam and download MV one more time
10 pieces of KFC chicken for US$12.30, delivery included. Cheap or expensive? :aswt:
Ugh-I HATE this! There's construction going on in my area and because of that my Internet connection is wonky; this site in particular keeps constantly freezing up on me; I can't even barely type a single sentence without the page freezing in the middle of it! I hope this changes soon.
Yeah, it’s cool to have friends that hang out, but get you a friend that goes grocery shopping together too.

Forum statistics

Threads
131,547
Messages
1,220,737
Members
173,220
Latest member
ZecaVn
Top