Jump to content
Nicke

XS - Menu Delux

Recommended Posts

Yeah!!Everything works!!

 

Thanks alot Niclas!

 

I was actually thinking this...are you gonna make the menu into a full menu?Like a status delux menu and a skill delux menu etc.?

 

I just notice something...Playtime doesn't have an icon and the clock stops when you enter the menu...also how can I remove the variable 1/2 amount?

Edited by Elliot Wyvern

Share this post


Link to post
Share on other sites

Yeah!!Everything works!!

 

Thanks alot Niclas!

 

I was actually thinking this...are you gonna make the menu into a full menu?Like a status delux menu and a skill delux menu etc.?

 

I just notice something...Playtime doesn't have an icon and the clock stops when you enter the menu...also how can I remove the variable 1/2 amount?

 

You can remove variable 1 and 2 by adding " # " in front the command in the script to comment it out.

Share this post


Link to post
Share on other sites

I love this menu script. However, I dislike that the timer doesn't update in real time (or at least it doesn't for me). Is it supposed to?

Share this post


Link to post
Share on other sites

I love this menu script. However, I dislike that the timer doesn't update in real time (or at least it doesn't for me). Is it supposed to?

Any menu I've ever used in VX, or VX Ace that had a Playtime, I never saw it update real time while in the menu.

It's not much of a big deal though.

 

We'll see if Niclas can make it update in real time while in the menu.

 

I would rather the playtime to be [H:M] (Hour : Minutes)

Share this post


Link to post
Share on other sites

@ Koutastep Thanks that worked :D/>

 

But yeah the script doesn't make it update in real time but its not such a big deal though..

 

Edit:Oh and to add custom commands..where do I find the scene_(Script) thing?

Edited by Elliot Wyvern

Share this post


Link to post
Share on other sites

@ Koutastep Thanks that worked :D/>/>/>

 

But yeah the script doesn't make it update in real time but its not such a big deal though..

 

Edit:Oh and to add custom commands..where do I find the scene_(Script) thing?

 

If you're trying to find the scene call from another script.

You can try Ctrl+F to bring up the search window, and enter "SceneManager.call" uncheck Match Case, and Whole Word.

So you can search all the following SceneManager commands.

 

Most likely the one you'll be looking for would be something like

 

  SceneManager.call(Scene_SCRIPT NAME) 

Share this post


Link to post
Share on other sites

Alright, released 1.0d. Some new features added such as live update on playtime and the ability to choose a bgm and bgs to be played when the menu is opened.

Share this post


Link to post
Share on other sites

Alright, released 1.0d. Some new features added such as live update on playtime and the ability to choose a bgm and bgs to be played when the menu is opened.

Nice, lol just curious, why do you name your updates with a,b,c,d's?

How come you don't use 1.0, 1.1, 1.2, etc?

 

or do you use 1.1 /or 2.0 when you add major updates?

Share this post


Link to post
Share on other sites

Yeah, I usually just do 1.0a, 1.0b when there are minor releases such as adding one feature or bug corrections. If I release a major overhaul of the script I tend to do 1.1 and so on :)

 

You can actually grab the script again if you want, I decided to add tp to the bar as well. A small change :P

Share this post


Link to post
Share on other sites

Yeah, I usually just do 1.0a, 1.0b when there are minor releases such as adding one feature or bug corrections. If I release a major overhaul of the script I tend to do 1.1 and so on :)

 

You can actually grab the script again if you want, I decided to add tp to the bar as well. A small change :P

Yeah, I don't need the TP bar, In my game I am using the MP bar as my TP bar (simular to the Tales series.)

So everything I'm using I renamed MP as TP and removed TP.

 

I noticed you added a "Battle Count" which I renamed as Encounters, I love that you added that.

Share this post


Link to post
Share on other sites

This is an awesome update!!

 

Thanks Niclas :)

 

