04-20-2025, 03:04 AM 
(This post was last modified: 04-26-2025, 02:55 AM by DerVVulfman.)
	
	
	Adeyemi's Armament Proficiency
Version: 1.2
Version: 1.2
Introduction
This script allows you to give actors the ability to increase their skill with a select group of weapons. It does so by giving an actor's defined combination of weapons a level with experience to gain during use. And as their level increases, so to does their base attack used in all manners of combat.
Features
- Define weapon style sets, so a collection of swords (by ID) could be one set and you gain proficiency with all of a given set
 
- Sets have levels, so proficiency is those sets gaining their own experience
 
- The player's own Experience Points or Level curve is used. So proficiency with weapons can be different per actor.
 
- You can gauge how much or little bonus to the base attack score per level
 
Bonus Features
- The in-game removal of class weapon limits. You may need to set a hero's weapon based on their class in the editor. But in-game, a wizard could use a broadsword.
 
- Option to allow for unarmed combat.
 
- Class and/or Actor based penalties for defined weapon use. So instead of saying it cannot be used by that class, their attack rolls will suck.
 
Screenshots
Nothing to see here, pal.
Demo
Nope.
Script
 The Script
  			Code:
#==============================================================================
# ** Adeyemi's Armament Proficiency
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 1.2
#    04-24-2025 (mm/dd/yyyy)
#    RGSS / RPGMaker XP
#==============================================================================
#
#  INTRODUCTION:
#
#  This script allows you to give actors the ability to increase their skill
#  with a select group of weapons.  It does so by giving  an actor's defined
#  combination of weapons a level with experience to gain during use. And as
#  their level increases,  so to does their base attack  used in all manners
#  of combat.
#
#  Bonus features include:
#
#  * The in-game removal of class weapon limits.  You may be forced to set a
#    specific weapon to an actor at game start. But as the game goes on, any
#    actor can use any weapon defined in the Weapons database.
#
#  * Option to allow for unarmed combat. The system will use the actor's un-
#    adjusted Strength score  (no weapon or armor bonuses) in the base_atk's 
#    place. It also includes options to set user and target animation IDs.
#
#  * Class and/or Actor based penalties  for defined weapon use.  So besides
#    giving one proficiency,  it can lower the base_atk score  for any actor
#    or character class using weapons they shouldn't. As an example, you may
#    set up a mages's class to suffer  a 25% penalty to their base_atk score
#    if they used axes or maces (as defined by their IDs).
#    or classes 
#
#  I wrote the instructions into the coonfiguration section.  Enjoy.
#
#
#------------------------------------------------------------------------------
#
#  NOTES:
#
#  The base_atk value (be it from Game_Actor or Game_Enemy) is used by the
#  Game_Battler class to calculate the 'atk' value used for any/all attack
#  and skill effect systems (not item).  Neither the default main menu nor
#  any other menu screens depicting this value.
#
#  When I created the  'weapon_prof_chance'  method within Game_Battler on
#  line 434,  I did so with the expectation of making add-ons that can in-
#  fluence the actor's chance of success when gaining experience points.
#
#  When you create a weapon style with the WEAP_STYLE hash array, you give
#  each style a name.   Couple that with the leveling system,  prospective
#  scripters could create updates to the Equip, Status any similar menu to
#  show their weapon proficiency levels by name.
#
#
#------------------------------------------------------------------------------
#
#  NOTES:
#
#  I named this after a friend and former co-worker whom I found out today is
#  no longer with us.  I wrote it for remembrance.
#
#
#------------------------------------------------------------------------------
#
#  VERSION HISTORY:
#
#  1.0 - 2025-04-19:  Original release
#  1.1 - 2025-04-20:  Altered exp storage to track all styles (if style changes)
#  1.2 - 2025-04-24:  Three alterations to the script
#                     * Altered: Changed value and method names in RPG script
#                     * Fixed: Value identifying which experience points to test
#                     * Fixed: Method to find highest leveled weapon proficiency
#
#
#------------------------------------------------------------------------------
#
#  COMPATIBILITY:
#
#  Fairly compatible for RPGMaker XP systems as there are no rewrites to any
#  classes, all content using aliased methods.
#
#
#==============================================================================
#
#  TERMS OF USE:
#
#  Free for use, even in commercial games.  Only due credit is required.
#
#
#==============================================================================
module Yemi
  #--------------------------------------------------------------------------
  # DO NOT TOUCH
  #--------------------------------------------------------------------------
  WEAP_STYLE, WEAP_CLASS, WEAP_ACTOR, WEAP_SKILL, WEAP_BONUS = {},{},{},{},{}
  WEAP_C_LOSS, WEAP_A_LOSS = {},{}
  #--------------------------------------------------------------------------
  # UNARMED STYLE
  # =============
  # As a bonus, the system allows you to use the actor's unadjusted strength
  # score as their base attack score.  This means, the stronger they become,
  # the more damage they can do even if unarmed.  Though it would still pale
  # in comparison to being armed.  And the attack animation can be set too.
  #--------------------------------------------------------------------------
  #
    UNARMED_STRENGTH  = true    # If true, allows STR as base attack if unarmed
    UNARMED_USER      = 0       # ID for user animation (or nil/0 to disable)
    UNARMED_TARGET    = 4       # ID for target animation (or nil/0 to disable)
  #--------------------------------------------------------------------------
  #         *             *             *             *             *
  #--------------------------------------------------------------------------
  # WEAPON STYLES
  # =============
  # A list of individual style sets: A style set consists of the name of the
  # style along with other options related to that style:
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  #  * Name:        Name of the styleset
  #  * Ch:          Chance of gaining exp per successful hit
  #  * Weapon IDs:  List of all weapons for a given styleset
  #  * Exp #1:      Exp gained for a successful strike and on chance
  #  * Exp #2:      (Optional) Exp gained for a skill effect that uses weapons
  #                 * If not set, will use Exp #1:
  #                 * Requires skills that recognize weapons (WEAP_SKILL)
  #--------------------------------------------------------------------------
  #
  #            ID       Name            Ch.   Weapon IDs             Exp  Exp
  #            ==       ==============  ===   ====================   ===  ===
    WEAP_STYLE[1]   = [ 'Blademaster',  100,  [1,2,3,4,13,14,15,16], 0.5,   1 ]
    WEAP_STYLE[2]   = [ 'Swordmaster',   75,  [1,2,3,4],             1.5,   1 ]
    WEAP_STYLE[3]   = [ 'Barbasettian',  80,  [13,14,15,16],         1,   1.2 ]
    WEAP_STYLE[4]   = [ 'Archer',       100,  [17,18,19,20],         2        ]
  #--------------------------------------------------------------------------
  #         *             *             *             *             *
  #--------------------------------------------------------------------------
  # ASSIGNED WEAPON STYLES
  # ======================
  # This section applies weapon styles to character classes and actors alike.
  # Do know that duplicates are removed. 
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  #  * Class/Actor ID:  ID of the actor or class depending on the hash array
  #  * Weapon Styles:   The ID(s) of the weapon styles defined above within 
  #                     WEAPON STYLES section.
  #                     * If a single actor is defined a Weapon Style within
  #                       the WEAP_CLASS array and the same style within the
  #                       WEAP_ACTOR array, the system will recognize this
  #                       duplication and will remove the duplicate instance.
  #--------------------------------------------------------------------------
  #
  #      Class ID     Weaspon Style(s)
  #      ========     ================
    WEAP_CLASS[1]   = [2]     # (1)Fighters use Blademaster (swords/knives)
    WEAP_CLASS[4]   = [2]     # (4)Thieves use Barbasettian (knifes)
    WEAP_CLASS[5]   = [2,3]   # (5)Hunters use Archer(bows) and Barbasettian
  #      Actor ID     Weaspon Style(s)
  #      ========     ================
    WEAP_ACTOR[1]   = [1,3]   # (1)Aluxes is a Blademaster and Archer
  #--------------------------------------------------------------------------
  #         *             *             *             *             *
  #--------------------------------------------------------------------------
  # ASSIGNED WEAPON PENALTIES
  # =========================
  # This section will apply percentage based penalties to the actor's base atk
  # score if any weapons defined are being used.  There are two hash arrays in
  # which to accomplish this, and the effects CAN be cumulative.
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  #  * Class/Actor ID:  ID of the actor or class depending on the hash array
  #  * Per:             Percentage of Base Attack loss (ie 20 is -20% loss).
  #  * Weapon IDs:      List of all weapons that deliver the penalty
  #                     * NOTE: The effects are cumulative.  In the below
  #                       example, Basil (as a lancer) would lose 20% of his
  #                       base_atk score from the CLASS penalty and an addi-
  #                       tional 25% loss just for his ACTOR penalty. OUCH!
  #--------------------------------------------------------------------------
  #
  #      Class ID       Per    Weaspon IDs
  #      ========       ===    ================  
    WEAP_C_LOSS[2]  = [  20,  [1,2,3,4,5,6,7,8]]  #(2)Lancer no swords/lances
  #
  #      Actor ID       Per    Weaspon IDs
  #      ========       ===    ================  
    WEAP_A_LOSS[2]  = [  25,  [5,6,7,8]]          #(2)Basil no more lances
  #--------------------------------------------------------------------------
  #         *             *             *             *             *
  #--------------------------------------------------------------------------
  # SKILLS THAT USE WEAPONS
  # =======================
  # This section defines those combat skills that are assumed tied to a spe-
  # cific weapon (such as Bird Killer for Bow use hence the animations). With-
  # out this, weapon proficiency when using combat skill attacks would not be.
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  #  * Skill ID:      ID of the skill tested for weapon proficiency gains
  #  * Weapon IDs:    List of all weapons that are aligned to that skill
  #--------------------------------------------------------------------------
  #
  #      Skill ID     Weaspon ID(s)
  #      ========     =============
    WEAP_SKILL[57] = [ 1,2,3,4]       # Sword Use Skills
    WEAP_SKILL[58] = [ 1,2,3,4]
    WEAP_SKILL[59] = [ 1,2,3,4]
    WEAP_SKILL[60] = [ 1,2,3,4]
    WEAP_SKILL[69] = [ 13,14,15,16]   # Dagger Use Skills
    WEAP_SKILL[70] = [ 13,14,15,16]
    WEAP_SKILL[71] = [ 13,14,15,16]
    WEAP_SKILL[72] = [ 13,14,15,16]
    WEAP_SKILL[73] = [ 17,18,19,20]   # Bow Use Skills
    WEAP_SKILL[74] = [ 17,18,19,20]
    WEAP_SKILL[75] = [ 17,18,19,20]
    WEAP_SKILL[76] = [ 17,18,19,20]
  #--------------------------------------------------------------------------
  #         *             *             *             *             *
  #--------------------------------------------------------------------------
  # LEVEL GAIN ADJUSTMENT
  # =====================
  # The weapon sets for any actor  is based upon the same experience curve as
  # the actor's own experience point  leveling curve.  This means  the weapon
  # style levels can reach level 100 if so defined. However, this section may
  # assist you in slowing down the rate of style set leveling and limit how
  # many levels that the weapon style sets can attain.
  #
  # These levels are important for the LEVEL ATTACK BONUS ADJUSTMENT below.
  #--------------------------------------------------------------------------
  #
    WEAPON_DIVIDE = 1     # Set to 3. The higher the rate, the slower the gain.
                          # If set to 1, it is normal. Nothing lower than 1.
    WEAPON_MAX    = 5     # Set to 5, the sets cannot go beyond level 5.
                          # If set to 1, sets won't grow. Nothing lower than 1.
  #--------------------------------------------------------------------------
  #         *             *             *             *             *
  #--------------------------------------------------------------------------
  # LEVEL ATTACK BONUS ADJUSTMENT
  # =============================
  # This final area defines what bonus the actors have when using weapons which
  # they are skilled and trained (based on their applied weapon sets). It is
  # assumed that all values are from 1.0 or higher to assume base attack growth
  # as a value lower would be a penalty.
  # 
  # The below example only has five WEAP_BONUS entries as I set the MAX_LEVEL
  # value (above) to 5.  I could set MAX_LEVEL to 10 and make five more entries,
  # but opted not.  Just so ya know, it is flexible.
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  #  * Level ID:     The level for any weapon set to give the defined bonus
  #  * Multiplier:   A multiplier bonus to the Base Atk value
  #                  * Normally a Level 1 set would have a 1.0 multiplier.
  #                    But here I thought... they were already training. ^_^
  #--------------------------------------------------------------------------
  #
  #      Level ID     Multiplier
  #      ========     ==========
    WEAP_BONUS[1]   = 1.10    # Assumes slightly more knowledgeable..?
    WEAP_BONUS[2]   = 1.2
    WEAP_BONUS[3]   = 1.35
    WEAP_BONUS[4]   = 1.5
    WEAP_BONUS[5]   = 1.7
end
#==============================================================================
# ** RPG
#------------------------------------------------------------------------------
#  A module containing RPGXP's data structures and more.
#==============================================================================
module RPG
  #--------------------------------------------------------------------------
  # * Clear class object limitations on initialization
  #--------------------------------------------------------------------------
  def RPG.yemi_class_clear_w
    #
    return if @initialized_yemi_class_clear_w             # Exit if executed
    class_clear_weapons                                   # Clear weapons
    @initialized_yemi_class_clear_w = true                # Flag executed
    #
  end
  #--------------------------------------------------------------------------
  # * Clear all class weapon limitations
  #--------------------------------------------------------------------------
  def RPG.class_clear_weapons
    #
    for classes in $data_classes                          # Cycle thru classes
      next if classes.nil?                                # Skip invalid class
      classes.weapon_set = []                             # Clear weapon set
      for weapon in $data_weapons                         # Cycle thru weapons
        next if weapon.nil?                               # Skip invalid weapons
        classes.weapon_set.push(weapon.id)                # Push all weapon IDs
      end
    end
    #
  end
  #--------------------------------------------------------------------------
  # * RPG Initialized Class Clearing
  #     bool      : boolean value (true/false)
  #--------------------------------------------------------------------------  
  def RPG.initialized_yemi_class_clear_w=(bool)
    #
    @initialized_yemi_class_clear_w = bool                  # Set/reset flag 
    #
  end
