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.

[VX] Lite Menu [version 1.01]

Lite Menu Version 1.01
by Woratana
Released on: 03/02/2008

Introduction
I script this because request of turtleman, so I want to share here. Maybe you guys will like it~^^

This script will change your menu style similar to Dragon Warrior style menu.

Request Picture:
http://www.woodus.com/den/games/dw2nes/ ... s-yarn.gif[/img]

Screenshot
http://i28.tinypic.com/2cpx9py.jpg[/img]

Script
place it above main
Code:
#==============================================================================
# ¦ [RMVX] Lite Menu Version 1.01
#------------------------------------------------------------------------------
# by Woratana [woratana@hotmail.com]
# released on 03/02/2008
#
# Features Version 1.01
# - Fixed Bug in Gold_Text
# Features Version 1.0
# - Allow user to config menu
# - Add Gold/Location Window (user can turn on/off)
#==============================================================================

module Wor_Litemenu
  #================
  # SETUP Script Here!
  #================
  MENU_WINDOW_Y = 50
  CHARA_WINDOW_Y = 160
  CHARA_WINDOW_WIDTH = 175
  SHOW_LV = true
  SHOW_LOCATION_WINDOW = true
  VOCAB_LOCATION = "Location:"
  VOCAB_GOLD = "Gold:"
  LOCATION_WINDOW_Y = 295
  LOCATION_TEXT_X = 96
  GOLD_TEXT_X = 84
end

class Scene_Menu < Scene_Base

  def initialize(menu_index = 0)
	@menu_index = menu_index
  end

  def start
	super
	create_menu_background
	create_command_window
	lite_create_location_window if Wor_Litemenu::SHOW_LOCATION_WINDOW == true
	lite_create_actor_window
  end
 
# START LITE METHOD
  def lite_create_actor_window
	member = []
	@item_max = $game_party.members.size
	for actor in $game_party.members
	 member.push ((actor.name) + " Lv." + (actor.level.to_s)) if Wor_Litemenu::SHOW_LV == true
	 member.push (actor.name) if Wor_Litemenu::SHOW_LV == false
	end
	@status_window = Window_Command.new(Wor_Litemenu::CHARA_WINDOW_WIDTH, member)
	@status_window.index = @menu_index
	@status_window.x = (554 /2) - (@status_window.width/2)
	@status_window.y = Wor_Litemenu::CHARA_WINDOW_Y
	@status_window.visible = false
  end

  def lite_get_map_name
	mapdata = load_data("Data/MapInfos.rvdata")
	map_id = $game_map.map_id
	@map_name = mapdata[map_id].name
  end
  
  def lite_draw_currency_value(value, x, y, width)
	cx = @location_window.contents.text_size(Vocab::gold).width
	@location_window.contents.font.color = @location_window.normal_color
	@location_window.contents.draw_text(x+53, y, @location_window.width+cx, 24, value, 0)
	@location_window.contents.font.color = @location_window.system_color
	@location_window.contents.draw_text(x+(($game_party.gold).to_s.size * 8)+68, y, @location_window.width, 24, Vocab::gold, 0)
  end
  
  def lite_create_location_window
	width = 300
	height = 90
	x = (554 /2) - (width/2)
	y = Wor_Litemenu::LOCATION_WINDOW_Y
	@location_window = Window_Base.new(x, y, width, height)
	@location_window.create_contents
	lite_get_map_name
	@location_window.contents.font.color = @location_window.system_color
	@location_window.contents.draw_text(0, 0, 300, 24, Wor_Litemenu::VOCAB_GOLD)
	@location_window.contents.font.color = @location_window.normal_color
	lite_draw_currency_value($game_party.gold, 4, 0, Wor_Litemenu::GOLD_TEXT_X)
	@location_window.contents.font.color = @location_window.system_color
	@location_window.contents.draw_text(0, 32, 300, 24, Wor_Litemenu::VOCAB_LOCATION)
	@location_window.contents.font.color = @location_window.normal_color
	@location_window.contents.draw_text(Wor_Litemenu::LOCATION_TEXT_X, 32, 300, 24, @map_name)
  end

