Removing non-combat skills from the combat menu.

I was wondering if anyone could make some snippets for me? I have 5 skills listed under 'terms' but only want Combat Skills and Spell Casting to show up during battle. I've added a pic to show you what I mean.
change the actor's features (or class features) using "Add Skill Type [xxx]"

if every actor can have the lot of skill types, but only those 2 are combat-related, then try this:

Code:
class Window_ActorCommand < Window_Command
def add_skill_commands
    @actor.added_skill_types.sort.each do |stype_id|
      next if ![A,B,C].include?(stype_id)
      if @actor.skills.any?{|sk| sk.stype_id == stype_id}
       name = $data_system.skill_types[stype_id]
       add_command(name, :skill, true, stype_id)
      end
    end
  end
end

where A,B,C,etc are the skill indexes you want to keep
I forgot to mention I only wanted actors 1,2,& 4 to have combat skills only.And 3 to have Spell Casting only.How would i write these skills in the snippet?
wouldn't it be easier to reverse it and just add the common types to the menu instead of picking unused classes out from the battle menu? ¬¬
This should help!
Spoiler
Code:
#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
#                                                                              #
#                           V's Simple Battle Skills                           #
#                                 Version  0.3                                 #
#                                                                              #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#                                Written By:  V                                #
#                          Last Edited:  May 16, 2018                          #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#                                                                              #
#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
 
#==============================================================================#
#------------------------------------------------------------------------------#
# ** Disclaimer                                                                #
#------------------------------------------------------------------------------#
#                                                                              #
# This script was intended for Non-commercial use only, if you wish to use     #
# this script in a commercial game please PM me at which ever site you found   #
# this script. Either way please give me credit in your game script as the     #
# writer of this script, and send me a PM abuot the release of the game/demo.  #
#                                                                              #
#------------------------------------------------------------------------------#
# ** How To Use                                                                #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#                                                                              #
# * This script is plug-and-play.                                              #
#                                                                              #
#------------------------------------------------------------------------------#
# ** Description                                                               #
#------------------------------------------------------------------------------#
#                                                                              #
#  v0.1                                                                        #
# ~=~=~=~                                                                      #
#  * This script allows you to remove skills from battle by setting the skills #
#  occasion to "Only from the Menu" or "Never" in the Database.                #
#                                                                              #
#------------------------------------------------------------------------------#
#==============================================================================#

#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
#                                                                              #
#         DO NOT EDIT PAST THIS POINT UNLESS YOU KNOW WHAT YOUR DOING.         #
#                                                                              #
#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#





























#==============================================================================
# ** Window_SkillList
#------------------------------------------------------------------------------
#  This window is for displaying a list of available skills on the skill window.
#==============================================================================

class Window_SkillList < Window_Selectable

  #--------------------------------------------------------------------------
  # * Include in Skill List?
  #--------------------------------------------------------------------------
  def include?(item)
    if item && item.stype_id == @stype_id
      unless item.occasion == 2
        unless item.occasion == 3
          return
        else
          return false
        end
      end
    end
  end
 
end
You can use Yanfly's script here:
https://yanflychannel.wordpress.com/rmvxa/battle-scripts/battle-command-list/
Thanks, everyone. I've decided to go with the yanfly script. It will be easier for me to add new things now that I have figured it out.
If your query is now fully resolved, please Report your opening post and ask for the thread to be closed.
Thanks.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/removing-non-combat-skills-from-the-combat-menu.95083/