Hide skilltype in battle until unlocked, but show it in the menu

Hi!
So I have a stealth skilltype for my character. As it works now, whenever player uses "Dusk Cut" skilltype Stealth is activated in battle. Normally it isn't shown.
However, in that case it won't show up in the menu. If I add skilltype Stealth to my character itself, then it is not disabled in battle (shows up despite nit being usable). Is there a way to like, disable skilltype "Stealth" in battle unless "Dusk Cut" is used?
But then have it show up in the menu so the player can check what skills are listed in it?
I don't know if this will help, but I had a similar problem and use this code to hide skill type 10 in battle:
Code:
class Window_ActorCommand < Window_Command
  #--------------------------------------------------------------------------
  # * Add Skill Command to List
  #--------------------------------------------------------------------------
  def add_skill_commands
    @actor.added_skill_types.sort.each do |stype_id|
      name = $data_system.skill_types[stype_id]
      if stype_id != 10 #define non-battle skill type number here
        add_command(name, :skill, true, stype_id)
      end
    end
  end
end

That said I do not know how to expand it to take your character's status effect into account, sorry.
Sadly that didn't work for me. I think because I'm using Yanfly's battle commands. But that one also has no option to hide skilltypes. It can hide skills but thta's not what I'd want.
I don't know if it will work, but I've looked up some options.


or
Ruby:
        DEFAULT_ACTOR_COMMANDS =[
            # "AUTOBATTLE",
            "ATTACK",
            # Comment out or remove 'SKILL LIST'
            #"SKILL LIST",
            # Insert 'SKILL TYPE 1'; instead of each skill type being displayed,
            # only skill type 1 will show up on the battle menu for the actor.
            "SKILL TYPE 1",
            "SUBCLASS LIST",
            "DEFEND",
            "ITEMS",
            "EQUIP",
    ] # Do not remove this.
which I'm wondering if it could be modified to work like this
Ruby:
        DEFAULT_ACTOR_COMMANDS =[
            # "AUTOBATTLE",
            "ATTACK",
            # Comment out or remove 'SKILL LIST'
            #"SKILL LIST",
            # Insert 'SKILL TYPE 1'; instead of each skill type being displayed,
            # only skill type 1 will show up on the battle menu for the actor.
            "SKILL TYPE 1" => if $game_switches[X],
            "SUBCLASS LIST",
            "DEFEND",
            "ITEMS",
            "EQUIP",
    ] # Do not remove this.
Then activating switch when that other skill is used.

Similarly this could be modified in the same way.


Might need another script for the menu skill type
Would be nice if something like



Code:
Ruby:
        DEFAULT_ACTOR_COMMANDS =[
            # "AUTOBATTLE",
            "ATTACK",
            # Comment out or remove 'SKILL LIST'
            #"SKILL LIST",
            # Insert 'SKILL TYPE 1'; instead of each skill type being displayed,
            # only skill type 1 will show up on the battle menu for the actor.
            "SKILL TYPE 1" => if $game_switches[X],
            "SUBCLASS LIST",
            "DEFEND",
            "ITEMS",
            "EQUIP",
    ] # Do not remove this.


Was possible yes
Bump.
I found a solution via multiple scripts. There's a script that can disable/enable skill types, then when using X skill I enable skill types at will via a common event (via a state). Once the state timer is up, it disables them again.

Original thread: https://forums.rpgmakerweb.com/threads/hide-skilltype-in-battle-until-unlocked-but-show-it-in-the-menu.122270/