Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Final Fantasy III Menu Style
#1
Final Fantasy III Menu Style
By Zero Maverick Hunter aka DragonKnigth
Sept 7, 2007

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Ok. Here it goes the second Script I`ve ever made on my life. So, just see and tell me what you think. The Instructions are in it and I must remember you this is not the updated version it`s the first released version...
Script FF3 Menu Style:

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

# Final Fantay III Menu Style
#-------------------------------------------------------------------------------
# - By Zero Maverick Hunter -
# - Created - 20 / 08 / 2007 -
# - Based on FF3 Real Menu -
#===============================================================================

#
# Intructions:
#
# 1. - Need faces 80 x 80 pixels in the "Picture Folder" of each character with
#      this code:
#        Example ==> Z001-Fighter01
#                ==> "Z" + "Player Battler Name"*
#
#        *(This could be seen in the Battlers or Characters Folder)
#
#===============================================================================


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

# Window_Base
#-------------------------------------------------------------------------------
# Adding Faces to the Menu and applying some changes
#===============================================================================


class Window_Base < Window

  def ff3_color
    return Color.new(50, 230, 255, 255)
  end

  def draw_actor_face(actor, x, y)
    face = RPG::Cache.picture("Z" + actor.character_name)
    fw = face.width
    fh = face.height
    src_rect = Rect.new(0, 0, fw, fh)
    self.contents.blt(x - fw / 23, y - fh, face, src_rect)
  end

  def draw_actor_level(actor, x, y)
    self.contents.font.color = ff3_color
    self.contents.draw_text(x, y, 32, 32, "Lv")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 80, y, 24, 32, actor.level.to_s, 2)
  end

  def draw_actor_hp(actor, x, y, width = 144)
    self.contents.font.color = ff3_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
    if width - 32 >= 108
      hp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      hp_x = x + width - 48
      flag = false
    end
    self.contents.font.color = actor.hp == 0 ? knockout_color :
      actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
    self.contents.draw_text(hp_x + 20, y, 48, 32, actor.hp.to_s, 2)
    if flag
      self.contents.font.color = normal_color
      self.contents.draw_text(hp_x + 68, y, 12, 32, "/", 1)
      self.contents.draw_text(hp_x + 115, y, 48, 32, actor.maxhp.to_s)
    end
  end

  def draw_actor_sp(actor, x, y, width = 144)
    self.contents.font.color = ff3_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
    if width - 32 >= 108
      sp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      sp_x = x + width - 48
      flag = false
    end
    self.contents.font.color = actor.sp == 0 ? knockout_color :
      actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
    self.contents.draw_text(sp_x + 20, y, 48, 32, actor.sp.to_s, 2)
    if flag
      self.contents.font.color = normal_color
      self.contents.draw_text(sp_x + 68, y, 12, 32, "/", 1)
      self.contents.draw_text(sp_x + 115, y, 48, 32, actor.maxsp.to_s)
    end
  end
end

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

# Window_Stats
#-------------------------------------------------------------------------------
# This Window shows the party Money and Steps
#===============================================================================


class Window_FF3_Stats < Window_Base

  def initialize
    super(0, 0, 135, 127)
    self.contents = Bitmap.new(width - 32, height - 32)
        self.contents.font.name = "Verdana"
    self.contents.font.size = 17
    refresh
  end

  def refresh
    self.contents.clear
    self.contents.clear
    self.contents.font.color = ff3_color
    self.contents.draw_text(2, -8, 120, 32, "Steps")
    self.contents.font.color = normal_color
    self.contents.draw_text(-20, 20, 120, 32, $game_party.steps.to_s, 2)

    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 67, 120-cx-2, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = ff3_color
    self.contents.draw_text(2, 42, cx, 32, $data_system.words.gold, 2)
  end
end

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

# Window_FF3_PlayTime
#-------------------------------------------------------------------------------
# This Window shows the Played Time, just minutes and hours
#===============================================================================


class Window_FF3_PlayTime < Window_Base

  def initialize
    super(0, 0, 120, 97)
    self.contents = Bitmap.new(width - 32, height - 32)
        self.contents.font.name = "Verdana"
    self.contents.font.size = 17
    refresh
  end

  def refresh
    self.contents.clear
    self.contents.font.color = ff3_color
    self.contents.draw_text(4, 0, 120, 24, "Time")
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%2d:%02d", hour, min)
    self.contents.font.color = normal_color
    self.contents.draw_text(-38, 38, 120, 24, text, 2)
  end

  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end

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

# Window_MenuStatus
#-------------------------------------------------------------------------------
# Writes part of the actors status
#===============================================================================


