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.

Single Player Menu Script?

Looking for a script that'll turn the menu to something like this:

menupx0.png


Except the white will show the current game, and erase the "Attack Power, Phys Defense, Mag Defense" and just show the equipment and stats. I also want to have the ability to change the picture of the character in the top right corner. I also don't want the class there, like it states fighter in the left corner.

Thanks alot.
 
Ok, I was bored. I think Level, Exp & Next Level should be together. and the equip should be with the battler. Nonetheless, here ya go...

screen1jud.png


Open your Script Editor (Tools -> Script Editor (or F11))
Right-Click on Main (way at the bottom)
Select "Insert"
Type in a name (Leggerr_Windows)
Copy/Paste the following code into the script window on the right (turn off line numbers first)

Code:
 

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

# ** Window_Status

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

#  This window displays full status specs on the status screen.

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

 

class Window_Status < Window_Base

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

  # * Object Initialization

  #     actor : actor

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

  def initialize(actor)

    super(0, 0, 246, 480)

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

    @actor = actor

    refresh

  end

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

  # * Refresh

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

  def refresh

    self.contents.clear

#    draw_actor_graphic(@actor, 150, 64)

    draw_actor_name(@actor, 4, 0)

#    draw_actor_class(@actor, 4 + 144, 0)

    draw_actor_level(@actor, 4, 32)

    draw_actor_state(@actor, 4, 64)

    draw_actor_hp(@actor, 4, 96, 172)

    draw_actor_sp(@actor, 4, 128, 172)

    draw_actor_parameter(@actor, 4, 320, 3)

    draw_actor_parameter(@actor, 4, 352, 4)

    draw_actor_parameter(@actor, 4, 384, 5)

    draw_actor_parameter(@actor, 4, 416, 6)

    self.contents.font.color = system_color

    self.contents.draw_text(320, 160, 96, 32, "equipment")

    draw_item_name($data_weapons[@actor.weapon_id], 16, 160)

    draw_item_name($data_armors[@actor.armor1_id], 16, 192)

    draw_item_name($data_armors[@actor.armor2_id], 16, 224)

    draw_item_name($data_armors[@actor.armor3_id], 16, 256)

    draw_item_name($data_armors[@actor.armor4_id], 16, 288)

  end

  def dummy

    self.contents.font.color = system_color

    self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)

    self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)

    self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)

    self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)

    self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)

    draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)

    draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)

    draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)

    draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)

    draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)

  end

end

 

class Window_Actor < Window_Base

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

  # * Object Initialization

  #     actor : actor

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

  def initialize(actor)

    super(0, 0, 182, 480)

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

    @actor = actor

    refresh

  end

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

  # * Refresh

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

  def refresh

    self.contents.clear

    draw_actor_battler(@actor, 75, 170)

    self.contents.font.color = system_color

    self.contents.draw_text(4, 176, 80, 32, "Exp")

    self.contents.draw_text(4, 208, 80, 32, "Next Level")

    self.contents.font.color = normal_color

    self.contents.draw_text(96, 176, 54, 32, @actor.exp_s, 2)

    self.contents.draw_text(96, 208, 54, 32, @actor.next_rest_exp_s, 2)

  end

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

  # * Draw Battler

  #     actor : actor

  #     x     : draw spot x-coordinate

  #     y     : draw spot y-coordinate

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

  def draw_actor_battler(actor, x, y)

    bitmap = RPG::Cache.battler(actor.battler_name, actor.character_hue)

    cw = bitmap.width

    ch = bitmap.height

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

    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)

  end

end

 

 

Insert another script above Main, below "Leggerrr_Windows"
Enter a name (Leggerr_Menu)
Paste in the following script...

Code:
 

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

# ** Scene_Menu

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

#  This class performs menu screen processing.

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

 

