Restrict the use of a menu option for one actor with a common event

Status
Not open for further replies.

FAGC54

What was that variable for?
Veteran
Joined
Apr 22, 2017
Messages
48
Reaction score
2
First Language
Spanish
Primarily Uses
RMVXA
Hello everyone!
I want what the tittle says. I will explain better anyways.
Scripts i'm using:


So, the problem is this, i'm using the Class System to change classes when an actor equips an item (Armor), for this, the script from Hime calls a common event and changes the class. What i want to do is also restrict the actor that equiped the item to use the class menu option until the item is unequiped (again a common event using Hime's script)

Can someone make a script to lock an actor the access to the Class System scene and unlock it again whit a script from a common event?
 
Last edited:

FAGC54

What was that variable for?
Veteran
Joined
Apr 22, 2017
Messages
48
Reaction score
2
First Language
Spanish
Primarily Uses
RMVXA

FAGC54

What was that variable for?
Veteran
Joined
Apr 22, 2017
Messages
48
Reaction score
2
First Language
Spanish
Primarily Uses
RMVXA

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
538
Reaction score
379
First Language
English
Primarily Uses
RMVXA
Okay, I haven't tested this with Galv's Menu Themes, because I don't have the demo, but give this a try:
Code:
=begin
#==============================================================================#
#   AMN YEA Class System addon
#   Version 1.01
#   Author: AMoonlessNight
#   Date: 20 Jul 2018
#   Latest: 20 Jul 2018
#==============================================================================#
#   UPDATE LOG
#------------------------------------------------------------------------------#
# 20 Jul 2018 - created the script
#==============================================================================#
#   TERMS OF USE
#------------------------------------------------------------------------------#
# - Please credit AMoonlessNight or A-Moonless-Night
# - Free for non-commercial use
# - Please follow Yanfly's terms and conditions for the original script
# - I'd love to see your game if you end up using one of my scripts
#==============================================================================#

Requested by FAGC54

This script makes it so that you can set certain armours to not let the actor
access the Class Change scene.

Use the following in a weapon or armour's notes:

<no_class_change>

This will make it so that if an actor has that item equipped, they will not be
able to access the Class Change scene in the menu.
 
=end

#==============================================================================
#  Please do not edit below this point unless you know what you are doing.
#==============================================================================

if !$imported["YEA-ClassSystem"]
  msg = "                                      IMPORTANT:\n"
  msg += "            YEA Class System script add-on by A-Moonless-Night\n"
  msg += " \n"
  msg += "This script requires Yanfly's Class System script.\n"
  msg += "Please download it from https://yanflychannel.wordpress.com/rmvxa/"
  msgbox(msg)
  exit
end

class RPG::EquipItem < RPG::BaseItem
  attr_reader :class_change
 
  def amn_loadnotetag_no_class_change
    @class_change = true
    self.note.split(/[\r\n]+/).each { |line|
    case line
    when /<no[-_ ]+class[-_ ]+change>/i
      @class_change = false
    end
    }
  end
 
  def class_change?
    return @class_change
  end

end

class << DataManager

  alias amn_classsystem_datamanager_loaddatabase load_database
  def load_database
    amn_classsystem_datamanager_loaddatabase
    load_notetags_classchange_addon
  end

  def load_notetags_classchange_addon
    groups = [$data_weapons, $data_armors]
    for group in groups
      for obj in group
        next if obj.nil?
        obj.amn_loadnotetag_no_class_change
      end
    end
  end
 
end

class Game_Actor < Game_Battler
 
  def has_no_class_change_equips?
    equips.each { |eq| next if eq.nil?; return false if !eq.class_change? }
    return true
  end
 
end

class Game_Party < Game_Unit
 
  def menu_members
    members.select {|member| member.has_no_class_change_equips? }
  end
 
  def menu_member_actor
    $game_actors[@menu_actor_id] || menu_members[0]
  end

  def menu_member_actor_next
    index = menu_members.index(menu_member_actor) || -1
    index = (index + 1) % menu_members.size
    self.menu_actor = menu_members[index]
  end

  def menu_member_actor_prev
    index = menu_members.index(menu_member_actor) || 1
    index = (index + menu_members.size - 1) % menu_members.size
    self.menu_actor = menu_members[index]
  end
