KA-terpillar + Settings
#1
KA-terpillar v 1.1.1
+ Settings Menu + Save/End Menu Mod

by Kyonides-Arkanthos



Features

This plug and play script lets you see the other 3 party members on screen like other scripts do but also lets you change the current party formation by shifting the first member to the last position or the last one to the first position or it shifts them semi-randomly for you. You can check its simple menu to change the settings at any time, it even includes dummy characters so you can check out what are the changes that you want to apply to your team.

You may also pick one of its current 3 formations or characters' alignments (Caterpillar, T-Formation, X or Cross Formation).

Instructions

Paste these scripts below the second to last default script in the same order as found here and pay close attention to the Constants just in case you really want to change any settings.

Since version 1.1.1 there are 2 new script calls you may want to use during gameplay. If you need to separate the leader from his or her team during gameplay the way Breath of Fire 1 did every single time you visited a Dragon Shrine. Do not fear, fellow adventurers, there is another script call to reunite them after the leader passed or failed the test. Check out the comments included on my script.

Scripts

KA-terpillar
Code:
#  KA-terpillar
#  v 1.1.1 - 2014-06-04
#  Scripter : Kyonides-Arkanthos

#  Optional Script Calls - Inspired by Breath of Fire 1

#  $game_player.go_alone
#  Makes the leader leave the party behind

#  $game_player.team_up
#  All party members are included in your team once again

module KAterpillar
  # ALL PARTY MEMBERS VISIBLE
  VISIBLE = true
  FORMATION_BUTTON = Input::L
  # PARTY FORMATION CYCLE MODES - 0 : 4 to 1,  1 : 1 to 4,  2 : random mode
  FORMATION_CYCLE = 0
  # MODES - 0 : Straight Line, 1 : T-Formation, 2 : X-Formation
  FORMATION_MODE = 0
  # DO NOT EDIT ANY OF THE FOLLOWING TWO HASHES
  T_POSITIONS = { 2 => {}, 4 => {}, 6 => {}, 8 => {} }
  X_POSITIONS = { 2 => {}, 4 => {}, 6 => {}, 8 => {} }
  # T-Formation Coordinates
  T_POSITIONS[2][:x] = [0, 1, 0, -1]
  T_POSITIONS[2][:y] = [0, -1, -1, -1]
  T_POSITIONS[4][:x] = [0, 1, 1, 1]
  T_POSITIONS[4][:y] = [0, -1, 0, 1]
  T_POSITIONS[6][:x] = [0, -1, -1, -1]
  T_POSITIONS[6][:y] = [0, -1, 0, 1]
  T_POSITIONS[8][:x] = [0, 1, 0, -1]
  T_POSITIONS[8][:y] = [0, 1, 1, 1]
  # X or Cross Formation Coordinates
  X_POSITIONS[2][:x] = [0, 1, 0, -1]
  X_POSITIONS[2][:y] = [0, -1, -2, -1]
  X_POSITIONS[4][:x] = [0, 1, 2, 1]
  X_POSITIONS[4][:y] = [0, -1, 0, 1]
  X_POSITIONS[6][:x] = [0, -1, -2, -1]
  X_POSITIONS[6][:y] = [0, -1, 0, 1]
  X_POSITIONS[8][:x] = [0, 1, 0, -1]
  X_POSITIONS[8][:y] = [0, 1, 2, 1]
end

class Game_Party
  attr_accessor :actors_visible, :default_cycle, :formation_mode
  alias kyon_katerpillar_gm_party_init initialize
  def initialize
    @actors_visible = KAterpillar::VISIBLE
    @default_cycle = KAterpillar::FORMATION_CYCLE
    @formation_mode = KAterpillar::FORMATION_MODE
    kyon_katerpillar_gm_party_init
  end

  def update_current_team
    case @default_cycle
    when 0
      @actors.unshift @actors.pop
    when 1
      @actors << @actors.shift
    when 2
      max = @actors.size - 1
      max.times { @actors.insert(rand(max + 1), @actors.shift) }
    end
    $game_player.refresh
  end

  def leader_only
    return if @actors.size < 2
    @other_actors = @actors[1..-1].clone
    @actors = [@actors[0]]
  end

  def whole_group
    return if @other_actors.nil?
    @actors = @actors + @other_actors.clone
    @other_actors = nil
  end
