Changing "Weapon Equip" through an event

Another post about character customization for that custom character game thing.
So I want the player to be able to equip certain weapon types from the start of the game. The thing is I haven't found anything that can change the weapons equipable without changing the character's class.
So you want like the "Knight" class to equip only swords but later on. Still be a "Knight" but can now equip swords and spear?

You could copy and paste the "Knight" class and make the 2nd "Knight" class have the trait to equip Spears?

(Or whatever weapon you want them to have)

So when it gets to that point you change him to the 2nd Knights class but in game it would like no change has happened at all to his class.
The thing is I haven't found anything that can change the weapons equipable without changing the character's class.
actors, states, and gear can all hold equip type traits. if you wanted an actor to be able to equip something that their class cannot, you can give the actor the trait instead of the class.

Edit: saw the body but not the title. you could probably use a script call to push the trait onto the actor. No idea how to do it offhand for ACE though
You could script a passive state that adds it.
You could clone the class and add the weapons used.
You could close the actor and give the clone access to that weapon while using the same class.
You could only make those weapons available later in the game, and code them as "swords" but use a plugin to give them the appearance of spears.
Another post about character customization for that custom character game thing.
So I want the player to be able to equip certain weapon types from the start of the game. The thing is I haven't found anything that can change the weapons equipable without changing the character's class.
Try this
Spoiler: Class Lock Feature
Ruby:
# ╔═══════════════════════════════════════════════╦════════════════════╗
# ║ Title: Actor/Class Feature Lock               ║  Version: 1.00     ║
# ║ Author: Roninator2                            ║                    ║
# ╠═══════════════════════════════════════════════╬════════════════════╣
# ║ Function:                                     ║   Date Created     ║
# ║                                               ╠════════════════════╣
# ║    Alter feature control with conditions      ║    16 Jun 2025     ║
# ╚═══════════════════════════════════════════════╩════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Requires: nil                                                      ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Brief Description:                                                 ║
# ║      Prevent locked features from applying                         ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Instructions:                                                      ║
# ║                                                                    ║
# ║   Put note tag on class note box in order to block                 ║
# ║   a feature unless the condition is true                           ║
# ║   <feature restrict: feature_id,method,value,condition>            ║
# ║   example                                                          ║
# ║     <class feature restrict: 2,st,15>                              ║
# ║     <class feature restrict: 4,sw,50>                              ║
# ║     <class feature restrict: 5,v,21,gt,5>                          ║
# ║     <class feature restrict: 5,v,21,lt,5>                          ║
# ║   Feature lists starts at 0                                        ║
# ║                                                                    ║
# ║  Available conditions:                                             ║
# ║    st - state (state must be inflicted)                            ║
# ║    sw - switch (switch must be on)                                 ║
# ║    v - variable (gt = greater than, lt = less than)                ║
# ║                                                                    ║
# ║  Numbers:                                                          ║
# ║    st,15 - state 15 is inflicted                                   ║
# ║    sw,50 - switch 50 is true                                       ║
# ║  v,21,gt,5 - variable 21 is equal to or greater than 5             ║
# ║                                                                    ║
# ║  The effect:                                                       ║
# ║    All features on the actor will not work                         ║
# ║    Only features not in the notetag will be available              ║
# ║    Features that are referenced in the note tag                    ║
# ║    will be used or added to the actor when the                     ║
# ║    condition is true.                                              ║
# ║                                                                    ║
# ║   Same options are availablefor the Actor as well                  ║
# ║     <actor feature restrict: 2,st,15>                              ║
# ║     <actor feature restrict: 4,sw,50>                              ║
# ║     <actor feature restrict: 5,v,21,gt,5>                          ║
# ║     <actor feature restrict: 5,v,21,lt,5>                          ║
# ║   Put note tag on actor note box in order to block                 ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Updates:                                                           ║
# ║ 1.00 - 22 Jul 2022 - Created script with help from Tsukihime code  ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Credits and Thanks:                                                ║
# ║   Roninator2                                                       ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Terms of use:                                                      ║
# ║  Follow the original Authors terms of use where applicable         ║
# ║    - When not made by me (Roninator2)                              ║
# ║  Free for all uses in RPG Maker except nudity                      ║
# ║  Anyone using this script in their project before these terms      ║
# ║  were changed are allowed to use this script even if it conflicts  ║
# ║  with these new terms. New terms effective 03 Apr 2024             ║
# ║  No part of this code can be used with AI programs or tools        ║
# ║  Credit must be given                                              ║
# ╚════════════════════════════════════════════════════════════════════╝