end

class Scene_Menu < Scene_MenuBase

if !$imported["Galv_Menu_Themes"]
  alias amn_classsystem_scenemenu_onpersonalok on_personal_ok
  def on_personal_ok
    case @command_window.current_symbol
    when :class
      $game_party.menu_actor = $game_party.members[@status_window.index]
      if $game_party.menu_actor.has_no_class_change_equips?
        SceneManager.call(Scene_Class)
      else
        Sound.play_buzzer
        @status_window.activate
      end
    else
      scene_menu_on_personal_ok_cs
    end
  end
end

if $imported["Galv_Menu_Themes"]
  alias amn_classsystem_galv_scenemenu_customonpersonalok custom_on_personal_ok
  def custom_on_personal_ok(symbol)
    if symbol == :class
      $game_party.menu_actor = $game_party.members[@status_window.index]
      if $game_party.menu_actor.has_no_class_change_equips?
        SceneManager.call(Scene_Class)
      else
        Sound.play_buzzer
        @status_window.activate
      end
    else
      amn_classsystem_galv_scenemenu_customonpersonalok
    end
  end
end

end

class Scene_Class < Scene_MenuBase
 
  def next_actor
    @actor = $game_party.menu_member_actor_next
    on_actor_change
  end

  def prev_actor
    @actor = $game_party.menu_member_actor_prev
    on_actor_change
  end
 
end
 

FAGC54

What was that variable for?
Veteran
Joined
Apr 22, 2017
Messages
48
Reaction score
2
First Language
Spanish
Primarily Uses
RMVXA
I just tested it, sorry, didn't work. u.u
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
538
Reaction score
379
First Language
English
Primarily Uses
RMVXA
Here you go, should work now:
Code:
=begin
#==============================================================================#
#   AMN YEA Class System addon
#   Version 1.02
#   Author: AMoonlessNight
#   Date: 20 Jul 2018
#   Latest: 21 Jul 2018
#==============================================================================#
#   UPDATE LOG
#------------------------------------------------------------------------------#
# 20 Jul 2018 - created the script
# 21 Jul 2018 - changed symbol used for Galv's Menu Themes Engine
#==============================================================================#
#   TERMS OF USE
#------------------------------------------------------------------------------#
# - Please credit AMoonlessNight or A-Moonless-Night
# - Free for non-commercial use
# - Please follow Yanfly's terms and conditions for the original script
# - I'd love to see your game if you end up using one of my scripts
#==============================================================================#

Requested by FAGC54

This script makes it so that you can set certain armours to not let the actor
access the Class Change scene.

Use the following in a weapon or armour's notes:

<no_class_change>

This will make it so that if an actor has that item equipped, they will not be
able to access the Class Change scene in the menu.
 
If you are using Galv's Menu Themes Engine, use the symbol :class_scene, e.g.:
# ["Menu Text", :command_type, :Scene, switch1, switch2, help txt, icon]
  ["Class",     :sel, :class_scene,  0, 0, "Change your character's class",121],
 
If you have other scripts that overwrite the following methods, place them before
this script.

class Scene_Menu < Scene_MenuBase
def custom_symbol(symbol)
def custom_on_command_ok(symbol)
def custom_on_personal_ok(symbol)
def custom_on_personal_cancel(symbol)
 
=end

#==============================================================================
#  Please do not edit below this point unless you know what you are doing.
#==============================================================================

if !$imported["YEA-ClassSystem"]
  msg = "                                      IMPORTANT:\n"
  msg += "            YEA Class System script add-on by A-Moonless-Night\n"
  msg += " \n"
  msg += "This script requires Yanfly's Class System script.\n"
  msg += "Please download it from https://yanflychannel.wordpress.com/rmvxa/"
  msgbox(msg)
  exit
end

class RPG::EquipItem < RPG::BaseItem
  attr_reader :class_change
 
  def amn_loadnotetag_no_class_change
    @class_change = true
    self.note.split(/[\r\n]+/).each { |line|
    case line
    when /<no[-_ ]+class[-_ ]+change>/i
      @class_change = false
    end
    }
  end
 
  def class_change?
    return @class_change
  end

end

class << DataManager

  alias amn_classsystem_datamanager_loaddatabase load_database
  def load_database
    amn_classsystem_datamanager_loaddatabase
    load_notetags_classchange_addon
  end

  def load_notetags_classchange_addon
    groups = [$data_weapons, $data_armors]
    for group in groups
      for obj in group
        next if obj.nil?
        obj.amn_loadnotetag_no_class_change
      end
    end
  end
 
end

class Game_Actor < Game_Battler
 
  def has_no_class_change_equips?
    equips.each { |eq| next if eq.nil?; return false if !eq.class_change? }
    return true
  end
 
end

class Game_Party < Game_Unit
 
  def menu_members
    members.select {|member| member.has_no_class_change_equips? }
  end
 
  def menu_member_actor
    $game_actors[@menu_actor_id] || menu_members[0]
  end

  def menu_member_actor_next
    index = menu_members.index(menu_member_actor) || -1
    index = (index + 1) % menu_members.size
    self.menu_actor = menu_members[index]
  end

  def menu_member_actor_prev
    index = menu_members.index(menu_member_actor) || 1
    index = (index + menu_members.size - 1) % menu_members.size
    self.menu_actor = menu_members[index]
  end
end

class Scene_Menu < Scene_MenuBase

if !$imported["Galv_Menu_Themes"]
  alias amn_classsystem_scenemenu_onpersonalok on_personal_ok
  def on_personal_ok
    case @command_window.current_symbol
    when :class
      $game_party.menu_actor = $game_party.members[@status_window.index]
      if $game_party.menu_actor.has_no_class_change_equips?
        SceneManager.call(Scene_Class)
      else
        Sound.play_buzzer
        @status_window.activate
      end
    else
      scene_menu_on_personal_ok_cs
    end
  end
end

if $imported["Galv_Menu_Themes"]
 
  alias amn_classsystem_galv_scenemenu_customsymbol custom_symbol
  def custom_symbol(symbol)
    case symbol
    when :class_scene
      return true
    end
    amn_classsystem_galv_scenemenu_customsymbol
  end
 
  alias amn_classsystem_galv_scenemenu_customonpersonalok custom_on_personal_ok
  def custom_on_personal_ok(symbol)
    if symbol == :class_scene
      $game_party.menu_actor = $game_party.members[@status_window.index]
      if $game_party.menu_actor.has_no_class_change_equips?
        SceneManager.call(Scene_Class)
      else
        Sound.play_buzzer
        @status_window.activate
      end
    else
      amn_classsystem_galv_scenemenu_customonpersonalok
    end
  end
end

end

class Scene_Class < Scene_MenuBase
 
  def next_actor
    @actor = $game_party.menu_member_actor_next
    on_actor_change
  end

  def prev_actor
    @actor = $game_party.menu_member_actor_prev
    on_actor_change
  end
 
end

If you have other scripts that add custom commands into Galv's menu, make sure they're before this one.
 

FAGC54

What was that variable for?
Veteran
Joined
Apr 22, 2017
Messages
48
Reaction score
2
First Language
Spanish
Primarily Uses
RMVXA
I'm getting this error message:


I never understood what this error was about.

Sorry about that, i had the older script too.

I changed the symbol :Scene_Class for :class_scene as the instructions said, and gave me an error about the symbol :class_scene. changed it back in galv's script, and the other two in your script, but didn't work.
 
Last edited:

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
538
Reaction score
379
First Language
English
Primarily Uses
RMVXA
What other scripts do you have that change the menu scene?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
1,845
Reaction score
405
First Language
English
Primarily Uses
RMVXA
I tried this in the galv's menu theme demo and could not get the class command to show up.
How is that part done.
However,
I commented out the galv's menu theme parts in the script and the next actor part and added in a classcommand part and got it to work for other games like how I would want it.
The scene comes up, but if you have the weapon/armor equipped with the code then the commands do not show up.
Code:
=begin
#==============================================================================#
#   AMN YEA Class System addon
#   Version 1.02
#   Author: AMoonlessNight
#   Date: 20 Jul 2018
#   Latest: 21 Jul 2018
#==============================================================================#
#   UPDATE LOG
#------------------------------------------------------------------------------#
# 20 Jul 2018 - created the script
# 21 Jul 2018 - changed symbol used for Galv's Menu Themes Engine
#==============================================================================#
#   TERMS OF USE
#------------------------------------------------------------------------------#
# - Please credit AMoonlessNight or A-Moonless-Night
# - Free for non-commercial use
# - Please follow Yanfly's terms and conditions for the original script
# - I'd love to see your game if you end up using one of my scripts
#==============================================================================#

Requested by FAGC54

This script makes it so that you can set certain armours to not let the actor
access the Class Change scene.

Use the following in a weapon or armour's notes:

<no_class_change>

This will make it so that if an actor has that item equipped, they will not be
able to access the Class Change scene in the menu.
 
If you are using Galv's Menu Themes Engine, use the symbol :class_scene, e.g.:
# ["Menu Text", :command_type, :Scene, switch1, switch2, help txt, icon]
  ["Class",     :sel, :class_scene,  0, 0, "Change your character's class",121],
 
If you have other scripts that overwrite the following methods, place them before
this script.

class Scene_Menu < Scene_MenuBase
def custom_symbol(symbol)
def custom_on_command_ok(symbol)
def custom_on_personal_ok(symbol)
def custom_on_personal_cancel(symbol)
 
=end

#==============================================================================
#  Please do not edit below this point unless you know what you are doing.
#==============================================================================

if !$imported["YEA-ClassSystem"]
  msg = "                                      IMPORTANT:\n"
  msg += "            YEA Class System script add-on by A-Moonless-Night\n"
  msg += " \n"
  msg += "This script requires Yanfly's Class System script.\n"
  msg += "Please download it from https://yanflychannel.wordpress.com/rmvxa/"
  msgbox(msg)
  exit
end

class RPG::EquipItem < RPG::BaseItem
  attr_reader :class_change
 
  def amn_loadnotetag_no_class_change
    @class_change = true
    self.note.split(/[\r\n]+/).each { |line|
    case line
    when /<no[-_ ]+class[-_ ]+change>/i
      @class_change = false
    end
    }
  end
 
  def class_change?
    return @class_change
  end

end

class << DataManager

  alias amn_classsystem_datamanager_loaddatabase load_database
  def load_database
    amn_classsystem_datamanager_loaddatabase
    load_notetags_classchange_addon
  end

  def load_notetags_classchange_addon
    groups = [$data_weapons, $data_armors]
    for group in groups
      for obj in group
        next if obj.nil?
        obj.amn_loadnotetag_no_class_change
      end
    end
  end
 
end

class Game_Actor < Game_Battler
 
  def has_no_class_change_equips?
    equips.each { |eq| next if eq.nil?; return false if !eq.class_change? }
    return true
  end
 
end

class Game_Party < Game_Unit
 
  def menu_members
    members.select {|member| member.has_no_class_change_equips? }
  end
 
  def menu_member_actor
    $game_actors[@menu_actor_id] || menu_members[0]
  end

  def menu_member_actor_next
    index = menu_members.index(menu_member_actor) || -1
    index = (index + 1) % menu_members.size
    self.menu_actor = menu_members[index]
  end

  def menu_member_actor_prev
    index = menu_members.index(menu_member_actor) || 1
    index = (index + menu_members.size - 1) % menu_members.size
    self.menu_actor = menu_members[index]
  end
end

#~ class Scene_Menu < Scene_MenuBase

