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.

Actor_Enhanced v1.0

Twirly

Sponsor

Hello everyone I'm releasing my first script! :toot:
It's a new menu I made together with sojabird.

Introduction
This script was startet by me (asdren) and finished by sojabird.

To come features
Only on request. (post here)

Script
####################################################################
# Actor_Enhanced v1.0
#
# By: SojaBird and Asdren
# Discription: With this script, your menu gets a awsome new look!
#
####################################################################

#==============================================================================
# ** Actor_Window
#------------------------------------------------------------------------------
# This class creates a single-actor informationwindow in the menu.
#==============================================================================

class Actor_Window < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  # x : window X coordinate
  # y : window Y coordinate
  # actor:  actor number
  #--------------------------------------------------------------------------
  def initialize(actor, x, y)
    super(x, y, 272, 120)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.clear
    @offset = (@actor - 1) * 96
    @item_max = $game_party.members.size
    for actor in $game_party.members
      draw_actor_face(actor, 2, actor.index * 96 + 2 - @offset, 90)
      x = 104
      y = actor.index * 96 + WLH / 2
      draw_actor_name(actor, x + 16, y - @offset)
      draw_actor_state(actor, x, y + WLH * 2 - @offset)
      draw_actor_hp(actor, x + 16, y + WLH * 1 - @offset)
      draw_actor_mp(actor, x + 16, y + WLH * 2 - @offset)
    end
  end
end

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================

class Scene_Menu < Scene_Base
  alias old_terminate terminate
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    @party_size = $game_party.members.size
    super
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(360, 0)
    @status_window = Window_MenuStatus.new(200, 0)
    @actor1_window = Actor_Window.new(1,0,175)if @party_size >= 1
    @actor2_window = Actor_Window.new(2,0,296) if @party_size >= 2
    @actor3_window = Actor_Window.new(3,272,175) if @party_size >= 3
    @actor4_window = Actor_Window.new(4,272,296) if @party_size >= 4
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    old_terminate
    @actor1_window.dispose if @party_size >= 1
    @actor2_window.dispose if @party_size >= 2
    @actor3_window.dispose if @party_size >= 3
    @actor4_window.dispose if @party_size >= 4
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    @actor1_window.update if @party_size >= 1
    @actor2_window.update if @party_size >= 2
    @actor3_window.update if @party_size >= 3
    @actor4_window.update if @party_size >= 4
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
end

#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #    x : window X coordinate
  #    y : window Y coordinate
  #--------------------------------------------------------------------------
  def initialize(x, y)
    @party_size = $game_party.members.size
    super(x, y, 130, 24 * @party_size + 32)
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      x = 8
      y = actor.index * 23 + WLH / 15
      draw_actor_name(actor, x, y)
    end
  end
  #--------------------------------------------------------------------------
  # * Update cursor
  #--------------------------------------------------------------------------
  def update_cursor
    if @index < 0              # No cursor
      self.cursor_rect.empty
    elsif @index < @item_max    # Normal
      self.cursor_rect.set(0, @index * 24, contents.width, 24)
    elsif @index >= 30        # Self
      self.cursor_rect.set(0, (@index - 30) * 24, contents.width, 24)
    else                        # All
      self.cursor_rect.set(0, 0, contents.width, @item_max * 24)
    end
  end
end
####################################################################
# Actor_Enhanced v1.0
#
# By: SojaBird and Asdren
# Discription: With this script, your menu gets a awsome new look!
#
####################################################################

#==============================================================================
# ** Actor_Window
#------------------------------------------------------------------------------
# This class creates a single-actor informationwindow in the menu.
#==============================================================================

class Actor_Window < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  # x : window X coordinate
  # y : window Y coordinate
  # actor:  actor number
  #--------------------------------------------------------------------------
  def initialize(actor, x, y)
    super(x, y, 272, 120)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.clear
    @offset = (@actor - 1) * 96
    @item_max = $game_party.members.size
    for actor in $game_party.members
      draw_actor_face(actor, 2, actor.index * 96 + 2 - @offset, 90)
      x = 104
      y = actor.index * 96 + WLH / 2
      draw_actor_name(actor, x + 16, y - @offset)
      draw_actor_state(actor,x + 115, y - @offset)
      draw_actor_hp(actor, x + 16, y + WLH * 1 - @offset)
      draw_actor_mp(actor, x + 16, y + WLH * 2 - @offset)
    end
  end