end

class Game_Teammate < Game_Character
  @@center_x = 304 * 4
  @@center_y = 224 * 4
  attr_writer :character_name, :character_hue, :opacity, :blend_type
  attr_writer :pos, :through, :step_anime, :dummy_mode
  alias kyon_katerpillar_gm_teammate_init initialize
  def initialize
    kyon_katerpillar_gm_teammate_init
    @transparent = !$game_party.actors_visible
    @dummy_mode = false
  end

  def next_position_t_formation(coord, index)
    return KAterpillar::T_POSITIONS[@direction][coord][index]
  end

  def next_position_x_formation(coord, index)
    return KAterpillar::X_POSITIONS[@direction][coord][index]
  end

  def show(bool, actor=nil)
    @transparent = !bool
    refresh(actor)
  end

  def refresh(actor=nil)
    actor = $game_party.actors[@pos] if !actor
    invisible = (actor.nil? or @transparent)
    @character_name = invisible ? '' : actor.character_name
    @character_hue = invisible ? 0 : actor.character_hue
    return if invisible
    @opacity = 255
    @blend_type = 0
  end

  def moveto(x, y)
    if $game_party.formation_mode > 0
      @pos = 0 if @pos.nil?
      pos = @pos
    end
    if $game_party.formation_mode == 1
      temp_x = x + next_position_t_formation(:x, pos)
      temp_y = y + next_position_t_formation(:y, pos)
      pos = 2 if !passable?(temp_x, temp_y, @direction)
      x += next_position_t_formation(:x, pos)
      y += next_position_t_formation(:y, pos)
    elsif $game_party.formation_mode == 2
      temp_x = x + next_position_x_formation(:x, pos)
      temp_y = y + next_position_x_formation(:y, pos)
      if !passable?(temp_x, temp_y, @direction)
        pos = 2
        x += next_position_t_formation(:x, pos)
        y += next_position_t_formation(:y, pos)
      else
        x += next_position_x_formation(:x, pos)
        y += next_position_x_formation(:y, pos)
      end
    end
    @x = x % $game_map.width
    @y = y % $game_map.height
    @real_x = @x * 128
    @real_y = @y * 128
    @prelock_direction = 0
    center(x, y)
  end

  def center(x, y)
    max_x = ($game_map.width - 20) * 128
    max_y = ($game_map.height - 15) * 128
    $game_map.display_x = [0, [x * 128 - @@center_x, max_x].min].max
    $game_map.display_y = [0, [y * 128 - @@center_y, max_y].min].max
  end

  def update
    unless @dummy_mode
      last_moving = moving?
      unless moving? or $game_system.map_interpreter.running? or
           @move_route_forcing or $game_temp.message_window_showing
        if $game_party.formation_mode == 0
        # If player's last direction exists, move teammate to his previous
        # coordinates - straight line formation
          update_first_formation if $game_player.last_dir[@pos]
        elsif $game_party.formation_mode == 1
          update_second_formation
        elsif $game_party.formation_mode == 2
          update_third_formation
        end
        @stop_count = 0
      end if $game_player.moving?
      if $game_party.formation_mode == 0
        update_first_formation
        @stop_count = 0
      elsif $game_party.formation_mode == 1
        update_second_formation
        @stop_count = 0
      elsif $game_party.formation_mode == 2
        update_third_formation
        @stop_count = 0
      end
      last_real_x = @real_x
      last_real_y = @real_y
    end
    super
  end
  # Update Straight Line Formation
  def update_first_formation
    return if $game_player.last_dir[@pos].nil?
    @direction = $game_player.last_dir[@pos]
    @x = $game_player.last_x[@pos]
    @y = $game_player.last_y[@pos]
  end
  # Update T-Formation
  def update_second_formation
    @direction = $game_player.last_dir[0]
    pos = @pos
    x, x2 = $game_player.last_x[0..1]
    y, y2 = $game_player.last_y[0..1]
    x2 = x if $game_player.last_x[1].nil?
    y2 = y if $game_player.last_y[1].nil?
    temp_x = x + next_position_t_formation(:x, pos)
    temp_y = y + next_position_t_formation(:y, pos)
    temp_x2 = x2 + next_position_t_formation(:x, pos)
    temp_y2 = y2 + next_position_t_formation(:y, pos)
    if !passable?(temp_x, temp_y, @direction) or
        !passable?(temp_x2, temp_y2, @direction)
      pos = 2
    end
    @x = x + next_position_t_formation(:x, pos)
    @y = y + next_position_t_formation(:y, pos)
  end
  # Update X-Formation
  def update_third_formation
    @direction = $game_player.last_dir[0]
    pos = @pos
    x, x2 = $game_player.last_x[0..1]
    y, y2 = $game_player.last_y[0..1]
    x2 = x if $game_player.last_x[1].nil?
    y2 = y if $game_player.last_y[1].nil?
    temp_x = x + next_position_x_formation(:x, pos)
    temp_y = y + next_position_x_formation(:y, pos)
    temp_x2 = x2 + next_position_x_formation(:x, pos)
    temp_y2 = y2 + next_position_x_formation(:y, pos)
    if !passable?(temp_x, temp_y, @direction) or
        !passable?(temp_x2, temp_y2, @direction)
      pos = 2
      x += next_position_t_formation(:x, pos)
      y += next_position_t_formation(:y, pos)
    else
      x += next_position_x_formation(:x, pos)
      y += next_position_x_formation(:y, pos)
    end
    @x = x
    @y = y
  end