end
#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  This class deals with battlers. It's used as a superclass for the Game_Actor
#  and Game_Enemy classes.
#==============================================================================
class Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  alias yemi_battler_attack_effect attack_effect
  alias yemi_battler_skill_effect skill_effect
  #--------------------------------------------------------------------------
  # * Applying Normal Attack Effects
  #     attacker : battler
  #--------------------------------------------------------------------------
  def attack_effect(attacker)
    #
    hp_test     = self.hp                                 # Get hp test value
    effective   = yemi_battler_attack_effect(attacker)    # Perform the method
    hp_retest   = self.hp                                 # Get current HP
    if hp_retest != hp_test                               # If HP changed
      attack_effect_weapon_prof(attacker)                 # Run weapon prof
    end
    return effective                                      # Exit effective
    #
  end
  #--------------------------------------------------------------------------
  # * Apply Skill Effects
  #     user  : the one using skills (battler)
  #     skill : skill
  #--------------------------------------------------------------------------
  def skill_effect(user, skill)
    #
    hp_test     = self.hp                                 # Get hp test value
    effective   = yemi_battler_skill_effect(user, skill)  # Perform the method
    hp_retest   = self.hp                                 # Get current HP
    if hp_retest != hp_test                               # If HP changed
      skill_effect_weapon_prof(user, skill)               # Run weap/skill prof
    end
    return effective                                      # Exit effective
    #
  end
  #--------------------------------------------------------------------------
  # * Get Normal Attack Weapon Proficiency
  #     aggressor : battler performing melee/attack
  #--------------------------------------------------------------------------
  def attack_effect_weapon_prof(aggressor)
    #
    return unless aggressor.is_a?(Game_Actor)             # Exit if not an actor
    return if aggressor.prof_weapon == []                 # Exit if no profs.
    for prof_id in aggressor.prof_weapon                  # Cycle through styles
      weapon_prof_exp(aggressor, prof_id)                 # Process experience
    end
    #
  end
  #--------------------------------------------------------------------------
  # * Get Skill Effect Weapon Proficiency
  #     aggressor : battler performing skill
  #     skill     : skill
  #--------------------------------------------------------------------------
  def skill_effect_weapon_prof(aggressor, skill)
    #
    skill_weaps = Yemi::WEAP_SKILL[skill.id]              # Get weaps array
    weap_id     = aggressor.weapon_id                     # Get current weapon
    return unless aggressor.is_a?(Game_Actor)             # Exit if not an actor
    return if aggressor.prof_weapon == []                 # Exit if no profs
    return if skill_weaps.nil?                            # Exit no weaps array
    return unless skill_weaps.include?(weap_id)           # Exit skill no weaps
    for prof_id in aggressor.prof_weapon                  # Cycle through styles
      weapon_prof_exp(aggressor, prof_id, true)           # Process experience
    end
    #
  end
  #--------------------------------------------------------------------------
  # * Set Weapon Proficiency Experience
  #     aggressor : battler performing skill
  #     prof_id   : ID of proficiency skill for aggressor
  #     is_skill  : if skill Exp or melee Exp
  #--------------------------------------------------------------------------
  def weapon_prof_exp(aggressor, prof_id, is_skill=false)
    #
    weap_id     = aggressor.weapon_id                     # Get current weapon
    prof_style  = Yemi::WEAP_STYLE[prof_id]               # Get style array
    chance      = prof_style[1]                           # Get chance
    prof_list   = prof_style[2]                           # Get weapon list
    prof_exp    = prof_style[3]                           # Get melee experience
    prof_exp    = prof_style[4] if is_skill               # Get skill experience
    prof_exp    = prof_style[3] if prof_exp.nil?          # Melee if no skill 
    return unless weapon_prof_chance(aggressor, chance)   # Exit if chance fails
    return unless prof_list.include?(weap_id)             # Exit if no weapon
    keys        = Yemi::WEAP_STYLE.keys                   # Get keys to styles
    keys.sort!                                            # Ensure key order
    idx         = keys.index(prof_id)                     # Get index position
    aggressor.prof_weapon_exp[idx] += prof_exp            # Increase style exp
    #
  end
  #--------------------------------------------------------------------------
  # * Set Weapon Proficiency Experience
  #     aggressor : battler (unused, but present for adaptation)
  #     chance    : chance of success for that weapon set
  #--------------------------------------------------------------------------
  def weapon_prof_chance(aggressor, chance)
    #
    effective = (rand(100) < chance)                      # Get chance success
    return effective                                      # Exit with outcome 
    #
  end
