RMMV Attempting mutually exclusive equipment types (Yanfly's Equip Requirements)

Cuprite

Previously Golden
Veteran
Joined
Feb 6, 2017
Messages
106
Reaction score
36
First Language
English
Primarily Uses
RMXP
Trying to make certain equipment types mutually exclusive. In this specific instance, I want a specific "Shield" equipment in the "Off-Hand" slot to be unequipable if the actor is equipped with a weapon with the "Bow" equipment type. I've tried using Yanfly's Equip Requirements, but I can't figure out what code to use for the custom requirement. Found a thing somewhere else and attempted it (With slight edits), but it didn't end up working.
<Custom Equip Requirement Condition>
if ($gameActors.actor(1).equips()[1] && $gameActors.actor(1).equips()[0].wtypeId == 2) {
condition = false;
} else {
condition = true;
}
</Custom Equip Requirement Condition>
Basically, I was trying to check the actor's first slot for the 3rd Weapon Type (In this case, Bows). Wasn't super worried about it only being the first actor since that's the only one that can actually equip weapons.
If anyone has anyone knows what code would work best for this, I'd really appreciate it.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
916
Reaction score
396
First Language
english
Primarily Uses
RMMV
2 handed weapons is easy. you just have the weapon with the trait 'seal equip: shield'

having shield slot equipment that you CAN equip while using a 2handed weapon is when you start needing plugins.
like having a great axe means cant equip a shield, but could still equip a leather grip which uses the same equip slot
(this is why i use ramza's dual wield plugin even for projects that dont have dual wielding at all, because it has notetags for 2handed weapons, and a offhand notetag for shield slot equipment that can ignore the 2handed tag)

(his plugin also helps avoid the base engine issue of dual wield trait just generally being buggy when the character is supposed to be able to use sword+shield, sword+sword, or 2H sword)
seen a few games throw in an accessory that gives dual wield trait but base engine 'seal equip: shield' doesnt actually read that as "2 handed weapon" and ends up letting you equip 2 2H weapons.

if your project has no dual wielding and no offhand equipment that can ignore 2handed restrictions, then theres no need for any plugin notetags for that
 
Last edited:

Cuprite

Previously Golden
Veteran
Joined
Feb 6, 2017
Messages
106
Reaction score
36
First Language
English
Primarily Uses
RMXP
2 handed weapons is easy. you just have the weapon with the trait 'seal equip: shield'

having shield slot equipment that you CAN equip while using a 2handed weapon is when you start needing plugins.
like having a great axe means cant equip a shield, but could still equip a leather grip which uses the same equip slot
(this is why i use ramza's dual wield plugin even for projects that dont have dual wielding at all, because it has notetags for 2handed weapons, and a offhand notetag for shield slot equipment that can ignore the 2handed tag)

(his plugin also helps avoid the base engine issue of dual wield trait just generally being buggy when the character is supposed to be able to use sword+shield, sword+sword, or 2H sword)
seen a few games throw in an accessory that gives dual wield trait but base engine 'seal equip: shield' doesnt actually read that as "2 handed weapon" and ends up letting you equip 2 2H weapons.

if your project has no dual wielding and no offhand equipment that can ignore 2handed restrictions, then theres no need for any plugin notetags for that
Yeah, I noticed that bug with default dual-wielding too. I'm not even 100% sure if I'm going to have 2-handed weapons or not tbh. Aside from the dual-variant equipment, most of my problems revolve around Bows. Really, all I want them to do is disable Shields and enable Arrows in the same Off-Hand slot.
As for that plugin... While I don't doubt it would help, $15 feels kinda overpriced? (not to mention it was free at some point which just feels wrong)
I've probably already burned up my Victor Engine luck getting SFonts working with Yanfly's stuff, so I have my doubts a gameplay-oriented plugin like his dual-wield would work (I can always try, but I seriously doubt it). Idk, I can always try that or Maliki's versions, tho I'm still unsure if I'd be able to accomplish what I'm looking to do with either of those. I guess I'll update if something does/doesn't work.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
916
Reaction score
396
First Language
english
Primarily Uses
RMMV
(not to mention it was free at some point which just feels wrong)
ya i got ramza's dual wield WAY back when it was still free and its just never needed an updated version. also think $15 to much for just 1 plugin that fixes dual wield/2H issues.
yanfly plugins also used to be free way back when. pretty sure it was people copy/pasting his code and selling them as their own plugins that made him start charging for them.
$30(us) for full yanfly collection is a great price though especially considering just the shear amount of stuff that adds to MV.
(beware of 'feature creep'. its easy to overwhelm yourself with "this gimmick would be cool to add")
100$(us) for MZ collection seems like to much, and looking at them it seems like requires moderate amount coding knowledge so not very user friendly to the cyber-illiterate like me. also still missing many features compared to MV collection but think they are still adding more.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
1,795
Reaction score
925
First Language
English
Primarily Uses
RMMV
As for that plugin... While I don't doubt it would help, $15 feels kinda overpriced?
While I can't change how you feel, I will say I don't feel the same way :wink:
That plugin provides a good number of options and features (using the graphic and stats of the off-hand weapon is not a part of RPG Maker).

And it's kind of like a foundation...if you get that, everything else related to it is much less (there's the bundle with the shield block, and the other extensions are in the single-digit dollars).

The only thing I haven't loved about Ramza's work is in his parry plugin, which has some weird default settings without an option to change them - but I was able to rewrite that functionality pretty easily.

Also, he's been very responsive for helping with bugs and supporting how to use his plugins, which is absolutely not the case with Yanfly/Olivia/VisuStella/SRD/...
 
Last edited:

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
916
Reaction score
396
First Language
english
Primarily Uses
RMMV
@ATT_Turan ah your home, u probably know the correct coding,
if (!user.isEquipWeaponType(X)) {

my idea for the work around was a notetag put on all of the shields so cant use shields while have bow type equipped but still allows them to use shield slot.
quivers would just take out the ! from the notetag.
while other non-bow 2H weapons just seal shield slot like normal.

edit: i tryed a couple wordings of it but idk the weapon type scripting so just wasnt working out
i also thought about just using a passive state added from bows and checking for the state but that was running into different issue. was 'somewhat' workable but horribly awkward and inconvenient.
 
Last edited:

Cuprite

Previously Golden
Veteran
Joined
Feb 6, 2017
Messages
106
Reaction score
36
First Language
English
Primarily Uses
RMXP
(beware of 'feature creep'. its easy to overwhelm yourself with "this gimmick would be cool to add")
Yeah, that's fair. That may be a thing that's happening here (The idea came up cause I thought it'd be cool to have specific "Arrow" equipment that could change the element of your Bow attacks (Kinda like the Bullets from SMT4) and I figured I'd let the slot be used for more things than just that). I may or may nor end up actually doing this though due to potential Feature Creep (I definitely have been guilty of this in the past, so it's no shock I would be now. Lol). I already have an alternate way of doing semi-dual-wielding (I.E.: Make a single weapon just hit twice), and I could probably just have specific elemental weapons. Would probably be easier for the player to understand anyway.
While I can't change how you feel, I will say I don't feel the same way :wink:
That plugin provides a good number of options and features (using the graphic and stats of the off-hand weapon is not a part of RPG Maker).

And it's kind of like a foundation...if you get that, everything else related to it is much less (there's the bundle with the shield block, and the other extensions are in the single-digit dollars).

The only thing I haven't loved about Ramza's work is in his parry plugin, which has some weird default settings without an option to change them - but I was able to rewrite that functionality pretty easily.

Also, he's been very responsive for helping with bugs and supporting how to use his plugins, which is absolutely not the case with Yanfly/Olivia/VisuStella/SRD/...
That's fair. I just already have about $40 worth of assets I plan on buying (Mostly due to my inability to make music), and I don't have a ton of money that I'm really willing to spend (Doesn't help that I don't have a job. Even tho I really should by this point. But ignoring that-). I can see why some would find it worth it.
@ATT_Turan ah your home, u probably know the correct coding,
if (!user.isEquipWeaponType(X)) {

my idea for the work around was a notetag put on all of the shields so cant use shields while have bow type equipped but still allows them to use shield slot.
quivers would just take out the ! from the notetag.
while other non-bow 2H weapons just seal shield slot like normal.

edit: i tryed a couple wordings of it but idk the weapon type scripting so just wasnt working out
i also thought about just using a passive state added from bows and checking for the state but that was running into different issue. was 'somewhat' workable but horribly awkward and inconvenient.
If they have an answer for this, I'm definitely still considering the Off-Hand slot. It ain't scrapped outright yet! Lol.
And ye, the plan was that normal 2-Handed weapons would just seal the Off-Hand slot while Bows would specifically disable Shields and enable Arrows, like you said.

(BIG reply. Lol)
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
916
Reaction score
396
First Language
english
Primarily Uses
RMMV
oh if all it is is attack element, what about just having bows 'add skills' that are instant cast "stance change type" skills (requires instant cast plugin obviously)
ie: my assassin has coating skills. "poison coating" removes all other coating states and adds the state for 'attack state: poison' trait. could do the same kinda thing just change it to attack element traits instead of attack state traits

edit: 1 of my proof of concept micro games, i had a few weapons that are similar to this. like flamebrand sword gives you a skill that allows you to toggle attack element fire (i had custom show requirements on them so only saw "flame enchant" skill if didnt have fire element state active. and all enchantment states had the add skill that would remove all enchantments).
i liked how D&D had it as "at will" bonus actions to turn on/off element damage.
the proof of concept worked perfectly but the major game i decided to just stick to classic's style with the element on the weapon itself and have to change weapons mid fight if its a bad match up.
gives more incentive to collect weapons.
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
1,795
Reaction score
925
First Language
English
Primarily Uses
RMMV
I thought it'd be cool to have specific "Arrow" equipment that could change the element of your Bow attacks
Then why don't you make them an item type that actually goes into an Arrow slot? Or quiver slot? After all, you don't actually hold all your arrows in one hand.

Make your bows seal the shield slot, have a separate slot for arrows, and whatever goes there is only checked by your bow skills (or you could make it more generic if you find other classes have a use for it, it could be, like, a Weapon Accessory slot that holds arrows for your bow-users, an orb or tome for your mage, holy symbol for clerics, etc.).
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
916
Reaction score
396
First Language
english
Primarily Uses
RMMV
or there's also the attachable augments version. basically the exact same thing just equipping the arrow type to the bow instead of to the character
 

Cuprite

Previously Golden
Veteran
Joined
Feb 6, 2017
Messages
106
Reaction score
36
First Language
English
Primarily Uses
RMXP
or there's also the attachable augments version. basically the exact same thing just equipping the arrow type to the bow instead of to the character
Y'know, I didn't even consider that. That thought never even entered my head. Lol.
Granted, it'd probably be weird for bows to be the only things to use the augments feature (Not to mention I imagine it would be a tad tedious to unequip them whenever you wanna change your bow), but it would work. That is something I'll consider from here on.
 

Latest Threads

Latest Posts

Latest Profile Posts

so... I decided since a park was an area in my game... here's an enemy that's slide with a hand behind it. cause why not.
Hot chocolate and music make studying and note-taking much easier :kaoluv:
Until my hand cramps up from writing too much!
Doing RPG Maker News for 21st September 2021


Malak is still waiting for Dark Deception Chapter 4... This was him yesterday after another sugar crash.
Again, he's fine. He's just bored at this point, considering he's exhausted his entire vacation bucket list.
Am I the only one who files custom resources under specific folders to remember who to credit? :kaoswt2:
1632263519730.png

Forum statistics

Threads
115,268
Messages
1,088,464
Members
149,872
Latest member
ghosted
Top