class Window_FF3_MenuStatus < Window_Selectable

  def initialize
    super(0, 0, 545, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Verdana"
    self.contents.font.size = 17
    refresh
    self.active = false
    self.index = -1
  end

  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 94
      y = i * 114
      actor = $game_party.actors[i]
      draw_actor_face(actor, 7, y + 104)
      draw_actor_name(actor, x + 30, y)
      draw_actor_level(actor, x + 50, y + 33)
      draw_actor_hp(actor, x + 50, y + 50)
      draw_actor_sp(actor, x + 50, y + 67)
    end
  end

  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(-3, @index * 114, self.width - 150, 107)
    end
  end
end

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

# FF3 Menu Style
#-------------------------------------------------------------------------------
# Combine multiple kind of Windows to make the Scene_Menu like in FF3
#===============================================================================


class Scene_Menu

  def initialize(menu_index = 0, order_index = 0)
    @menu_index = menu_index
    @order_index = order_index
    @changer = 0
    @where = 0
    @checker = 0
  end
  
  def main
    s1 = "   Items"
    s2 = "   Magic"
    s3 = "   Equip"
    s4 = "   Status"
    s5 = "   Save"
    @command_window = Window_Command.new(120, [s1, s2, s3, s4, s5])
    @command_window.x = 475
    @command_window.y = 0
    @command_window.z = 110
    @command_window.index = @menu_index
    @command_window.opacity = 255

    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
    if $game_system.save_disabled
      @command_window.disable_item(4)
    end

    u1 = "  Order"
    @order_window = Window_Command.new(110, [u1])
    @order_window.x = 0
    @order_window.y = 0
    @order_window.index = @order_index
    @order_window.opacity = 255
    @order_window.active = false
    @order_window.visible = false

    if $game_party.actors.size == 1
      @order_window.disable_item(0)
    end

    @status_window = Window_FF3_MenuStatus.new
    @status_window.x = 50
    @status_window.y = 0
    @status_window.opacity = 255

    @time_window = Window_FF3_PlayTime.new
    @time_window.x = 475
    @time_window.y = 256
    @time_window.z = 110
    @time_window.opacity = 255

    @stats_window = Window_FF3_Stats.new
    @stats_window.x = 460
    @stats_window.y = 353
    @stats_window.z = 110
    @stats_window.opacity = 255

    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @order_window.dispose
    @status_window.dispose
    @time_window.dispose
    @stats_window.dispose
  end

  def update
    @time_window.update
    @stats_window.update
    @command_window.update
    if @command_window.active
      update_command
      return
    end
    @order_window.update
    if @order_window.active
      update_order
      return
    end
    @status_window.update
    if @status_window.active
      update_status
      return
    end
  end
    
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::LEFT)
      $game_system.se_play($data_system.decision_se)
      @command_window.active = false
      @command_window.visible = false
      @time_window.visible = false
      @stats_window.visible = false
      @status_window.x = 110
      @order_window.visible = true
      @order_window.active = true
      return
    end
    if 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
      if $game_party.actors.size == 1 and @command_window.index == 5
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Item.new
      when 1
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4
        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

  def update_order
    if Input.trigger?(Input::RIGHT)
      $game_system.se_play($data_system.cancel_se)
      @order_window.active = false
      @order_window.visible = false
      @command_window.visible = true
      @time_window.visible = true
      @stats_window.visible = true
      @status_window.x = 50
      @command_window.active = true
      return
    end
    if Input.trigger?(Input::C)
      if $game_party.actors.size == 1
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      $game_system.se_play($data_system.decision_se)
      @checker = 0
      @order_window.active = false
      @status_window.active = true
      @status_window.index = 0
      return
    end
  end

  def update_status
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      if @command_window.visible
        @command_window.active = true
        @status_window.active = false
        @status_window.index = -1
      end
      if @order_window.visible
        @status_window.active = false
        @order_window.active = true
        @status_window.index = -1
      end
      return
    end
    if Input.trigger?(Input::C)
      if @command_window.visible
        case @command_window.index
        when 1
          if $game_party.actors[@status_window.index].restriction >= 2
            $game_system.se_play($data_system.buzzer_se)
            return
          end
          $game_system.se_play($data_system.decision_se)
          $scene = Scene_Skill.new(@status_window.index)
        when 2
          $game_system.se_play($data_system.decision_se)
          $scene = Scene_Equip.new(@status_window.index)
        when 3
          $game_system.se_play($data_system.decision_se)
          $scene = Scene_Status.new(@status_window.index)
        end
      end
      if @order_window.visible
        case @order_window.index
        when 0
          $game_system.se_play($data_system.decision_se)
          if @checker == 0
            @changer = $game_party.actors[@status_window.index]
            @where = @status_window.index
            @checker = 1
          else
            $game_party.actors[@where] = $game_party.actors[@status_window.index]
            $game_party.actors[@status_window.index] = @changer
            @checker = 0
            @status_window.refresh
          end
        end
      end
      return
    end
  end
end


Enjoy it for now...


PS: (Edites) Sorry dudes, I didn`t see I`ve put the instructions in Spanish, now, I`ve fixed it... Ah, yeah, about the "print the warning instruction", I want people to read instructions and make its own players faces. It`s not because I´m a bad person it`s because I want people to learn how to search for things they want by themselves... (I don`t know if you understood, nut it`s the point)...
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  FF7 style menu system Narc the Jester 0 2,489 05-04-2010, 01:00 PM
Last Post: Narc the Jester
  L's Custom Menu Scenes Landarma 0 2,434 02-27-2009, 01:00 PM
Last Post: Landarma
  Advanced Menu Screen Kanon 1 3,150 11-21-2008, 01:00 PM
Last Post: Kanon
  Legend of dragoon type Equipment Menu Genshyu 0 2,353 09-02-2008, 01:00 PM
Last Post: Genshyu
  SilentSteps Menu System Silentwalker 0 1,973 06-17-2007, 01:00 PM
Last Post: Silentwalker
  Ring Menu for SDK2 Landarma 0 2,776 06-01-2007, 01:00 PM
Last Post: Landarma
  Variable Image Menu Chrono Cry 0 1,994 04-25-2007, 01:00 PM
Last Post: Chrono Cry
  Ztorm's Speed Menu ztorm 0 2,318 01-21-2007, 01:00 PM
Last Post: ztorm
  Kingdom Hearts Menu Leon Blade 0 2,362 12-29-2006, 01:00 PM
Last Post: Leon Blade
  Castlevania Menu Sheol 0 2,136 09-04-2006, 01:00 PM
Last Post: Sheol



Users browsing this thread: