Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Want your code reviewed by an experienced scripter?

Our .ORG scripting staff wants to see you scripting more. We are always looking to see new members getting into scripting and want to help with this as much as we can. So we are reaching out the olive branch to you guys. Post your script, add [Review] to the topic title, and we'll take a look and offer up advice on how to improve your code and applaud your effort. Anyone can give pointers to any scripter out there, but make it constructive.

Feel free to post complete codes or even snippets of your code. We don't have to understand everything that is going on in your script (most of the time) to give you some pointers on improving your code.

Let's see more [Review] topics then "Help me" topics. Please do not abuse this tag to get people's attention either. We want to see original work, not how to get Minkoff's or the XAS script to work in your project. Warns will be issued for abuse.

Happy Scripting :thumb:
 

lome0

Member

Well my latest version of my script is this:
#
#
# KAISERLOMEPRODUCTIONS
#
#
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
# This class performs title screen processing.
# Edited by Lome0
#==============================================================================

class Scene_Title
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# If battle test
if $BTEST
battle_test
return
end
# Load database
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
# Make system object
$game_system = Game_System.new
# Make title graphic
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
# Make command window
s1 = "New Game"
s2 = "Continue"
s3 = "Shutdown"
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.back_opacity = 160
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 288
# Continue enabled determinant
# Check if at least one save file exists
# If enabled, make @continue_enabled true; if disabled, make it false
@continue_enabled = false
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata")
@continue_enabled = true
end
end
# If continue is enabled, move cursor to "Continue"
# If disabled, display "Continue" text in gray
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
# Play title BGM
$game_system.bgm_play($data_system.title_bgm)
# Stop playing ME and BGS
Audio.me_stop
Audio.bgs_stop
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of command window
@command_window.dispose
# Dispose of title graphic
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # New game
command_new_game
when 1 # Continue
command_continue
when 2 # Shutdown
command_shutdown
end
end
end
#--------------------------------------------------------------------------
# * Command: New Game
#--------------------------------------------------------------------------
def command_new_game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to map screen
$scene = Scene_Difficulty.new
end
class Scene_Difficulty
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# If battle test
if $BTEST
battle_test
return
end
# Load database
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
# Make system object
$game_system = Game_System.new
# Make title graphic
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
# Make command window
s1 = "Easy"
s2 = "Normal"
s3 = "Hard"
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.back_opacity = 160
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 288
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of command window
@command_window.dispose
# Dispose of title graphic
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # Easy
command_easy
when 1 # Normal
command_normal
when 2 # Shutdown
command_hard
end
end
end
#--------------------------------------------------------------------------
# * Command: Easy
#--------------------------------------------------------------------------
def command_easy
# Turn on easy switch
$game_switches[1] = true
# Load Data
$data_actors = load_data("Data/Easy/Actors.rxdata")
$data_enemies = load_data("Data/Easy/Enemies.rxdata")
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Stop BGM
Audio.bgm_stop
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each type of game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Set up initial party
$game_party.setup_starting_members
# Set up initial map position
$game_map.setup($data_system.start_map_id)
# Move player to initial position
$game_player.moveto($data_system.start_x, $data_system.start_y)
# Refresh player
$game_player.refresh
# Run automatic change for BGM and BGS set with map
$game_map.autoplay
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Command: Normal
#--------------------------------------------------------------------------
def command_normal
# Turn on normal switch
$game_switches[2] = true
# Load Data
$data_actors = load_data("Data/Normal/Actors.rxdata")
$data_enemies = load_data("Data/Normal/Enemies.rxdata")
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Stop BGM
Audio.bgm_stop
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each type of game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Set up initial party
$game_party.setup_starting_members
# Set up initial map position
$game_map.setup($data_system.start_map_id)
# Move player to initial position
$game_player.moveto($data_system.start_x, $data_system.start_y)
# Refresh player
$game_player.refresh
# Run automatic change for BGM and BGS set with map
$game_map.autoplay
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Command: Hard
#--------------------------------------------------------------------------
def command_hard
# Turn on hard switch
$game_switches[3] = true
# Load Data
$data_actors = load_data("Data/Hard/Actors.rxdata")
$data_enemies = load_data("Data/Hard/Enemies.rxdata")
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Stop BGM
Audio.bgm_stop
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each type of game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Set up initial party
$game_party.setup_starting_members
# Set up initial map position
$game_map.setup($data_system.start_map_id)
# Move player to initial position
$game_player.moveto($data_system.start_x, $data_system.start_y)
# Refresh player
$game_player.refresh
# Run automatic change for BGM and BGS set with map
$game_map.autoplay
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
end

#--------------------------------------------------------------------------
# * Command: Continue
#--------------------------------------------------------------------------
def command_continue
# If continue is disabled
unless @continue_enabled
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to load screen
$scene = Scene_Load.new
end
#--------------------------------------------------------------------------
# * Command: Shutdown
#--------------------------------------------------------------------------
def command_shutdown
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Fade out BGM, BGS, and ME
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# Shutdown
$scene = nil
end
#--------------------------------------------------------------------------
# * Battle Test
#--------------------------------------------------------------------------
def battle_test
# Load database (for battle test)
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Set up party for battle test
$game_party.setup_battle_test_members
# Set troop ID, can escape flag, and battleback
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
# Play battle start SE
$game_system.se_play($data_system.battle_start_se)
# Play battle BGM
$game_system.bgm_play($game_system.battle_bgm)
# Switch to battle screen
$scene = Scene_Battle.new
end
end

Instructions on how to use are here:
viewtopic.php?f=11&t=60437
 
First off, there is alot of useful tips that people told you in your origional topic you didn't take into account since the last time you've updated your script.

For instance, you repeat alot of Scene_Title code that should either not be there, or should be aliased. Secondly, although effective, you create a new Scene_Difficulty which didn't really need to be done, then turned around and added some Scene_Title methods into Scene_Difficulty that didn't even need to be there (like command_continue, command_shutdown, you don't use those at all in Scene_Difficulty).

Finally, there is a Ruby concept known as DRY (Don't Repeat Yourself), theres ways you could avoid repeating code which is common amongst the methods command_easy, command_normal, command_hard.

Hopefully you don't mind, I did some MAJOR cleanup work with your script, and now it'll load more than just "Actors.rxdata" and "Enemies.rxdata" safely if the file exists in the respective difficulty folder (else it'll just load the default file from the "Data/" folder).

Code:
#===============================================================================

# ** Scene_Title

#===============================================================================

 

class Scene_Title

  #-----------------------------------------------------------------------------

  # * Alias Listings

  #-----------------------------------------------------------------------------

  alias_method :difficulty_scntitle_main,   :main

  alias_method :difficulty_scntitle_update, :update

  #-----------------------------------------------------------------------------

  # * Main

  #-----------------------------------------------------------------------------

  def main

    s1 = "Easy"

    s2 = "Normal"

    s3 = "Hard"

    @difficulty_window = Window_Command.new(192, [s1, s2, s3])

    @difficulty_window.back_opacity = 160

    @difficulty_window.x = 320 - @difficulty_window.width / 2

    @difficulty_window.y = 288

    @difficulty_window.active  = false

    @difficulty_window.visible = false

    difficulty_scntitle_main

  end

  #-----------------------------------------------------------------------------

  # * Command: New Game

  #-----------------------------------------------------------------------------

  def command_new_game

    $game_system.se_play($data_system.decision_se)

    @difficulty_window.active   = true

    @difficulty_window.visible  = true

    @command_window.active      = false

    @command_window.visible     = false

  end

  #-----------------------------------------------------------------------------

  # * Frame Update

  #-----------------------------------------------------------------------------

  def update

    if @difficulty_window.active

      update_difficulty

      return

    end

    difficulty_scntitle_update

  end

  #-----------------------------------------------------------------------------

  # * Update Difficulty

  #-----------------------------------------------------------------------------

  def update_difficulty

    if Input.trigger?(Input::C)

      command_difficulty_decision

      return

    elsif Input.trigger?(Input::B)

      command_difficulty_cancel

      return

    end

  end

  #-----------------------------------------------------------------------------

  # * Command Difficulty : Decision

  #-----------------------------------------------------------------------------

  def command_difficulty_decision

    $data_actors        = load_difficulty("Data/Actors.rxdata")

    $data_classes       = load_difficulty("Data/Classes.rxdata")

    $data_skills        = load_difficulty("Data/Skills.rxdata")

    $data_items         = load_difficulty("Data/Items.rxdata")

    $data_weapons       = load_difficulty("Data/Weapons.rxdata")

    $data_armors        = load_difficulty("Data/Armors.rxdata")

    $data_enemies       = load_difficulty("Data/Enemies.rxdata")

    $data_troops        = load_difficulty("Data/Troops.rxdata")

    $data_states        = load_difficulty("Data/States.rxdata")

    $data_animations    = load_difficulty("Data/Animations.rxdata")

    $data_tilesets      = load_difficulty("Data/Tilesets.rxdata")

    $data_common_events = load_difficulty("Data/CommonEvents.rxdata")

    $data_system        = load_difficulty("Data/System.rxdata")

    $game_system.se_play($data_system.decision_se)

    Audio.bgm_stop

    Graphics.frame_count = 0

    $game_temp          = Game_Temp.new

    $game_system        = Game_System.new

    $game_switches      = Game_Switches.new

    $game_variables     = Game_Variables.new

    $game_self_switches = Game_SelfSwitches.new

    $game_screen        = Game_Screen.new

    $game_actors        = Game_Actors.new

    $game_party         = Game_Party.new

    $game_troop         = Game_Troop.new

    $game_map           = Game_Map.new

    $game_player        = Game_Player.new

    $game_party.setup_starting_members

    $game_map.setup($data_system.start_map_id)

    $game_player.moveto($data_system.start_x, $data_system.start_y)

    $game_player.refresh

    $game_map.autoplay

    $game_map.update

    $scene = Scene_Map.new

  end

  #-----------------------------------------------------------------------------

  # * Command Difficulty : Cancel

  #-----------------------------------------------------------------------------

  def command_difficulty_cancel

    $game_system.se_play($data_system.cancel_se)

    @difficulty_window.active  = false

    @difficulty_window.visible = false

    @command_window.active     = true

    @command_window.visible    = true

  end

  #-----------------------------------------------------------------------------

  # * Load Difficulty

  #-----------------------------------------------------------------------------

  def load_difficulty(origional_filepath)

    case @difficulty_window.index

    when 0 ; difficulty = "Easy"

    when 1 ; difficulty = "Normal"

    when 2 ; difficulty = "Hard"

    end

    filepath = origional_filepath.dup

    begin

      filepath.gsub!("Data/", "Data/#{difficulty}/")

      load_data(filepath)

    rescue

      load_data(origional_filepath)

    end

  end

end

Total lines previous was 402, I've cut it down to 124 lines.

Compatability Issues

This script may cause problems with any other script that wants to do something extra to Scene_Title.command_new_game, as this method is totally bypassed now.

Also, this is more of something the user must be cautious of, as the author of the script you'll have no control over this; files (such as "Actors", "Enemies", "Items", "Weapons", etc...) must be similiar between difficulty versions or there will definately be some unforseen problems.

Final Notes

Some of these above compatability issues can be resolved via SDK, if you would like further help in improving this make a topic in Script Support and PM me the link and I'll give you some additional help.
 

lome0

Member

Kain Nobel":1zsnc84q said:
First off, there is alot of useful tips that people told you in your origional topic you didn't take into account since the last time you've updated your script.

For instance, you repeat alot of Scene_Title code that should either not be there, or should be aliased. Secondly, although effective, you create a new Scene_Difficulty which didn't really need to be done, then turned around and added some Scene_Title methods into Scene_Difficulty that didn't even need to be there (like command_continue, command_shutdown, you don't use those at all in Scene_Difficulty).

Finally, there is a Ruby concept known as DRY (Don't Repeat Yourself), theres ways you could avoid repeating code which is common amongst the methods command_easy, command_normal, command_hard.

Hopefully you don't mind, I did some MAJOR cleanup work with your script, and now it'll load more than just "Actors.rxdata" and "Enemies.rxdata" safely if the file exists in the respective difficulty folder (else it'll just load the default file from the "Data/" folder).

Code:
#===============================================================================

# ** Scene_Title

#===============================================================================

 

class Scene_Title

  #-----------------------------------------------------------------------------

  # * Alias Listings

  #-----------------------------------------------------------------------------

  alias_method :difficulty_scntitle_main,   :main

  alias_method :difficulty_scntitle_update, :update

  #-----------------------------------------------------------------------------

  # * Main

  #-----------------------------------------------------------------------------

  def main

    s1 = "Easy"

    s2 = "Normal"

    s3 = "Hard"

    @difficulty_window = Window_Command.new(192, [s1, s2, s3])

    @difficulty_window.back_opacity = 160

    @difficulty_window.x = 320 - @difficulty_window.width / 2

    @difficulty_window.y = 288

    @difficulty_window.active  = false

    @difficulty_window.visible = false

    difficulty_scntitle_main

  end

  #-----------------------------------------------------------------------------

  # * Command: New Game

  #-----------------------------------------------------------------------------

  def command_new_game

    $game_system.se_play($data_system.decision_se)

    @difficulty_window.active   = true

    @difficulty_window.visible  = true

    @command_window.active      = false

    @command_window.visible     = false

  end

  #-----------------------------------------------------------------------------

  # * Frame Update

  #-----------------------------------------------------------------------------

  def update

    if @difficulty_window.active

      update_difficulty

      return

    end

    difficulty_scntitle_update

  end

  #-----------------------------------------------------------------------------

  # * Update Difficulty

  #-----------------------------------------------------------------------------

  def update_difficulty

    if Input.trigger?(Input::C)

      command_difficulty_decision

      return

    elsif Input.trigger?(Input::B)

      command_difficulty_cancel

      return

    end

  end

  #-----------------------------------------------------------------------------

  # * Command Difficulty : Decision

  #-----------------------------------------------------------------------------

  def command_difficulty_decision

    $data_actors        = load_difficulty("Data/Actors.rxdata")

    $data_classes       = load_difficulty("Data/Classes.rxdata")

    $data_skills        = load_difficulty("Data/Skills.rxdata")

    $data_items         = load_difficulty("Data/Items.rxdata")

    $data_weapons       = load_difficulty("Data/Weapons.rxdata")

    $data_armors        = load_difficulty("Data/Armors.rxdata")

    $data_enemies       = load_difficulty("Data/Enemies.rxdata")

    $data_troops        = load_difficulty("Data/Troops.rxdata")

    $data_states        = load_difficulty("Data/States.rxdata")

    $data_animations    = load_difficulty("Data/Animations.rxdata")

    $data_tilesets      = load_difficulty("Data/Tilesets.rxdata")

    $data_common_events = load_difficulty("Data/CommonEvents.rxdata")

    $data_system        = load_difficulty("Data/System.rxdata")

    $game_system.se_play($data_system.decision_se)

    Audio.bgm_stop

    Graphics.frame_count = 0

    $game_temp          = Game_Temp.new

    $game_system        = Game_System.new

    $game_switches      = Game_Switches.new

    $game_variables     = Game_Variables.new

    $game_self_switches = Game_SelfSwitches.new

    $game_screen        = Game_Screen.new

    $game_actors        = Game_Actors.new

    $game_party         = Game_Party.new

    $game_troop         = Game_Troop.new

    $game_map           = Game_Map.new

    $game_player        = Game_Player.new

    $game_party.setup_starting_members

    $game_map.setup($data_system.start_map_id)

    $game_player.moveto($data_system.start_x, $data_system.start_y)

    $game_player.refresh

    $game_map.autoplay

    $game_map.update

    $scene = Scene_Map.new

  end

  #-----------------------------------------------------------------------------

  # * Command Difficulty : Cancel

  #-----------------------------------------------------------------------------

  def command_difficulty_cancel

    $game_system.se_play($data_system.cancel_se)

    @difficulty_window.active  = false

    @difficulty_window.visible = false

    @command_window.active     = true

    @command_window.visible    = true

  end

  #-----------------------------------------------------------------------------

  # * Load Difficulty

  #-----------------------------------------------------------------------------

  def load_difficulty(origional_filepath)

    case @difficulty_window.index

    when 0 ; difficulty = "Easy"

    when 1 ; difficulty = "Normal"

    when 2 ; difficulty = "Hard"

    end

    filepath = origional_filepath.dup

    begin

      filepath.gsub!("Data/", "Data/#{difficulty}/")

      load_data(filepath)

    rescue

      load_data(origional_filepath)

    end

  end

end

Total lines previous was 402, I've cut it down to 124 lines.

Compatability Issues

This script may cause problems with any other script that wants to do something extra to Scene_Title.command_new_game, as this method is totally bypassed now.

Also, this is more of something the user must be cautious of, as the author of the script you'll have no control over this; files (such as "Actors", "Enemies", "Items", "Weapons", etc...) must be similiar between difficulty versions or there will definately be some unforseen problems.

Final Notes

Some of these above compatability issues can be resolved via SDK, if you would like further help in improving this make a topic in Script Support and PM me the link and I'll give you some additional help.

Well I tried that code and got an error:
Script 'Window_Base' line 17: NoMethodError occured undefined method 'windowskin_name' for nil:NilClass

I made the code a bit shorter:
#
#
# KAISERLOMEPRODUCTIONS
#
#
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
# This class performs title screen processing.
# Edited by Lome0
#==============================================================================

class Scene_Title
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # New game
command_new_game
when 1 # Continue
command_continue
when 2 # Shutdown
command_shutdown
end
end
end
#--------------------------------------------------------------------------
# * Command: New Game
#--------------------------------------------------------------------------
def command_new_game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to map screen
$scene = Scene_Difficulty.new
end
class Scene_Difficulty
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# If battle test
if $BTEST
battle_test
return
end
# Load database
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
# Make system object
$game_system = Game_System.new
# Make title graphic
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
# Make command window
s1 = "Easy"
s2 = "Normal"
s3 = "Hard"
s4 = "Cancel"
@command_window = Window_Command.new(192, [s1, s2, s3, s4])
@command_window.back_opacity = 160
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 288
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of command window
@command_window.dispose
# Dispose of title graphic
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # Easy
command_easy
when 1 # Normal
command_normal
when 2 # Shutdown
command_hard
when 3 # Cancel
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Title.new
end
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Title.new
end
end
#--------------------------------------------------------------------------
# * Command: Easy
#--------------------------------------------------------------------------
def command_easy
# Load Data
$data_actors = load_data("Data/Easy/Actors.rxdata")
$data_enemies = load_data("Data/Easy/Enemies.rxdata")
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Stop BGM
Audio.bgm_stop
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each type of game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Turn on easy switch
$game_switches[1] = true
# Set up initial party
$game_party.setup_starting_members
# Set up initial map position
$game_map.setup($data_system.start_map_id)
# Move player to initial position
$game_player.moveto($data_system.start_x, $data_system.start_y)
# Refresh player
$game_player.refresh
# Run automatic change for BGM and BGS set with map
$game_map.autoplay
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Command: Normal
#--------------------------------------------------------------------------
def command_normal
# Load Data
$data_actors = load_data("Data/Normal/Actors.rxdata")
$data_enemies = load_data("Data/Normal/Enemies.rxdata")
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Stop BGM
Audio.bgm_stop
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each type of game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Turn on normal switch
$game_switches[2] = true
# Set up initial party
$game_party.setup_starting_members
# Set up initial map position
$game_map.setup($data_system.start_map_id)
# Move player to initial position
$game_player.moveto($data_system.start_x, $data_system.start_y)
# Refresh player
$game_player.refresh
# Run automatic change for BGM and BGS set with map
$game_map.autoplay
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Command: Hard
#--------------------------------------------------------------------------
def command_hard
# Load Data
$data_actors = load_data("Data/Hard/Actors.rxdata")
$data_enemies = load_data("Data/Hard/Enemies.rxdata")
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Stop BGM
Audio.bgm_stop
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each type of game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Turn on hard switch
$game_switches[3] = true
# Set up initial party
$game_party.setup_starting_members
# Set up initial map position
$game_map.setup($data_system.start_map_id)
# Move player to initial position
$game_player.moveto($data_system.start_x, $data_system.start_y)
# Refresh player
$game_player.refresh
# Run automatic change for BGM and BGS set with map
$game_map.autoplay
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
end
#--------------------------------------------------------------------------
# * Command: Continue
#--------------------------------------------------------------------------
def command_continue
# If continue is disabled
unless @continue_enabled
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to load screen
$scene = Scene_Load.new
end
#--------------------------------------------------------------------------
# * Command: Shutdown
#--------------------------------------------------------------------------
def command_shutdown
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Fade out BGM, BGS, and ME
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# Shutdown
$scene = nil
end
#--------------------------------------------------------------------------
# * Battle Test
#--------------------------------------------------------------------------
def battle_test
# Load database (for battle test)
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Set up party for battle test
$game_party.setup_battle_test_members
# Set troop ID, can escape flag, and battleback
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
# Play battle start SE
$game_system.se_play($data_system.battle_start_se)
# Play battle BGM
$game_system.bgm_play($game_system.battle_bgm)
# Switch to battle screen
$scene = Scene_Battle.new
end
end

I don't understand what alias methods do. I tried messing with them putting them into different scripts and they don't seem to do anything. Can anybody tell me what there for?
 
What kyonides said.
I'll give you an example. Let's say you want to add a 'race' to each actor.
You can copy the whole code of Game_Actor class's initialize, and add the race at the end,
or use alias, like this:
Code:
class Game_Actor

  alias the_old_init initialize

  def initialize

   # call the default initialize

    the_old_init

   # add your own code

    race_table = [1=>'Human', 2=>'Fairy', 3=>'mermaid' ]

    @race = race_table[@actor_id]

  end

end
 
Silly me, its because $game_system isn't defined until the 'origional' Scene_Title.main, which the 'alias' which calls that origional method is called after I create @window_difficulty... in other words, $game_system isn't defined before creating the window (which all windows look for that stupid $game_system.windowskin_name XD)

In the Scene_Title of that script, the very first line after 'def main', just add...

$game_system = Game_System.new

...above the lines that create @window_difficulty. Another way I could've/should've done it was to just change the commands in the current command window, rather than creating a new window but whatever.

Here's a funky way to see what an alias does, I'll write an example script that uses alias for ya...

Code:
class AliasExample

  def initialize

    test

  end

  def test

    p "This is the Origional Method!"

  end

end

 

example = AliasExample.new

 

class AliasExample

  alias_method :origional_test, :test

  def test

    p "We've aliased this method and added to the start of it."

    origional_test

    p "We've aliased this method and added to the end of it, as well XD!"

  end

end

 

example = AliasExample.new

You should understand it if you read the code, but if not paste it in your script editor anywhere in main and test your game.
 
ok it is some custom script a friend of myn did for me but it has a bug he is having trouble fixing
the scrip allows you to post a random photo from a list but in trying to make it not do back to back photos
we encountered a problem whare it rembers the entier list of photos and refuses to show any more once it has bean displayed
for this script he moded Game_System and Scene_Map and added 2 other small scripts
he used the call $photo = 1 to call for a random photo
GAME_system
Code:
Game_System

  #--------------------------------------------------------------------------

  # * Variables Globales

  #--------------------------------------------------------------------------

  attr_reader   :map_interpreter          # Int�rprete de eventos en mapa

  attr_reader   :battle_interpreter       # Int�rprete de eventos en batalla

  attr_accessor :timer                    # Temporizador

  attr_accessor :timer_working            # Temporizador funcionando

  attr_accessor :save_disabled            # Llamada a Guardar deshabilitado

  attr_accessor :menu_disabled            # Llamada a Men� deshabilitado

  attr_accessor :encounter_disabled       # Encuentro de enemigos deshabilitado

  attr_accessor :message_position         # Opci�n de Mensaje:Posici�n de la Ventana

  attr_accessor :message_frame            # Opci�n de Mensaje: Marco

  attr_accessor :save_count               # Contador de Partidas Guardadas

  attr_accessor :magic_number             # N�mero de Magia

  attr_accessor :unshowedphotos

  attr_reader   :photos

  #--------------------------------------------------------------------------

  # * Inicio de Objetos (Aqu� se agrega el valor inicial a cada variable)

  #--------------------------------------------------------------------------

  def initialize

    @map_interpreter = Interpreter.new(0, true)

    @battle_interpreter = Interpreter.new(0, false)

    @timer = 0

    @timer_working = false

    @save_disabled = false

    @menu_disabled = false

    @encounter_disabled = false

    @message_position = 2

    @message_frame = 0

    @save_count = 0

    @magic_number = 0

    @photos = ['1.jpg','2.jpg','4.jpg',5jpg','6.jpg','7.jpg','8.jpg']

    @unshowedphotos = @photos

  end

  #--------------------------------------------------------------------------

  # * Play Background Music

  #     bgm : background music to be played

  #--------------------------------------------------------------------------

  def bgm_play(bgm)

    @playing_bgm = bgm

    if bgm != nil and bgm.name != ""

      Audio.bgm_play("Audio/BGM/" + bgm.name, bgm.volume, bgm.pitch)

    else

      Audio.bgm_stop

    end

    Graphics.frame_reset

  end

  #--------------------------------------------------------------------------

  # * Stop Background Music

  #--------------------------------------------------------------------------

  def bgm_stop

    Audio.bgm_stop

  end

  #--------------------------------------------------------------------------

  # * Fade Out Background Music

  #     time : fade-out time (in seconds)

  #--------------------------------------------------------------------------

  def bgm_fade(time)

    @playing_bgm = nil

    Audio.bgm_fade(time * 1000)

  end

  #--------------------------------------------------------------------------

  # * Background Music Memory

  #--------------------------------------------------------------------------

  def bgm_memorize

    @memorized_bgm = @playing_bgm

  end

  #--------------------------------------------------------------------------

  # * Restore Background Music

  #--------------------------------------------------------------------------

  def bgm_restore

    bgm_play(@memorized_bgm)

  end

  #--------------------------------------------------------------------------

  # * Play Background Sound

  #     bgs : background sound to be played

  #--------------------------------------------------------------------------

  def bgs_play(bgs)

    @playing_bgs = bgs

    if bgs != nil and bgs.name != ""

      Audio.bgs_play("Audio/BGS/" + bgs.name, bgs.volume, bgs.pitch)

    else

      Audio.bgs_stop

    end

    Graphics.frame_reset

  end

  #--------------------------------------------------------------------------

  # * Fade Out Background Sound

  #     time : fade-out time (in seconds)

  #--------------------------------------------------------------------------

  def bgs_fade(time)

    @playing_bgs = nil

    Audio.bgs_fade(time * 1000)

  end

  #--------------------------------------------------------------------------

  # * Background Sound Memory

  #--------------------------------------------------------------------------

  def bgs_memorize

    @memorized_bgs = @playing_bgs

  end

  #--------------------------------------------------------------------------

  # * Restore Background Sound

  #--------------------------------------------------------------------------

  def bgs_restore

    bgs_play(@memorized_bgs)

  end

  #--------------------------------------------------------------------------

  # * Play Music Effect

  #     me : music effect to be played

  #--------------------------------------------------------------------------

  def me_play(me)

    if me != nil and me.name != ""

      Audio.me_play("Audio/ME/" + me.name, me.volume, me.pitch)

    else

      Audio.me_stop

    end

    Graphics.frame_reset

  end

  #--------------------------------------------------------------------------

  # * Play Sound Effect

  #     se : sound effect to be played

  #--------------------------------------------------------------------------

  def se_play(se)

    if se != nil and se.name != ""

      Audio.se_play("Audio/SE/" + se.name, se.volume, se.pitch)

    end

  end

  #--------------------------------------------------------------------------

  # * Stop Sound Effect

  #--------------------------------------------------------------------------

  def se_stop

    Audio.se_stop

  end

  #--------------------------------------------------------------------------

  # * Get Playing Background Music

  #--------------------------------------------------------------------------

  def playing_bgm

    return @playing_bgm

  end

  #--------------------------------------------------------------------------

  # * Get Playing Background Sound

  #--------------------------------------------------------------------------

  def playing_bgs

    return @playing_bgs

  end

  #--------------------------------------------------------------------------

  # * Get Windowskin File Name

  #--------------------------------------------------------------------------

  def windowskin_name

    if @windowskin_name == nil

      return $data_system.windowskin_name

    else

      return @windowskin_name

    end

  end

  #--------------------------------------------------------------------------

  # * Set Windowskin File Name

  #     windowskin_name : new windowskin file name

  #--------------------------------------------------------------------------

  def windowskin_name=(windowskin_name)

    @windowskin_name = windowskin_name

  end

  #--------------------------------------------------------------------------

  # * Get Battle Background Music

  #--------------------------------------------------------------------------

  def battle_bgm

    if @battle_bgm == nil

      return $data_system.battle_bgm

    else

      return @battle_bgm

    end

  end

  #--------------------------------------------------------------------------

  # * Set Battle Background Music

  #     battle_bgm : new battle background music

  #--------------------------------------------------------------------------

  def battle_bgm=(battle_bgm)

    @battle_bgm = battle_bgm

  end

  #--------------------------------------------------------------------------

  # * Get Background Music for Battle Ending

  #--------------------------------------------------------------------------

  def battle_end_me

    if @battle_end_me == nil

      return $data_system.battle_end_me

    else

      return @battle_end_me

    end

  end

  #--------------------------------------------------------------------------

  # * Set Background Music for Battle Ending

  #     battle_end_me : new battle ending background music

  #--------------------------------------------------------------------------

  def battle_end_me=(battle_end_me)

    @battle_end_me = battle_end_me

  end

  #--------------------------------------------------------------------------

  # * Frame Update

  #--------------------------------------------------------------------------

  def update

    # reduce timer by 1

    if @timer_working and @timer > 0

      @timer -= 1

    end

  end

end

 
Scene_Map
Code:
#==============================================================================

# ** Scene_Map

#------------------------------------------------------------------------------

#  This class performs map screen processing.

#==============================================================================

 

class Scene_Map

  #--------------------------------------------------------------------------

  # * Main Processing

  #--------------------------------------------------------------------------

  def main

    # Make sprite set

    @spriteset = Spriteset_Map.new

    # Make message window

    @message_window = Window_Message.new

################################################################################1

    @window_photo = Window_Photo.new

    @window_photo.visible = false

    @window_photo.active = false

    $photo = 0

################################################################################2

    # Transition run

    Graphics.transition

    # Main loop

    loop do

      # Update game screen

      Graphics.update

      # Update input information

      Input.update

      # Frame update

      update

      # Abort loop if screen is changed

      if $scene != self

        break

      end

    end

    # Prepare for transition

    Graphics.freeze

    # Dispose of sprite set

    @spriteset.dispose

    # Dispose of message window

    @message_window.dispose

    # If switching to title screen

    if $scene.is_a?(Scene_Title)

      # Fade out screen

      Graphics.transition

      Graphics.freeze

    end

  end

  #--------------------------------------------------------------------------

  # * Frame Update

  #--------------------------------------------------------------------------

    

  def update

################################################################################1

    if @window_photo.active == true

      if Input.trigger?(Input::C) or Input.trigger?(Input::B)

        $photo = 0

        @window_photo.visible = false

        @window_photo.active = false

      end

    else

################################################################################2

    # Loop

    loop do

      # Update map, interpreter, and player order

      # (this update order is important for when conditions are fulfilled 

      # to run any event, and the player isn't provided the opportunity to

      # move in an instant)

      $game_map.update

      $game_system.map_interpreter.update

      $game_player.update

      # Update system (timer), screen

      $game_system.update

      $game_screen.update

      # Abort loop if player isn't place moving

      unless $game_temp.player_transferring

        break

      end

      # Run place move

      transfer_player

      # Abort loop if transition processing

      if $game_temp.transition_processing

        break

      end

    end

    # Update sprite set

    @spriteset.update

    # Update message window

    @message_window.update

    # If game over

    if $game_temp.gameover

      # Switch to game over screen

      $scene = Scene_Gameover.new

      return

    end

    # If returning to title screen

    if $game_temp.to_title

      # Change to title screen

      $scene = Scene_Title.new

      return

    end

    # If transition processing

    if $game_temp.transition_processing

      # Clear transition processing flag

      $game_temp.transition_processing = false

      # Execute transition

      if $game_temp.transition_name == ""

        Graphics.transition(20)

      else

        Graphics.transition(40, "Graphics/Transitions/" +

          $game_temp.transition_name)

      end

    end

    # If showing message window

    if $game_temp.message_window_showing

      return

    end

    # If encounter list isn't empty, and encounter count is 0

    if $game_player.encounter_count == 0 and $game_map.encounter_list != []

      # If event is running or encounter is not forbidden

      unless $game_system.map_interpreter.running? or

             $game_system.encounter_disabled

        # Confirm troop

        n = rand($game_map.encounter_list.size)

        troop_id = $game_map.encounter_list[n]

        # If troop is valid

        if $data_troops[troop_id] != nil

          # Set battle calling flag

          $game_temp.battle_calling = true

          $game_temp.battle_troop_id = troop_id

          $game_temp.battle_can_escape = true

          $game_temp.battle_can_lose = false

          $game_temp.battle_proc = nil

        end

      end

    end

    # If B button was pressed

    if Input.trigger?(Input::B)

      # If event is running, or menu is not forbidden

      unless $game_system.map_interpreter.running? or

             $game_system.menu_disabled

        # Set menu calling flag or beep flag

        $game_temp.menu_calling = true

        $game_temp.menu_beep = true

      end

    end

    # If debug mode is ON and F9 key was pressed

    if $DEBUG and Input.press?(Input::F9)

      # Set debug calling flag

      $game_temp.debug_calling = true

    end

################################################################################1

      if $photo == 0

       @window_photo.visible = false

       @window_photo.active = false

      elsif $photo == 1

       @window_photo.refresh

       $photo = 2

      elsif $photo == 2

       @window_photo.visible = true

       @window_photo.active = true

      end

################################################################################2

    # If player is not moving

    unless $game_player.moving?

      # Run calling of each screen

      if $game_temp.battle_calling

        call_battle

      elsif $game_temp.shop_calling

        call_shop

      elsif $game_temp.name_calling

        call_name

      elsif $game_temp.menu_calling

        call_menu

      elsif $game_temp.save_calling

        call_save

      elsif $game_temp.debug_calling

        call_debug

      end

    end

################################################################################1

end

################################################################################2

  end

  #--------------------------------------------------------------------------

  # * Battle Call

  #--------------------------------------------------------------------------

  def call_battle

    # Clear battle calling flag

    $game_temp.battle_calling = false

    # Clear menu calling flag

    $game_temp.menu_calling = false

    $game_temp.menu_beep = false

    # Make encounter count

    $game_player.make_encounter_count

    # Memorize map BGM and stop BGM

    $game_temp.map_bgm = $game_system.playing_bgm

    $game_system.bgm_stop

    # Play battle start SE

    $game_system.se_play($data_system.battle_start_se)

    # Play battle BGM

    $game_system.bgm_play($game_system.battle_bgm)

    # Straighten player position

    $game_player.straighten

    # Switch to battle screen

    $scene = Scene_Battle.new

  end

  #--------------------------------------------------------------------------

  # * Shop Call

  #--------------------------------------------------------------------------

  def call_shop

    # Clear shop call flag

    $game_temp.shop_calling = false

    # Straighten player position

    $game_player.straighten

    # Switch to shop screen

    $scene = Scene_Shop.new

  end

  #--------------------------------------------------------------------------

  # * Name Input Call

  #--------------------------------------------------------------------------

  def call_name

    # Clear name input call flag

    $game_temp.name_calling = false

    # Straighten player position

    $game_player.straighten

    # Switch to name input screen

    $scene = Scene_Name.new

  end

  #--------------------------------------------------------------------------

  # * Menu Call

  #--------------------------------------------------------------------------

  def call_menu

    # Clear menu call flag

    $game_temp.menu_calling = false

    # If menu beep flag is set

    if $game_temp.menu_beep

      # Play decision SE

      $game_system.se_play($data_system.decision_se)

      # Clear menu beep flag

      $game_temp.menu_beep = false

    end

    # Straighten player position

    $game_player.straighten

    # Switch to menu screen

    $scene = Scene_Menu.new

  end

  #--------------------------------------------------------------------------

  # * Save Call

  #--------------------------------------------------------------------------

  def call_save

    # Straighten player position

    $game_player.straighten

    # Switch to save screen

    $scene = Scene_Save.new

  end

  #--------------------------------------------------------------------------

  # * Debug Call

  #--------------------------------------------------------------------------

  def call_debug

    # Clear debug call flag

    $game_temp.debug_calling = false

    # Play decision SE

    $game_system.se_play($data_system.decision_se)

    # Straighten player position

    $game_player.straighten

    # Switch to debug screen

    $scene = Scene_Debug.new

  end

  #--------------------------------------------------------------------------

  # * Player Place Move

  #--------------------------------------------------------------------------

  def transfer_player

    # Clear player place move call flag

    $game_temp.player_transferring = false

    # If move destination is different than current map

    if $game_map.map_id != $game_temp.player_new_map_id

      # Set up a new map

      $game_map.setup($game_temp.player_new_map_id)

    end

    # Set up player position

    $game_player.moveto($game_temp.player_new_x, $game_temp.player_new_y)

    # Set player direction

    case $game_temp.player_new_direction

    when 2  # down

      $game_player.turn_down

    when 4  # left

      $game_player.turn_left

    when 6  # right

      $game_player.turn_right

    when 8  # up

      $game_player.turn_up

    end

    # Straighten player position

    $game_player.straighten

    # Update map (run parallel process event)

    $game_map.update

    # Remake sprite set

    @spriteset.dispose

    @spriteset = Spriteset_Map.new

    # If processing transition

    if $game_temp.transition_processing

      # Clear transition processing flag

      $game_temp.transition_processing = false

      # Execute transition

      Graphics.transition(20)

    end

    # Run automatic change for BGM and BGS set on the map

    $game_map.autoplay

    # Frame reset

    Graphics.frame_reset

    # Update input information

    Input.update

  end

end

 

put custom 1 and 2 above seen_map
custom 1
Code:
class Window_Photo < Window_Base

 

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    super(0, 0, 640, 480)

    self.contents = Bitmap.new(width - 32, height - 32)

    @photos = ['1.jpg','2.jpg','4.jpg',5jpg','6.jpg','7.jpg','8']

    @usedphotos = [21]

    

    choose

    #@bitmap = @photos[rand(@photos.length)] 

    #@usedphotos.push(@bitmap)

    

    @showedphoto = RPG::Cache.picture(@bitmap)

    refresh

  end

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    self.contents.clear

    

     choose

      

    @showedphoto = RPG::Cache.picture(@bitmap)

    self.contents.blt(x, y, @showedphoto, Rect.new(0, 0, 640, 480), 255) 

  end

  

  def choose

    @bitmap = @photos[rand(@photos.length)] 

    @usedphotos.push(@bitmap)

  end

  

end
custom 2
Code:
class Window_Photo < Window_Base

 

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    super(0, 0, 640, 480)

    self.contents = Bitmap.new(width - 32, height - 32)

    #$photos = ['photo1', 'photo2', 'photo3', 'photo4']         

    #@unshowedphotos = $photos

    @bitmap = ""

    @showedphoto = RPG::Cache.picture(@bitmap)

    refresh

  end

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    self.contents.clear

    if  $photo == 1 or $photo == 2

     choose

   

    @showedphoto = RPG::Cache.picture(@bitmap)

    self.contents.blt(x, y, @showedphoto, Rect.new(0, 0, 640, 480), 255) 

    end

  end

  

  def choose

    @bitmap = $game_system.unshowedphotos[rand($game_system.unshowedphotos.length) - 1] 

    begin

  @delphoto = $game_system.unshowedphotos.rindex(@bitmap)

  $game_system.unshowedphotos.slice!(@delphoto)

  rescue

    print "No more pictures"

    @bitmap = ""

    end

  end

end

put custom 1 and 2 above seen_map
 
I need help


I just downloaded Blizz ABS and I put all the code in but in part 2 somethings wrong. Everything works fine until I try to load saved game data, as soon as I try I get this

'Blizz ABS part 2' line 1485: TypeError occurred. nil can't be coerced into Fixnum

heres the code if anyone could help me

[CODE REMOVED]
 
I need help


I just downloaded Blizz ABS and I put all the code in but in part 2 somethings wrong. Everything works fine until I try to load saved game data, as soon as I try I get this

'Blizz ABS part 2' line 1485: TypeError occurred. nil can't be coerced into Fixnum


return ($game_system == nil ? 1 : 2 ** $game_system.pixel_rate)
 
momentai1018":3g1mkr5o said:
I need help


I just downloaded Blizz ABS and I put all the code in but in part 2 somethings wrong. Everything works fine until I try to load saved game data, as soon as I try I get this

'Blizz ABS part 2' line 1485: TypeError occurred. nil can't be coerced into Fixnum


return ($game_system == nil ? 1 : 2 ** $game_system.pixel_rate)

First off, this isn't the thread for this. Second, this is because the BlizzABS is incompatible with save files made before you inserted the script. This one's a relatively easy fix, but I assume there would be quite a few other errors for similar reasons.
 

Zeriab

Sponsor

I deleted the double post and removed the code from the other because it's simply too big.
This is not the right place since its not your own script. You have posted another topic in the right place in Script Support.

This thread is for scripters and their own code.
I am afraid that it is dead, but if any experienced scripters want to revive it please let me know :)

*hugs*
 

Star

Sponsor

Okay this is my first time making a script on my own. Well, at least one this long. It's taking me a while, but I'm proud it works great and everything. I just want to make sure I scripted it right. I had a little trouble trying to get some things to work so I took the long way around

Code:
#_______________________________________________________________________________

# Star_Scene_Tactics V1.0            

#_______________________________________________________________________________

# By StarGGundam2    

#_______________________________________________________________________________

module STAR

#Transition Time.  

STR_TIME = 10

#Transition Type(Name).  

STR_TYPE = "004-Blind04"

TEXT1 = "Attack Enemies!"

TEXT2 = "Support Allies!"

TEXT3 = "Use Techs!"

TEXT4 = "Avoid Foes!"

end

 

###############

# Window_Base #

###############

class Window_Base < Window

  

def pic_missing?

face = RPG::Cache.picture("")

end    

 

def draw_team_pictures(x,y)

face = RPG::Cache.picture("TACTICS_team") rescue pic_missing?

cw = face.width 

ch = face.height 

src_rect = Rect.new(0, 0, cw, ch)

self.contents.blt(x , y, face, src_rect)    

end 

 

def draw_tactics_selectable(x,y)

face = RPG::Cache.picture("TACTICS_selectable") rescue pic_missing?

cw = face.width 

ch = face.height 

src_rect = Rect.new(0, 0, cw, ch)

self.contents.blt(x , y, face, src_rect)    

end 

 

def draw_actor_picture1(actor,x,y)

face = RPG::Cache.picture(actor.name + "_fc5") rescue pic_missing?

cw = face.width 

ch = face.height 

src_rect = Rect.new(0, 0, cw, ch)

self.contents.blt(x , y, face, src_rect)    

end 

 

def draw_maphp5(actor, x, y)

back = RPG::Cache.picture("BAR")    

cw = back.width  

ch = back.height 

src_rect = Rect.new(0, 0, cw, ch)    

self.contents.blt(x + 65, y - ch + 30, back, src_rect)

meter = RPG::Cache.picture("HP_Bar2")    

cw = meter.width  * actor.hp / actor.maxhp

ch = meter.height 

src_rect = Rect.new(0, 0, cw, ch)

self.contents.blt(x + 65, y - ch + 30, meter, src_rect)

self.contents.font.color = Color.new(0,0,0,255)

self.contents.draw_text(x + 66, y - 1, 100, 32, actor.hp.to_s + "/" + actor.maxhp.to_s, 1)  

self.contents.font.color = Color.new(250,255,255,255) 

self.contents.draw_text(x + 65, y - 2, 100, 32, actor.hp.to_s + "/" + actor.maxhp.to_s, 1)  

end  

 

def draw_mapsp5(actor, x, y)

back = RPG::Cache.picture("BAR")    

cw = back.width  

ch = back.height 

src_rect = Rect.new(0, 0, cw, ch)    

self.contents.blt(x + 65 , y - ch + 30, back, src_rect)

meter = RPG::Cache.picture("SP_Bar2")    

cw = meter.width  * actor.sp / actor.maxsp

ch = meter.height 

src_rect = Rect.new(0, 0, cw, ch)

self.contents.blt(x + 65 , y - ch + 30, meter, src_rect)

self.contents.font.color = Color.new(0,0,0,255)

self.contents.draw_text(x + 66, y - 1, 100, 32, actor.sp.to_s + "/" + actor.maxsp.to_s, 1)  

self.contents.font.color = Color.new(250,255,255,255) 

self.contents.draw_text(x + 65, y - 2, 100, 32, actor.sp.to_s + "/" + actor.maxsp.to_s, 1)  

end

 

def draw_tactics_choice(x, y)

self.contents.font.color = Color.new(0,0,0,255)

self.contents.draw_text(x + 66, y + 0, 150, 32, STAR::TEXT1, 1)  

self.contents.font.color = Color.new(250,255,255,255) 

self.contents.draw_text(x + 65, y - 1, 150, 32, STAR::TEXT1, 1) 

 

self.contents.font.color = Color.new(0,0,0,255)

self.contents.draw_text(x + 66, y + 60, 150, 32, STAR::TEXT2, 1)  

self.contents.font.color = Color.new(250,255,255,255) 

self.contents.draw_text(x + 65, y + 59, 150, 32, STAR::TEXT2, 1) 

 

self.contents.font.color = Color.new(0,0,0,255)

self.contents.draw_text(x + 66, y + 120, 150, 32, STAR::TEXT3, 1)  

self.contents.font.color = Color.new(250,255,255,255) 

self.contents.draw_text(x + 65, y + 119, 150, 32, STAR::TEXT3, 1)  

 

self.contents.font.color = Color.new(0,0,0,255)

self.contents.draw_text(x + 66, y + 180, 150, 32, STAR::TEXT4, 1)  

self.contents.font.color = Color.new(250,255,255,255) 

self.contents.draw_text(x + 65, y + 179, 150, 32, STAR::TEXT4, 1)  

end  

 

def draw_actor_tactic(actor, x, y)

  case actor.id

when 1

if $game_variables[451] == 0

text = STAR::TEXT1

elsif $game_variables[451] == 1

text = STAR::TEXT2 

elsif $game_variables[451] == 2

text = STAR::TEXT3  

elsif $game_variables[451] == 3

text = STAR::TEXT4

  end

when 2

if $game_variables[452] == 0

text = STAR::TEXT1

elsif $game_variables[452] == 1

text = STAR::TEXT2  

elsif $game_variables[452] == 2

text = STAR::TEXT3  

elsif $game_variables[452] == 3

text = STAR::TEXT4

  end

when 3

if $game_variables[453] == 0

text = STAR::TEXT1

elsif $game_variables[453] == 1

text = STAR::TEXT2 

elsif $game_variables[453] == 2

text = STAR::TEXT3     

elsif $game_variables[453] == 3

text = STAR::TEXT4

  end

when 4

  if $game_variables[454] == 0

text = STAR::TEXT1

elsif $game_variables[454] == 1

text = STAR::TEXT2   

elsif $game_variables[454] == 2

text = STAR::TEXT3   

elsif $game_variables[454] == 3

text = STAR::TEXT4

  end

when 5

if $game_variables[455] == 0

text = STAR::TEXT1

elsif $game_variables[455] == 1

text = STAR::TEXT2 

elsif $game_variables[455] == 2

text = STAR::TEXT3  

elsif $game_variables[455] == 3

text = STAR::TEXT4

  end

when 6

if $game_variables[456] == 0

text = STAR::TEXT1

elsif $game_variables[456] == 1

text = STAR::TEXT2   

elsif $game_variables[456] == 2

text = STAR::TEXT3   

elsif $game_variables[456] == 3

text = STAR::TEXT4

  end

when 7

if $game_variables[457] == 0

text = STAR::TEXT1

elsif $game_variables[457] == 1

text = STAR::TEXT2  

elsif $game_variables[457] == 2

text = STAR::TEXT3    

elsif $game_variables[457] == 3

text = STAR::TEXT4

  end

when 8

if $game_variables[458] == 0

text = STAR::TEXT1

elsif $game_variables[458] == 1

text = STAR::TEXT2   

elsif $game_variables[458] == 2

text = STAR::TEXT3   

elsif $game_variables[458] == 3

text = STAR::TEXT4

  end

when 9

if $game_variables[459] == 0

text = STAR::TEXT1

elsif $game_variables[459] == 1

text = STAR::TEXT2 

elsif $game_variables[459] == 2

text = STAR::TEXT3   

elsif $game_variables[459] == 3

text = STAR::TEXT4

  end

when 10

if $game_variables[460] == 0

text = STAR::TEXT1

elsif $game_variables[460] == 1

text = STAR::TEXT2   

elsif $game_variables[460] == 2

text = STAR::TEXT3    

elsif $game_variables[460] == 3

text = STAR::TEXT4

  end

when 11

if $game_variables[461] == 0

text = STAR::TEXT1

elsif $game_variables[461] == 1

text = STAR::TEXT2  

elsif $game_variables[461] == 2

text = STAR::TEXT3     

elsif $game_variables[461] == 3

text = STAR::TEXT4

  end

end  

self.contents.font.color = Color.new(0,0,0,255)

self.contents.draw_text(x - 1, y - 1, 120, 32, text, 1)  

self.contents.font.color = Color.new(250,255,255,255) 

self.contents.draw_text(x, y, 120, 32, text, 1)  

end

 

 

########

#class Window_Base end

end

########

 

##################

# Tactics_Window #

##################

class Tactics_Window < Window_Selectable

  attr_reader :index

  def initialize(actor)

    super(0, 0, 680, 480)

    self.contents = Bitmap.new(width, height)

    self.contents.font.name = "BorisBlackBloxx"

    self.z = 20

    self.index = 0

    @actor = actor

    refresh

########

#initialize end

end

########

  def refresh

    self.contents.clear

    for i in 0...$game_party.actors.size

      if i >= 4

      x = 447  

      y = 110 + ((i - 4) * 80)

    else

      x = 120

      y = 110 + (i * 80)

    end

      actor = $game_party.actors[i]

      draw_actor_tactic(actor, x, y)

      draw_maphp5(actor, x - 84, y - 30)

      draw_mapsp5(actor, x + 24, y - 30)

      draw_actor_picture1(actor,x - 105,y - 25)

    end

    end

def update_cursor_rect

     if @index >= 4

      x = 320 

      y = 70 + ((@index - 4) * 80)

    else

      x = 0

      y = 70 + (@index * 80)

    end

    if @index == -1

      self.cursor_rect.empty

      else

      self.cursor_rect.set(x, y, 320, 77)

      end

    end

  def update_help

    actor = $game_party.actors[@index] 

    text = actor.name

    @help_window.set_text("Press Enter to edit " + text + "'s tactics in battle")

  end

########

#class Tactics_Window end

end

########

 

##################

# ChangeTactics_Window #

##################

class ChangeTactics_Window < Window_Selectable

  def initialize(actor)

    super(160, 0, 360, 540)

    self.contents = Bitmap.new(width, height)

    self.windowskin = RPG::Cache.windowskin("Mywindowskin_deep")

    self.opacity = 255

    self.z = 55

    self.index = 0

    @actor = actor

    refresh

  end

  def refresh

    self.contents.clear

    draw_tactics_selectable( 0, 0)

    draw_tactics_choice(50, 105)

    draw_maphp5(@actor, 30, 80)

    draw_mapsp5(@actor, 140, 80)

    draw_actor_picture1(@actor, 16, 85)

    end

  def update_cursor_rect

      self.cursor_rect.set(99, 95 + (@index * 60), 190, 40)

      end

  def update_help

    actor = @actor

    text = actor.name

    if index == 0

    @help_window.set_text("Press enter to pick 'Attack Enemies' for " + text + "'s tactic")

  elsif index == 1

    @help_window.set_text("Press enter to pick 'Support Allies' for " + text + "'s tactic")

  elsif index == 2 

    @help_window.set_text("Press enter to pick 'Use Techs' for " + text + "'s tactic")

  elsif index == 3  

    @help_window.set_text("Press enter to pick 'Avoid Foes' for " + text + "'s tactic")

  end

end

  ########

#class ChangeTactics_Window end

end

########

##################

# Team_Window #

##################

class Team_Window < Window_Base

  def initialize

  super(0, 0, 360, 540)

    self.contents = Bitmap.new(width, height)

    self.z = 1

    self.opacity = 0

    refresh

  end

  def refresh

    self.contents.clear

    draw_team_pictures( 0, 0)

    end

  

########

#class Team_Window end

end

########

 

##################

# Scene_Tactics #

##################

class Scene_Tactics

def initialize

########

#initialize end

end

########

def main

for i in 0...$game_party.actors.size

@actor = $game_party.actors[i]

end

@tactics_bak = Sprite.new

@tactics_bak.bitmap = RPG::Cache.picture("TACTICS_bak")

@tactics_bak.x = 0

@tactics_bak.z = 10

@tactics_bak.visible = true

@tactics_window = Tactics_Window.new(@actor)

@tactics_window.y = 480

@tactics_window.x = - 15

@tactics_window.visible = true

@team1_window = Team_Window.new

@team1_window.x = -320

@team1_window.visible = true

@team2_window = Team_Window.new

@team2_window.x = 640

@team1_window.visible = true

@changetactics0_window = ChangeTactics_Window.new($game_party.actors[0])

@changetactics0_window.visible = false

@changetactics0_window.active = false

@changetactics1_window = ChangeTactics_Window.new($game_party.actors[1]) unless $game_party.actors.size <= 1

@changetactics1_window.visible = false unless $game_party.actors.size <= 1

@changetactics1_window.active = false unless $game_party.actors.size <= 1

@changetactics2_window = ChangeTactics_Window.new($game_party.actors[2]) unless $game_party.actors.size <= 2

@changetactics2_window.visible = false unless $game_party.actors.size <= 2

@changetactics2_window.active = false unless $game_party.actors.size <= 2

@changetactics3_window = ChangeTactics_Window.new($game_party.actors[3]) unless $game_party.actors.size <= 3

@changetactics3_window.visible = false unless $game_party.actors.size <= 3

@changetactics3_window.active = false unless $game_party.actors.size <= 3

@changetactics4_window = ChangeTactics_Window.new($game_party.actors[4]) unless $game_party.actors.size <= 4

@changetactics4_window.visible = false unless $game_party.actors.size <= 4

@changetactics4_window.active = false unless $game_party.actors.size <= 4

@changetactics5_window = ChangeTactics_Window.new($game_party.actors[5]) unless $game_party.actors.size <= 5

@changetactics5_window.visible = false unless $game_party.actors.size <= 5

@changetactics5_window.active = false unless $game_party.actors.size <= 5

@changetactics6_window = ChangeTactics_Window.new($game_party.actors[6]) unless $game_party.actors.size <= 6

@changetactics6_window.visible = false unless $game_party.actors.size <= 6

@changetactics6_window.active = false unless $game_party.actors.size <= 6

@changetactics7_window = ChangeTactics_Window.new($game_party.actors[7]) unless $game_party.actors.size <= 7

@changetactics7_window.visible = false unless $game_party.actors.size <= 7 

@changetactics7_window.active = false unless $game_party.actors.size <= 7

@help_window = Window_Help.new

@help_window.y = 510

@help_window.x = 30

@tactics_window.help_window = @help_window

@spriteset = Spriteset_Map.new

Graphics.transition(STAR::STR_TIME, "Graphics/Transitions/" + STAR::STR_TYPE)

loop do

Graphics.update

Input.update

update

if $scene != self

break

end

end

for i in 0..10

@tactics_bak.zoom_x += 0.2

@tactics_bak.opacity -= 40

@tactics_window.y += 40

@tactics_window.contents_opacity -=40

@team1_window.x -= 40

@tactics_window.contents_opacity -=40

@team2_window.x += 40

@tactics_window.contents_opacity -=40

@help_window.x += 40

@help_window.contents_opacity -=20

Graphics.update

end  

Graphics.freeze

@tactics_bak.dispose

@spriteset.dispose

@tactics_window.dispose

@team1_window.dispose

@team2_window.dispose

@help_window.dispose

@changetactics0_window.dispose

@changetactics1_window.dispose unless $game_party.actors.size <= 1

@changetactics2_window.dispose unless $game_party.actors.size <= 2

@changetactics3_window.dispose unless $game_party.actors.size <= 3

@changetactics4_window.dispose unless $game_party.actors.size <= 4

@changetactics5_window.dispose unless $game_party.actors.size <= 5

@changetactics6_window.dispose unless $game_party.actors.size <= 6

@changetactics7_window.dispose unless $game_party.actors.size <= 7

#############

#main end

end

#############

 

def update

 

  

  if @tactics_window.help_window.y > 421

  @tactics_window.update_help

  @tactics_window.help_window.y -= 30

elsif @tactics_window.help_window.y <= 420

  @tactics_window.update_help

  @tactics_window.help_window.y = 420

  end

  

  if @tactics_window.y > 0

  @tactics_window.y -= 40

elsif @tactics_window.y <= 0

  @tactics_window.y = 0

end

 

  if @team1_window.x < -15

  @team1_window.x += 40

elsif @team1_window.x >= -15

  @team1_window.x = -15

end

 

  if @team2_window.x > 321

  @team2_window.x -= 30

elsif @team2_window.x >= 320

  @team2_window.x = 300

end

 

if @tactics_window.active

update_tactics

return

end

 

if @changetactics0_window.active == true

@changetactics0_window.help_window = @help_window

update_changetactics0

else

@changetactics0_window.visible = false

end

 

if $game_party.actors.size >= 2

if @changetactics1_window.active == true

@changetactics1_window.help_window = @help_window 

update_changetactics1

else

@changetactics1_window.visible = false

end

end

 

if $game_party.actors.size >= 3

if @changetactics2_window.active == true

@changetactics2_window.help_window = @help_window   

update_changetactics2

else

@changetactics2_window.visible = false

end

end

 

if $game_party.actors.size >= 4

if @changetactics3_window.active == true

@changetactics3_window.help_window = @help_window   

update_changetactics3

else

@changetactics3_window.visible = false

end

end

 

if $game_party.actors.size >= 5

if @changetactics4_window.active == true

@changetactics4_window.help_window = @help_window  

update_changetactics4

else

@changetactics4_window.visible = false

end

end

 

if $game_party.actors.size >= 6

if @changetactics5_window.active == true

@changetactics5_window.help_window = @help_window   

update_changetactics5

else

@changetactics5_window.visible = false

end

end

 

if $game_party.actors.size >= 7

if @changetactics6_window.active == true

@changetactics6_window.help_window = @help_window   

update_changetactics6

else

@changetactics6_window.visible = false

end

end

 

if $game_party.actors.size == 8

if @changetactics7_window.active == true

@changetactics7_window.help_window = @help_window   

update_changetactics7

else

@changetactics7_window.visible = false

end

end

#######

#update end

end

#######

 

def update_tactics

  

if $game_variables[499] == 0 and Input.trigger?(Input::B)

$game_system.se_play($data_system.cancel_se)

$scene = Scene_Menu.new(4)

return

elsif $game_variables[499] == 1 and Input.trigger?(Input::B)

$game_system.se_play($data_system.cancel_se)

$scene = Scene_Map.new

return

end

 

if Input.trigger?(Input::DOWN)

#@tactics_window.help_window.y = 510

  if @tactics_window.index == 7

    @tactics_window.index = 0

  else

    unless @tactics_window.index == $game_party.actors.size - 1

    @tactics_window.index += 1

    end

  end

end

 

if Input.trigger?(Input::UP)

#@tactics_window.help_window.y = 510

  if @tactics_window.index == 0

    @tactics_window.index = $game_party.actors.size - 1

  else

    @tactics_window.index -= 1

  end

end

 

 

if Input.trigger?(Input::RIGHT)

#@tactics_window.help_window.y = 510

   unless @tactics_window.index == 4 or

      @tactics_window.index == 5 or

      @tactics_window.index == 6 or

      @tactics_window.index == 7 or

      $game_party.actors.size <= 4 or

      $game_party.actors.size == 5 and @tactics_window.index >= 0 or

      $game_party.actors.size == 6 and @tactics_window.index >= 1 or

      $game_party.actors.size == 7 and @tactics_window.index >= 2

        @tactics_window.index += 4

  end

end

 

if Input.trigger?(Input::LEFT)

#@tactics_window.help_window.y = 510

   unless @tactics_window.index == 0 or

      @tactics_window.index == 1 or

      @tactics_window.index == 2 or

      @tactics_window.index == 3

        @tactics_window.index -= 4

  end

end

 

 

if Input.trigger?(Input::C)

@tactics_window.active = false

    if @tactics_window.index == 0

      @changetactics0_window.active = true

      @changetactics0_window.visible = true

        return

      end

    if @tactics_window.index == 1

      @changetactics1_window.active = true

      @changetactics1_window.visible = true

        return

      end

    if @tactics_window.index == 2

      @changetactics2_window.active = true

      @changetactics2_window.visible = true

        return

      end

    if @tactics_window.index == 3

      @changetactics3_window.active = true

      @changetactics3_window.visible = true

        return

      end

    if @tactics_window.index == 4

      @changetactics4_window.active = true

      @changetactics4_window.visible = true

        return

      end

    if @tactics_window.index == 5

      @changetactics5_window.active = true

      @changetactics5_window.visible = true

        return

      end

    if @tactics_window.index == 6

      @changetactics6_window.active = true

      @changetactics6_window.visible = true

        return

      end

    if @tactics_window.index == 7

      @changetactics7_window.active = true

      @changetactics7_window.visible = true

        return

      end

    end

#######

#update_tactics end

end

#######

 

def update_changetactics0

  

if Input.trigger?(Input::B)

@tactics_window.index = 0

@changetactics0_window.visible = false 

@tactics_window.active = true

@changetactics0_window.active = false 

return

end

 

if Input.trigger?(Input::C) and @changetactics0_window.visible == true

  actor_index = $game_party.actors[0].id

  if @changetactics0_window.index == 0

    case actor_index

    when 1

      $game_variables[451] = 0

    when 2

      $game_variables[452] = 0

    when 3

      $game_variables[453] = 0  

    when 4

      $game_variables[454] = 0

    when 5

      $game_variables[455] = 0

    when 6

      $game_variables[456] = 0

    when 7

      $game_variables[457] = 0 

    when 8

      $game_variables[458] = 0  

    when 9

      $game_variables[459] = 0

    when 10

      $game_variables[460] = 0

    when 11

      $game_variables[461] = 0  

    end

  elsif @changetactics0_window.index == 1

    

        case actor_index

    when 1

      $game_variables[451] = 1

    when 2

      $game_variables[452] = 1

    when 3

      $game_variables[453] = 1  

    when 4

      $game_variables[454] = 1

    when 5

      $game_variables[455] = 1

    when 6

      $game_variables[456] = 1

    when 7

      $game_variables[457] = 1 

    when 8

      $game_variables[458] = 1  

    when 9

      $game_variables[459] = 1

    when 10

      $game_variables[460] = 1

    when 11

      $game_variables[461] = 1  

    end

  elsif @changetactics0_window.index == 2

        case actor_index

    when 1

      $game_variables[451] = 2

    when 2

      $game_variables[452] = 2

    when 3

      $game_variables[453] = 2  

    when 4

      $game_variables[454] = 2

    when 5

      $game_variables[455] = 2

    when 6

      $game_variables[456] = 2

    when 7

      $game_variables[457] = 2 

    when 8

      $game_variables[458] = 2  

    when 9

      $game_variables[459] = 2

    when 10

      $game_variables[460] = 2

    when 11

      $game_variables[461] = 2  

    end

  elsif @changetactics0_window.index == 3

        case actor_index

    when 1

      $game_variables[451] = 3

    when 2

      $game_variables[452] = 3

    when 3

      $game_variables[453] = 3  

    when 4

      $game_variables[454] = 3

    when 5

      $game_variables[455] = 3

    when 6

      $game_variables[456] = 3

    when 7

      $game_variables[457] = 3 

    when 8

      $game_variables[458] = 3  

    when 9

      $game_variables[459] = 3

    when 10

      $game_variables[460] = 3

    when 11

      $game_variables[461] = 3  

    end

  end

@tactics_window.refresh

@tactics_window.index = 0

@changetactics0_window.visible = false 

@tactics_window.active = true

@changetactics0_window.active = false 

return

end

 

if Input.trigger?(Input::DOWN)

#@tactics_window.help_window.y = 510

  if @changetactics0_window.index == 3

    @changetactics0_window.index = 0

  else

    @changetactics0_window.index += 1

  end

    

end

 

if Input.trigger?(Input::UP)

#@tactics_window.help_window.y = 510

  if @changetactics0_window.index == 0

    @changetactics0_window.index = 3

  else

    @changetactics0_window.index -= 1

  end

    

end

 

##########

#update_changetactics end

end

##########

 

 

def update_changetactics1

  

if Input.trigger?(Input::B)

  @tactics_window.index = 1

@changetactics1_window.visible = false 

@tactics_window.active = true

@changetactics1_window.active = false 

return

end

 

if Input.trigger?(Input::C) and @changetactics1_window.visible == true

  actor_index = $game_party.actors[1].id

  if @changetactics1_window.index == 0

    case actor_index

    when 1

      $game_variables[451] = 0

    when 2

      $game_variables[452] = 0

    when 3

      $game_variables[453] = 0  

    when 4

      $game_variables[454] = 0

    when 5

      $game_variables[455] = 0

    when 6

      $game_variables[456] = 0

    when 7

      $game_variables[457] = 0 

    when 8

      $game_variables[458] = 0  

    when 9

      $game_variables[459] = 0

    when 10

      $game_variables[460] = 0

    when 11

      $game_variables[461] = 0  

    end

  elsif @changetactics1_window.index == 1

    

        case actor_index

    when 1

      $game_variables[451] = 1

    when 2

      $game_variables[452] = 1

    when 3

      $game_variables[453] = 1  

    when 4

      $game_variables[454] = 1

    when 5

      $game_variables[455] = 1

    when 6

      $game_variables[456] = 1

    when 7

      $game_variables[457] = 1 

    when 8

      $game_variables[458] = 1  

    when 9

      $game_variables[459] = 1

    when 10

      $game_variables[460] = 1

    when 11

      $game_variables[461] = 1  

    end

  elsif @changetactics1_window.index == 2

        case actor_index

    when 1

      $game_variables[451] = 2

    when 2

      $game_variables[452] = 2

    when 3

      $game_variables[453] = 2  

    when 4

      $game_variables[454] = 2

    when 5

      $game_variables[455] = 2

    when 6

      $game_variables[456] = 2

    when 7

      $game_variables[457] = 2 

    when 8

      $game_variables[458] = 2  

    when 9

      $game_variables[459] = 2

    when 10

      $game_variables[460] = 2

    when 11

      $game_variables[461] = 2  

    end

  elsif @changetactics1_window.index == 3

        case actor_index

    when 1

      $game_variables[451] = 3

    when 2

      $game_variables[452] = 3

    when 3

      $game_variables[453] = 3  

    when 4

      $game_variables[454] = 3

    when 5

      $game_variables[455] = 3

    when 6

      $game_variables[456] = 3

    when 7

      $game_variables[457] = 3 

    when 8

      $game_variables[458] = 3  

    when 9

      $game_variables[459] = 3

    when 10

      $game_variables[460] = 3

    when 11

      $game_variables[461] = 3  

    end

  end

@tactics_window.refresh

  @tactics_window.index = 1

@changetactics1_window.visible = false 

@tactics_window.active = true

@changetactics1_window.active = false 

return

end

 

if Input.trigger?(Input::DOWN)

#@tactics_window.help_window.y = 510

  if @changetactics1_window.index == 3

    @changetactics1_window.index = 0

  else

    @changetactics1_window.index += 1

  end

    

end

 

if Input.trigger?(Input::UP)

#@tactics_window.help_window.y = 510

  if @changetactics1_window.index == 0

    @changetactics1_window.index = 3

  else

    @changetactics1_window.index -= 1

  end

    

end

 

##########

#update_changetactics end

end

##########

 

 

def update_changetactics2

  

if Input.trigger?(Input::B)

@tactics_window.index = 2

@changetactics2_window.visible = false 

@tactics_window.active = true

@changetactics2_window.active = false 

return

end

 

if Input.trigger?(Input::C) and @changetactics2_window.visible == true

  actor_index = $game_party.actors[2].id

  if @changetactics2_window.index == 0

    case actor_index

    when 1

      $game_variables[451] = 0

    when 2

      $game_variables[452] = 0

    when 3

      $game_variables[453] = 0  

    when 4

      $game_variables[454] = 0

    when 5

      $game_variables[455] = 0

    when 6

      $game_variables[456] = 0

    when 7

      $game_variables[457] = 0 

    when 8

      $game_variables[458] = 0  

    when 9

      $game_variables[459] = 0

    when 10

      $game_variables[460] = 0

    when 11

      $game_variables[461] = 0  

    end

  elsif @changetactics2_window.index == 1

    

        case actor_index

    when 1

      $game_variables[451] = 1

    when 2

      $game_variables[452] = 1

    when 3

      $game_variables[453] = 1  

    when 4

      $game_variables[454] = 1

    when 5

      $game_variables[455] = 1

    when 6

      $game_variables[456] = 1

    when 7

      $game_variables[457] = 1 

    when 8

      $game_variables[458] = 1  

    when 9

      $game_variables[459] = 1

    when 10

      $game_variables[460] = 1

    when 11

      $game_variables[461] = 1  

    end

  elsif @changetactics2_window.index == 2

        case actor_index

    when 1

      $game_variables[451] = 2

    when 2

      $game_variables[452] = 2

    when 3

      $game_variables[453] = 2  

    when 4

      $game_variables[454] = 2

    when 5

      $game_variables[455] = 2

    when 6

      $game_variables[456] = 2

    when 7

      $game_variables[457] = 2 

    when 8

      $game_variables[458] = 2  

    when 9

      $game_variables[459] = 2

    when 10

      $game_variables[460] = 2

    when 11

      $game_variables[461] = 2  

    end

  elsif @changetactics2_window.index == 3

        case actor_index

    when 1

      $game_variables[451] = 3

    when 2

      $game_variables[452] = 3

    when 3

      $game_variables[453] = 3  

    when 4

      $game_variables[454] = 3

    when 5

      $game_variables[455] = 3

    when 6

      $game_variables[456] = 3

    when 7

      $game_variables[457] = 3 

    when 8

      $game_variables[458] = 3  

    when 9

      $game_variables[459] = 3

    when 10

      $game_variables[460] = 3

    when 11

      $game_variables[461] = 3  

    end

  end

@tactics_window.refresh

@tactics_window.index = 2

@changetactics2_window.visible = false 

@tactics_window.active = true

@changetactics2_window.active = false 

return

end

 

if Input.trigger?(Input::DOWN)

#@tactics_window.help_window.y = 510

  if @changetactics2_window.index == 3

    @changetactics2_window.index = 0

  else

    @changetactics2_window.index += 1

  end

    

end

 

if Input.trigger?(Input::UP)

#@tactics_window.help_window.y = 510

  if @changetactics2_window.index == 0

    @changetactics2_window.index = 3

  else

    @changetactics2_window.index -= 1

  end

    

end

 

##########

#update_changetactics end

end

##########

 

 

def update_changetactics3

  

if Input.trigger?(Input::B)

@tactics_window.index = 3

@changetactics3_window.visible = false 

@tactics_window.active = true

@changetactics3_window.active = false 

return

end

 

if Input.trigger?(Input::C) and @changetactics3_window.visible == true

  actor_index = $game_party.actors[3].id

  if @changetactics3_window.index == 0

    case actor_index

    when 1

      $game_variables[451] = 0

    when 2

      $game_variables[452] = 0

    when 3

      $game_variables[453] = 0  

    when 4

      $game_variables[454] = 0

    when 5

      $game_variables[455] = 0

    when 6

      $game_variables[456] = 0

    when 7

      $game_variables[457] = 0 

    when 8

      $game_variables[458] = 0  

    when 9

      $game_variables[459] = 0

    when 10

      $game_variables[460] = 0

    when 11

      $game_variables[461] = 0  

    end

  elsif @changetactics3_window.index == 1

    

        case actor_index

    when 1

      $game_variables[451] = 1

    when 2

      $game_variables[452] = 1

    when 3

      $game_variables[453] = 1  

    when 4

      $game_variables[454] = 1

    when 5

      $game_variables[455] = 1

    when 6

      $game_variables[456] = 1

    when 7

      $game_variables[457] = 1 

    when 8

      $game_variables[458] = 1  

    when 9

      $game_variables[459] = 1

    when 10

      $game_variables[460] = 1

    when 11

      $game_variables[461] = 1  

    end

  elsif @changetactics3_window.index == 2

        case actor_index

    when 1

      $game_variables[451] = 2

    when 2

      $game_variables[452] = 2

    when 3

      $game_variables[453] = 2  

    when 4

      $game_variables[454] = 2

    when 5

      $game_variables[455] = 2

    when 6

      $game_variables[456] = 2

    when 7

      $game_variables[457] = 2 

    when 8

      $game_variables[458] = 2  

    when 9

      $game_variables[459] = 2

    when 10

      $game_variables[460] = 2

    when 11

      $game_variables[461] = 2  

    end

  elsif @changetactics3_window.index == 3

        case actor_index

    when 1

      $game_variables[451] = 3

    when 2

      $game_variables[452] = 3

    when 3

      $game_variables[453] = 3  

    when 4

      $game_variables[454] = 3

    when 5

      $game_variables[455] = 3

    when 6

      $game_variables[456] = 3

    when 7

      $game_variables[457] = 3 

    when 8

      $game_variables[458] = 3  

    when 9

      $game_variables[459] = 3

    when 10

      $game_variables[460] = 3

    when 11

      $game_variables[461] = 3  

    end

  end

@tactics_window.refresh

@tactics_window.index = 3

@changetactics3_window.visible = false 

@tactics_window.active = true

@changetactics3_window.active = false 

return

end

 

if Input.trigger?(Input::DOWN)

#@tactics_window.help_window.y = 510

  if @changetactics3_window.index == 3

    @changetactics3_window.index = 0

  else

    @changetactics3_window.index += 1

  end

    

end

 

if Input.trigger?(Input::UP)

#@tactics_window.help_window.y = 510

  if @changetactics3_window.index == 0

    @changetactics3_window.index = 3

  else

    @changetactics3_window.index -= 1

  end

    

end

 

##########

#update_changetactics end

end

##########

 

 

def update_changetactics4

  

if Input.trigger?(Input::B)

@tactics_window.index = 4

@changetactics4_window.visible = false 

@tactics_window.active = true

@changetactics4_window.active = false 

return

end

 

if Input.trigger?(Input::C) and @changetactics4_window.visible == true

  actor_index = $game_party.actors[4].id

  if @changetactics4_window.index == 0

    case actor_index

    when 1

      $game_variables[451] = 0

    when 2

      $game_variables[452] = 0

    when 3

      $game_variables[453] = 0  

    when 4

      $game_variables[454] = 0

    when 5

      $game_variables[455] = 0

    when 6

      $game_variables[456] = 0

    when 7

      $game_variables[457] = 0 

    when 8

      $game_variables[458] = 0  

    when 9

      $game_variables[459] = 0

    when 10

      $game_variables[460] = 0

    when 11

      $game_variables[461] = 0  

    end

  elsif @changetactics4_window.index == 1

    

        case actor_index

    when 1

      $game_variables[451] = 1

    when 2

      $game_variables[452] = 1

    when 3

      $game_variables[453] = 1  

    when 4

      $game_variables[454] = 1

    when 5

      $game_variables[455] = 1

    when 6

      $game_variables[456] = 1

    when 7

      $game_variables[457] = 1 

    when 8

      $game_variables[458] = 1  

    when 9

      $game_variables[459] = 1

    when 10

      $game_variables[460] = 1

    when 11

      $game_variables[461] = 1  

    end

  elsif @changetactics4_window.index == 2

        case actor_index

    when 1

      $game_variables[451] = 2

    when 2

      $game_variables[452] = 2

    when 3

      $game_variables[453] = 2  

    when 4

      $game_variables[454] = 2

    when 5

      $game_variables[455] = 2

    when 6

      $game_variables[456] = 2

    when 7

      $game_variables[457] = 2 

    when 8

      $game_variables[458] = 2  

    when 9

      $game_variables[459] = 2

    when 10

      $game_variables[460] = 2

    when 11

      $game_variables[461] = 2  

    end

  elsif @changetactics4_window.index == 3

        case actor_index

    when 1

      $game_variables[451] = 3

    when 2

      $game_variables[452] = 3

    when 3

      $game_variables[453] = 3  

    when 4

      $game_variables[454] = 3

    when 5

      $game_variables[455] = 3

    when 6

      $game_variables[456] = 3

    when 7

      $game_variables[457] = 3 

    when 8

      $game_variables[458] = 3  

    when 9

      $game_variables[459] = 3

    when 10

      $game_variables[460] = 3

    when 11

      $game_variables[461] = 3  

    end

  end

@tactics_window.refresh

@tactics_window.index = 4

@changetactics4_window.visible = false 

@tactics_window.active = true

@changetactics4_window.active = false 

return

end

 

if Input.trigger?(Input::DOWN)

#@tactics_window.help_window.y = 510

  if @changetactics4_window.index == 3

    @changetactics4_window.index = 0

  else

    @changetactics4_window.index += 1

  end

    

end

 

if Input.trigger?(Input::UP)

#@tactics_window.help_window.y = 510

  if @changetactics4_window.index == 0

    @changetactics4_window.index = 3

  else

    @changetactics4_window.index -= 1

  end

    

end

 

##########

#update_changetactics end

end

##########

 

 

def update_changetactics5

  

if Input.trigger?(Input::B)

@tactics_window.index = 5

@changetactics5_window.visible = false 

@tactics_window.active = true

@changetactics5_window.active = false 

return

end

 

if Input.trigger?(Input::C) and @changetactics5_window.visible == true

  actor_index = $game_party.actors[5].id

  if @changetactics5_window.index == 0

    case actor_index

    when 1

      $game_variables[451] = 0

    when 2

      $game_variables[452] = 0

    when 3

      $game_variables[453] = 0  

    when 4

      $game_variables[454] = 0

    when 5

      $game_variables[455] = 0

    when 6

      $game_variables[456] = 0

    when 7

      $game_variables[457] = 0 

    when 8

      $game_variables[458] = 0  

    when 9

      $game_variables[459] = 0

    when 10

      $game_variables[460] = 0

    when 11

      $game_variables[461] = 0  

    end

  elsif @changetactics5_window.index == 1

    

        case actor_index

    when 1

      $game_variables[451] = 1

    when 2

      $game_variables[452] = 1

    when 3

      $game_variables[453] = 1  

    when 4

      $game_variables[454] = 1

    when 5

      $game_variables[455] = 1

    when 6

      $game_variables[456] = 1

    when 7

      $game_variables[457] = 1 

    when 8

      $game_variables[458] = 1  

    when 9

      $game_variables[459] = 1

    when 10

      $game_variables[460] = 1

    when 11

      $game_variables[461] = 1  

    end

  elsif @changetactics5_window.index == 2

        case actor_index

    when 1

      $game_variables[451] = 2

    when 2

      $game_variables[452] = 2

    when 3

      $game_variables[453] = 2  

    when 4

      $game_variables[454] = 2

    when 5

      $game_variables[455] = 2

    when 6

      $game_variables[456] = 2

    when 7

      $game_variables[457] = 2 

    when 8

      $game_variables[458] = 2  

    when 9

      $game_variables[459] = 2

    when 10

      $game_variables[460] = 2

    when 11

      $game_variables[461] = 2  

    end

  elsif @changetactics5_window.index == 3

        case actor_index

    when 1

      $game_variables[451] = 3

    when 2

      $game_variables[452] = 3

    when 3

      $game_variables[453] = 3  

    when 4

      $game_variables[454] = 3

    when 5

      $game_variables[455] = 3

    when 6

      $game_variables[456] = 3

    when 7

      $game_variables[457] = 3 

    when 8

      $game_variables[458] = 3  

    when 9

      $game_variables[459] = 3

    when 10

      $game_variables[460] = 3

    when 11

      $game_variables[461] = 3  

    end

  end

@tactics_window.refresh

@tactics_window.index = 5

@changetactics5_window.visible = false 

@tactics_window.active = true

@changetactics5_window.active = false 

return

end

 

if Input.trigger?(Input::DOWN)

#@tactics_window.help_window.y = 510

  if @changetactics5_window.index == 3

    @changetactics5_window.index = 0

  else

    @changetactics5_window.index += 1

  end

    

end

 

if Input.trigger?(Input::UP)

#@tactics_window.help_window.y = 510

  if @changetactics5_window.index == 0

    @changetactics5_window.index = 3

  else

    @changetactics5_window.index -= 1

  end

    

end

 

##########

#update_changetactics end

end

##########

 

 

 

def update_changetactics6

  

if Input.trigger?(Input::B)

@tactics_window.index = 6

@changetactics6_window.visible = false 

@tactics_window.active = true

@changetactics6_window.active = false 

return

end

 

if Input.trigger?(Input::C) and @changetactics6_window.visible == true

  actor_index = $game_party.actors[6].id

  if @changetactics6_window.index == 0

    case actor_index

    when 1

      $game_variables[451] = 0

    when 2

      $game_variables[452] = 0

    when 3

      $game_variables[453] = 0  

    when 4

      $game_variables[454] = 0

    when 5

      $game_variables[455] = 0

    when 6

      $game_variables[456] = 0

    when 7

      $game_variables[457] = 0 

    when 8

      $game_variables[458] = 0  

    when 9

      $game_variables[459] = 0

    when 10

      $game_variables[460] = 0

    when 11

      $game_variables[461] = 0  

    end

  elsif @changetactics6_window.index == 1

        case actor_index

    when 1

      $game_variables[451] = 1

    when 2

      $game_variables[452] = 1

    when 3

      $game_variables[453] = 1  

    when 4

      $game_variables[454] = 1

    when 5

      $game_variables[455] = 1

    when 6

      $game_variables[456] = 1

    when 7

      $game_variables[457] = 1 

    when 8

      $game_variables[458] = 1  

    when 9

      $game_variables[459] = 1

    when 10

      $game_variables[460] = 1

    when 11

      $game_variables[461] = 1  

    end

  elsif @changetactics6_window.index == 2

        case actor_index

    when 1

      $game_variables[451] = 2

    when 2

      $game_variables[452] = 2

    when 3

      $game_variables[453] = 2  

    when 4

      $game_variables[454] = 2

    when 5

      $game_variables[455] = 2

    when 6

      $game_variables[456] = 2

    when 7

      $game_variables[457] = 2 

    when 8

      $game_variables[458] = 2  

    when 9

      $game_variables[459] = 2

    when 10

      $game_variables[460] = 2

    when 11

      $game_variables[461] = 2  

    end

  elsif @changetactics6_window.index == 3

        case actor_index

    when 1

      $game_variables[451] = 3

    when 2

      $game_variables[452] = 3

    when 3

      $game_variables[453] = 3  

    when 4

      $game_variables[454] = 3

    when 5

      $game_variables[455] = 3

    when 6

      $game_variables[456] = 3

    when 7

      $game_variables[457] = 3 

    when 8

      $game_variables[458] = 3  

    when 9

      $game_variables[459] = 3

    when 10

      $game_variables[460] = 3

    when 11

      $game_variables[461] = 3  

    end

  end

@tactics_window.refresh

@tactics_window.index = 6

@changetactics6_window.visible = false 

@tactics_window.active = true

@changetactics6_window.active = false 

return

end

 

if Input.trigger?(Input::DOWN)

#@tactics_window.help_window.y = 510

  if @changetactics6_window.index == 3

    @changetactics6_window.index = 0

  else

    @changetactics6_window.index += 1

  end

    

end

 

if Input.trigger?(Input::UP)

#@tactics_window.help_window.y = 510

  if @changetactics6_window.index == 0

    @changetactics6_window.index = 3

  else

    @changetactics6_window.index -= 1

  end

    

end

 

##########

#update_changetactics end

end

##########

 

 

 

def update_changetactics7

  

if Input.trigger?(Input::B)

@tactics_window.index = 7

@changetactics7_window.visible = false 

@tactics_window.active = true

@changetactics7_window.active = false  

return

end

 

if Input.trigger?(Input::C) and @changetactics7_window.visible == true

  actor_index = $game_party.actors[7].id

  if @changetactics7_window.index == 0

    case actor_index

    when 1

      $game_variables[451] = 0

    when 2

      $game_variables[452] = 0

    when 3

      $game_variables[453] = 0  

    when 4

      $game_variables[454] = 0

    when 5

      $game_variables[455] = 0

    when 6

      $game_variables[456] = 0

    when 7

      $game_variables[457] = 0 

    when 8

      $game_variables[458] = 0  

    when 9

      $game_variables[459] = 0

    when 10

      $game_variables[460] = 0

    when 11

      $game_variables[461] = 0  

    end

  elsif @changetactics7_window.index == 1

    

        case actor_index

    when 1

      $game_variables[451] = 1

    when 2

      $game_variables[452] = 1

    when 3

      $game_variables[453] = 1  

    when 4

      $game_variables[454] = 1

    when 5

      $game_variables[455] = 1

    when 6

      $game_variables[456] = 1

    when 7

      $game_variables[457] = 1 

    when 8

      $game_variables[458] = 1  

    when 9

      $game_variables[459] = 1

    when 10

      $game_variables[460] = 1

    when 11

      $game_variables[461] = 1  

    end

  elsif @changetactics7_window.index == 2

        case actor_index

    when 1

      $game_variables[451] = 2

    when 2

      $game_variables[452] = 2

    when 3

      $game_variables[453] = 2  

    when 4

      $game_variables[454] = 2

    when 5

      $game_variables[455] = 2

    when 6

      $game_variables[456] = 2

    when 7

      $game_variables[457] = 2 

    when 8

      $game_variables[458] = 2  

    when 9

      $game_variables[459] = 2

    when 10

      $game_variables[460] = 2

    when 11

      $game_variables[461] = 2  

    end

  elsif @changetactics7_window.index == 3

        case actor_index

    when 1

      $game_variables[451] = 3

    when 2

      $game_variables[452] = 3

    when 3

      $game_variables[453] = 3  

    when 4

      $game_variables[454] = 3

    when 5

      $game_variables[455] = 3

    when 6

      $game_variables[456] = 3

    when 7

      $game_variables[457] = 3 

    when 8

      $game_variables[458] = 3  

    when 9

      $game_variables[459] = 3

    when 10

      $game_variables[460] = 3

    when 11

      $game_variables[461] = 3  

    end

  end

@tactics_window.refresh

@tactics_window.index = 7

@changetactics7_window.visible = false 

@tactics_window.active = true

@changetactics7_window.active = false 

return

end

 

if Input.trigger?(Input::DOWN)

#@tactics_window.help_window.y = 510

  if @changetactics7_window.index == 3

    @changetactics7_window.index = 0

  else

    @changetactics7_window.index += 1

  end

    

end

 

if Input.trigger?(Input::UP)

#@tactics_window.help_window.y = 510

  if @changetactics7_window.index == 0

    @changetactics7_window.index = 3

  else

    @changetactics7_window.index -= 1

  end

    

end

 

##########

#update_changetactics7 end

end

##########

 

 

 

##########

#tactics class end

end

##########

 

Basically this is a script for Scene_Tactics. You can select characters in your party based on my party size and change variables associated to them. Then you can use those variables to determine how they should be acting during let's say an abs.

I'm sorry ahead of time if I wasn't supposed to bump this, but I just wanted an experienced script to review it if they have time.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top