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.

Custom Menu Request (Rather Large)

Taylor

Sponsor

After a long time, I finally get an idea for a CMS.

http://jirby.cleverpun.com/temp/screen01.png[/IMG]
This is the main screen.
'Light Pistol' is the weapon currently equipped. is the Icon.

Whenever a menu is being used, the transparent, 'Add' blend image in the corner will spin 360 degrees when the selection moves. ...Hrm... You may need to add blank space to get the circle to stay centered.
Here is the original image. By default it is -45 degrees.
You may edit it to get it to have a similar effect as with the screenshot.
http://jirby.cleverpun.com/temp/unitysymbolrotate.png[/IMG]

This is a script that allows re-arranging of the party using button A. Note this is an edit of the default and is made for menus with the menu on the left and party on the right.
Code:
class Scene_Menu
# --------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
    @changer = 0
    @where = 0
    @checker = 0
  end
# --------------------------------
  def update
    @command_window.update
    @playtime_window.update
    @gold_window.update
    @status_window.update
    if @command_window.active
      update_command
      return
    end
    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::RIGHT)
        $game_system.se_play($data_system.decision_se)
        @checker = 0
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
        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 ==6
        $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
      when 5
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
      end
      return
    end
  end
# --------------------------------
  def update_status
    if Input.trigger?(Input::B) or Input.trigger?(Input::LEFT)
      $game_system.se_play($data_system.cancel_se)
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    if Input.trigger?(Input::A)
      $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
        $game_player.refresh
      end
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 1
        $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
      return
    end
  end
end
I want this same feature in my menu, but when changing order begins, the menu moves up by 64 px and fades out, and the the word order moves down 64 px and fades in.
Screen-piece if you don't understand. :B
http://jirby.cleverpun.com/temp/screen02.png[/IMG]
All left side items fade-move out-to/from-the left. Main menu the top, Time/Gold/Chapter (variable 001) the bottom.

http://jirby.cleverpun.com/temp/screen03.png[/IMG]
Item menu. Skills menu is just the same.
http://jirby.cleverpun.com/temp/screen04.png[/IMG]
Target menu. "Give" items, "Use" skills.

http://jirby.cleverpun.com/temp/screen05.png[/IMG]
Equip screen. Hero seleted moves into position as seen here. Why STR, MDEF, DEX, INT and AGI... but not ATK, or PDEF? My battles are skill based, plus I've swapped MDEF and DEX definitions around, giving MDEF (or just DEF) a growth rate but not DEX (which I still need to make skills be able to be critical... o.o;)
Some weapons are also two handed while some aren't.

http://jirby.cleverpun.com/temp/screen06.png[/img]
I have no idea how you'd make a World Map script... but that x and y positions would change with different maps.
The circles zoom out in threes from the current location, pause... then repeat.
Here is a circle. XD
http://jirby.cleverpun.com/temp/circlelol.png[/img]
Note this is one of the times Time etc. is off screen.

http://jirby.cleverpun.com/temp/screen07.png[/img]
...
You could probably do a better arrangement than I did...

http://jirby.cleverpun.com/temp/screen08.png[/img]
A diary scene keeps record of progress in the storyline, incase you are lost on what is happening.
I tried editing a quest scene progress script I found, but it resets after quitting/reseting. Clearing all the entries unlocked.

Code:
#==============================================================================
# ** Configuration Translated
#==============================================================================
# The Sleeping Leonhart
# Version 1.3
# 7.07.06
#==============================================================================
# This script function only whit the SDK
#==============================================================================

#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log('Configuration', 'The Sleeping Leonhart', 1.3, '7.07.06')

#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state('Configuration') == true

module RPG
  module Cache
    def self.windowskin(filename, hue)
      self.load_bitmap("Graphics/Windowskins/", filename, hue)
    end
  end
end
  