end

class Game_Event
  attr_writer :list
end

class Game_Player
  attr_reader :teammates, :last_dir, :last_x, :last_y
  alias kyon_katerpillar_gm_player_init initialize
  alias kyon_katerpillar_gm_player_refresh refresh
  alias kyon_katerpillar_gm_player_moveto moveto
  def initialize
    kyon_katerpillar_gm_player_init
    @last_dir = []
    @last_x = []
    @last_y = []
    @teammates = [Game_Teammate.new, Game_Teammate.new, Game_Teammate.new]
    3.times {|n| @teammates[n].pos = n + 1 }
  end

  def clear_previous_movements
    @last_dir.clear
    @last_x.clear
    @last_y.clear
  end

  def go_alone
    clear_previous_movements
    size = $game_party.actors.size - 1
    size.times {|n| mate = @teammates[n].dummy_mode = true }
    $game_party.leader_only
  end

  def team_up
    clear_previous_movements
    $game_party.whole_group
    size = $game_party.actors.size - 1
    size.times {|n| mate = @teammates[n].dummy_mode = false }
  end

  def refresh
    kyon_katerpillar_gm_player_refresh
    return if $game_party.actors.size < 2
    size = $game_party.actors.size - 1
    size.times {|n| mate = @teammates[n].refresh }
  end

  def moveto(x, y)
    kyon_katerpillar_gm_player_moveto(x, y)
    update_last_xy(x, y)
    return if $game_party.actors.size < 2
    size = $game_party.actors.size - 1
    size.times{|n| @teammates[n].moveto(x, y) }
  end

  def update_last_xy(x, y)
    return if @last_x[0] == x and @last_y[0] == y
    @last_dir.unshift @direction
    @last_dir.delete_at 4
    @last_x.unshift x
    @last_x.delete_at 4
    @last_y.unshift y
    @last_y.delete_at 4
  end

  def update
    last_moving = moving?
    unless moving? or $game_system.map_interpreter.running? or
           @move_route_forcing or $game_temp.message_window_showing
      case Input.dir4
      when 2
        move_down
      when 4
        move_left
      when 6
        move_right
      when 8
        move_up
      end
      # Store future teammates's x and y coordinates
      update_last_xy(@x, @y)
    end
    last_real_x = @real_x
    last_real_y = @real_y
    super
    if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y
      $game_map.scroll_down(@real_y - last_real_y)
    end
    if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X
      $game_map.scroll_left(last_real_x - @real_x)
    end
    if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X
      $game_map.scroll_right(@real_x - last_real_x)
    end
    if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y
      $game_map.scroll_up(last_real_y - @real_y)
    end
    return if moving?
    if last_moving
      result = check_event_trigger_here([1,2])
      if !result
        unless $DEBUG and Input.press?(Input::CTRL)
          @encounter_count -= 1 if @encounter_count > 0
        end
      end
    end
    if Input.trigger?(Input::C)
      check_event_trigger_here([0])
      check_event_trigger_there([0,1,2])
    elsif Input.trigger?(KAterpillar::FORMATION_BUTTON)
      $game_party.update_current_team
    end
  end
