Removing non-combat skills from the combat menu.

Status
Not open for further replies.

Tanarex

Scrub
Veteran
Joined
Sep 14, 2014
Messages
468
Reaction score
306
First Language
English
Primarily Uses
RMVXA
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.
 

Attachments

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
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
 

Tanarex

Scrub
Veteran
Joined
Sep 14, 2014
Messages
468
Reaction score
306
First Language
English
Primarily Uses
RMVXA
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?
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
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? ¬¬
 
Last edited:

vindaca

CEO of Tales of the Valiant
Veteran
Joined
Dec 11, 2012
Messages
534
Reaction score
75
First Language
English
Primarily Uses
This should help!
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
 

Tanarex

Scrub
Veteran
Joined
Sep 14, 2014
Messages
468
Reaction score
306
First Language
English
Primarily Uses
RMVXA
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.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
If your query is now fully resolved, please Report your opening post and ask for the thread to be closed.
Thanks.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,225
First Language
Dutch
Primarily Uses
RMXP

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.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

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.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top