class Game_System
  attr_reader   :map_interpreter          
  attr_reader   :battle_interpreter       
  attr_accessor :timer                    
  attr_accessor :timer_working            
  attr_accessor :save_disabled            
  attr_accessor :menu_disabled            
  attr_accessor :encounter_disabled       
  attr_accessor :message_position         
  attr_accessor :message_frame            
  attr_accessor :save_count               
  attr_accessor :magic_number             
  attr_accessor :bgm_volume
  attr_accessor :se_volume
  attr_accessor :skin_hue
  attr_accessor :skin_index
  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
    @bgm_volume = 100
    @se_volume = 100
    @skin_hue = 0
    @skin_index = 7
  end
  def bgm_play(bgm)
    @playing_bgm = bgm
    if bgm != nil and bgm.name != ""
      Audio.bgm_play("Audio/BGM/" + bgm.name , bgm.volume * bgm_volume / 100, bgm.pitch)
    else
      Audio.bgm_stop
    end
    Graphics.frame_reset
  end
  def bgs_play(bgs)
    @playing_bgs = bgs
    if bgs != nil and bgs.name != ""
      Audio.bgs_play("Audio/BGS/" + bgs.name, bgs.volume * se_volume / 100, bgs.pitch)
    else
      Audio.bgs_stop
    end
    Graphics.frame_reset
  end
  def me_play(me)
    if me != nil and me.name != ""
      Audio.me_play("Audio/ME/" + me.name, me.volume * se_volume / 100, me.pitch)
    else
      Audio.me_stop
    end
    Graphics.frame_reset
  end
  def se_play(se)
    if se != nil and se.name != ""
      Audio.se_play("Audio/SE/" + se.name, se.volume * se_volume / 100, se.pitch)
    end
  end
end

class Window_Base < Window
  def initialize(x, y, width, height)
    super()
    @windowskin_name = $windowskin_name
    self.windowskin = RPG::Cache.windowskin($game_system.windowskin_name, $game_system.skin_hue)
    self.x = x
    self.y = y
    self.width = width
    self.height = height
    self.z = 100
  end
  def update
    super
    if $windowskin_name != @windowskin_name
      @windowskin_name = $windowskin_name
      self.windowskin = RPG::Cache.windowskin($game_system.windowskin_name, $game_system.skin_hue)
    end
  end
  def draw_slant_bar(x, y, min, max, width = 152, height = 6,
    bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(255, 255, 60, 255))
    for i in 0..height
      self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
    end
    for i in 1..(height - 1)
      r = 100 * (height - i) / height + 0 * i / height
      g = 100 * (height - i) / height + 0 * i / height
      b = 100 * (height - i) / height + 0 * i / height
      a = 255 * (height - i) / height + 255 * i / height
      self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
    end
    for i in 1..( (min / max) * width - 1)
      for j in 1..(height - 1)
        r = bar_color.red * (width - i) / width + end_color.red * i / width
        g = bar_color.green * (width - i) / width + end_color.green * i / width
        b = bar_color.blue * (width - i) / width + end_color.blue * i / width
        a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
        self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
      end
    end
  end
end

class Arrow_Base < Sprite
  attr_reader   :index          
  attr_reader   :help_window           
  def initialize(viewport)
    super(viewport)
    self.bitmap = RPG::Cache.windowskin($game_system.windowskin_name, $game_system.skin_hue)
    self.ox = 16
    self.oy = 64
    self.z = 2500
    @blink_count = 0
    @index = 0
    @help_window = nil
    update
  end
end

class Window_Command < Window_Selectable
  def refresh
    self.contents.clear
    self.windowskin = RPG::Cache.windowskin($game_system.windowskin_name, $game_system.skin_hue)
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end
end

class Window_VolumeBGMCorrente < Window_Base
  def initialize
    super(160, 0, 480, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
  end  
  def refresh
    self.contents.clear
    self.windowskin = RPG::Cache.windowskin($game_system.windowskin_name, $game_system.skin_hue)    
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 160, 32, "BGM Volume")
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_system.bgm_volume.to_s + "%", 2.9)
    draw_slant_bar(160, 45, $game_system.bgm_volume.to_f, 100, 100, 6,
    Color.new(200, 200, 200), Color.new(100, 100, 100))
  end  