end

class Spriteset_Map
  def initialize
    @viewport1 = Viewport.new(0, 0, 640, 480)
    @viewport2 = Viewport.new(0, 0, 640, 480)
    @viewport3 = Viewport.new(0, 0, 640, 480)
    @viewport2.z = 200
    @viewport3.z = 5000
    @tilemap = Tilemap.new(@viewport1)
    @tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
    for i in 0..6
      autotile_name = $game_map.autotile_names[i]
      @tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
    end
    @tilemap.map_data = $game_map.data
    @tilemap.priorities = $game_map.priorities
    @panorama = Plane.new(@viewport1)
    @panorama.z = -1000
    @fog = Plane.new(@viewport1)
    @fog.z = 3000
    @character_sprites = []
    for i in $game_map.events.keys.sort
      sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
      @character_sprites << sprite
    end
    for teammate in $game_player.teammates.reverse
      @character_sprites << Sprite_Character.new(@viewport1, teammate)
    end
    @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
    @weather = RPG::Weather.new(@viewport1)
    @picture_sprites = []
    for i in 1..50
      @picture_sprites.push(Sprite_Picture.new(@viewport2,
        $game_screen.pictures[i]))
    end
    @timer_sprite = Sprite_Timer.new
    update
  end
end

class Scene_Map
  def update
    loop do
      $game_map.update
      $game_system.map_interpreter.update
      $game_player.update
      $game_player.teammates[0].update
      $game_player.teammates[1].update
      $game_player.teammates[2].update
      $game_system.update
      $game_screen.update
      break unless $game_temp.player_transferring
      transfer_player
      break if $game_temp.transition_processing
    end
    @spriteset.update
    @message_window.update
    if $game_temp.gameover
      $scene = Scene_Gameover.new
      return
    end
    if $game_temp.to_title
      $scene = Scene_Title.new
      return
    end
    if $game_temp.transition_processing
      $game_temp.transition_processing = false
      if $game_temp.transition_name == ""
        Graphics.transition(20)
      else
        Graphics.transition(40, "Graphics/Transitions/" +
          $game_temp.transition_name)
      end
    end
    return if $game_temp.message_window_showing
    if $game_player.encounter_count == 0 and $game_map.encounter_list != []
      unless $game_system.map_interpreter.running? or
             $game_system.encounter_disabled
        n = rand($game_map.encounter_list.size)
        troop_id = $game_map.encounter_list[n]
        if $data_troops[troop_id] != nil
          $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 Input.trigger?(Input::B)
      unless $game_system.map_interpreter.running? or
             $game_system.menu_disabled
        $game_temp.menu_calling = true
        $game_temp.menu_beep = true
      end
    end
    if $DEBUG and Input.press?(Input::F9)
      $game_temp.debug_calling = true
    end
    return if $game_player.moving?
    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

  def transfer_player
    $game_temp.player_transferring = false
    if $game_map.map_id != $game_temp.player_new_map_id
      $game_map.setup($game_temp.player_new_map_id)
    end
    x = $game_temp.player_new_x
    y = $game_temp.player_new_y
    dir = $game_temp.player_new_direction
    dir = $game_player.direction if dir == 0
    formation_1 = $game_party.actors_visible and $game_party.formation_mode == 1
    if formation_1
      x += (dir == 4 ? -1 : dir == 6 ? 1 : 0)
      y += (dir == 2 ? -1 : dir == 8 ? 1 : 0)
    end
    $game_player.clear_previous_movements
    $game_player.moveto(x, y)
    $game_player.teammates.each {|mate| mate.moveto(x, y) }
    case $game_temp.player_new_direction
    when 2  # down
      $game_player.turn_down
      $game_player.teammates.each {|mate| mate.turn_down }
    when 4  # left
      $game_player.turn_left
      $game_player.teammates.each {|mate| mate.turn_left }
    when 6  # right
      $game_player.turn_right
      $game_player.teammates.each {|mate| mate.turn_right }
    when 8  # up
      $game_player.turn_up
      $game_player.teammates.each {|mate| mate.turn_up }
    end
    $game_player.straighten
    $game_player.teammates.each {|mate| mate.straighten }
    $game_map.update
    @spriteset.dispose
    @spriteset = Spriteset_Map.new
    if $game_temp.transition_processing
      $game_temp.transition_processing = false
      Graphics.transition(20)
    end
    $game_map.autoplay
    Graphics.frame_reset
    Input.update
  end