Edit:I got an error :(

 

I've actually been having issues lately with the script cause stuff are switched like Skill becoming Equip and then equips get's skill's icon and description...

 

So I saw that I have Yanfly's menu script and then I deleted it..I then tested it and when I tried to open the menu I got this error:

 

Vbi5D.png

 

Here's the script:

 

 

 

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

# XaiL System - Menu Delux

# Author: Nicke

# Created: 20/11/2012

# Edited: 27/11/2012

# Version: 1.0d

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

# Instructions

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

# To install this script, open up your script editor and copy/paste this script

# to an open slot below ? Materials but above ? Main. Remember to save.

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

# Requires: XS - Core Script.

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

#

# This script changes the way the menu scene works. Not compatible with

# XS - Menu or XS - Icon Menu.

#

# Instructions are in the settings module below. Make sure you read through

# everything so you understand each section.

#

# *** Only for RPG Maker VX Ace. ***

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

($imported ||= {})["XAIL-XS-MENU_DELUX"] = true

 

module XAIL

module MENU_DELUX

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

# * Settings

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

# MENU_FONT:

# MENU_FONT = [name, size, color, bold, shadow]

MENU_FONT = [["Calibri", "Verdana"], 18, Color.new(255,255,255), true, true]

 

# MENU_WINDOW:

# MENU_WINDOW [x, y, z, opacity]

MENU_WINDOW = [-12, -12, 200, 0]

 

# STATUS_WINDOW:

# STATUS_WINDOW [x, y, z, opacity]

STATUS_WINDOW = [142, -4, 200, 0]

 

# DETAILS_WINDOW:

# DETAILS_WINDOW [x, y, z, opacity]

DETAILS_WINDOW = [380, -10, 200, 0]

 

# PLAYTIME_WINDOW:

# PLAYTIME_WINDOW [x, y, z, opacity, icon, enabled]

PLAYTIME_WINDOW = [430, 348, 200, 0, 280, true]

 

# HELP_WINDOW:

# Setup help window.

# HELP = [x, y, z, opacity, enabled]

HELP_WINDOW = [-6, 352, 200, 0, true]

 

# MENU_ALIGNMENT:

# MENU_ALIGNMENT = 0 (left), 1 (center), 2 (right)

MENU_ALIGNMENT = 0 # Default: 2.

 

# MENU_SKIN:

# The windowskin to use for the windows.

# Set to nil to disable.

# MENU_SKIN = string

MENU_SKIN = nil

 

# MENU_LIST:

# name, icon_index and custom are optional.

# If name is empty it will use the corresponding symbol as name instead.

# To make a command a common event you need to set custom to the common event

# id you want to run as seen below.

# symbol => [name, description, icon_index, enabled, personal, custom]

MENU_LIST = {

:item => ["", "Browse through your acquired items.", 3392, true, false],

:equip => ["Equipment", "Change your equipment.", 451, true, true],

:skill => ["Spells", "Manage your available skills.", 14, true, true],

:status => ["Status", "See the current status of the hero.", 3191, true, true],

:formation => ["", "Change the formation of the party.", 8587, true, false],

:save => ["", "Record your progress.", 4139, true, false],

:load => ["", "Load your saved progress.", 4165, true, false, Scene_Load],

:game_end => ["Quit", "Exit the program.", 4162, true, false],

:title => ["", "Return to title.", 2831, true, false, Scene_Title],

:event_1 => ["Camping", "Run common event camping.", 728, true, false, 1]

} # Don't remove this line!

 

# MENU_SAVE = true/false

# Override enabled option for save (so you can change it ingame).

MENU_SAVE = false

 

# If MENU_CUSTOM is true you will have to add the commands yourself

# ingame, which can be useful for certain quest related stuff or if you

# want to enable/disable menu commands.

# To add/remove a command ingame follow these instructions:

#

# In a script call do like this:

# menu_scene(key, type)

# menu_scene(:item,:add) # To add item to menu list.

# menu_scene(:item,:del) # To remove item from menu list.

#

# In a conditional branch you can check if a menu command is

# enabled/disabled:

# menu_active?(key)

# menu_active?(:item) # Check if item is enabled.

# !menu_active?(:item) # Check if item is disabled.

#

# To set a id to be enabled do like this:

# menu_active(:skill, true) # Set menu skill to be enabled.

#

# To add/remove all available menu commands use one of the

# following methods in a script call:

# menu_add_all

# menu_del_all

#

# MENU_CUSTOM = true/false

MENU_CUSTOM = false

 

# The text to be displayed if no menu items is available.

# Only used if MENU_CUSTOM is true.

# MENU_EMPTY = string

EMPTY = "Menu is not available at this point..."

 

# MENU_MUSIC:

# Set the music to be played at the menu scene.

# This is optional.

# MUSIC = true/false

MUSIC = true

# MUSIC_BGM = [name, volume, pitch]

MUSIC_BGM = ["13 - DAYS", 70, 100]

# MUSIC_BGS = [name, volume, pitch]

MUSIC_BGS = ["", 50, 100]

 

# ANIM_LIST:

# A list of animation images.

# name => [z, zoom_x, zoom_y, blend_type, opacity]

ANIM_LIST = {

"Menu_Fog1" => [1, 1.2, 1.2, 1, 125],

"Menu_Fog2" => [1, 1.8, 1.8, 1, 155]

} # Don't remove this line!

 

# BACKGROUND:

# name => [x, y, z, opacity]

BACKGROUND = {

"Menu_Back" => [0, 0, 4, 255]

} # Don't remove this line!

 

# BAR_COLOR = rgba(255,255,255,255)

# Set the color of the gauges.

BAR_HP = [Color.new(205,50,50,65), Color.new(235,75,75,185)]

BAR_MP = [Color.new(50,50,205,65), Color.new(75,75,235,185)]

BAR_TP = [Color.new(50,205,50,65), Color.new(75,235,75,185)]

 

# DETAILS:

# Setup details here. (Recommended to use the default ones since you will

# need a bit RGSS knowledge to add more.)

def self.details

["#{Vocab::currency_unit}: #{$game_party.gold}",

"Steps: #{$game_party.steps}",

"Items: #{$game_party.all_items.size}",

"Map: #{$game_map.name}",

"Party Leader: #{$game_party.leader.name}",

"Encounters: #{$game_system.battle_count}",]

# "Save count: #{$game_system.save_count}",

# "Variable I: #{$game_variables[1]}",

# "Variable II: #{$game_variables[2]}"]

end

 

# DETAILS_ICONS:

# DETAILS_ICONS[id] = icon_id

# Set the details icon_id. (optional)

# Should be in the same order as details.

# Use nil to disable a icon.

DETAILS_ICONS = []

DETAILS_ICONS[0] = 2114 # GOLD

DETAILS_ICONS[1] = 672 # STEPS

DETAILS_ICONS[2] = 3401 # ITEMS

DETAILS_ICONS[3] = 2381 # MAP

DETAILS_ICONS[4] = 8112 # LEADER

DETAILS_ICONS[5] = 4355 # BATTLE COUNT

# DETAILS_ICONS[6] = 224 # SAVE COUNT

# DETAILS_ICONS[7] = nil # VAR 1

# DETAILS_ICONS[8] = nil # VAR 2

 

# Transition, nil to use default.

# TRANSITION [speed, transition, opacity]

TRANSITION = nil

 

end

end

# *** Don't edit below unless you know what you are doing. ***

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

# ** Error Handler

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

unless $imported["XAIL-XS-CORE"]

# // Error handler when XS - Core is not installed.

msg = "The script %s requires the latest version of XS - Core in order to function properly."

name = "XS - Menu Delux"

msgbox(sprintf(msg, name))

exit

end

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

# ** Game_System

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

class Game_System

 

attr_accessor :menu_list

 

alias xail_menu_delux_gm_sys_initialize initialize

def initialize(*args, &block)

# // Method to initialize game system.

xail_menu_delux_gm_sys_initialize(*args, &block)

@menu_list = {}

end

 

def get_menu

# // Method to get the menu list.

if XAIL::MENU_DELUX::MENU_CUSTOM

return $game_system.menu_list

else

return XAIL::MENU_DELUX::MENU_LIST

end

end

 

end

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

# ** Game_Interpreter

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

class Game_Interpreter

 

def menu_scene(key, type = :add)

# // Method to add/remove a menu item to the list.

case type

when :add # // Add menu id.

unless $game_system.menu_list.include?(XAIL::MENU_DELUX::MENU_LIST[key])

$game_system.menu_list[key] = XAIL::MENU_DELUX::MENU_LIST[key]

end unless XAIL::MENU_DELUX::MENU_LIST[key].nil?

when :del # // Remove menu id.

unless XAIL::MENU_DELUX::MENU_LIST[key].nil?

$game_system.menu_list.delete(key)

end

end

end

 

def menu_active?(key)

# // Method to check if menu key is enabled.

# This will return nil if menu item not added in the list.

return $game_system.menu_list[key][3] rescue nil

end

 

def menu_active(key, enabled)

# // Method to enable id.

$game_system.menu_list[id][3] = enabled

end

 

def menu_add_all

# // Method to add all available menu items.

XAIL::MENU_DELUX::MENU_LIST.each {|key, value| menu_scene(key) }

end

 

def menu_del_all

# // Method to remove all available menu items.

XAIL::MENU_DELUX::MENU_LIST.each {|key, value| menu_scene(key, :del) }

end

 

end

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

# ** Game_Map

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

class Game_Map

 

attr_reader :name

 

alias xail_menu_delux_setup setup

def setup(map_id)

# // Method to setup the map id.

xail_menu_delux_setup(map_id)

@name = $data_mapinfos[@map_id].name

end

 

end

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

# ** Window_MenuCommand

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

class Window_MenuCommand < Window_Command

 

def window_width

# // Method to return the width of MENU_WINDOW.

return 170

end

 

def alignment

# // Method to return the alignment.

return XAIL::MENU_DELUX::MENU_ALIGNMENT

end

 

def menu_color(color, enabled = true)

# // Method to set the color and alpha if not enabled.

contents.font.color.set(color)

contents.font.color.alpha = Colors::AlphaMenu unless enabled

end

 

def item_rect_for_text(index)

# // Method to draw item rect for text.

rect = item_rect(index)

contents.fill_rect(rect.x, rect.y, contents_width, contents_height, Color.new(0,0,0,60))

rect.x += 24

rect.width -= 8

draw_icon(XAIL::MENU_DELUX::MENU_LIST.values[index][2], -2, rect.y) unless XAIL::MENU_DELUX::MENU_LIST.values[index][2].nil?

rect

end

 

def draw_item(index)

# // Method to draw the command item.

contents.font.name = XAIL::MENU_DELUX::MENU_FONT[0]

contents.font.size = XAIL::MENU_DELUX::MENU_FONT[1]

# // Save option.

XAIL::MENU_DELUX::MENU_LIST[:save][3] = save_enabled if XAIL::MENU_DELUX::MENU_SAVE

menu_color(XAIL::MENU_DELUX::MENU_FONT[2], menu_enabled?(index))

# // Font settings

contents.font.bold = XAIL::MENU_DELUX::MENU_FONT[3]

contents.font.shadow = XAIL::MENU_DELUX::MENU_FONT[4]

draw_text(item_rect_for_text(index), command_name(index), alignment)

reset_font_settings

end

 

def menu_enabled?(index)

# // Method to check if menu item is enabled.

XAIL::MENU_DELUX::MENU_LIST.values[index][3]

end

 

def make_command_list

# // Method to add the commands.

$game_system.get_menu.each {|key, value|

name = value[0] == "" ? key.id2name.capitalize : value[0]

XAIL::MENU_DELUX::MENU_LIST[:save][3] = save_enabled if XAIL::MENU_DELUX::MENU_SAVE

add_command(name, key, value[3], value[5].nil? ? nil : value[5])

}

end

 

end

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

# ** Window_MenuStatus

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

class Window_MenuStatus < Window_Selectable

 

def window_width

# // Method to determine window width.

return 250

end

 

def window_height

# // Method to determine window height.

return Graphics.height

end

 

def standard_padding

# // Method to determine standard padding.

return 4

end

 

def col_max

# // Method to determine col max.

return 2

end

 

def spacing

# // Method to determine spacing.

return 30

end

 

def item_width

# // Method to determine item width.

return 98

end

 

def item_height

# // Method to determine item height.

return 128

end

 

def refresh

# // Method to refresh the window.

contents.clear

draw_background

draw_all_items

end

 

def draw_background

# // Method to draw background.

contents.fill_rect(0, 0, contents_width, contents_height, Color.new(0,0,0,60))

end

 

def draw_item(index)

# // Method to draw item.

actor = $game_party.members[index]

rect = item_rect(index)

draw_item_background(index)

# // Face

draw_actor_face(actor, rect.x + 1, rect.y + 1, true)

# // Name

draw_font_text(actor.name, rect.x + 4, rect.y, rect.width, 0, XAIL::MENU_DELUX::MENU_FONT[0], 20, XAIL::MENU_DELUX::MENU_FONT[2])

# // Level

lvl = "#{Vocab::level_a} #{actor.level}"

draw_font_text(lvl, rect.x + 4, rect.y + 64, rect.width, 0, XAIL::MENU_DELUX::MENU_FONT[0], 16, XAIL::MENU_DELUX::MENU_FONT[2])

# // Class

draw_font_text(actor.class.name, rect.x - 4, rect.y + 76, rect.width, 2, XAIL::MENU_DELUX::MENU_FONT[0], 16, XAIL::MENU_DELUX::MENU_FONT[2])

# // Stats

draw_menu_stats(actor, :hp, rect.x, rect.y + 90, XAIL::MENU_DELUX::BAR_HP[0], XAIL::MENU_DELUX::BAR_HP[1], rect.width - 2)

draw_menu_stats(actor, :mp, rect.x, rect.y + 100, XAIL::MENU_DELUX::BAR_MP[0], XAIL::MENU_DELUX::BAR_MP[1], rect.width - 2)

draw_menu_stats(actor, :tp, rect.x, rect.y + 110, XAIL::MENU_DELUX::BAR_TP[0], XAIL::MENU_DELUX::BAR_TP[1], rect.width - 2)

end

 

def draw_menu_stats(actor, stat, x, y, color1, color2, width)

# // Method to draw actor hp & mp.

case stat

when :hp

rate = actor.hp_rate ; vocab = Vocab::hp_a ; values = [actor.hp, actor.mhp]

when :mp

rate = actor.mp_rate ; vocab = Vocab::mp_a ; values = [actor.mp, actor.mmp]

when :tp

rate = actor.tp_rate ; vocab = Vocab::tp_a ; values = [actor.tp, actor.max_tp]

end

contents.font.name = XAIL::MENU_DELUX::MENU_FONT[0]

contents.font.size = 14 # // Override font size.

contents.font.color = XAIL::MENU_DELUX::MENU_FONT[2]

contents.font.bold = XAIL::MENU_DELUX::MENU_FONT[3]

contents.font.shadow = XAIL::MENU_DELUX::MENU_FONT[4]

# // Draw guage.

draw_gauge_ex(x, y - 8, width, 8, rate, color1, color2)

# // Draw stats.

draw_text(x + 1, y, width, line_height, values[0], 0)

draw_text(x - 1, y, width, line_height, values[1], 2)

# // Draw vocab.

draw_text(x, y, width, line_height, vocab, 1)

reset_font_settings

end

 

end

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

# ** Window_Menu_Details

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

class Window_Menu_Details < Window_Base

 

def initialize(x, y)

# // Method to initialize.

super(x, y, window_width, fitting_height(XAIL::MENU_DELUX.details.size) + 6)

@leader = $game_party.leader

refresh

end

 

def standard_padding

# // Method to determine standard padding.

return 8

end

 

def window_width

# // Method to determine window width.

return 172

end

 

def refresh

# // Method to refresh the window.

contents.clear

# // Draw background.

draw_background

# // Draw details.

y = -10

XAIL::MENU_DELUX.details.each_index {|i|

draw_line_ex(0, y+=24, Color.new(255,255,255,32), Color.new(0,0,0,64))

draw_font_text(XAIL::MENU_DELUX.details, -4, line_height * i + 4, contents_width, 2, XAIL::MENU_DELUX::MENU_FONT[0], 16, XAIL::MENU_DELUX::MENU_FONT[2])

}

# // Draw icons.

draw_icons(XAIL::MENU_DELUX::DETAILS_ICONS, :vertical, 2, line_height * 0 + 2)

end

 

def draw_background

# // Method to draw background.

contents.fill_rect(0, 0, contents_width, contents_height, Color.new(0,0,0,60))

end

 

def update

# // Method to update details window.

super

if @leader != $game_party.leader

@leader = $game_party.leader

refresh

end

end

 

end

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

# ** Window_Menu_Playtime

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

class Window_Menu_Playtime < Window_Base

 

def initialize(x, y)

# // Method to initialize.

super(x, y, 120, fitting_height(1))

@playtime = $game_system.playtime_s

refresh

end

 

def refresh

# // Method to refresh the window.

contents.clear

# // Draw icon.

draw_icon(XAIL::MENU_DELUX::PLAYTIME_WINDOW[4], 4, 0)

# // Draw playtime.

draw_font_text(@playtime, 0, 6, contents_width, 2, XAIL::MENU_DELUX::MENU_FONT[0], 22, XAIL::MENU_DELUX::MENU_FONT[2])

end

 

def update

# // Method to update the window.

super

@playtime = $game_system.playtime_s

refresh

end

 

end

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

# ** Window_Menu_Help

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

class Window_Menu_Help < Window_Help

 

attr_accessor :index

 

alias xail_icon_menu_winhelp_init initialize

def initialize(*args, &block)

# // Method to initialize help window.

xail_icon_menu_winhelp_init(*args, &block)

@index = 0

end

 

def set_text(text, enabled)

# // Method to set a new help text.

if text != @text

menu_color(XAIL::MENU_DELUX::MENU_FONT[2], enabled)

@text = text

refresh

end

end

 

def refresh

# // Refresh help contents.

contents.clear

draw_help_text

end

 

def draw_help_text

# // Method to draw the help text.

contents.font.name = XAIL::MENU_DELUX::MENU_FONT[0]

contents.font.size = XAIL::MENU_DELUX::MENU_FONT[1]

menu_color(XAIL::MENU_DELUX::MENU_FONT[2], menu_enabled?(@index))

contents.font.bold = XAIL::MENU_DELUX::MENU_FONT[3]

contents.font.shadow = XAIL::MENU_DELUX::MENU_FONT[4]

# // Draw title and description for the menu.

draw_line_ex(0, 14, Color.new(255,255,255,128), Color.new(0,0,0,200))

draw_text_ex_no_reset(0, 0, @text)

reset_font_settings

end

 

def menu_enabled?(index)

# // Method to check if menu item is enabled.

XAIL::MENU_DELUX::MENU_LIST.values[index][3]

end

 

def menu_color(color, enabled = true)

# // Method to set the color and alpha if not enabled.

contents.font.color.set(color)

contents.font.color.alpha = 150 unless enabled

end

 

end

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

# ** Scene_MenuBase

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

class Scene_MenuBase < Scene_Base

 

def start

# // Method to start the scene.

super

@actor = $game_party.menu_actor

if SceneManager.scene_is?(Scene_Menu)

@backgrounds = []

@animations = []

create_menu_backgrounds

create_menu_animations

end

end

 

def create_menu_backgrounds

# // Method to create custom background(s).

XAIL::MENU_DELUX::BACKGROUND.each {|key, value| @backgrounds << [sprite.new, key] }

@backgrounds.each {|i|

i[0].bitmap = Cache.system(i[1])

i[0].x = XAIL::MENU_DELUX::BACKGROUND[i[1]][0]

i[0].y = XAIL::MENU_DELUX::BACKGROUND[i[1]][1]

i[0].z = XAIL::MENU_DELUX::BACKGROUND[i[1]][2]

i[0].opacity = XAIL::MENU_DELUX::BACKGROUND[i[1]][3]

}

end

 

def create_menu_animations

# // Method to create custom animation(s).

# name => [z, zoom_x, zoom_y, blend_type, opacity]

XAIL::MENU_DELUX::ANIM_LIST.each {|key, value| @animations.push << [Plane.new, key] }

@animations.each {|i|

i[0].bitmap = Cache.system(i[1])

i[0].z = XAIL::MENU_DELUX::ANIM_LIST[i[1]][0]

i[0].zoom_x = XAIL::MENU_DELUX::ANIM_LIST[i[1]][1]

i[0].zoom_y = XAIL::MENU_DELUX::ANIM_LIST[i[1]][2]

i[0].blend_type = XAIL::MENU_DELUX::ANIM_LIST[i[1]][3]

i[0].opacity = XAIL::MENU_DELUX::ANIM_LIST[i[1]][4]

}

end

 

alias xail_upd_menubase_delux_upd update

def update(*args, &block)

# // Method for updating the scene.

xail_upd_menubase_delux_upd(*args, &block)

if SceneManager.scene_is?(Scene_Menu)

for i in 0...@animations.size

@animations[0].ox += 1.2 - i

@animations[0].oy -= 0.6 + i

end unless scene_changing?

delay?(1)

end

end

 

def delay?(amount)

# // Method to delay.

amount.times do

update_basic

end

end

 

alias xail_menubase_delux_transition perform_transition

def perform_transition(*args, &block)

# // Method to create the transition.

return if $game_system.get_menu.empty?

if XAIL::MENU_DELUX::TRANSITION.nil?

xail_menubase_delux_transition(*args, &block)

else

Graphics.transition(XAIL::MENU_DELUX::TRANSITION[0],XAIL::MENU_DELUX::TRANSITION[1],XAIL::MENU_DELUX::TRANSITION[2])

end

end

 

def dispose_sprites

# // Method to dispose sprites.

@backgrounds.each {|i| i[0].dispose unless i[0].nil? ; i[0] = nil } rescue nil

@animations.each {|i| i[0].dispose unless i[0].nil? ; i[0] = nil } rescue nil

end

 

def terminate

# // Method to terminate.

super

dispose_sprites unless SceneManager.scene_is?(Scene_Menu)

end

 

end

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

# ** Scene_Menu

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

class Scene_Menu < Scene_MenuBase

 

def start

super

# // Method to start the scene.

# // Return if menu empty.

return command_map if $game_system.get_menu.empty?

# // Create windows.

create_menu_command_window

create_menu_status_window

create_menu_details_window

create_menu_playtime_window if XAIL::MENU_DELUX::PLAYTIME_WINDOW[5]

if XAIL::MENU_DELUX::HELP_WINDOW[4]

create_menu_help_window

help_update(@command_window.index)

end

# // Play music if enabled.

play_menu_music if XAIL::MENU_DELUX::MUSIC

end

 

def create_menu_command_window

# // Method to create the command window.

@command_window = Window_MenuCommand.new

@command_window.windowskin = Cache.system(XAIL::MENU_DELUX::MENU_SKIN) unless XAIL::MENU_DELUX::MENU_SKIN.nil?

@command_window.x = XAIL::MENU_DELUX::MENU_WINDOW[0]

@command_window.y = XAIL::MENU_DELUX::MENU_WINDOW[1]

@command_window.z = XAIL::MENU_DELUX::MENU_WINDOW[2]

@command_window.opacity = XAIL::MENU_DELUX::MENU_WINDOW[3]

$game_system.get_menu.each {|key, value|

unless value[5].nil?

@command_window.set_handler(key, method(:command_custom))

else

if value[4]

@command_window.set_handler(key, method(:command_personal))

else

@command_window.set_handler(key, method("command_#{key}".to_sym))

end

end

}

@command_window.set_handler(:cancel, method(:return_scene))

end

 

def create_menu_status_window

# // Method to create the status window.

x = XAIL::MENU_DELUX::STATUS_WINDOW[0]

y = XAIL::MENU_DELUX::STATUS_WINDOW[1]

@status_window = Window_MenuStatus.new(x, y)

@status_window.z = XAIL::MENU_DELUX::STATUS_WINDOW[2]

@status_window.opacity = XAIL::MENU_DELUX::STATUS_WINDOW[3]

end

 

def create_menu_details_window

# // Method to create the details window.

x = XAIL::MENU_DELUX::DETAILS_WINDOW[0]

y = XAIL::MENU_DELUX::DETAILS_WINDOW[1]

@details_window = Window_Menu_Details.new(x, y)

@details_window.z = XAIL::MENU_DELUX::DETAILS_WINDOW[2]

@details_window.opacity = XAIL::MENU_DELUX::DETAILS_WINDOW[3]

end

 

def create_menu_playtime_window

# // Method to create the playtime window.

x = XAIL::MENU_DELUX::PLAYTIME_WINDOW[0]

y = XAIL::MENU_DELUX::PLAYTIME_WINDOW[1]

@playtime_window = Window_Menu_Playtime.new(x, y)

@playtime_window.z = XAIL::MENU_DELUX::PLAYTIME_WINDOW[2]

@playtime_window.opacity = XAIL::MENU_DELUX::PLAYTIME_WINDOW[3]

end

 

def create_menu_help_window

# // Method to create the help window.

@help_window = Window_Menu_Help.new(2)

@help_window.viewport = @viewport

@help_window.windowskin = Cache.system(XAIL::MENU_DELUX::MENU_SKIN) unless XAIL::MENU_DELUX::MENU_SKIN.nil?

@help_window.index = @command_window.index

@help_window.x = XAIL::MENU_DELUX::HELP_WINDOW[0]

@help_window.y = XAIL::MENU_DELUX::HELP_WINDOW[1]

@help_window.z = XAIL::MENU_DELUX::HELP_WINDOW[2]

@help_window.opacity = XAIL::MENU_DELUX::HELP_WINDOW[3]

end

 

def play_menu_music

# // Method to play menu music.

@last_bgm = RPG::BGM.last

@last_bgs = RPG::BGS.last

bgm = XAIL::MENU_DELUX::MUSIC_BGM

bgs = XAIL::MENU_DELUX::MUSIC_BGS

Sound.play(bgm[0], bgm[1], bgm[2], :bgm)

Sound.play(bgs[0], bgs[1], bgs[2], :bgs)

end

 

alias xail_upd_menu_delux_upd update

def update(*args, &block)

# // Method for updating the scene.

xail_upd_menu_delux_upd(*args, &block)

if XAIL::MENU_DELUX::HELP_WINDOW[4]

old_index = @help_window.index

if old_index != @command_window.index

help_update(@command_window.index)

end

end

end

 

def help_update(index)

# // If index changes update help window text.

list = XAIL::MENU_DELUX::MENU_LIST

icon = list.values[index][2].nil? ? "" : list.values[index][2]

name = list.values[index][0] == "" ? list.keys[index].id2name.capitalize : list.values[index][0]

if icon == "" ; title = name ; else ; title = '\i[' + icon.to_s + ']' + name ; end

desc = '\c[0]' + list.values[index][1]

text = "#{title}\n#{desc}"

enabled = list.values[index][3]

@help_window.index = index

@help_window.set_text(text, enabled)

end

 

def on_personal_ok

# // Method override on personal ok.

scene = "Scene_#{@command_window.current_symbol.to_s.capitalize}".to_class

SceneManager.call(scene)

end

 

def command_custom

# // Method to call a custom command. (Don't remove)

if @command_window.current_ext.is_a?(Integer)

$game_temp.reserve_common_event(@command_window.current_ext)

return command_map

end

SceneManager.call(@command_window.current_ext)

end

 

def command_map

# // command_map (Don't remove)

if $game_system.get_menu.empty?

Sound.play_buzzer

$game_message.texts << XAIL::MENU_DELUX::EMPTY

end

SceneManager.call(Scene_Map)

end

 

def pre_terminate

# // Method to pre terminate scene menu.

# // Play last bgm and bgs if menu music is enabled.

if XAIL::MENU_DELUX::MUSIC

@last_bgm.replay rescue nil

@last_bgs.replay rescue nil

end

end

 

end

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

# ** Scene_Menu

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

class Scene_File < Scene_MenuBase

 

alias xail_upd_menu_delux_create_savefile_viewport create_savefile_viewport

def create_savefile_viewport

# // Method to create save viewport.

xail_upd_menu_delux_create_savefile_viewport

@savefile_viewport.z = 9999

end

 

end # END OF FILE

 

#=*==========================================================================*=#

# ** END OF FILE

#=*==========================================================================*=#

 

 

 

What do I do :(

Edited by Elliot Wyvern

Share this post


Link to post
Share on other sites

Niclas, whatever site you are using to house the images and scripts on has been suspended. Just an FYI in case this effects all your other scripts, which is a shame, because they all look very nice.

 

I definitely would like to grab ahold of this one if you ever get it up again.

Share this post


Link to post
Share on other sites

Niclas, whatever site you are using to house the images and scripts on has been suspended. Just an FYI in case this effects all your other scripts, which is a shame, because they all look very nice.

 

I definitely would like to grab ahold of this one if you ever get it up again.

 

He is working on it.

 

Yeah, my domain was due to cancel today. I am going to buy a new one today or tomorrow so hopefully it will be fixed soon :)

Share this post


Link to post
Share on other sites

Hey quick question, for 640x480 resolutions I've already made them all fit, but is there a way to expand the main window with the party members? I'd like for it to be full and without a gap between the menu options and the stats on the right side. Thanks

Awesome script :D

Edited by Alaek

Share this post


Link to post
Share on other sites

Just the gap between the 2 sides I'd like to know if it's possible to expand it.

 

Thanks

post-7934-0-86426800-1355852924_thumb.png

Edited by Alaek

Share this post


Link to post
Share on other sites

Yeah it is possible. Try to change the width of the windows or the x position. If that doesn't work you need to mess with the spacing however that is not include in the settings sadly.

Share this post


Link to post
Share on other sites

Okay, I have updated the URL on this topic now. The script is now available.

Share this post


Link to post
Share on other sites

Hi :D Great job on this menu script Niclas, it looks pretty amazing.

I was wondering one thing tho, this script its only for the main menu screen? or does it also applies for the Equip, Skill, etc? (I've read all 4 pages of this post but cant seem to find anyone asking the same).

 

For me it only modifies the main menu. i might have dont something to screw ur script.

 

Thanks in advance for your answer :D

 

PS: Im also missing some of the resources o.o my menu aint showing those cute icons next to the menu options

Edited by necrosage22

Share this post


Link to post
Share on other sites

@necrosage22: Thats because I am using a custom iconset which enables those icons. No, this script only change the main menu (Scene_Menu).

Share this post


Link to post
Share on other sites

EDIT 2: After adding a new menu point for CrystalNoel's Licence Board script, the following error occurs when pressing the return key on the "Licence Board" point in the menu:

 

 

Crystal Basic Module:83:in `new': wrong number of arguments (0 for 1) (ArgumentError)

from Crystal Basic Module:83:in `call'

from XS Menu Delux:787:in `command_custom'

from Window_Selectable:212:in `call'

from Window_Selectable:212:in `call_handler'

from Window_Command:136:in `call_ok_handler'

from Window_Selectable:322:in `process_ok'

from Window_MenuCommand:98:in `process_ok'

from Window_Selectable:297:in `process_handling'

from XS Core:315:in `process_handling'

from Window_Selectable:276:in `update'

from Scene_Base:95:in `block in update_all_windows'

from Scene_Base:93:in `each'

from Scene_Base:93:in `update_all_windows'

from Scene_Base:49:in `update_basic'

from Scene_Base:41:in `update'

from XS Menu Delux:615:in `update'

from XS Menu Delux:753:in `update'

from Scene_Base:14:in `main'

from SceneManager:22:in `run'

from Main:9:in `block in <main>'

 

From my limited knowledge, the argumenterror occurs because the LB wants the actor's ID as an argument, but it doesn't get it. The LB's entry in the XS menu delux script is:

 

 

:licence => ["","Licence board.", 750, true, true, Scene_LicenceBoard]

 

Note: From looking at the script, it seems it's not prepared for an overlapping of personal (actor-selecting) and custom scene calls. Could you please look into it? Thank you.

 

EDIT: I solved the problem below, it was Modern Algebra's quest journal adding a new menu element. If you get a similar error, make sure all custom menu elements are made within the XS Menu Deluxe script!

 

XS Menu Delux:322:in `menu_enabled?': undefined method `[]' for nil:NilClass (NoMethodError)

from XS Menu Delux:312:in `draw_item'

from Window_Selectable:409:in `block in draw_all_items'

from Window_Selectable:409:in `times'

from Window_Selectable:409:in `draw_all_items'

from Window_Selectable:440:in `refresh'

from Window_Command:150:in `refresh'

from Window_Command:15:in `initialize'

from Window_MenuCommand:18:in `initialize'

from XS Menu Delux:680:in `new'

from XS Menu Delux:680:in `create_menu_command_window'

from XS Menu Delux:666:in `start'

from Scene_Base:12:in `main'

from SceneManager:22:in `run'

from Main:9:in `block in <main>'

Edited by Naridar

Share this post


Link to post
Share on other sites

Hey, nice to meet you all! I'm definitely a noob with RPG Maker and Ruby. I got your script Niclas and it's really dang good! Being a noob though, could you show an example how to do this exactly: 

 # If MENU_CUSTOM is true you will have to add the commands yourself
    # ingame, which can be useful for certain quest related stuff or if you
    # want to enable/disable menu commands.
    # To add/remove a command ingame follow these instructions:
    # 
    # In a script call do like this:
    # menu_scene(key, type)
    # menu_scene(:item,:add) # To add item to menu list.
    # menu_scene(:item,:del) # To remove item from menu list.
    #
    # In a conditional branch you can check if a menu command is 
    # enabled/disabled:
    # menu_active?(key) 
    # menu_active?(:item) # Check if item is enabled.
    # !menu_active?(:item) # Check if item is disabled.
    #
    # To set a id to be enabled do like this:
    # menu_active(:skill, true) # Set menu skill to be enabled.
    #
    # To add/remove all available menu commands use one of the 
    # following methods in a script call:
    # menu_add_all
    # menu_del_all
    #
    # MENU_CUSTOM = true/false

 

I'm not sure exactly what I'm supposed to put for "menu_scene(key, type)" Thanks in advance!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted