Screenshots
(http://imagesload.net/daten_no/1223200484_ff9menu.jpg)
Anleitung
Einstellungsmöglichkeiten befinden sich ziemlich am Anfang im Modul FFIX_Menu und sind kommentiert.
Anmerkung
Master-M hat hier (http://rpgvx.de/forum.php?topic=1967.0) nach dem Menü gefragt und als ich ihm ein Screenshot zeigte und er sagte, dass es ihm so gefällt hab ich es nicht weiter und 1:1 nachgebaut - was aber möglich wäre :)
Kompatibilität
Das Skript ist zu keinen anderen Menüs kompatibel. Menüerweiterungen müssen unter dieses Skript im Script Editor eingefügt werden um (möglicherweise) zu funktionieren.
- hellMinors Questlog - Scene_Menu Addition von Evil95: darüber einfügen
Fehler gefunden?
1. Von der Fehlermeldung einen Screenshot erstellen (Taste Druck drücken, in Paint einfügen und speichern als PNG)
2. Das Bild z.B. auf Imagesload.net (http://imagesload.net/) hochladen.
3. Eine Liste aller eingefügten Skripte schreiben.
4. Die Adresse zum Bild und die Liste hier posten :)
Script
#==============================================================================
# ** [ERZVX] Final Fantasy IX Menü
#------------------------------------------------------------------------------
# Autor: ERZENGEL
# Datum: 6. Oktober 2008 19:11 (GMT +02:00)
# Lizenz: http://creativecommons.org/licenses/by-nc-sa/3.0/deed.de
#------------------------------------------------------------------------------
# Nachbau des Menüs von Final Fantasy IX
#==============================================================================
################################################################################
# Optimized for 544x416, Window_Base::WLH equal 24 and RPGVX's default scripts #
################################################################################
module FFIX_Menu
# Indizes der jeweiligen Icons im Iconset
TIME_ICON = 188
GOLD_ICON = 147
# die Überschrift des Zeit und Gold- und Ortfensters
TIMEGOLD_HEADLINE = 'ZEIT & GOLD'
LOCATION_HEADLINE = 'ORT'
# Farben der Überschriften (Rand, Inhalt)
HEADLINECOLORS = [Color.new(0, 0, 0), Color.new(255, 255, 255)]
# Farbe des Faceshintergrund und des Statusanzeigerechtecks
FACESRECTCOLOR = Color.new(0, 0, 0, 128)
STATUSRECTCOLOR = Color.new(0, 0, 0, 192)
# Names des Pictures, dass als Hintergrund verwendet wird
# Leer lassen, falls die Map als Hintergrund verwendet werden soll
BACKGROUNDNAME = ''
# Kartenname, wenn ein Fehler beim Kartennamen auslesen eintritt
MAPNAME = 'Undefined'
end
#==============================================================================
# ** Bitmap
#------------------------------------------------------------------------------
# The bitmap class. Bitmaps are expressions of so-called graphics.
#==============================================================================
class Bitmap
def draw_framed_text(x, y, width, height, str, align = 0,
color1 = Color.new(0, 0, 0), color2 = Color.new(255, 255, 255))
x, y, width, height = x.x, x.y, x.width, x.height if x.kind_of?(Rect)
shadow = font.shadow
orig_color = font.color.dup
font.shadow = false
font.color = color1
draw_text(x.succ, y, width, height, str, align)
draw_text(x - 1, y, width, height, str, align)
draw_text(x, y.succ, width, height, str, align)
draw_text(x, y - 1, width, height, str, align)
font.color = color2
draw_text(x, y, width, height, str, align)
font.color = orig_color
font.shadow = shadow
end
def draw_frame(rect, color)
color = color.dup
fill_rect(rect, color)
rect.x += 1
rect.y += 1
rect.width -= 2
rect.height -= 2
color.alpha = 0
fill_rect(rect, color)
end
end
#==============================================================================
# ** Window_Headline
#------------------------------------------------------------------------------
# This window displays the currents map name.
#==============================================================================
class Window_Headline < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
# x : window x-coordinate
# y : window y-coordinate
# width : window width
# height : window height
# headline : headline options
# font : font options
#--------------------------------------------------------------------------
def initialize(x, y, width, height, headline, font = {})
super(x, y, width, height)
@headline_sprite = Sprite.new(viewport())
@headline_sprite.bitmap = Bitmap.new(headline[:width] || width(),
headline[:height])
[:name, :size, :bold, :italic, :shadow, :color].each{|sym|
@headline_sprite.bitmap.font.send("#{sym}=", font[sym]) if !font[sym].nil?
}
draw_headline(headline[:string], headline[:colors])
end
#--------------------------------------------------------------------------
# * Draws the headline
# str : headline string
# color : headline contour color
#--------------------------------------------------------------------------
def draw_headline(str, colors)
@headline_sprite.bitmap.clear
@headline_sprite.bitmap.draw_framed_text(0, 0, @headline_sprite.width,
@headline_sprite.height, str, 0, colors.first, colors[1])
@headline_sprite.x = x() + 8
@headline_sprite.y = y() - 10
@headline_sprite.z = z.succ
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose()
@headline_sprite.bitmap.dispose
@headline_sprite.dispose
super()
end
end
#==============================================================================
# ** Window_TimeAndGold
#------------------------------------------------------------------------------
# This window displays the play time and the amount of gold.
#==============================================================================
class Window_TimeAndGold < Window_Headline
#--------------------------------------------------------------------------
# * Constants
#--------------------------------------------------------------------------
ICON_WIDTH = 24 # The width
#--------------------------------------------------------------------------
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, (WLH * 2) + 32,
{:height => 18, :string => FFIX_Menu::TIMEGOLD_HEADLINE,
:colors => FFIX_Menu::HEADLINECOLORS},
{:bold => true, :size => 16})
refresh()
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh()
contents.clear
x, y = 4, 0
draw_playtime(x, y)
draw_currency_value(x, y + WLH)
end
#--------------------------------------------------------------------------
# * Draws the amoutn of gold
#--------------------------------------------------------------------------
def draw_currency_value(x, y)
super($game_party.gold, x + ICON_WIDTH, WLH,
contents.width - (x * 2 + ICON_WIDTH))
draw_icon(FFIX_Menu::GOLD_ICON, x, y)
end
#--------------------------------------------------------------------------
# * Draws the play time
#--------------------------------------------------------------------------
def draw_playtime(x, y)
draw_icon(FFIX_Menu::TIME_ICON, x, y)
sixty = 60
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / sixty / sixty
min = @total_sec / sixty % sixty
sec = @total_sec % sixty
text = sprintf("%02d:%02d:%02d", hour, min, sec)
contents.font.color = normal_color()
contents.draw_text(x + ICON_WIDTH, y,
contents.width - (x * 2 + ICON_WIDTH), WLH, text, 2)
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update()
super()
refresh() if Graphics.frame_count / Graphics.frame_rate != @total_sec
end
end
#==============================================================================
# ** Window_Location
#------------------------------------------------------------------------------
# This window displays the currents map name.
#==============================================================================
class Window_Location < Window_Headline
#--------------------------------------------------------------------------
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 200, WLH + 32,
{:height => 18, :string => FFIX_Menu::LOCATION_HEADLINE,
:colors => FFIX_Menu::HEADLINECOLORS},
{:bold => true, :size => 16})
refresh()
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh()
contents.clear
draw_map_name(4, 0)
end
#--------------------------------------------------------------------------
# * Draws the name of the current map
#--------------------------------------------------------------------------
def draw_map_name(x, y)
$data_mapinfos ||= load_data('Data/MapInfos.rvdata')
name = $data_mapinfos[$game_map.map_id].name rescue FFIX_Menu::MAPNAME
contents.draw_text(x, y, contents.width, WLH, name, 1)
end
end
#==============================================================================
# ** Window_FFIX_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================
class Window_FFIX_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Constants
#--------------------------------------------------------------------------
HEIGHT = 84
SEPERATOR = '/'
#--------------------------------------------------------------------------
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 400, 368)
refresh()
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh()
contents.clear
height = HEIGHT - 4
contents.fill_rect(2, 2, height, height * 4 + 12, FFIX_Menu::FACESRECTCOLOR)
4.times{|y|
rect = Rect.new(222, y * HEIGHT + 2, 96, WLH)
contents.draw_frame(rect, FFIX_Menu::STATUSRECTCOLOR)
}
contents.font.size = 18
@item_max = $game_party.members.size
$game_party.members.each{|actor|
draw_actor_face(actor, 2, actor.index * HEIGHT + 2, height)
x = HEIGHT + 8
y = actor.index * HEIGHT
contents.font.bold = true
draw_actor_name(actor, x + 4, y)
contents.font.bold = false
draw_actor_level(actor, x + 4, y + contents.font.size)
draw_actor_state(actor, x + 130, y + 2)
draw_actor_hp(actor, x + 4, y + contents.font.size * 2)
draw_actor_mp(actor, x + 4, y + contents.font.size * 3)
}
end
#--------------------------------------------------------------------------
# * Draw bold text
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# string : will be drawn
#--------------------------------------------------------------------------
def draw_bold_text(x, y, string)
contents.font.bold = true
contents.draw_framed_text(x, y, 32, WLH, string)
contents.font.bold = false
end
#--------------------------------------------------------------------------
# * Draw Level
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def draw_actor_level(actor, x, y)
contents.font.color = normal_color()
draw_bold_text(x, y, Vocab.level_a)
contents.draw_text(x + 44, y, 24, WLH, actor.level, 2)
end
#--------------------------------------------------------------------------
# * Draw HP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : Width
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y)
draw_bold_text(x, y, Vocab.hp_a)
contents.font.color = hp_color(actor)
last_font_size = contents.font.size
contents.draw_text(x + 24, y, 44, WLH, actor.hp, 2)
contents.font.color = normal_color()
contents.draw_text(x + 68, y, 11, WLH, SEPERATOR, 2)
contents.draw_text(x + 79, y, 44, WLH, actor.maxhp, 2)
end
#--------------------------------------------------------------------------
# * Draw MP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : Width
#--------------------------------------------------------------------------
def draw_actor_mp(actor, x, y)
draw_bold_text(x, y, Vocab.mp_a)
contents.font.color = mp_color(actor)
last_font_size = contents.font.size
contents.draw_text(x + 24, y, 44, WLH, actor.mp, 2)
contents.font.color = normal_color()
contents.draw_text(x + 68, y, 11, WLH, SEPERATOR, 2)
contents.draw_text(x + 79, y, 44, WLH, actor.maxmp, 2)
end
#--------------------------------------------------------------------------
# * Update cursor
#--------------------------------------------------------------------------
def update_cursor()
if @index < 0 # No cursor
cursor_rect.empty()
elsif @index < @item_max # Normal
cursor_rect.set(0, @index * HEIGHT, contents.width, HEIGHT)
elsif @index >= 100 # Self
cursor_rect.set(0, (@index - 100) * HEIGHT, contents.width, HEIGHT)
else # All
cursor_rect.set(0, 0, contents.width(), @item_max * HEIGHT)
end
end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start()
super()
create_menu_background()
create_command_window()
@gold_window ||= Window_TimeAndGold.new(360, 272)
@status_window ||= Window_FFIX_MenuStatus.new(24, 24)
@location_window ||= Window_Location.new(320, 352)
[@location_window, @gold_window, @command_window].each{|win|
win.z = @status_window.z.succ
}
@location_window.back_opacity = @gold_window.back_opacity = 255
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
alias_method(:erzvx_ffix_terminate, :terminate)
def terminate()
erzvx_ffix_terminate()
@location_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias_method(:erzvx_ffix_update, :update)
def update()
@location_window.update
erzvx_ffix_update()
end
#--------------------------------------------------------------------------
# * Create Background for Menu Screen
#--------------------------------------------------------------------------
def create_menu_background()
@menuback_sprite = Sprite.new()
@menuback_sprite.bitmap = if FFIX_Menu::BACKGROUNDNAME.empty? then
@menuback_sprite.color.set(16, 16, 16, 128)
$game_temp.background_bitmap
else
Cache.picture(FFIX_Menu::BACKGROUNDNAME)
end
update_menu_background()
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
alias_method(:erzvx_ffix_create_command_window, :create_command_window)
def create_command_window()
erzvx_ffix_create_command_window()
@command_window.x, @command_window.y = 360, 16
end
end