end

Settings Menu
Code:
#  KA-terpillar Settings Menu
#  + Save / End Game Menu
#  v 1.1 - 2014-05-22
#  Scripter : Kyonides-Arkanthos

module KAterpillar
  # SETTINGS WINDOWS STRINGS
  # HEROES VISIBLE? STRING
  STRINGS = ['All Heroes Visible?']
  # FORMATION CYCLE MODES STRING
  STRINGS[1] = 'Formation Cycle Mode'
  # FORMATION MODES STRING
  STRINGS[2] = 'Formation Mode'
  # HEROES VISIBLE? OPTIONS STRING
  STRINGS[3] = ['YES','NO']
  # FORMATION CYCLE MODES OPTIONS STRING
  STRINGS[4] = ['4 >> 1','1 >> 4','RANDOM']
  # FORMATION MODES OPTIONS STRING
  STRINGS[5] = ['S. Line','T-Form','X-Form']
end

class Window_SaveFile
  def check_savefile
    @file_exist = FileTest.exist?(@filename)
    return unless @file_exist
    file = File.open(@filename, "r")
    @time_stamp = file.mtime
    @characters = Marshal.load(file)
    @frame_count = Marshal.load(file)
    @game_system = Marshal.load(file)
    @game_switches = Marshal.load(file)
    @game_variables = Marshal.load(file)
    @total_sec = @frame_count / Graphics.frame_rate
    file.close
    refresh
  end
end

class Window_SetupCommand < Window_Selectable
  def initialize(commands)
    super(0, 0, 480, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.back_opacity = 0
    @commands = commands
    @item_max = commands.size
    @column_max = @item_max
    @item_max.times {|n| draw_item(n) }
    self.active = true
    self.visible = true
    self.index = 0
  end

  def draw_item(index)
    self.contents.font.size = 18
    self.contents.font.color = normal_color
    rect = Rect.new(index * 112, 0, 112, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index], 1)
  end

  def update_cursor_rect
    self.cursor_rect.set(0 + index * 118, 0, 92, 32)
  end
end

class Spriteset_Settings
  def initialize
    @wait_count = 20
    @default_cycle = $game_party.default_cycle
    @actors = $game_party.actors.dup
    @teammates = []
    @visible = $game_party.actors_visible
    size = $game_party.actors.size
    size.times {|n| @teammates << Game_Teammate.new
      @teammates[n].show(n == 0 ? true : @visible, @actors[n])
      @teammates[n].dummy_mode = true
      @teammates[n].step_anime = true }
    @teammates[0].moveto(2, 8)
    update_formation_mode($game_party.formation_mode)
    @viewport1 = Viewport.new(0, 0, 160, 480)
    @character_sprites = []
    for char in @teammates.reverse
      @character_sprites << Sprite_Character.new(@viewport1, char)
    end
    update
  end

  def update
    @character_sprites.each {|sprite| sprite.character.update; sprite.update }
    @viewport1.update
    if @wait_count > 0
      @wait_count -= 1
      return
    elsif @wait_count == 0
      @wait_count = 80
      update_formation_cycle
    end
  end

  def update_visible(visible)
    @visible = visible
    1.upto(@actors.size - 1) {|n| @teammates[n].show(@visible, @actors[n]) }
  end

  def update_default_cycle(cycle)
    @default_cycle = cycle
    @wait_count = 80
    update_formation_cycle
  end

  def update_formation_cycle
    return unless @visible
    case @default_cycle
    when 0
      @actors.unshift @actors.pop
    when 1
      @actors << @actors.shift
    when 2
      max = @actors.size - 1
      max.times { @actors.insert(rand(max + 1), @actors.shift) }
    end
    @actors.size.times {|n| @teammates[n].refresh(@actors[n]) }
  end

  def update_formation_mode(mode)
    @formation_mode = mode
    if mode == 0
      1.upto(@actors.size - 1) {|n| @teammates[n].moveto(2, 8 - (n * 1.5)) }
    else
      ox = @teammates[0].x
      oy = @teammates[0].y
      if mode == 1
        x = KAterpillar::T_POSITIONS[2][:x]
        y = KAterpillar::T_POSITIONS[2][:y]
      elsif mode == 2
        x = KAterpillar::X_POSITIONS[2][:x]
        y = KAterpillar::X_POSITIONS[2][:y]
      end
      1.upto(@actors.size - 1) {|n| @teammates[n].moveto(ox + x[n], oy + y[n]) }
    end
  end

  def dispose
    @character_sprites.each {|sprite| sprite.bitmap.dispose; sprite.dispose }
    @character_sprites.clear
    @teammates.clear
    @actors.clear
    @character_sprites = @teammates = @actors = nil
    @viewport1.dispose
    @wait_count = @visible = @default_cycle = @formation_mode = nil
  end
