Skill only available with specific armour equipped

FrancoBash

Villager
Member
Joined
Jul 9, 2021
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMZ
Hello,

I was wondering if anyone had a solution for having skills be visible or enabled only when a certain type of armour is equipped. In my project guns count as armour equipped in the "sidearm" slot and have their power based on a custom parameter called "Fire Power." This then adds a skill command right to the command menu corresponding to the gun type (e.g, handgun, shotgun, etc). This all works great. But what I can't do is have a skill called, say, "Ricochet" that is supposed to only apply to handguns actually only be useable with handguns. If we could use the same function as "Required Weapon" for Armour this would work great but not only can I not figure out how to hide/disable the skill if a character has a different gun type equipped I can't even hide if a character has no gun equipped lol. Point is, I can't be having people using "Suppressing Fire" with a Grenade Launcher lmao.

I'm using VisuStella plugins and am a noob when it comes to java though I was decent with RUBY. I've been using RPGMaker since 2003 lol and this is the first time I've had to ask something on a forum haha. Any help would be appreciate.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,763
Reaction score
8,973
First Language
German
Primarily Uses
RMMV
no need for plugins if you just change the approach.

have the skill added as a feature/trait of the gun/armor instead of learned by class, and it will be available only when the gun/armor is equipped.

and the skill type can still be linked to the class, making sure that it is not available by other classes even if they equip that.
 

kirbwarrior

Veteran
Veteran
Joined
Nov 13, 2014
Messages
1,008
Reaction score
836
First Language
English
Primarily Uses
N/A
Point is, I can't be having people using "Suppressing Fire" with a Grenade Launcher lmao.
I'm pretty sure that suppressing fire with a grenade launcher would be extremely effective ;)


If* VisuStella works anything like Yanfly did, then passive states are likely your friend. One idea is slapping a 'handgun' state onto your handguns and then the skill in question only shows up if that state is there.

On the other hand, you can do it without plugins. If, say, Ricochet was a 'Handgun' skill and 'Handgun' was a skill type, then just have handguns add that skill type to what the user has access to.

*Note, I don't have MZ, let alone VisuStella. I've heard the two are quite similar to MV and Yanfly, respectively, so I'm sharing my knowledge of those.
 

FrancoBash

Villager
Member
Joined
Jul 9, 2021
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMZ
no need for plugins if you just change the approach.

have the skill added as a feature/trait of the gun/armor instead of learned by class, and it will be available only when the gun/armor is equipped.

and the skill type can still be linked to the class, making sure that it is not available by other classes even if they equip that.
The problem with this is that I'm trying to avoid skill type bloat. Additionally, something I didn't mention though I suppose I probably should have, is that I'm using the VisuStella Skill Learn for character growth. Because of this its important that the skills can exist separate to the equipped 'armour' but merely be invisible/unelectable when it is unequipped. Maybe I should ask in the dedicated VisuStella plugin help thread?
I'm pretty sure that suppressing fire with a grenade launcher would be extremely effective ;)


If* VisuStella works anything like Yanfly did, then passive states are likely your friend. One idea is slapping a 'handgun' state onto your handguns and then the skill in question only shows up if that state is there.

On the other hand, you can do it without plugins. If, say, Ricochet was a 'Handgun' skill and 'Handgun' was a skill type, then just have handguns add that skill type to what the user has access to.

*Note, I don't have MZ, let alone VisuStella. I've heard the two are quite similar to MV and Yanfly, respectively, so I'm sharing my knowledge of those.

Ay, that would've been my solution back in the VX ACE days. Looking just at the plugin commands there are options to hide skills if another skill is learned which is handy for replacing outmoded skills or--

Actually now that I think about each gun gives a character base gun skill (I.e, equipping a handgun lets you use 'Handgun' as a direct command in the actors menu without going into a submenu). What I could do maybe do is hide the more advanced gun skill if any other gun-skill is on the character? This works to an extent, but doesn't let me hide the advanced gun skills if they are equipped with NO guns.

tsk tsk tsk. Unfortunately I can't find an easy way to hide based on a state. Maybe I'm just missing something.
 

kirbwarrior

Veteran
Veteran
Joined
Nov 13, 2014
Messages
1,008
Reaction score
836
First Language
English
Primarily Uses
N/A
What I could do maybe do is hide the more advanced gun skill if any other gun-skill is on the character?
If you can do that, then you can also have a passive state that only applies when no weapon is equipped (maybe Unarmed) and the gun skills hide themselves when you have that state/skill. Looking over the link I sent, it does allow for javascript, so you can have things set up so the skill is only available if something is true. Namely, the blank state that all handguns would have in this situation.

"Instead, use "a.states().includes($dataStates[10])" to check for them. This code will search for both directly applied states and passive states alike."
 

Latest Threads

Latest Profile Posts

Well, I'm quickly recovering from Covid, but I'm still broke and injured lol. I miss working on my game! I think I've figured out a lore-friendly way to do a tutorial section separate from the main gameplay, but it'll take some scripting know-how. Which I don't have. And can't afford. :p
I think Kipling said it best.

If you can make one heap of all your winnings
And risk it on one turn of pitch-and-toss,
And lose, and start again at your beginnings
⁠And never breathe a word about your loss,
(...)
Yours is the Earth and everything that's in it,
⁠And—which is more—you'll be a Man, my son!


Do you feel like your modern cities are too clean? I made some dumpsters and trash variations. Visit my MZ resource thread (link in signature).

Forum statistics

Threads
118,580
Messages
1,117,119
Members
155,649
Latest member
G4M3RS3B3N
Top