#~ if !$imported["Galv_Menu_Themes"]
#~   alias amn_classsystem_scenemenu_onpersonalok on_personal_ok
#~   def on_personal_ok
#~     case @command_window.current_symbol
#~     when :class
#~       $game_party.menu_actor = $game_party.members[@status_window.index]
#~       if $game_party.menu_actor.has_no_class_change_equips?
#~         SceneManager.call(Scene_Class)
#~       else
#~         Sound.play_buzzer
#~         @status_window.activate
#~       end
#~     else
#~       scene_menu_on_personal_ok_cs
#~     end
#~   end
#~ end

#~ if $imported["Galv_Menu_Themes"]
#~ 
#~   alias amn_classsystem_galv_scenemenu_customsymbol custom_symbol
#~   def custom_symbol(symbol)
#~     case symbol
#~     when :class_scene
#~       return true
#~     end
#~     amn_classsystem_galv_scenemenu_customsymbol
#~   end
#~ 
#~   alias amn_classsystem_galv_scenemenu_customonpersonalok custom_on_personal_ok
#~   def custom_on_personal_ok(symbol)
#~     if symbol == :class_scene
#~       $game_party.menu_actor = $game_party.members[@status_window.index]
#~       if $game_party.menu_actor.has_no_class_change_equips?
#~         SceneManager.call(Scene_Class)
#~       else
#~         Sound.play_buzzer
#~         @status_window.activate
#~       end
#~     else
#~       amn_classsystem_galv_scenemenu_customonpersonalok
#~     end
#~   end
#~ end

#~ end

#~ class Scene_Class < Scene_MenuBase
#~ 
#~   def next_actor
#~     @actor = $game_party.menu_member_actor_next
#~     on_actor_change
#~   end

#~   def prev_actor
#~     @actor = $game_party.menu_member_actor_prev
#~     on_actor_change
#~   end
#~ 
#~ end

class Window_ClassCommand < Window_Command

    def make_command_list
    return if @actor.nil?
    return if !$game_party.menu_actor.has_no_class_change_equips?
    for command in YEA::CLASS_SYSTEM::COMMANDS
      case command[0]
      when :primary
        next unless Switch.primary_show
        add_command(command[1], command[0], Switch.primary_enable)
      when :subclass
        next unless Switch.subclass_show
        add_command(command[1], command[0], Switch.subclass_enable)
      when :learn_skill
        next unless $imported["YEA-LearnSkillEngine"]
        add_learn_skill_command
      else
        process_custom_command(command)
      end
    end
    if !$game_temp.scene_class_index.nil?
      select($game_temp.scene_class_index)
      self.oy = $game_temp.scene_class_oy
    end
    $game_temp.scene_class_index = nil
    $game_temp.scene_class_oy = nil
  end
end
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
538
Reaction score
379
First Language
English
Primarily Uses
RMVXA
Ah, that's right. Rather than doing that, it should work if you comment out these lines in Yanfly's Class script:
Code:
#~ class Scene_Menu < Scene_MenuBase
#~   
#~   #--------------------------------------------------------------------------
#~   # alias method: create_command_window
#~   #--------------------------------------------------------------------------
#~   alias scene_menu_create_command_window_cs create_command_window
#~   def create_command_window
#~     scene_menu_create_command_window_cs
#~     @command_window.set_handler(:class, method(:command_personal))
#~   end
#~   
#~   #--------------------------------------------------------------------------
#~   # alias method: on_personal_ok
#~   #--------------------------------------------------------------------------
#~   alias scene_menu_on_personal_ok_cs on_personal_ok
#~   def on_personal_ok
#~     case @command_window.current_symbol
#~     when :class
#~       SceneManager.call(Scene_Class)
#~     else
#~       scene_menu_on_personal_ok_cs
#~     end
#~   end
#~   
#~ end # Scene_Menu
That's because Galv's script takes the display name you enter and makes a symbol out of it, which links back to Yanfly's script.

In my script, I made it so that if you try to select the actor in the menu scene, it'll play the buzzer sound and not let you. Then if you enter the Class scene with a different actor, you won't be able to access the actor with the <no_class_change> equipment.
 

FAGC54