end

class Scene_KAterpillarSettings
  def main
    @spriteset = Spriteset_Settings.new
    @label_window = Window_Base.new(160, 0, 480, 480)
    contents = @label_window.contents = Bitmap.new(448, 448)
    contents.draw_text(0, 0, 448, 28, KAterpillar::STRINGS[0])
    contents.draw_text(0, 0, 448, 174, KAterpillar::STRINGS[1])
    contents.draw_text(0, 0, 448, 320, KAterpillar::STRINGS[2])
    @command_windows = []
    @command_windows << Window_SetupCommand.new(KAterpillar::STRINGS[3])
    @command_windows[-1].x = 160
    @command_windows[-1].y = 34
    @command_windows[-1].z = @label_window.z - 1
    @command_windows[-1].index = $game_party.actors_visible ? 0 : 1
    @command_windows << Window_SetupCommand.new(KAterpillar::STRINGS[4])
    @command_windows[-1].x = 160
    @command_windows[-1].y = 108
    @command_windows[-1].z = @label_window.z - 1
    @command_windows[-1].active = nil
    @command_windows[-1].index = $game_party.default_cycle
    @command_windows << Window_SetupCommand.new(KAterpillar::STRINGS[5])
    @command_windows[-1].x = 160
    @command_windows[-1].y = 182
    @command_windows[-1].z = @label_window.z - 1
    @command_windows[-1].active = nil
    @command_windows[-1].index = $game_party.formation_mode
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      break if $scene != self
    end
    Graphics.freeze
    @command_windows.each {|cw| cw.dispose }
    @command_windows.clear
    @command_windows = nil
    @label_window.dispose
    @spriteset.dispose
  end

  def update
    @spriteset.update
    @command_windows.each {|cw| cw.update }
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      update_settings
      $scene = Scene_Menu.new(4)
      return
    elsif Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      update_settings    
      return
    end
    if @command_windows[0].active
      update_visible
      return
    elsif @command_windows[1].active
      update_cycle_mode
      return
    elsif @command_windows[2].active
      update_formation_mode
      return
    end
  end

  def update_visible
    if Input.trigger?(Input::LEFT) or Input.trigger?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      @spriteset.update_visible(@command_windows[0].index == 0)
      return
    elsif Input.trigger?(Input::UP)
      $game_system.se_play($data_system.cursor_se)
      @command_windows[0].active = nil
      @command_windows[2].active = true
    elsif Input.trigger?(Input::DOWN)
      $game_system.se_play($data_system.cursor_se)
      @command_windows[0].active = nil
      @command_windows[1].active = true
    end
  end

  def update_cycle_mode
    if Input.trigger?(Input::LEFT) or Input.trigger?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      @spriteset.update_default_cycle(@command_windows[1].index)
      return
    elsif Input.trigger?(Input::UP)
      $game_system.se_play($data_system.cursor_se)
      @command_windows[1].active = nil
      @command_windows[0].active = true
      return
    elsif Input.trigger?(Input::DOWN)
      $game_system.se_play($data_system.cursor_se)
      @command_windows[1].active = nil
      @command_windows[2].active = true
    end
  end

  def update_formation_mode
    if Input.trigger?(Input::LEFT) or Input.trigger?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      @spriteset.update_formation_mode(@command_windows[2].index)
      return
    elsif Input.trigger?(Input::UP)
      $game_system.se_play($data_system.cursor_se)
      @command_windows[2].active = nil
      @command_windows[1].active = true
    elsif Input.trigger?(Input::DOWN)
      $game_system.se_play($data_system.cursor_se)
      @command_windows[2].active = nil
      @command_windows[0].active = true
    end
  end

  def update_settings
    $game_party.actors_visible = @command_windows[0].index == 0
    $game_party.default_cycle = @command_windows[1].index
    $game_party.formation_mode = mode = @command_windows[2].index
    visible = $game_party.actors_visible
    $game_player.teammates.each {|tm| tm.show(visible)
      tm.moveto($game_player.x, $game_player.y) if mode == 0 }
  end