module R2_Class_Feature_Adjust
  Lock_Actor_Feature = /<actor[ _-]feature[ _-]restrict:[ ](\w+(?:\s*,\s*\w+)*)>/i
  Lock_Class_Feature = /<class[ _-]feature[ _-]restrict:[ ](\w+(?:\s*,\s*\w+)*)>/i
end
 
module DataManager
  class <<self
    alias load_database_original_r2_class_feature_cond_restrict load_database
  end
  def self.load_database
    load_database_original_r2_class_feature_cond_restrict
    load_class_restrict_feature_cond
    load_actor_restrict_feature_cond
  end
  def self.load_class_restrict_feature_cond
    for obj in $data_classes
      next if obj.nil?
      obj.load_class_restrict_feature_cond
    end
  end
  def self.load_actor_restrict_feature_cond
    for obj in $data_actors
      next if obj.nil?
      obj.load_actor_restrict_feature_cond
    end
  end
end

class RPG::Class
  attr_accessor :class_feature_restrict
  #--------------------------------------------------------------------------
  # * Load Class Feature Restrictions
  #--------------------------------------------------------------------------
  def load_class_restrict_feature_cond
    @class_feature_restrict = []
    results = self.note.scan(R2_Class_Feature_Adjust::Lock_Class_Feature)
    results.each do |res|
      data = res[0]
      restrict = []
      for x in data.split(",")
        restrict.push(x)
      end
      @class_feature_restrict << restrict
    end
  end
end

class RPG::Actor
  attr_accessor :actor_feature_restrict
  #--------------------------------------------------------------------------
  # * Load Actor Feature Restrictions
  #--------------------------------------------------------------------------
  def load_actor_restrict_feature_cond
    @actor_feature_restrict = []
    results = self.note.scan(R2_Class_Feature_Adjust::Lock_Actor_Feature)
    results.each do |res|
      data = res[0]
      restrict = []
      for x in data.split(",")
        restrict.push(x)
      end
      @actor_feature_restrict << restrict
    end
  end
end

class Game_Actor
  #--------------------------------------------------------------------------
  # * overwrite class features
  #--------------------------------------------------------------------------
  def feature_objects
    super + [process_actor_feature_conditions] + [process_class_feature_conditions] + equips.compact
  end
  #--------------------------------------------------------------------------
  # * New Process Actor Conditions
  #--------------------------------------------------------------------------
  def process_actor_feature_conditions
    @actor_saved_features = []
    @actor_original_features = [] if @actor_original_features.nil?
    orig = actor
    @actor_original_features = orig.features if @actor_original_features.empty?
    orig.features = @actor_original_features
    @actor_deleted_features = []
    @actor_removed_features = []
    @actor_removed_features = check_actor_feature_restrict(orig)
    @actor_removed_features.each do |ft|
      @actor_deleted_features << @actor_original_features[ft]
    end
    @actor_original_features.each do |ef|
      next if ef.nil?
      @same = false
      code_o = ef.code
      data_o = ef.data_id
      value_o = ef.value
      @actor_deleted_features.each do |df|
        next if df.nil?
        code_d = df.code
        data_d = df.data_id
        value_d = df.value
        if (code_d == code_o) && (data_o == data_d) && (value_o == value_d)
          @same = true
        end
      end
      @actor_saved_features << ef if @same == false
    end
    orig.features = @actor_saved_features
    return orig
  end
  #--------------------------------------------------------------------------
  # * New Check Actor feature restrictions
  #--------------------------------------------------------------------------
  def check_actor_feature_restrict(orig)
    restrict_features = get_feature_restrict(orig.actor_feature_restrict)
    return restrict_features
  end
  #--------------------------------------------------------------------------
  # * New Process Class Conditions
  #--------------------------------------------------------------------------
  def process_class_feature_conditions
    @class_saved_features = []
    @class_original_features = [] if @class_original_features.nil?
    orig = self.class
    @class_original_features = orig.features if @class_original_features.empty?
    orig.features = @class_original_features
    @class_deleted_features = []
    @class_removed_features = []
    @class_removed_features = check_class_feature_restrict(orig)
    @class_removed_features.each do |ft|
      @class_deleted_features << @class_original_features[ft]
    end
    @class_original_features.each do |ef|
      next if ef.nil?
      @same = false
      code_o = ef.code
      data_o = ef.data_id
      value_o = ef.value
      @class_deleted_features.each do |df|
        next if df.nil?
        code_d = df.code
        data_d = df.data_id
        value_d = df.value
        if (code_d == code_o) && (data_o == data_d) && (value_o == value_d)
          @same = true
        end
      end
      @class_saved_features << ef if @same == false
    end
    orig.features = @class_saved_features
    return orig
  end
  #--------------------------------------------------------------------------
  # * New Check Class feature restrictions
  #--------------------------------------------------------------------------
  def check_class_feature_restrict(orig)
    restrict_features = get_feature_restrict(orig.class_feature_restrict)
    return restrict_features
  end
  #--------------------------------------------------------------------------
  # * New Get feature restrictions
  #--------------------------------------------------------------------------
  def get_feature_restrict(value)
    ft_remove = []
    value.each do |ftr|
      ft = ftr[0].to_i
      mt = ftr[1].to_s.downcase
      vl = ftr[2].to_i
      eq = ftr[3].to_s.downcase
      cd = ftr[4].to_i
      case mt
      when "st", " st"
        ft_remove.push(ft) if !state?(vl)
      when "sw", " sw"
        if $game_switches[vl] == false
          ft_remove.push(ft)
        end
      when "v", " v"
        if eq == "gt"
          if $game_variables[vl] < cd
            ft_remove.push(ft)
          end
        else
          if $game_variables[vl] > cd
            ft_remove.push(ft)
          end
        end
      end
    end
    return ft_remove
  end