end

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================

class Scene_Menu < Scene_Base
  alias old_terminate terminate
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    @party_size = $game_party.members.size
    super
    Audio.bgm_play("Audio/BGM/" + "Menu", 100, 100)
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(384, 0)
    @status_window = Window_MenuStatus.new(160, 0)
    @actor1_window = Actor_Window.new(1,0,175)if @party_size >= 1
    @actor2_window = Actor_Window.new(3,0,296) if @party_size >= 2
    @actor3_window = Actor_Window.new(2,272,175) if @party_size >= 3
    @actor4_window = Actor_Window.new(4,272,296) if @party_size >= 4
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    old_terminate
    @actor1_window.dispose if @party_size >= 1
    @actor2_window.dispose if @party_size >= 2
    @actor3_window.dispose if @party_size >= 3
    @actor4_window.dispose if @party_size >= 4
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    @actor1_window.update if @party_size >= 1
    @actor2_window.update if @party_size >= 2
    @actor3_window.update if @party_size >= 3
    @actor4_window.update if @party_size >= 4
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
end
#--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      $game_map.autoplay 
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        start_actor_selection
      when 4      # Save
        $scene = Scene_File.new(true, false, false)
      when 5      # End Game
        $scene = Scene_End.new
      end
    end
  end

#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #    x : window X coordinate
  #    y : window Y coordinate
  #--------------------------------------------------------------------------
  def initialize(x, y)
    @party_size = $game_party.members.size
    super(x, y, 224, 24 * @party_size + 32)
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      x = 8
      y = actor.index * 23 + WLH / 15
      draw_actor_name(actor, x, y)
      draw_actor_level(actor,x + 123,y)
    end
  end
  #--------------------------------------------------------------------------
  # * Update cursor
  #--------------------------------------------------------------------------
  def update_cursor
    if @index < 0              # No cursor
      self.cursor_rect.empty
    elsif @index < @item_max    # Normal
      self.cursor_rect.set(0, @index * 24, contents.width, 24)
    elsif @index >= 30        # Self
      self.cursor_rect.set(0, (@index - 30) * 24, contents.width, 24)
    else                        # All
      self.cursor_rect.set(0, 0, contents.width, @item_max * 24)
    end
  end
end

Compatibility
VX only.

Screenshot
http://img397.imageshack.us/img397/7256/actorenhancedv10yp3.png[/img]

Installation
Put it above main...
For personal update import a song with the name Menu.

Terms and Conditions
Credit us, sojabird and asdren (that's me) , and the script is free for use in NONCOMERCIAL projects.
If anyone want some changes, please pm me of use or post it here,i'll track the topic.
 

ikos

Member

Well, it's your first, so I'm going to critique. But no hard feelings, just trying to help out.
That layout is fine, except the weird list of actors in the middle, I don't quite understand that.
And the 2x2 layout of the party members is nice, but you can't see the level or states, level being more important to me.
You could always place the level (or states if you think it's more important) above the Actor HP.

Other than that, the menu is neat and runs pretty smoothly, Nice work. :thumb:
~Ikos out
 

Twirly

Sponsor

Thanks Ikos the names are there because I dont know how to make a cursor which switches between the boxes...
Mybe i should add the levels to the name box...
 

Twirly

Sponsor

Updated the script. (This update is just the version of this script i'm probably gonna use for a game i'm making.The real update's gonna
be made by sojabird so you can choose which version you want to use. However you have to credit for both versions asdren and sojabird)
In my update you can see the level in the actor name list  now and it has music in the menu. (just import a song with the name Menu and the song will be played when you enter the menu :D)
now the actor boxes show the status of the member too. :wink:
 

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