class Scene_Menu

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

  # * Object Initialization

  #     menu_index : command cursor's initial position

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

  def initialize(menu_index = 0)

    @menu_index = menu_index > 3 ? menu_index - 1 : menu_index

  end

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

  # * Main Processing

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

  def main

    # Make sprite set

    @spriteset = Spriteset_Map.new

    # Make play time window

    @playtime_window = Window_PlayTime.new

    @playtime_window.x = 272

    @playtime_window.y = 310

    # Make steps window

#    @steps_window = Window_Steps.new

#    @steps_window.x = 0

#    @steps_window.y = 320

    # Make gold window

    @gold_window = Window_Gold.new

    @gold_window.x = 272

    @gold_window.y = 406

    # Get actor

    @actor = $game_party.actors[0]

    # Make status window

    @status_window = Window_Status.new(@actor)

    @status_window.x = 0

    @status_window.y = 0

    # Make actor window

    @actor_window = Window_Actor.new(@actor)

    @actor_window.x = 458

    @actor_window.y = 0

    # Make command window

    s1 = $data_system.words.item

    s2 = $data_system.words.skill

    s3 = $data_system.words.equip

#    s4 = "Status"

    s5 = "Save"

    s6 = "Exit"

    @command_window = Window_Command.new(150, [s1, s2, s3, s5, s6])

    @command_window.index = @menu_index

    @command_window.x = 474

    @command_window.y = 272

    # If number of party members is 0

    if $game_party.actors.size == 0

      # Disable items, skills, equipment, and status

      @command_window.disable_item(0)

      @command_window.disable_item(1)

      @command_window.disable_item(2)

#      @command_window.disable_item(3)

    end

    # If save is forbidden

    if $game_system.save_disabled

      # Disable save

      @command_window.disable_item(3)

    end

    # 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 windows

    @command_window.dispose

    @playtime_window.dispose

#    @steps_window.dispose

    @gold_window.dispose

    @status_window.dispose

    @actor_window.dispose

    @spriteset.dispose

  end

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

  # * Frame Update

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

  def update

    # Update windows

    @command_window.update

    @playtime_window.update

#    @steps_window.update

    @gold_window.update

    @status_window.update

    # If command window is active: call update_command

    if @command_window.active

      update_command

      return

    end

    # If status window is active: call update_status

    if @status_window.active

      update_status

      return

    end

  end

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

  # * Frame Update (when command window is active)

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

  def update_command

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # Switch to map screen

      $scene = Scene_Map.new

      return

    end

    # If C button was pressed

    if Input.trigger?(Input::C)

      # If command other than save or end game, and party members = 0

      if $game_party.actors.size == 0 and @command_window.index < 4

        # Play buzzer SE

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # Branch by command window cursor position

      case @command_window.index

      when 0  # item

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to item screen

        $scene = Scene_Item.new

      when 1  # skill

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Make status window active

#        @command_window.active = false

#        @status_window.active = true

#        @status_window.index = 0

        $scene = Scene_Skill.new

      when 2  # equipment

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Make status window active

#        @command_window.active = false

#        @status_window.active = true

 #       @status_window.index = 0

        $scene = Scene_Equip.new

      when 3  # save

        # If saving is forbidden

        if $game_system.save_disabled

          # 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 save screen

        $scene = Scene_Save.new

      when 4  # end game

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to end game screen

        $scene = Scene_End.new

      end

      return

    end

  end

end

 

To change the battler image, just pick a new battler on the actor page of the database.
To change the battler in-game, use the "Change Actor Graphic" event command.

TTFN
 
Thank you so much!

Problem is, I'm using Minkoff's Animated Battler's, and it works perfectly with it except for the fact that the battler is all screwed up because I have to use sprites, now if I use another image, it works fine.

Is there anyway I could just use something from my Pictures folder in Materials, instead of using a battler?
 
Yep, change line 89 in draw_actor_battler from

bitmap = RPG::Cache.battler(actor.battler_name, actor.character_hue)

to

bitmap = RPG::Cache.picture(actor.battler_name)

and name the image the same as the battler selected in the database on the actor page.
 

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