end
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :prof_weapon              # Weapon proficiency list
  attr_accessor :prof_weapon_exp          # Weapon proficiency experience
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias yemi_actor_setup setup
  alias yemi_actor_base_atk base_atk
  alias yemi_actor_animation1_id animation1_id
  alias yemi_actor_animation2_id animation2_id
  #--------------------------------------------------------------------------
  # * Setup
  #     actor_id : actor ID
  #--------------------------------------------------------------------------
  def setup(actor_id)
    yemi_actor_setup(actor_id)                            # Perform the method
    setup_proficiencies_weapon                            # Setup weapon profs
  end
  #--------------------------------------------------------------------------
  # * Get Basic Attack Power
  #--------------------------------------------------------------------------
  def base_atk
    #
    score = yemi_actor_base_atk                           # Perform the method
    score = unarmed_atk_test(score)                       # Calc Unarmed STR?
    score = weapon_penalty_change(score)                  # Adj for penalty
    score = weapon_proficiency_change(score)              # Adj for proficiency
    return score.to_i                                     # Exit with score
    #
  end
  #--------------------------------------------------------------------------
  # * Get Offensive Animation ID for Normal Attacks
  #--------------------------------------------------------------------------
  def animation1_id
    #
    weapon  = $data_weapons[@weapon_id]                   # Get weapon
    id      = yemi_actor_animation1_id                    # Get user anim ID
    return id if id > 0                                   # Exit if anim over 0
    return id unless Yemi::UNARMED_STRENGTH               # Exit if no Unarmed
    return id if Yemi::UNARMED_USER == nil                # Exit if no anim ID
    return Yemi::UNARMED_USER                             # Exit with custom ID
    #
  end
  #--------------------------------------------------------------------------
  # * Get Target Animation ID for Normal Attacks
  #--------------------------------------------------------------------------
  def animation2_id
    #
    weapon  = $data_weapons[@weapon_id]                   # Get weapon
    id      = yemi_actor_animation2_id                    # Get target anim ID
    return id if id > 0                                   # Exit if anim over 0
    return id unless Yemi::UNARMED_STRENGTH               # Exit if no Unarmed
    return id if Yemi::UNARMED_TARGET == nil              # Exit if no anim ID
    return Yemi::UNARMED_TARGET                           # Exit with custom ID
    #
  end
  #--------------------------------------------------------------------------
  # * Setup Proficiencies in Weapons
  #--------------------------------------------------------------------------
  def setup_proficiencies_weapon
    #
    @prof_weapon = []                                     # Clear proficiencies
    if Yemi::WEAP_CLASS.has_key?(@class_id)               # If class proficiency
      for id in Yemi::WEAP_CLASS[@class_id]               # Cycle through styles
        @prof_weapon.push(id)                             # Push styles
      end
    end
    if Yemi::WEAP_ACTOR.has_key?(@actor_id)               # If actor proficiency
      for id in Yemi::WEAP_ACTOR[@actor_id]               # Cycle through styles
        @prof_weapon.push(id)                             # Push styles
      end
    end
    @prof_weapon.uniq!                                    # Remove duplicates
    keys = Yemi::WEAP_STYLE.keys                          # Get keys to styles
    size = keys.size                                      # Get total num styles
    @prof_weapon_exp = Array.new(size, 0.0)               # Make style exp array
    #
  end
  #--------------------------------------------------------------------------
  # * Get Strength Score for Attack Power if set
  #     score : base_atk score
  #--------------------------------------------------------------------------
  def unarmed_atk_test(score)
    #
    return score if @weapon_id != 0                       # Exit on weapon use
    return score if Yemi::UNARMED_STRENGTH != true        # Exit if not enabled
    n = $data_actors[@actor_id].parameters[2, @level]     # Get untouched STR
    return [[n, 1].max, 999].min                          # Return/use STR score
    #
  end
  #--------------------------------------------------------------------------
  # * Get Weapon Proficiency Penalty
  #     score : base_atk score
  #--------------------------------------------------------------------------
  def weapon_penalty_change(score)
    #
    return score if score == 0                            # Exit if '0' score
    test = false                                          # Assume failure
    test = true if Yemi::WEAP_C_LOSS.has_key?(@class_id)  # True if class loss
    test = true if Yemi::WEAP_A_LOSS.has_key?(@actor_id)  # True if actor loss
    return score unless test                              # Exit unless true
    loss_test = Yemi::WEAP_C_LOSS[@class_id]              # Get class loss
    score = weapon_penalty_calc(score, loss_test)         # Execute class loss
    loss_test = Yemi::WEAP_A_LOSS[@actor_id]              # Get actor loss
    score = weapon_penalty_calc(score, loss_test)         # Execute actor loss
    return score.to_i                                     # Exit with score
    #
  end
  #--------------------------------------------------------------------------
  # * Get Weapon Proficiency Bonus
  #     score      : base_atk score
  #     loss_array : penalty array
  #--------------------------------------------------------------------------
  def weapon_penalty_calc(score, loss_array)
    #
    return score  if loss_array.nil?                      # Exit if no penalty
    penalty = loss_array[0].to_f                          # Get penalty percent
    weapons = loss_array[1]                               # Get penalty weapons
    return score unless weapons.include?(@weapon_id)      # Exit if not weapon
    score *= ((100-penalty)/100)                          # Reduce by percent
    return score.to_i                                     # Exit with score
    #
  end
  #--------------------------------------------------------------------------
  # * Get Weapon Proficiency Bonus
  #     score : base_atk score
  #--------------------------------------------------------------------------
  def weapon_proficiency_change(score)
    #
    return score if @prof_weapon == []                    # Exit if no profs.
    level = weapon_proficiency_level                      # Get proficiency lvl
    return score if level.nil?                            # Exit if no level
    return score if level == 0                            # Exit if 0 level
    level = Yemi::WEAPON_MAX if level > Yemi::WEAPON_MAX  # Cannot exceed max
    score *= Yemi::WEAP_BONUS[level]                      # Increase by bonus
    return score.to_i                                     # Exit with score
    #
  end
  #--------------------------------------------------------------------------
  # * Get Weapon Proficiency Level
  #--------------------------------------------------------------------------
  def weapon_proficiency_level
    #
    exp, idx = 0, 0                                       # Reset exp and idx
    make_list = []                                        # Create new exp list 
    for exp_score in @prof_weapon_exp                     # Cycle through exp
      make_list.push([exp_score,idx])                     # push exp and idx
      idx += 1                                            # increase idx
    end
    make_list.sort!                                       # Sort exp low-to-high
    make_list.reverse!                                    # Reverse to high/low
    for item in make_list                                 # Sort exp list
      exp       = item[0]                                 # Get Exp score
      idx       = item[1]                                 # Get index position
      break if weapon_proficiency_found?(idx)             # Exit loop if found
    end
    exp = 0 if exp.nil?
    exp = [[exp, 9999999].min, 0].max                     # Keep exp in range
    level = 1                                             # Assume lvl 1 start
    while exp >= @exp_list[level+1]                       # Exp is above level?
      level += 1                                          # Increase level by 1
    end
    l_divide = Yemi::WEAPON_DIVIDE                        # Get divide amount
    l_divide = 1 if l_divide < 1                          # Its no lower than 1
    level = (level/l_divide).to_i                         # Divide level
    l_max = Yemi::WEAPON_MAX                              # Get max level
    l_max = 1 if l_max < 1                                # Its no lower than 1
    level = [[level, l_max].min, 0].max                   # Keep within range
    return level                                          # Exit with level
    #
  end
  #--------------------------------------------------------------------------
  # * Get Weapon Proficiency found
  #     idx : index in actor's weapon style list
  #--------------------------------------------------------------------------
  def weapon_proficiency_found?(idx)
    #
    keys = Yemi::WEAP_STYLE.keys                          # Get keys to styles
    for prof_id in @prof_weapon                           # Cycle through styles
      next unless idx ==  keys.index(prof_id)             # Skip until match
      prof_style  = Yemi::WEAP_STYLE[prof_id]             # Get style
      prof_list   = prof_style[2]                         # Get weapon list
      next unless prof_list.include?(@weapon_id)          # Skip until weapon
      return true                                         # Exit weapon found
      break                                               # Break from loop
    end        
    return false                                          # Exit no weapon found
    #
  end