end

There are now three options on this page. Pick one, they should all work.
your best option would be a script for dynamic features, as that would allow you to add and remove traits during gameplay.

The one I used for VXA is:
I use this script written by Kyonides, it allows me to have actors learn to use new equip types midgame.

Spoiler: Script
CSS:
# * EquipFeatures ACE * #
#   Scripter : Kyonides Arkanthes
#   2023-05-10

# This scriptlet will allow you to add or remove Equip Types to
# any given Actor during gameplay at will.

# * Script Calls * #

# - Find an Actor - 2 Methods:
# actor = $game_party.members[Index]
# actor = $game_actors[ActorID]

# - Learn a New Equip Type
# actor.learn_weapon_type(EquipTypeIndex)
# actor.learn_armor_type(EquipTypeIndex)

# - Forget a given Equip Type
# actor.forget_weapon_type(EquipTypeIndex)
# actor.forget_armor_type(EquipTypeIndex)

module Equip
  class FeaturesContainer
    attr_reader :features
    def initialize
      @features = []
    end

    def add(type_code, type_id)
      @features << RPG::BaseItem::Feature.new(type_code, type_id)
      @features = @features.uniq{|f| f.data_id }
    end

    def remove(type_code, type_id)
      @features.delete_if{|f| f.same_data?(type_code, type_id) }
    end
  end
end

class RPG::BaseItem::Feature
  def same_data?(type_code, type_id)
    @code == type_code and @data_id == type_id
  end
end

class Game_Actor
  alias :learn_equip_types_init :initialize
  alias :learn_equip_types_feat_obj :feature_objects
  def initialize(actor_id)
    @weapon_features = Equip::FeaturesContainer.new
    @armor_features = Equip::FeaturesContainer.new
    learn_equip_types_init(actor_id)
  end

  def equip_features
    [@weapon_features] + [@armor_features]
  end

  def feature_objects
    learn_equip_types_feat_obj + equip_features
  end

  def learn_weapon_type(type_id)
    @weapon_features.add(FEATURE_EQUIP_WTYPE, type_id)
  end

  def learn_armor_type(type_id)
    @armor_features.add(FEATURE_EQUIP_ATYPE, type_id)
  end

  def forget_weapon_type(type_id)
    @weapon_features.remove(FEATURE_EQUIP_WTYPE, type_id)
  end

  def forget_armor_type(type_id)
    @armor_features.remove(FEATURE_EQUIP_ATYPE, type_id)
  end
end

Original thread: https://forums.rpgmakerweb.com/threads/changing-weapon-equip-through-an-event.178362/