end

class Window_VolumeSECorrente < Window_Base
  def initialize
    super(160, 96, 480, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
  end  
  def refresh
    self.contents.clear
    self.windowskin = RPG::Cache.windowskin($game_system.windowskin_name, $game_system.skin_hue)    
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 160, 32, "SFX Volume")
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_system.se_volume.to_s + "%", 2.9)
    draw_slant_bar(160, 45, $game_system.se_volume.to_f, 100, 100, 6,
    Color.new(200, 200, 200), Color.new(100, 100, 100))
  end  
end

class Window_ColoreSkinCorrente < Window_Base
  def initialize
    super(160, 192, 480, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
  end  
  def refresh
    self.contents.clear
    self.windowskin = RPG::Cache.windowskin($game_system.windowskin_name, $game_system.skin_hue)
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 160, 32, "Skin Hue")
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_system.skin_hue.to_s, 2.9)
    draw_slant_bar(160, 45, $game_system.skin_hue.to_f, 350, 100, 6,
    Color.new(200, 200, 200), Color.new(100, 100, 100))
  end  
end

class Window_TramaSkinCorrente < Window_Base
  def initialize
    super(160, 288, 480, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
  end  
  def refresh
    self.contents.clear
    self.windowskin = RPG::Cache.windowskin($game_system.windowskin_name, $game_system.skin_hue)    
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 160, 32, "Current Skin")
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_system.windowskin_name, 2.9)
  end  
end

class Scene_Opzioni
  def initialize(option_index = 0, skin_index = $game_system.skin_index)
    @option_index = option_index
    @skin_index = skin_index
  end
  def main
    s1 = "Music Volume"
    s2 = "SE Volume"
    s3 = "Skin Color"
   #s4 = "Skin Type"
    
    r1 = "Black"
    r2 = "Old"
    r3 = "Red"
    r4 = "White Ties"
    r5 = "Blue"
    r6 = "Comic Skin"
    r7 = "Army"
    r8 = "SLFFVII"
    
    @windowskin_window = Window_Command.new(160, [r1, r2, r3, r4, r5, r6, r7, r8])    
    @windowskin_window.index = @skin_index
    @command_window = Window_Command.new(160, [s1, s2, s3,])
    @command_window.index = @option_index    
    @currentsfx_window = Window_VolumeSECorrente.new
    @currentbgm_window = Window_VolumeBGMCorrente.new
    @currentskin_window = Window_ColoreSkinCorrente.new
    @currwindskin_window = Window_TramaSkinCorrente.new
    @currentsfx_window.active = false
    @currentbgm_window.active = false
    @currentskin_window.active = false
    @windowskin_window.active = false
    @currwindskin_window.active = false
    @currentbgm_window.back_opacity = 160
    @currentsfx_window.back_opacity = 160
    @currentskin_window.back_opacity = 160
    @command_window.y = 180
    @windowskin_window.y = 9980
    @currentbgm_window.y = 64
    @currentsfx_window.y = 64+64+64
    @currentskin_window.y = 64+64+64+64+64
    @currwindskin_window.y = 999900
    @currentsfx_window.refresh
    @currentbgm_window.refresh 
    @currentskin_window.refresh
    @currwindskin_window.refresh
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @currentbgm_window.dispose
    @currentsfx_window.dispose
    @currentskin_window.dispose
    @windowskin_window.dispose
    @currwindskin_window.dispose        
  end
  def update
    @windowskin_window.update    
    @command_window.update
    @currentsfx_window.update
    @currentbgm_window.update 
    @currentskin_window.update
    @currwindskin_window.update
    if @command_window.active
      update_command
      return
    end 
    if @currentbgm_window.active              
      update_bgm
      return
    end
    if @currentsfx_window.active              
      update_sfx
      return
    end
    if @currentskin_window.active
      update_skin
      return
    end    
    if @windowskin_window.active
      update_windowskin
      return
    end
  end
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(4)
      return
    end
    if Input.trigger?(Input::C)
    case @command_window.index
      when 0
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @currentbgm_window.active = true
        @currentbgm_window.back_opacity = 255
      when 1
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @currentsfx_window.active = true  
        @currentsfx_window.back_opacity = 255
      when 2
      $game_system.se_play($data_system.decision_se)
      @command_window.active = false
      @currentskin_window.active = true 
      @currentskin_window.back_opacity = 255
      end
      return
    end
  end