end

class Scene_Menu
  def main
    # Make command window and add different option strings
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Settings"
    s6 = "End & Save"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    if $game_party.actors.size == 0
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    @command_window.disable_item(4) if $game_system.save_disabled
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 0
    @playtime_window.y = 224
    @steps_window = Window_Steps.new
    @steps_window.x = 0
    @steps_window.y = 320
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 416
    @status_window = Window_MenuStatus.new
    @status_window.x = 160
    @status_window.y = 0
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @playtime_window.dispose
    @steps_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end

  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    elsif Input.trigger?(Input::C)
      if $game_party.actors.size == 0 and @command_window.index < 4
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0  # item
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Item.new
      when 1  # skill
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # settings
        $game_system.se_play($data_system.decision_se)
        # Switch to settings screen
        $scene = Scene_KAterpillarSettings.new
      when 5  # save
        if $game_system.save_disabled
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Save.new
      end
      return
    end
  end
end

class Scene_Save
  alias kyon_save_end_mod_scn_save_main main
  alias kyon_save_end_mod_scn_save_up update
  def main
    @wait_count = 0
    commands = ["To Main Menu", "To Title", "Shutdown"]
    @command_window = Window_Command.new(192, commands)
    @command_window.active = @command_window.visible = nil
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 240 - @command_window.height / 2
    @command_window.z = 2000
    commands.clear
    kyon_save_end_mod_scn_save_main
    @command_window.dispose
  end

  def on_decision(filename)
    $game_system.se_play($data_system.save_se)
    file = File.open(filename, "wb")
    write_save_data(file)
    file.close
    if $game_temp.save_calling
      $game_temp.save_calling = false
      $scene = Scene_Map.new
      return
    end
    @savefile_windows[@file_index].check_savefile
    @command_window.active = @command_window.visible = true
  end

  def on_cancel
    $game_system.se_play($data_system.cancel_se)
    if $game_temp.save_calling
      $game_temp.save_calling = false
      $scene = Scene_Map.new
      return
    end
    @command_window.active = @command_window.visible = true
  end

  def update
    if @command_window.active
      update_command
      return
    end
    kyon_save_end_mod_scn_save_up
  end

  def update_command
    @command_window.update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(5)
      return
    elsif Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      case @command_window.index
      when 0 # Main Menu
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Menu.new(5)
        return
      when 1 # Title
        $game_system.se_play($data_system.decision_se)
        Audio.bgm_fade(800)
        Audio.bgs_fade(800)
        Audio.me_fade(800)
        $scene = Scene_Title.new
        return
      when 2 # Shutdown
        $game_system.se_play($data_system.decision_se)
        Audio.bgm_fade(800)
        Audio.bgs_fade(800)
        Audio.me_fade(800)
        $scene = nil
      end
    end
  end
end

Credits

Don't forget to mention my name! Remember these scripts are not available for commercial games.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }
#2
BUMP!

Version 1.1.0 is now available for all board members. Now the caterpillar character alignment is just one of 3 possible modes available on this version of my scripts.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }
#3
BUMP!

Version 1.1.1 is now available for all board members. Now the script allows you to separate the leader from his or her team at any time and make him come back just like it happened in Breath of Fire 1 while being at a Dragon Shrine. Obviously you would need to make sure you created an event that would block the pass. Sadly it doesn't check who is the one entitle to become a dragon or anything like that but that can be easily done with the good use of a few event commands.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Audio Settings EJlol 1 6,533 07-03-2012, 09:36 PM
Last Post: Erechel
   Window_PlayTime + Day & Night Settings kyonides 0 4,964 03-08-2008, 04:09 AM
Last Post: kyonides



Users browsing this thread: 2 Guest(s)