Yanfly's Hide Skills string help

I'm trying hide a certain guard skill while a shield is not equipped. I command string for weapons like this: <hide eval>

[email protected]?

{|weapon| weapon.wtype_id == 1 }

</hide eval>

It works wonders but now I need an equivalent for shields and armors. Thanks in advance.

 

Here's the script: https://github.com/Archeia/YEARepo/blob/master/Menu/Hide_Menu_Skill.rb

 
bump
Hmm, could add the following :

#==============================================================================# ** Game_Actor#==============================================================================class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Determine if Specific Type of Armor Is Equipped #-------------------------------------------------------------------------- def atype_equipped?(atype_id) armors.any? {|armor| armor.atype_id == atype_id } end alias aequip? atype_equipped? endThen the actual eval :

Code:
# atype 4, 5 and 6 are shields in the default configuration<hide eval>[email protected]?(4) || [email protected]?(5) || [email protected]?(6)</hide eval>
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


alcreator440, please do not bump your topic unless it has been 72 hours later since your last post. You can review our forum rules here. Thank you.
Hmm, could add the following :

#==============================================================================# ** Game_Actor#==============================================================================class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Determine if Specific Type of Armor Is Equipped #-------------------------------------------------------------------------- alias aequip? atype_equipped? def atype_equipped?(atype_id) armors.any? {|armor| armor.atype_id == atype_id } end end
Thanks for the reply but where do I put this? When I put this under the script I get the error: undefined method 'atype_equipped?' for class 'Game Actor' when I go to the menu to use see the skill. Placing it above doesn't work either.

I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

alcreator440, please do not bump your topic unless it has been 72 hours later since your last post. You can review our forum rules here. Thank you.
Oh, sorry about that. Sometimes I get the rules confused with other forums.
Ah, whoops ... I updated the code in my previous response. But yeah, it should go under the normal add-on scripts area.
It works! I appreciate the help. Oh is there a way to combine:

<hide eval>

[email protected]?

{|weapon| weapon.wtype_id == 1 }

</hide eval>

 

with 

 

<hide eval>

[email protected]?(1)

</hide eval>

 

Into one line?

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-hide-skills-string-help.41813/