# END LITE METHOD

  def terminate
	super
	dispose_menu_background
	@command_window.dispose
	@location_window.dispose if @location_window
	@status_window.dispose
  end
  
  def update
	super
	update_menu_background
	@command_window.update
	if @command_window.active
	  update_command_selection
	elsif @status_window.active
	  @status_window.update
	  update_actor_selection
	end
  end

  def create_command_window
	s1 = Vocab::item
	s2 = Vocab::skill
	s3 = Vocab::equip
	s4 = Vocab::status
	s5 = Vocab::save
	s6 = Vocab::game_end
	@command_window = Window_Command.new(200, [s1, s2, s3, s4, s5, s6],2,3)
	@command_window.index = @menu_index
	@command_window.x = (554 /2) - (@command_window.width/2) #167
	@command_window.y = Wor_Litemenu::MENU_WINDOW_Y
	if $game_party.members.size == 0 
	  @command_window.draw_item(0, false)
	  @command_window.draw_item(1, false)
	  @command_window.draw_item(2, false)
	  @command_window.draw_item(3, false) 
	end
	if $game_system.save_disabled
	  @command_window.draw_item(4, false) 
	end
  end

  def start_actor_selection
	@command_window.active = false
	@status_window.visible = true
	@status_window.active = true
	@status_window.index = 0
  end

  def end_actor_selection
	@command_window.active = true
	@status_window.visible = false
	@status_window.active = false
	@status_window.index = -1
  end
  
end

Note
  This script started because request of other member, and you are allow to use, and post in other forum if credit included.

  Please do not redistribute if there's no permission.

Comment? Question? feel free to post~^^
 
I mean, How do i make the location hidden ( not dissipear but just say ??? ) but lets say when i get a map i can now see it.

Sorry if i wasn't very detailed in the last post lol,
 
Alright, I didn't tested this yet :p (because I just type in this reply box)
so let me know if it's work or not.

place this below Lite Menu Script...
Code:
class Scene_Menu < Scene_Base

NO_NAME_MAP_ID = [1,2,3]
# Map ID of map that you don't want to show name

NO_NAME = '????????'
# What name you will use for no name map

  def lite_get_map_name
if NO_NAME_MAP_ID.include?($game_map.map_id)
  @map_name = NO_NAME
else
	mapdata = load_data("Data/MapInfos.rvdata")
	map_id = $game_map.map_id
	@map_name = mapdata[map_id].name
  end
end
end
 
rather than setting it in the script, is there a way you can make that so the game can dynamicly display the ???s ? -- I.E. - you discover a new area, it comes up as ???. Later in the game you go back, and it shows the name of the place because you now know where it is.
 
@Strager
Alright, forgot the above one >_>
Code:
class Scene_Menu < Scene_Base

NO_NAME = '????????'
# What name you will use for no name map

  def lite_get_map_name
if $game_system.noname_map.include?($game_map.map_id)
  @map_name = NO_NAME
else
	mapdata = load_data("Data/MapInfos.rvdata")
	map_id = $game_map.map_id
	@map_name = mapdata[map_id].name
  end
end
end

class Game_System
attr_accessor :noname_map
alias wor_litemenu_gamsys_ini initialize
def initialize
  wor_litemenu_gamsys_ini
  @noname_map = []
end
end

When you want to hide map name, call script
Code:
$game_system.noname_map.push (map id)

When you don't want to hide anymore,
Code:
$game_system.noname_map.delete(map id)

:)

This should work, didn't test though.

=================
@Jrr Kein
^ Check script above >_>
 
I got an error message when I tried to run the game with the script.

Script 'Lite Menu Version 1.01' line 30: TypeError occurred

undefined superclass 'Scene_Base'

Was there something I was supposed to change that I neglected to, or...?
 
Well, Scene_Base is normally included in default script.

Check if you have slot named 'Scene_Base' in left side of script editor. :)
 

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