What was that variable for?
Veteran
Joined
Apr 22, 2017
Messages
48
Reaction score
2
First Language
Spanish
Primarily Uses
RMVXA
It works perfect now!!!!!!!
Thank you very much guys, you helped me a lot! You're the best!
This thread can be closed due to beign solved.
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
538
Reaction score
379
First Language
English
Primarily Uses
RMVXA
Oops, forgot something. Replace the code with this:
Code:
=begin
#==============================================================================#
#   AMN YEA Class System addon
#   Version 1.03
#   Author: AMoonlessNight
#   Date: 20 Jul 2018
#   Latest: 22 Jul 2018
#==============================================================================#
#   UPDATE LOG
#------------------------------------------------------------------------------#
# 20 Jul 2018 - created the script
# 21 Jul 2018 - changed symbol used for Galv's Menu Themes Engine
# 22 Jul 2018 - overwrote alias methods for Scene Menu from YEA Class System
#==============================================================================#
#   TERMS OF USE
#------------------------------------------------------------------------------#
# - Please credit AMoonlessNight or A-Moonless-Night
# - Free for non-commercial use
# - Please follow Yanfly's terms and conditions for the original script
# - I'd love to see your game if you end up using one of my scripts
#==============================================================================#

Requested by FAGC54

This script makes it so that you can set certain armours to not let the actor
access the Class Change scene.

Use the following in a weapon or armour's notes:

<no_class_change>

This will make it so that if an actor has that item equipped, they will not be
able to access the Class Change scene in the menu.

If you are using Galv's Menu Themes Engine, use the symbol :class_scene, e.g.:
# ["Menu Text", :command_type, :Scene, switch1, switch2, help txt, icon]
  ["Class",     :sel, :class_scene,  0, 0, "Change your character's class",121],
 
If you have other scripts that overwrite the following methods, place them before
this script.

class Scene_Menu < Scene_MenuBase
def custom_symbol(symbol)
def custom_on_command_ok(symbol)
def custom_on_personal_ok(symbol)
def custom_on_personal_cancel(symbol)

=end

#==============================================================================
#  Please do not edit below this point unless you know what you are doing.
#==============================================================================

if !$imported["YEA-ClassSystem"]
  msg = "                                      IMPORTANT:\n"
  msg += "            YEA Class System script add-on by A-Moonless-Night\n"
  msg += " \n"
  msg += "This script requires Yanfly's Class System script.\n"
  msg += "Please download it from https://yanflychannel.wordpress.com/rmvxa/"
  msgbox(msg)
  exit
end

class RPG::EquipItem < RPG::BaseItem
  attr_reader :class_change
 
  def amn_loadnotetag_no_class_change
    @class_change = true
    self.note.split(/[\r\n]+/).each { |line|
    case line
    when /<no[-_ ]+class[-_ ]+change>/i
      @class_change = false
    end
    } 
  end
 
  def class_change?
    return @class_change
  end

end

class << DataManager

  alias amn_classsystem_datamanager_loaddatabase load_database
  def load_database
    amn_classsystem_datamanager_loaddatabase
    load_notetags_classchange_addon
  end

  def load_notetags_classchange_addon
    groups = [$data_weapons, $data_armors]
    for group in groups
      for obj in group
        next if obj.nil?
        obj.amn_loadnotetag_no_class_change
      end
    end
  end
 
end

class Game_Actor < Game_Battler
 
  def has_no_class_change_equips?
    equips.each { |eq| next if eq.nil?; return false if !eq.class_change? }
    return true
  end
 
end

class Game_Party < Game_Unit
 
  def menu_members 
    members.select {|member| member.has_no_class_change_equips? } 
  end
 
  def menu_member_actor
    $game_actors[@menu_actor_id] || menu_members[0]
  end

  def menu_member_actor_next
    index = menu_members.index(menu_member_actor) || -1
    index = (index + 1) % menu_members.size
    self.menu_actor = menu_members[index]
  end

  def menu_member_actor_prev
    index = menu_members.index(menu_member_actor) || 1
    index = (index + menu_members.size - 1) % menu_members.size
    self.menu_actor = menu_members[index]
  end
end

class Scene_Menu < Scene_MenuBase

