RMMV Finally got dual wield skills properly hidden/visible using Yanfly's Custom Show Eval

zzmmorgan

I've used punchcards
Veteran
Joined
Jul 10, 2020
Messages
114
Reaction score
179
First Language
English
Primarily Uses
RMMV
Over 2 hours of finding postings that didn't seem to work and tinkering in the console looking at the items in the various slots but I finally have it working smoothly so that dual wield skills ONLY show if the character has a sword in their off hand.


<Custom Show Eval>
if (user.equips()[1] && user.equips()[1].wtypeId == 2) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>

This takes care of ensuring you don't crash if the off hand is empty since the system doesn't like NULL values in some instances.

The user.equips()[1] checks the second slot ([0] would be the first) and, if something is there then it checks to see if it has a weapon type of 2 which I have as the sword in my database.

Sadly the hours of searching I did came up with a lot of almost similar code snips but they had everything from missing semi colons at the end to underscores in odd places and nothing quite matched up.

I assume other people eventually got it working but never posted the actual working code so I'm doing so here in hopes someone else finds it useful :)

Incidentally Maliki79 has a very nice plugin for handling dual wielding and 2 handed weapons that seems to work smoothly with Yanfly's plugins. I placed it below Yanfly's stuff and it seems to like it there.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,096
Members
137,587
Latest member
Usagiis
Top