end
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs title screen processing.
#==============================================================================
class Scene_Title
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias yemi_title_main main
  #--------------------------------------------------------------------------
  # * Main Processing
  #-------------------------------------------------------------------------- 
  def main
    #
    RPG.initialized_yemi_class_clear_w = false            # Reset initialization
    yemi_title_main                                       # Perform the method
    RPG.yemi_class_clear_w                                # Run new RPG method
    #
  end
endFAQ
The Weapon 'style' for knives within the default script was named Barbasettian, in honor of Luigi Barbasetti of Italy. A master Fencer and a military master at arms, he was responsible for one of the top ten knife fighting styles. Your choice of course...
Instructions
Plenty, and all in the script.
Version History
- 1.0 - 2025-04-19:  Original release
 
 
- 1.1 - 2025-04-20:  Altered the experience storage array to track all styles for an actor, not just those currently assigned.
 
 
- 1.2 - 2025-04-24: Three alterations:
- Altered: Changed value and #method names in RPG script
- Fixed: Value identifying which experience points to test
- Fixed: Method to find highest leveled weapon proficiency
- Fixed: Value identifying which experience points to test
- Fixed: Method to find highest leveled weapon proficiency
Compatibility
Fairly compatible for RPGMaker XP systems as there are no rewrites to any classes, all content using aliased methods.
Author's Notes
I named this after a friend and former co-worker whom I found out today is no longer with us. I wrote it for remembrance.
Terms and Conditions
Free for use, even in commercial games. Only due credit is required.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
	  Above are clickable links

 
 
 Adeyemi's Armament Proficiency
 Adeyemi's Armament Proficiency
 
 
![[Image: QrnbKlx.jpg]](https://i.imgur.com/QrnbKlx.jpg)
![[Image: sGz1ErF.png]](https://i.imgur.com/sGz1ErF.png)
![[Image: liM4ikn.png]](https://i.imgur.com/liM4ikn.png)
![[Image: fdzKgZA.png]](https://i.imgur.com/fdzKgZA.png)
![[Image: sj0H81z.png]](https://i.imgur.com/sj0H81z.png)
![[Image: QL7oRau.png]](https://i.imgur.com/QL7oRau.png)
![[Image: uSqjY09.png]](https://i.imgur.com/uSqjY09.png)
![[Image: GAA3qE9.png]](https://i.imgur.com/GAA3qE9.png)
![[Image: 2Hmnx1G.png]](https://i.imgur.com/2Hmnx1G.png)
![[Image: BwtNdKw.png%5B]](https://i.imgur.com/BwtNdKw.png%5B)