if !$imported["Galv_Menu_Themes"]
  alias amn_classsystem_scenemenu_onpersonalok on_personal_ok
  def on_personal_ok
    case @command_window.current_symbol
    when :class
      $game_party.menu_actor = $game_party.members[@status_window.index]
      if $game_party.menu_actor.has_no_class_change_equips?
        SceneManager.call(Scene_Class)
      else
        Sound.play_buzzer
        @status_window.activate
      end
    else
      scene_menu_on_personal_ok_cs
    end
  end
end

if $imported["Galv_Menu_Themes"]
 
  # Overwrite YEA create command window so the :class symbol is not made
  alias amn_yeaclass_scenemenu_createcommandwind  create_command_window
  def create_command_window
    scene_menu_create_command_window_cs
  end
 
  # Overwrite YEA on personal OK so everything functions as per original script
  alias amn_yeaclass_scenemenu_onpersonalok  on_personal_ok
  def on_personal_ok
    scene_menu_on_personal_ok_cs
  end


  alias amn_classsystem_galv_scenemenu_customsymbol custom_symbol
  def custom_symbol(symbol)
    case symbol 
    when :class_scene
      return true
    end
    amn_classsystem_galv_scenemenu_customsymbol(symbol)
  end
 
  alias amn_classsystem_galv_scenemenu_customonpersonalok custom_on_personal_ok
  def custom_on_personal_ok(symbol)
    if symbol == :class_scene
      $game_party.menu_actor = $game_party.members[@status_window.index]
      if $game_party.menu_actor.has_no_class_change_equips?
        SceneManager.call(Scene_Class)
      else
        Sound.play_buzzer
        @status_window.activate
      end
    else
      amn_classsystem_galv_scenemenu_customonpersonalok(symbol)
    end
  end
end

end

class Scene_Class < Scene_MenuBase
 
  def next_actor
    @actor = $game_party.menu_member_actor_next
    on_actor_change
  end

  def prev_actor
    @actor = $game_party.menu_member_actor_prev
    on_actor_change
  end
 
end

Un-comment those lines I originally said to comment out in Yanfly's script; I've included a method to overwrite that.

If everything is working as is, you can report your original post to get a mod to close it.
 

FAGC54

What was that variable for?
Veteran
Joined
Apr 22, 2017
Messages
48
Reaction score
2
First Language
Spanish
Primarily Uses
RMVXA
With the previous code, the class change scene in the actor didn't had the "change class" text (it was transparent) and played the buzzer sound whenever i tried to select it. Perfect outcome, less the missing text situation.
With this new code, the class change text appears and lets me change class, and also plays the buzzer sound.

So, im sticking to the previous code. It works fine for me. Thank you very much again.
 

Kes

Global Moderators
Global Mod
Joined
Aug 3, 2012
Messages
21,388
Reaction score
10,825
First Language
English
Primarily Uses
RMVXA

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

TFW: You get a text from someone and a long conversation--but you have no idea who this person is and don't wanna be that guy that asks "Who is this by the way?" I have no clue who this person is... but they seem to know me quite well. :rswt
You know, after all these years of using RM I've never played To The Moon. With being busy with life and then after my mom died I was too emotionally fragile to play something that heavy. Has anyone played the Switch version? Is there any big differences between that and the RM version?
Today I finished my Lets Play. Gonna have the videos scheduled for daily uploads now. Woo I finished something ^^
*tries to study Emergence of Bangladesh: Ancient Bengal* Matsyanyayam- When the law of punishment is kept in abeyance... okay what? *searches dictionary* oh! Ok. In abeyance, it gives rise to such disorders as is implied in the proverb of fishes i.e the larger fish swallows a small one- wait fishes eat each other!? Is that like... fishy cannibalism!?...Oh! It's 8:30! Time for dinner! *throws book on floor*
Babbaditch Finster and the Seven-Sided Cube has got to be one of my favorite classic games that didn't exist when I was kid, or ever

Forum statistics

Threads
93,398
Messages
911,982
Members
122,904
Latest member
Vandso
Top