MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
186
First Language
Meowish
Primarily Uses
Made for a request here.

This script changes the actor's class according to the weapon type he/she is using.

So equipping weapon will change the class id to be the same as the weapon type's id.

Features:

Change Class ID based on Weapon Type ID

How to Use:

[1] Paste this below Material and above Main

[2] Set up your class change preferences in the Script's SETTINGS AREA

[3] Set up your weapon types and classes in the database editor to make sure both share the same id

Compatibility:

This script overwrites the OK command in the equip scene.

So there might be a chance of conflict if you have another custom script overwriting the same place.

Terms of Use:

Free for both commercial and non-commercial

Script:

Code:
#==============================================================================# ■ Meow Face Change Class via Weapon Type#------------------------------------------------------------------------------# Change the Actor's Class ID according to equipped Weapon Type ID#==============================================================================# How to Use:# [1] Paste this below Material and above Main# [2] Set your preferences in the script's SETTINGS AREA#==============================================================================module MeowCCvW #DO NOT REMOVE!!#==============================================================================# Settings Area#==============================================================================  KEEP_EXP = false #(true/false) whether or not to keep exp from previous class  INHERIT_SKILL = false #(true/false) whether or not to keep skills from previous class#==============================================================================# End of Settings Area# Edit anything past this line at your own risk!#==============================================================================endclass Game_Actor < Game_Battler  def update_skills    self.class.learnings.each do |learning|      learn_skill(learning.skill_id) if learning.level <= @level    end  endendclass Scene_Equip < Scene_MenuBase  def on_item_ok #Overwrite    Sound.play_equip    @actor.change_equip(@slot_window.index, @item_window.item)    if @slot_window.index == 0 && @item_window.item.is_a?(RPG::Weapon)      @actor.change_class(@item_window.item.wtype_id,MeowCCvW::KEEP_EXP)      !MeowCCvW::INHERIT_SKILL ? @actor.init_skills : @actor.update_skills    end    @slot_window.activate    @slot_window.refresh    @item_window.unselect    @item_window.refresh  endend
 

ovate

tale
Veteran
Joined
Dec 16, 2016
Messages
863
Reaction score
1,493
First Language
English
Primarily Uses
N/A
Fixed script format, credit Meow Face.
Be sure to- set up your weapon types and classes in the database editor to make sure both share the same id
Code:
#==============================================================================
# ■ Meow Face Change Class via Weapon Type
#------------------------------------------------------------------------------
# Change the Actor's Class ID according to equipped Weapon Type ID
#==============================================================================
# How to Use:
# [1] Paste this below Material and above Main
# [2] Set your preferences in the script's SETTINGS AREA
#==============================================================================
module MeowCCvW
#DO NOT REMOVE!!
#==============================================================================
# Settings Area
#============================================================================== 
KEEP_EXP = false  #(true/false) whether or not to keep exp from previous class 
INHERIT_SKILL = false #(true/false) whether or not to keep skills from previous class
#==============================================================================
# End of Settings Area# Edit anything past this line at your own risk!
#==============================================================================
end
class Game_Actor < Game_Battler 
  def update_skills   
    self.class.learnings.each do |learning|     
      learn_skill(learning.skill_id) if learning.level <= @level   
    end 
  end
end
class Scene_Equip < Scene_MenuBase 
  def on_item_ok #Overwrite   
    Sound.play_equip   
    @actor.change_equip(@slot_window.index, @item_window.item)   
    if @slot_window.index == 0 &&
      @item_window.item.is_a?(RPG::Weapon)     
      @actor.change_class(@item_window.item.wtype_id,MeowCCvW::KEEP_EXP)     
      !MeowCCvW::INHERIT_SKILL ? @actor.init_skills : @actor.update_skills   
    end   
    @slot_window.activate   
    @slot_window.refresh   
    @item_window.unselect   
    @item_window.refresh 
  end
  end
 

Latest Threads

Latest Posts

Latest Profile Posts

Lately I have been taking a break from game and resource making so I won't get burnt out. But I am also interested in the Game Jams this site periodically holds. It'd be great if I knew when the next one, if any, is planned.
elexy 1.2.pngSome bust art to be cropped and cleaned. May use in special decision moments. Depending on how it looks in game I may cut it.
Tiamat-86 wrote on ATT_Turan's profile.
apparently since its turning 15 years old this year the ps3 is considered "retro". now how old do you feel?
guess that means im an "antique" gamer since ill still play games as old as i am.
"you know your getting old when your childhood console changes ethnicity" lol it turned yellow
I'm making Toilet in Wonderland 2. and tell vinny about it lol

Forum statistics

Threads
115,346
Messages
1,089,179
Members
150,023
Latest member
kirra
Top