def update_sfx
    if Input.repeat?(Input::LEFT)        
      if $game_system.se_volume < 5       
          $game_system.se_play($data_system.decision_se)
          $game_system.se_volume = 100
          @currentsfx_window.refresh
        else
        $game_system.se_volume = $game_system.se_volume - 5
        $game_system.se_play($data_system.decision_se)        
        @currentsfx_window.refresh      
      end
      return
    end
    if Input.repeat?(Input::RIGHT)
      if $game_system.se_volume > 99       
          $game_system.se_play($data_system.decision_se)
          $game_system.se_volume = 0
          @currentsfx_window.refresh
        else
        $game_system.se_volume = $game_system.se_volume + 5
        $game_system.se_play($data_system.decision_se)
        @currentsfx_window.refresh      
      end
      return
    end  
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @command_window.active = true
      @currentsfx_window.active = false
      @currentsfx_window.back_opacity = 160
      return
    end
  end
  def update_bgm
    if Input.repeat?(Input::LEFT)        
      if $game_system.bgm_volume < 5       
          $game_system.bgm_volume = 100
          $game_system.bgm_play($game_system.bgm_memorize)
          @currentbgm_window.refresh
        else
        $game_system.bgm_volume = $game_system.bgm_volume - 5
        @currentbgm_window.refresh 
        $game_system.bgm_play($game_system.bgm_memorize)
      end
      return
    end
    if Input.repeat?(Input::RIGHT)
      if $game_system.bgm_volume > 99       
          $game_system.bgm_volume = 0
          $game_system.bgm_play($game_system.bgm_memorize)
          @currentbgm_window.refresh
        else
        $game_system.bgm_volume = $game_system.bgm_volume + 5
        @currentbgm_window.refresh  
        $game_system.bgm_play($game_system.bgm_memorize)
      end
      return
    end
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @command_window.active = true
      @currentbgm_window.active = false
      @currentbgm_window.back_opacity = 160
      return
    end
  end
    def update_skin
    if Input.repeat?(Input::LEFT)        
      if $game_system.skin_hue < 10       
          $game_system.se_play($data_system.decision_se)
           @currentskin_window.refresh 
          $game_system.skin_hue = 350
          recolour
      else
        $game_system.skin_hue = $game_system.skin_hue - 10
        $game_system.se_play($data_system.decision_se)
        @currentskin_window.refresh 
        recolour
      end
      return
    end
    if Input.repeat?(Input::RIGHT)
      if $game_system.skin_hue > 349       
        $game_system.skin_hue = 0
        $game_system.se_play($data_system.decision_se)
        @currentskin_window.refresh 
        recolour
        else
        $game_system.skin_hue = $game_system.skin_hue + 10
        $game_system.se_play($data_system.decision_se)      
        @currentskin_window.refresh
        recolour
      end
      return
    end
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @command_window.active = true
      @currentskin_window.active = false
      @currentskin_window.back_opacity = 160
      return
    end
  end
  def update_windowskin
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @windowskin_window.active = false
      @command_window.active = true
      return
    end
    if Input.trigger?(Input::C)
      case @windowskin_window.index
      when 0 
        $game_system.se_play($data_system.decision_se)
        $game_system.windowskin_name = "Black"
        $game_system.skin_index = 0
        recolour
      when 1 
        $game_system.se_play($data_system.decision_se)
        $game_system.windowskin_name = "Old"
        $game_system.skin_index = 1
        recolour
      when 2 
        $game_system.se_play($data_system.decision_se)
        $game_system.windowskin_name = "Red"
        $game_system.skin_index = 2
        recolour
      when 3 
        $game_system.se_play($data_system.decision_se)
        $game_system.windowskin_name = "White Ties"
        $game_system.skin_index = 3
        recolour
      when 4 
        $game_system.se_play($data_system.decision_se)
        $game_system.windowskin_name = "Blue"
        $game_system.skin_index = 4
        recolour
      when 5 
        $game_system.se_play($data_system.decision_se)
        $game_system.windowskin_name = "Comic Skin"
        $game_system.skin_index = 5
        recolour
      when 6 
        $game_system.se_play($data_system.decision_se)
        $game_system.windowskin_name = "Army"
        $game_system.skin_index = 6
        recolour
      when 7 
        $game_system.se_play($data_system.decision_se)
        $game_system.windowskin_name = "SLFFVII"
        $game_system.skin_index = 7
        @windowskin_window.active = true
        recolour
      end
      return
    end
  end
  def recolour
    @command_window.refresh
    @currentbgm_window.refresh
    @currentsfx_window.refresh
    @currentskin_window.refresh
    @windowskin_window.refresh  
    @currwindskin_window.refresh
  end
end

class Scene_Menu
  alias squall_opzioni_scenemenu_init initialize
  alias squall_opzioni_scenemenu_update_command_check update_command_check
    def initialize(menu_index = 0)
      squall_opzioni_scenemenu_init(menu_index)
      @commands.insert(@commands.index('Status') + 1, 'Configuration')
    end
    def update_command_check
      squall_opzioni_scenemenu_update_command_check
      command = @commands[@command_window.index]
      if command == 'Configuration'
        command_config
      end
    end
    def command_config
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Opzioni.new
    end
end
=begin
module PARA_LEFT_CURSOR
  FILE_NAME = "cursor"
  TYPE = 0
end

class Window_Base
  alias cursor_rect_para_lcr cursor_rect
  def cursor_rect=(rect)
    if PARA_LEFT_CURSOR::TYPE == 1
      super(rect)
    end
    empty = Rect.new(0,0,0,0)
    if rect != empty and self.visible != false and @index != -1
      if @cursor == nil or @cursor.disposed?
        @cursor = Sprite.new
        @cursor.bitmap = RPG::Cache.windowskin(PARA_LEFT_CURSOR::FILE_NAME, 255)
      end  
      @cursor.x = self.x + rect.x
      cy = (rect.height-32) / 2
      @cursor.y = self.y + cy + rect.y + 24
      @cursor.z = self.z + 100
      elsif @cursor != nil
        @cursor.dispose
      end
    end 
    alias dispose_para_cur dispose
    def dispose
      super
      if @cursor != nil
        @cursor.dispose
      end     
    end    
    def visible=(bool)
      super
      if @cursor != nil and bool == false
        @cursor.dispose
      end
    end
  end
=end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end
Just add the background, rotating symbol and 0 opacity the windows. ... or is it 255 that's clear?
...I wonder if it' possible to tone the background using the Windowskin tone?

http://jirby.cleverpun.com/temp/screen09.png[/img]
... ohcrap another thing I forgot.
When selecting Load/Save a smaller menu should allow the choice whether to load or save.

http://jirby.cleverpun.com/temp/screen10.png[/img]
...
Does this really need explaining?

If there is anything I might've missed, please tell me. Fonts should all be default, as the font I use is around the same size as Arial (it might be a little big in the screenshots.) ._.
Face images are "f_" + @actor.name under images, 48x48 px.
Oh here's the background for now.
http://jirby.cleverpun.com/temp/backgradient.png[/img]

Thanks alot if you can do this. ^^

EDIT: "Layer" is a class... yeah an obscure name but they are the egg layers of the race so I couldn't think of a better name. :B
(Don't delve into this at the momment.)
 

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