ProjectMeLT XRXS - 5-6 Character Menu - JackMonty - 04-16-2013
Introduction
Firstly this is not my script! A friend of mine referred me to a handy script to enable a 5 to 6 character menu (as opposed to the standard 4 characters). I thought I would share it here as many many people here have helped me with scripting problems in the past.
The author's site is here: http://xrxs.at-ninja.jp/MeLT.htm
Instructions
The main menu layout template referred to as "Main Module XRXS_MeLT" goesafter all standard RPG Maker Scripts (1st custom script).
Menu screen layouts are handled by plugins - include only one plugin type A and one plugin Type B with any combinations of plugin types C.
Code
All available from the author's site but for quick reference see below:
Main Module
Code: # ¥£¥ MeLT.ƒƒjƒ…[ƒŒƒCƒAƒEƒgƒeƒ“ƒvƒŒ[ƒg ¥£¥
#
# update 2007/ 7/22
#
#==============================================================================
# ƒJƒXƒ^ƒ}ƒCƒYƒ|ƒCƒ“ƒg
#==============================================================================
module XRXS_MeLT
#
# •\Ž¦ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“
#
TRANS_TIME = 8
TRANS_NAME = "" #"Graphics/Transitions/013-Square01"
# [ƒƒjƒ…[ƒRƒ}ƒ“ƒh]
COMMANDS = [
"ƒAƒCƒeƒ€", Scene_Item,
"ƒXƒLƒ‹", Scene_Skill,
"‘•”õ", Scene_Equip,
"ƒXƒe[ƒ^ƒX", Scene_Status,
"ƒZ[ƒu", Scene_Save,
"ƒQ[ƒ€I—¹", Scene_End
]
# ƒAƒNƒ^[‘I‘ð‚ð—p‚¢‚È‚¢ƒV[ƒ“
ACTOR_INDEX_DISADAPTED = [Scene_Item, Scene_Save, Scene_End]
#
# ƒJ[ƒ\ƒ‹ƒtƒ@ƒCƒ‹–¼ (Windowskin)
#
CURSOR_SKIN = "MenuCursor"
CURSOR_SKIN2 = "MenuCursor2"
#
# ”wŒiÝ’è
#
USE_MAP = true # ”wŒi‚Ƀ}ƒbƒv‚ð•\Ž¦
BG_TITLE = "MenuBack" # ”wŒi‰æ‘œ (Titles)
B_OPACITY = 160 # ”wŒi•s“§–¾“x
#
# ƒTƒCƒhƒRƒ}ƒ“ƒh
#
SIDE_KEY = nil # Input::RIGHT ‚È‚Ç@ƒL[Žw’è‚Å—LŒøBnil‚Å–³Œø‰»
SIDE_SCENE = nil # nil ‚Ńp[ƒeƒB“ü‚ê‘Ö‚¦, ƒV[ƒ“‚àŽw’è‰Â
#
# [ƒAƒNƒ^[—§‚¿ŠGƒtƒ@ƒCƒ‹–¼]
# ( ƒAƒNƒ^[ID=>ƒtƒ@ƒCƒ‹–¼ ƒnƒbƒVƒ…
# —áF2=>"Stand_2", ‚È‚Ç)
#
STAND_NAMES = {
}
end
#==============================================================================
# —§‚¿ŠGƒtƒ@ƒCƒ‹–¼‚̎擾
#==============================================================================
class Game_Actor < Game_Battler
def stand_name
return XRXS_MeLT::STAND_NAMES[self.id].to_s
end
end
#==============================================================================
# ƒƒjƒ…[ƒJ[ƒ\ƒ‹ˆêŽž‹L‰¯ / MeLTÝ’è
#==============================================================================
class Game_Temp
attr_accessor :menu_index
end
module XRXS_MeLT
# ƒƒjƒ…[ƒRƒ}ƒ“ƒh@ƒV[ƒ“/•¶Žš
def self.commands
set = []
for i in 0...COMMANDS.size/2
set.push(COMMANDS[i * 2 + 1])
end
return set
end
def self.captions
set = []
for i in 0...COMMANDS.size/2
set.push(COMMANDS[i * 2])
end
return set
end
end
#==============================================================================
# --- ƒƒjƒ…[ƒŒƒCƒAƒEƒg Šg’£’è‹` ---
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# › ƒEƒBƒ“ƒhƒE‚Ìì¬
#--------------------------------------------------------------------------
def make_windows #
@bg_sprite = Spriteset_Map.new if XRXS_MeLT::USE_MAP
sprite = Sprite.new
sprite.bitmap = RPG::Cache.title(XRXS_MeLT::BG_TITLE)
sprite.z = 1
sprite.opacity = XRXS_MeLT::B_OPACITY
@sprites.push(sprite)
end
def dispose_windows
@bg_sprite.dispose if @bg_sprite != nil
end
end
#==============================================================================
# ¡ Scene_Menu
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = $game_temp.menu_index.to_i
end
#--------------------------------------------------------------------------
# œ ƒƒCƒ“ˆ—
#--------------------------------------------------------------------------
def main
# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðì¬
@command_window = Window_MenuCommand.new
@command_window.index = @menu_index
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðì¬
@status_window = Window_MenuStatus.new
# ‰Šú‰»
@slideout_count= 0
@next_scene_actor_index = nil
# ƒJ[ƒ\ƒ‹‚Ìì¬
@cursor2 = Sprite_MenuCursor.new(XRXS_MeLT::CURSOR_SKIN2)
@cursor2.visible = false
@cursor = Sprite_MenuCursor.new(XRXS_MeLT::CURSOR_SKIN)
@sprites = [@cursor2, @cursor]
# ƒEƒBƒ“ƒhƒE‚ðì¬
@windows = []
@windows.push(@command_window)
@windows.push(@status_window)
make_windows
# ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“ŽÀs
Graphics.transition(XRXS_MeLT::TRANS_TIME, XRXS_MeLT::TRANS_NAME)
# ƒƒCƒ“ƒ‹[ƒv
loop do
# ƒQ[ƒ€‰æ–Ê‚ðXV
Graphics.update
# “ü—Íî•ñ‚ðXV
Input.update
# ƒtƒŒ[ƒ€XV
update
# ‰æ–Ê‚ªØ‚è‘Ö‚í‚Á‚½‚烋[ƒv‚ð’†’f
if $scene != self
break
end
end
# ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“€”õ
Graphics.freeze
# ƒEƒBƒ“ƒhƒE‚ð‰ð•ú
@windows.each{|window| window.dispose }
@sprites.each{|sprite| sprite.dispose }
dispose_windows
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#--------------------------------------------------------------------------
def update
# ƒEƒBƒ“ƒhƒE‚ðXV
@windows.each{|window| window.update }
# ƒAƒNƒeƒBƒu‚ȃEƒBƒ“ƒhƒE‚ðŒŸõ
active_window = nil
for window in @windows
if window.active
active_window = window
break
end
end
# ƒJ[ƒ\ƒ‹ˆÊ’u‚ÌXV
@cursor.visible = (active_window != nil)
if active_window != nil
cursor_dx = active_window.x + active_window.cursor_rect.x
cursor_dy = active_window.y + active_window.cursor_rect.y + active_window.cursor_rect.height / 2
distance_x = (cursor_dx - @cursor.x)
distance_y = (cursor_dy - @cursor.y)
speed = 24
if distance_x.abs <= speed
@cursor.x = cursor_dx
else
sign = (distance_x >= 0 ? 1 : -1)
@cursor.x += speed * sign
end
if distance_y.abs <= speed
@cursor.y = cursor_dy
else
sign = (distance_y >= 0 ? 1 : -1)
@cursor.y += speed * sign
end
@cursor.visible = false if active_window.index == -1
end
# ƒXƒ‰ƒCƒhƒAƒEƒg
if @slideout_count > 0
@slideout_count -= 1
if @slideout_count == 0
# ‰æ–Ê‚ðØ‚è‘Ö‚¦
if @next_scene_actor_index == nil
$scene = @slideout_next_scene.new
else
$scene = @slideout_next_scene.new(@next_scene_actor_index)
end
end
return
end
# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡: update_command ‚ðŒÄ‚Ô
if @command_window.active
update_command
return
end
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡: update_status ‚ðŒÄ‚Ô
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡)
#--------------------------------------------------------------------------
def update_command
# B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::B)
# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cancel_se)
#
@windows.each{|window| window.slideout! }
@slideout_count = 8
@slideout_next_scene = Scene_Map
$game_temp.menu_index = 0
return
end
# C ƒ{ƒ^ƒ“‚©ƒTƒCƒhƒL[‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C) or
(XRXS_MeLT::SIDE_KEY != nil and Input.trigger?(XRXS_MeLT::SIDE_KEY))
# ƒp[ƒeƒBl”‚ª 0 l‚ÅAƒZ[ƒuAƒQ[ƒ€I—¹ˆÈŠO‚̃Rƒ}ƒ“ƒh‚Ìê‡
if $game_party.actors.size == 0 and @command_window.index < 4
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# ‰Ÿ‚³‚ꂽƒL[‚É‚æ‚Á‚ăV[ƒ“‚ðŽæ“¾
if Input.trigger?(Input::C)
scene = XRXS_MeLT.commands[@command_window.index]
else
scene = XRXS_MeLT::SIDE_SCENE
index = XRXS_MeLT.commands.index(XRXS_MeLT::SIDE_SCENE)
@command_window.index = index == nil ? -1 : index
end
# ƒp[ƒeƒB“ü‚ê‘Ö‚¦‚Ìê‡
if scene == nil
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
@command_window.active = false
@command_window.decide!
@status_window.active = true
@status_window.index = 0
return
end
# ƒZ[ƒu‹ÖŽ~‚Ìê‡
if scene == Scene_Save and $game_system.save_disabled
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# Žw’èƒV[ƒ“‚Ö‚ÌØ‚è‘Ö‚¦
if not XRXS_MeLT::ACTOR_INDEX_DISADAPTED.include?(scene)
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
@command_window.active = false
@command_window.decide!
@status_window.active = true
@status_window.index = 0
elsif scene != nil
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒƒjƒ…[ƒCƒ“ƒfƒbƒNƒX‚Ì•ÛŽ
$game_temp.menu_index = @command_window.index
# ‰æ–Ê‚ðØ‚è‘Ö‚¦
@windows.each{|window| window.slideout! }
@slideout_count = 8
@slideout_next_scene = scene
end
return
end
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡)
#--------------------------------------------------------------------------
def update_status
# B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::B)
# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cancel_se)
#
if @status_window.index2 == -1
# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
@command_window.active = true
@command_window.cancel!
@command_window.index = 0 if @command_window.index == -1
@status_window.active = false
@status_window.index = -1
@next_scene_actor_index = nil
else
@status_window.index = @status_window.index2
@status_window.index2 = -1
@cursor2.visible = false
end
return
end
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
# Žw’肳‚ꂽƒV[ƒ“‚̎擾
scene = @command_window.index == -1 ? nil : XRXS_MeLT.commands[@command_window.index]
# nil ‚È‚ç‚΃ƒjƒ…[‚ł̃ƒ“ƒo[“ü‚ê‘Ö‚¦
if scene == nil
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
if @status_window.index2 == -1
@status_window.index2 = @status_window.index
@cursor2.x = @status_window.x + @status_window.cursor_rect.x
@cursor2.y = @status_window.y + @status_window.cursor_rect.y + @status_window.cursor_rect.height / 2
@cursor2.visible = true
else
@cursor2.visible = false
# ƒƒ“ƒo[‚Ì“ü‚ê‘Ö‚¦“ñl–Ú‚ÌŒˆ’è‚Æ“ü‚ê‘Ö‚¦‚ÌŽÀs
actor2 = $game_party.actors[@status_window.index]
actor = $game_party.actors[@status_window.index2]
$game_party.actors[@status_window.index2] = actor2
$game_party.actors[@status_window.index] = actor
@status_window.index = @status_window.index2
@status_window.index2 = -1
# ƒvƒŒƒCƒ„[‚ðƒŠƒtƒŒƒbƒVƒ…
$game_player.refresh
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒŠƒtƒŒƒbƒVƒ…
@status_window.refresh
end
return
end
# ‚±‚̃AƒNƒ^[‚Ìs“®§ŒÀ‚ª 2 ˆÈã‚Ìê‡
if scene == Scene_Skill and $game_party.actors[@status_window.index].restriction >= 2
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
@next_scene_actor_index = @status_window.index
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒƒjƒ…[ƒCƒ“ƒfƒbƒNƒX‚Ì•ÛŽ
$game_temp.menu_index = @command_window.index
# ‰æ–Ê‚ðØ‚è‘Ö‚¦
@windows.each{|window| window.slideout! }
@slideout_count = 8
@slideout_next_scene = scene
return
end
end
end
#==============================================================================
# --- ƒJ[ƒ\ƒ‹ƒXƒvƒ‰ƒCƒg ---
#==============================================================================
class Sprite_MenuCursor < Sprite
def initialize(skin)
super()
self.bitmap = RPG::Cache.windowskin(skin)
self.ox = self.bitmap.rect.width - 20
self.oy = self.bitmap.rect.height / 2 - 16
self.x = -64
self.y = 64
self.z = 205
end
end
#==============================================================================
# --- XRXS. ƒEƒBƒ“ƒhƒEƒXƒ‰ƒCƒfƒBƒ“ƒO‹@\ ---
#==============================================================================
module XRXS_WindowSliding
def initialize(x, y, w, h)
super(x, y, w, h)
self.contents_opacity = 0
@slidein_count = 4
@slideout_count = 0
@slide_x_speed = 8
@slide_y_speed = 0
@slide_x_limit = nil
@slide_objects = [self]
end
def update
super
if @slidein_count > 0
@slidein_count -= 1
for object in @slide_objects
object.x += @slide_x_speed
object.y += @slide_y_speed
object.x = [object.x, @slide_x_limit].min if @slide_x_limit != nil
case object
when Window
object.contents_opacity += 64
when Sprite
object.opacity += 64
end
end
elsif @slideout_count > 0
@slideout_count -= 1
for object in @slide_objects
object.x -= @slide_x_speed
object.y -= @slide_y_speed
case object
when Window
object.contents_opacity -= 64
when Sprite
object.opacity -= 64
end
end
end
end
def slideout!
@slidein_count = 0
@slideout_count = 4
end
end
#==============================================================================
# Bitmapƒ‰ƒCƒuƒ‰ƒŠ --- draw_hemming_text ---
#==============================================================================
class Bitmap
def draw_hemming_text(x, y, w, h, text, align = 0, black_color = Color.new(0,0,0,255))
original_color = self.font.color.dup
self.font.color = black_color
self.draw_text(x , y , w, h, text, align)
self.draw_text(x , y+2, w, h, text, align)
self.draw_text(x+2, y+2, w, h, text, align)
self.draw_text(x+2, y , w, h, text, align)
self.font.color = original_color
self.draw_text(x+1, y+1, w, h, text, align)
end
end
#==============================================================================
# Bitmapƒ‰ƒCƒuƒ‰ƒŠ --- blt_number ---
#==============================================================================
class Bitmap
def blt_number(x, y, skin, number, opacity = 224)
a_width = skin.rect.width / 10
rect = Rect.new(0, 0, a_width, skin.rect.height)
#
numbers = [
number/10000000,number/1000000,number/100000,number/10000,
number/1000, number/100, number/10, number
]
display = false
for i in 0...numbers.size
n = numbers[i]
display |= (n != 0 or i == numbers.size - 1)
if display
rect.x = n * a_width
self.blt(x - (8-i) * a_width, y - skin.rect.height, skin, rect, opacity)
end
#x += a_width
end
end
end
Plugin A1
Code: # ¥£¥ MeLT. ƒvƒ‰ƒOƒCƒ“A1 : ƒRƒ}ƒ“ƒhƒXƒgƒŠ[ƒ€ ¥£¥
#
#==============================================================================
# Window_MenuCommand
#==============================================================================
class Window_MenuCommand < Window_Selectable
#
# ‰Žæ‚èF
#
HEMCOLOR = Color.new(0,48,96,255)
# –³Œø‰»”»’è—p@ƒZ[ƒu–¼
SAVE = "ƒZ[ƒu"
#--------------------------------------------------------------------------
# --- ƒEƒBƒ“ƒhƒEƒXƒ‰ƒCƒfƒBƒ“ƒO‚ð“‹Ú ---
#--------------------------------------------------------------------------
include XRXS_WindowSliding
#--------------------------------------------------------------------------
# › ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
@sprites = []
max = XRXS_MeLT.commands.size
super(16, 64, 160, max * 32 + 32)
self.opacity = 0
self.index = 0
@item_max = max
@column_max = 1
@slide_objects = @sprites
@slide_x_limit = 16
@slidein_count = 4 + @item_max
@slideout_count = 0
w = 160
h = 32
z = 101
x = self.x - 32
y = self.y + 16
for caption in XRXS_MeLT.captions
sprite = Sprite.new
sprite.bitmap = Bitmap.new(w,h)
color = HEMCOLOR
if caption == SAVE
if $game_system.save_disabled
color = color.dup
color.alpha = 64
end
sprite.bitmap.font.color.alpha = $game_system.save_disabled ? 160 : 255
end
sprite.bitmap.draw_hemming_text(0,0,w,h,caption,1,color)
sprite.opacity = 0
sprite.z = z
sprite.x = x
sprite.y = y
x -= 8
y += 32
@sprites.push(sprite)
end
self.z = z + 1
end
#--------------------------------------------------------------------------
# › ‰ð•ú‚ƃXƒ‰ƒCƒhƒAƒEƒg
#--------------------------------------------------------------------------
def dispose
@sprites.each{|sprite| sprite.dispose }
super
end
def slideout!
self.index = -1
super
end
#--------------------------------------------------------------------------
# › Œˆ’è‚ƃLƒƒƒ“ƒZƒ‹
#--------------------------------------------------------------------------
def decide!
update while @slidein_count > 0
@decision_index = self.index
@sprites.each{|sprite| sprite.opacity = 96 }
@sprites[@decision_index].opacity = 255 if @decision_index >= 0
end
def cancel!
@decision_index = nil
@sprites.each{|sprite| sprite.opacity = 255 }
end
end
Plugin A2
Code: # ¥£¥ MeLT. ƒvƒ‰ƒOƒCƒ“A2 : ƒRƒ}ƒ“ƒhƒvƒŒ[ƒg ¥£¥
#
#==============================================================================
# Window_MenuCommand
#==============================================================================
class Window_MenuCommand < Window_Selectable
#
# ƒƒjƒ…[ƒvƒŒ[ƒg (Windowskins)
#
PLATE = "MenuCommandBack"
#
# ‰Žæ‚èF
#
HEMCOLOR = Color.new(64,64,0,255)
# –³Œø‰»”»’è—p@ƒZ[ƒu–¼
SAVE = "ƒZ[ƒu"
#--------------------------------------------------------------------------
# --- ƒEƒBƒ“ƒhƒEƒXƒ‰ƒCƒfƒBƒ“ƒO‚ð“‹Ú ---
#--------------------------------------------------------------------------
include XRXS_WindowSliding
#--------------------------------------------------------------------------
# › ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
super(-24, 64, 160, 288)
@plate = Sprite.new
@plate.bitmap = RPG::Cache.windowskin(PLATE)
@plate.x = -64
@plate.y = 48
@plate.z = self.z - 1
@slide_objects.push(@plate)
@item_max = XRXS_MeLT.commands.size
self.opacity = 0
self.index = 0
self.contents = Bitmap.new(128, 256)
refresh
end
def refresh
self.contents.clear
y = 0
for caption in XRXS_MeLT.captions
color = HEMCOLOR
if caption == SAVE
if $game_system.save_disabled
color = color.dup
color.alpha = 64
end
self.contents.font.color.alpha = 160
end
self.contents.draw_hemming_text(0, y, 128, 32, caption, 1, color)
self.contents.font.color.alpha = 255
y += 32
end
end
#--------------------------------------------------------------------------
# › ‰ð•ú‚ƃXƒ‰ƒCƒhƒAƒEƒg
#--------------------------------------------------------------------------
def dispose
@plate.dispose
super
end
def slideout!
self.index = -1
super
end
#--------------------------------------------------------------------------
# › Œˆ’è‚ƃLƒƒƒ“ƒZƒ‹
#--------------------------------------------------------------------------
def decide!
end
def cancel!
end
end
Plugin B1
Code: # ¥£¥ MeLT. ƒvƒ‰ƒOƒCƒ“B1 : ƒoƒgƒ‰[ƒYƒLƒƒƒ“ƒv ¥£¥
#
# update 2007/ 7/22
#
#==============================================================================
# ƒJƒXƒ^ƒ}ƒCƒYƒ|ƒCƒ“ƒg
#==============================================================================
module XRXS_MeLT
#
# ŠeŽíƒtƒ@ƒCƒ‹–¼ (Windowskins)
#
ASB_SKIN = "MenuStatusBar"
NUM_SKIN_L = "NumberL"
NUM_SKIN_S = "NumberS"
HP = "HP"
SP = "SP"
HPBAR = "MenuHPBar"
SPBAR = "MenuSPBar"
# ƒXƒe[ƒgID=>ƒAƒCƒRƒ“–¼ ŠÖ˜A•t‚¯ƒnƒbƒVƒ…
STATE_ICON = {3=>"skill_024",5=>"skill_027",7=>"skill_026",8=>"skill_025"}
end
class Window_MenuStatus < Window_Selectable
# ƒoƒgƒ‰[ƒ|ƒWƒVƒ‡ƒ“Ý’è
POSITIONS = [
[412, 200],
[540, 264],
[444, 344],
[564, 400]
]
# ƒXƒe[ƒ^ƒXƒo[•`‰æÀ•W
EACH_X_OFFSET = 0 # Šes–ˆ‚̉¡‚¸‚ê
EVEN_X_OFFSET = 32 # ‹ô”s‚̉¡‚¸‚ê
end
#==============================================================================
# ¡ Window_MenuStatus [Ä’è‹`]
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# --- ƒEƒBƒ“ƒhƒEƒXƒ‰ƒCƒfƒBƒ“ƒO‚ð“‹Ú ---
#--------------------------------------------------------------------------
include XRXS_WindowSliding
include XRXS_Cursor2
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
super(144 + 32, 140, 512, 384)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
@slide_x_speed = -8
@actor_sprites = []
refresh
@slide_objects = [self] + @actor_sprites
self.active = false
self.index = -1
@column_max = 1
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
draw_menustatus(i)
end
# ƒoƒgƒ‰[ƒXƒvƒ‰ƒCƒg‚Ì—pˆÓ
@actor_sprites.each{|sprite| sprite.dispose }
@actor_sprites.clear
positions = POSITIONS.dup
for actor in $game_party.actors
battler_bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
sprite = Sprite.new
sprite.bitmap = battler_bitmap
position = positions.shift
sprite.x = position[0] + @slidein_count * 8
sprite.y = position[1]
sprite.ox = battler_bitmap.rect.width / 2
sprite.oy = battler_bitmap.rect.height
sprite.z = 201
sprite.visible = !actor.dead?
@actor_sprites.push(sprite)
end
@slide_objects = [self] + @actor_sprites
end
#--------------------------------------------------------------------------
# › ƒƒjƒ…[ƒXƒe[ƒ^ƒX‚Ì•`ŽÊ
#--------------------------------------------------------------------------
def draw_menustatus(i)
x = i * EACH_X_OFFSET + i % 2 * EVEN_X_OFFSET
y = i * 64 + 4
#
bar = RPG::Cache.windowskin(XRXS_MeLT::ASB_SKIN)
self.contents.blt(x, y, bar, bar.rect, 160)
num_skin_l = RPG::Cache.windowskin(XRXS_MeLT::NUM_SKIN_L)
num_skin_s = RPG::Cache.windowskin(XRXS_MeLT::NUM_SKIN_S)
hp_bitmap = RPG::Cache.windowskin(XRXS_MeLT::HP)
sp_bitmap = RPG::Cache.windowskin(XRXS_MeLT::SP)
hpbar_skin = RPG::Cache.windowskin(XRXS_MeLT::HPBAR)
spbar_skin = RPG::Cache.windowskin(XRXS_MeLT::SPBAR)
# ƒAƒNƒ^[‚̎擾
actor = $game_party.actors[i]
#
self.contents.font.color = Color.new(0,0,0,255)
self.contents.font.size = 16
self.contents.draw_text(x + 16, y + 2, 80, 24, actor.name)
#
state_icon_names = []
for state_id in actor.states.sort
icon_name = XRXS_MeLT::STATE_ICON[state_id]
if icon_name != nil
state_icon_names.push(icon_name)
end
end
if state_icon_names.empty?
self.contents.font.color = Color.new(0,64,96,255)
self.contents.font.size = 14
self.contents.draw_text(x + 104, y + 2, 16, 24, "Lv.")
self.contents.draw_text(x + 120, y + 2, 16, 24, actor.level.to_s, 2)
else
ix = x + 96
for icon_name in state_icon_names
icon = RPG::Cache.icon(icon_name)
self.contents.blt(ix, y + 2, icon, icon.rect)
ix += 26
end
end
#
self.contents.blt_number(x + 96, y + 45, num_skin_l, actor.hp)
self.contents.blt_number(x + 96, y + 59, num_skin_s, actor.sp)
self.contents.blt( x + 23, y + 34, hp_bitmap, hp_bitmap.rect)
self.contents.blt( x + 32, y + 50, sp_bitmap, sp_bitmap.rect)
# HP ƒo[‚Ì•`‰æ
h = 10
rect = Rect.new(0,0,96,h)
self.contents.blt(x + 98, y + 34, hpbar_skin, rect)
rect.y = (actor.hp == actor.maxhp ? 2 * h : h)
rect.width = 96 * actor.hp / actor.maxhp
self.contents.blt(x + 98, y + 34, hpbar_skin, rect)
# SP ƒo[‚Ì•`‰æ
h = 8
rect = Rect.new(0,0,96,h)
self.contents.blt(x + 98, y + 48, spbar_skin, rect)
rect.y = (actor.sp == actor.maxsp ? 2 * h : h)
rect.width = 96 * actor.sp / [actor.maxsp, 1].max
self.contents.blt(x + 98, y + 48, spbar_skin, rect)
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚Ì‹éŒ`XV
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
x = @index % 2 * 32 + 2
w = 218 - x
self.cursor_rect.set(x, @index * 64 + 4, w, 64)
end
end
#--------------------------------------------------------------------------
# › ‰ð•ú‚ƃXƒ‰ƒCƒhƒAƒEƒg
#--------------------------------------------------------------------------
def dispose
@actor_sprites.each{|sprite| sprite.dispose }
super
end
def slideout!
self.index = -1
super
end
end
Plugin B2
Code: # ¥£¥ MeLT. ƒvƒ‰ƒOƒCƒ“B2 : ƒVƒƒ[ƒvƒnƒ“ƒ^[ƒY ¥£¥
#
# update 2007/ 7/22
#
#==============================================================================
# ƒJƒXƒ^ƒ}ƒCƒYƒ|ƒCƒ“ƒg
#==============================================================================
module XRXS_MeLT
#
# ŠeŽíƒtƒ@ƒCƒ‹–¼ (Windowskins)
#
NUM_SKIN_L = "NumberL"
NUM_SKIN_S = "NumberS"
HP = "HP"
SP = "SP"
HPBAR = "MenuHPBar"
SPBAR = "MenuSPBar"
STATUS_BACK= "MenuStatusBack"
# ƒXƒe[ƒgID=>ƒAƒCƒRƒ“–¼ ŠÖ˜A•t‚¯ƒnƒbƒVƒ…
STATE_ICON = {3=>"skill_024",5=>"skill_027",7=>"skill_026",8=>"skill_025"}
#
# ƒAƒNƒ^[ID => ƒVƒƒ[ƒvƒtƒFƒCƒX ƒtƒ@ƒCƒ‹–¼ ƒnƒbƒVƒ… (Battlers)
#
ACTOR_FACE = {}#{5=>"fd1", 6=>"fd2", 7=>"fd3", 8=>"fd4", 9=>"fd5"}
#
# ‚±‚êˆÈ~‚ðT‚¦ƒƒ“ƒo[‚Æ‚µ‚Ĉµ‚¤’l
#
FRONT_MEMBER_LIMIT = 4
end
class Window_MenuStatus < Window_Selectable
# ƒXƒe[ƒ^ƒXƒo[•`‰æÀ•W
EACH_X_OFFSET = 0 # Šes–ˆ‚̉¡‚¸‚ê
EVEN_X_OFFSET = 0 # ‹ô”s‚̉¡‚¸‚ê
# –¼‘O•”•ª •`‰æF
NAMECOLOR = Color.new( 32, 48, 64,255)
# –¼‘O•”•ª ‰Žæ‚èF
HEMCOLOR = Color.new(128,192,256,255)
end
#==============================================================================
# ¡ Window_MenuStatus [Ä’è‹`]
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# --- ƒEƒBƒ“ƒhƒEƒXƒ‰ƒCƒfƒBƒ“ƒO‚ð“‹Ú ---
#--------------------------------------------------------------------------
include XRXS_WindowSliding
include XRXS_Cursor2
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
super(192 + 32, 96, 464, 328)
self.contents = Bitmap.new(width - 32, $game_party.actors.size * 48 + 8)
self.opacity = 0
@slide_x_speed = -8
refresh
self.active = false
self.index = -1
@column_max = 1
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
draw_menustatus(i)
end
end
#--------------------------------------------------------------------------
# › ƒƒjƒ…[ƒXƒe[ƒ^ƒX‚Ì•`ŽÊ
#--------------------------------------------------------------------------
def draw_menustatus(i)
# ƒAƒNƒ^[‚̎擾
actor = $game_party.actors[i]
#
x = i * EACH_X_OFFSET + i % 2 * EVEN_X_OFFSET
y = i * 48 + 4
back = RPG::Cache.windowskin(XRXS_MeLT::STATUS_BACK)
self.contents.blt(x, y, back, back.rect)
facefile = XRXS_MeLT::ACTOR_FACE[actor.id]
if facefile != nil
face = RPG::Cache.battler(facefile, 0)
opacity = actor.dead? ? 96 :
i >= XRXS_MeLT::FRONT_MEMBER_LIMIT ? 160 :
255
self.contents.blt(x, y + 4, face, face.rect, opacity)
end
#
num_skin_l = RPG::Cache.windowskin(XRXS_MeLT::NUM_SKIN_L)
num_skin_s = RPG::Cache.windowskin(XRXS_MeLT::NUM_SKIN_S)
hp_bitmap = RPG::Cache.windowskin(XRXS_MeLT::HP)
sp_bitmap = RPG::Cache.windowskin(XRXS_MeLT::SP)
hpbar_skin = RPG::Cache.windowskin(XRXS_MeLT::HPBAR)
spbar_skin = RPG::Cache.windowskin(XRXS_MeLT::SPBAR)
#
name_color = NAMECOLOR.dup
hem_color = HEMCOLOR.dup
if i >= XRXS_MeLT::FRONT_MEMBER_LIMIT
name_color.alpha = 128
hem_color.alpha = 32
end
self.contents.font.color = name_color
self.contents.font.size = 14
self.contents.draw_hemming_text(x + 160, y + 4, 96, 18, actor.name, 0, hem_color)
#
state_icon_names = []
for state_id in actor.states.sort
icon_name = XRXS_MeLT::STATE_ICON[state_id]
if icon_name != nil
state_icon_names.push(icon_name)
end
end
if state_icon_names.empty?
self.contents.font.color = Color.new(0,48,96,255)
self.contents.font.size = 14
self.contents.draw_text(x + 160, y + 22, 76, 24, "Lv." + actor.level.to_s, 2)
else
ix = x + 160
for icon_name in state_icon_names
icon = RPG::Cache.icon(icon_name)
self.contents.blt(ix, y + 22, icon, icon.rect)
ix += 24
end
end
#
self.contents.blt_number(x + 328, y + 24, num_skin_l, actor.hp)
self.contents.blt_number(x + 328, y + 40, num_skin_s, actor.sp)
self.contents.blt( x + 256, y + 14, hp_bitmap, hp_bitmap.rect)
self.contents.blt( x + 256, y + 30, sp_bitmap, sp_bitmap.rect)
# HP ƒo[‚Ì•`‰æ
h = 10
rect = Rect.new(0,0,96,h)
self.contents.blt(x + 330, y + 14, hpbar_skin, rect)
rect.y = (actor.hp == actor.maxhp ? 2 * h : h)
rect.width = 96 * actor.hp / actor.maxhp
self.contents.blt(x + 330, y + 14, hpbar_skin, rect)
# SP ƒo[‚Ì•`‰æ
h = 8
rect = Rect.new(0,0,96,h)
self.contents.blt(x + 330, y + 28, spbar_skin, rect)
rect.y = (actor.sp == actor.maxsp ? 2 * h : h)
rect.width = 96 * actor.sp / [actor.maxsp, 1].max
self.contents.blt(x + 330, y + 28, spbar_skin, rect)
end
#--------------------------------------------------------------------------
# › 擪‚Ìs‚ÌÝ’è [ƒI[ƒo[ƒ‰ƒCƒh]
#--------------------------------------------------------------------------
def top_row=(row)
super
self.oy = self.oy * 48 / 32
end
#--------------------------------------------------------------------------
# › 1 ƒy[ƒW‚É•\Ž¦‚Å‚«‚és”‚̎擾 [ƒI[ƒo[ƒ‰ƒCƒh]
#--------------------------------------------------------------------------
def page_row_max
return 6
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚Ì‹éŒ`XV
#--------------------------------------------------------------------------
def update_cursor_rect
super
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 48 + 8 - self.oy, 200, 40)
end
end
#--------------------------------------------------------------------------
# › ‰ð•ú‚ƃXƒ‰ƒCƒhƒAƒEƒg
#--------------------------------------------------------------------------
def slideout!
self.index = -1
super
end
end
Plugin B3
Code: # ¥£¥ MeLT. ƒvƒ‰ƒOƒCƒ“B3 : ƒtƒ@ƒCƒ“ƒp[ƒgƒi[ ¥£¥
#
# update 2007/ 7/22
#
#==============================================================================
# ƒJƒXƒ^ƒ}ƒCƒYƒ|ƒCƒ“ƒg
#==============================================================================
module XRXS_MeLT
#
# ŠeŽíƒtƒ@ƒCƒ‹–¼ (Windowskins)
#
NUM_SKIN_L = "NumberL"
NUM_SKIN_S = "NumberS"
HP = "HP"
SP = "SP"
HPBAR = "MenuHPBar"
SPBAR = "MenuSPBar"
STATUS_BACK= "MenuStatusBack3"
# ƒXƒe[ƒgID=>ƒAƒCƒRƒ“–¼ ŠÖ˜A•t‚¯ƒnƒbƒVƒ…
STATE_ICON = {3=>"skill_024",5=>"skill_027",7=>"skill_026",8=>"skill_025"}
end
class Window_MenuStatus < Window_Selectable
# —§‚¿ŠG•`‰æˆÊ’u
STAND_POS = [[320, 480], [128, 512]]
# –¼‘O•”•ª •`‰æF
NAMECOLOR = Color.new(255,224,210,255)
# –¼‘O•”•ª ‰Žæ‚èF
HEMCOLOR = Color.new(115, 96, 82,255)
# ƒŒƒxƒ‹•”•ª
LEVEL_COLOR = Color.new(96,48, 0,255)
end
#==============================================================================
# ƒAƒNƒ^[—§‚¿ŠGƒZƒbƒeƒBƒ“ƒO (‚±‚±‚Å—§‚¿ŠG‚ðݒ肵‚Ä‚‚¾‚³‚¢)
#==============================================================================
class Game_Actor < Game_Battler
def stand_name
#
# ƒAƒNƒ^[ID => "ƒtƒ@ƒCƒ‹–¼" (Pictures) ŠÖ˜A•t‚¯ƒnƒbƒVƒ…
#
hash = {
5=>"Stand2",
6=>"Stand1"
}
return hash[self.id].to_s
end
end
#==============================================================================
# ¡ Window_MenuStatus [Ä’è‹`]
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# --- ƒEƒBƒ“ƒhƒEƒXƒ‰ƒCƒfƒBƒ“ƒO‚ð“‹Ú ---
#--------------------------------------------------------------------------
include XRXS_WindowSliding
include XRXS_Cursor2
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
super(192 + 32, -16, 464, 512)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
@slide_x_speed = -8
refresh
self.active = false
self.index = -1
@column_max = 1
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = [$game_party.actors.size, 2].min
for i in 0...@item_max
draw_menustatus(@item_max - 1 - i)
end
end
#--------------------------------------------------------------------------
# › ƒƒjƒ…[ƒXƒe[ƒ^ƒX‚Ì•`ŽÊ
#--------------------------------------------------------------------------
def draw_menustatus(i)
# ƒAƒNƒ^[‚̎擾
actor = $game_party.actors[i]
return if actor == nil or i >= 2
#
x = STAND_POS[i][0]
y = STAND_POS[i][1]
picture = RPG::Cache.picture(actor.stand_name)
ox = picture.rect.width / 2
oy = picture.rect.height
self.contents.blt(x - ox, y - oy, picture, picture.rect)
#
num_skin_l = RPG::Cache.windowskin(XRXS_MeLT::NUM_SKIN_L)
num_skin_s = RPG::Cache.windowskin(XRXS_MeLT::NUM_SKIN_S)
hp_bitmap = RPG::Cache.windowskin(XRXS_MeLT::HP)
sp_bitmap = RPG::Cache.windowskin(XRXS_MeLT::SP)
hpbar_skin = RPG::Cache.windowskin(XRXS_MeLT::HPBAR)
spbar_skin = RPG::Cache.windowskin(XRXS_MeLT::SPBAR)
back = RPG::Cache.windowskin(XRXS_MeLT::STATUS_BACK)
#
x = i == 0 ? 64 : 0
y = i == 0 ? 384 : 320
self.contents.blt(x, y, back, back.rect)
#
self.contents.font.color = NAMECOLOR
self.contents.font.size = 16
self.contents.font.bold = true
self.contents.draw_hemming_text(x + 4, y + 4, 80, 18, actor.name, 0, HEMCOLOR)
# HP ƒo[‚Ì•`‰æ
h = 10
rect = Rect.new(0,0,96,h)
self.contents.blt(x + 4, y + 34, hpbar_skin, rect)
rect.y = (actor.hp == actor.maxhp ? 2 * h : h)
rect.width = 96 * actor.hp / actor.maxhp
self.contents.blt(x + 4, y + 34, hpbar_skin, rect)
# SP ƒo[‚Ì•`‰æ
h = 8
rect = Rect.new(0,0,96,h)
self.contents.blt(x + 102, y + 34, spbar_skin, rect)
rect.y = (actor.sp == actor.maxsp ? 2 * h : h)
rect.width = 96 * actor.sp / [actor.maxsp, 1].max
self.contents.blt(x + 102, y + 34, spbar_skin, rect)
#
state_icon_names = []
for state_id in actor.states.sort
icon_name = XRXS_MeLT::STATE_ICON[state_id]
if icon_name != nil
state_icon_names.push(icon_name)
end
end
if state_icon_names.empty?
self.contents.font.color = LEVEL_COLOR
self.contents.font.size = 14
self.contents.font.bold = false
self.contents.draw_text(x + 80, y + 2, 44, 20, "Lv." + actor.level.to_s, 2)
else
ix = x + 80
for icon_name in state_icon_names
icon = RPG::Cache.icon(icon_name)
self.contents.blt(ix, y + 2, icon, icon.rect)
ix += 24
end
end
#
self.contents.blt_number(x + 96, y + 44, num_skin_l, actor.hp)
self.contents.blt_number(x + 196, y + 44, num_skin_s, actor.sp)
self.contents.blt( x + 4, y + 34, hp_bitmap, hp_bitmap.rect)
self.contents.blt( x + 104, y + 34, sp_bitmap, sp_bitmap.rect)
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚Ì‹éŒ`XV
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
x = @index == 0 ? 64 : 0
y = @index == 0 ? 384 : 320
self.cursor_rect.set(x, y, 480, 48)
end
end
#--------------------------------------------------------------------------
# › ‰ð•ú‚ƃXƒ‰ƒCƒhƒAƒEƒg
#--------------------------------------------------------------------------
def slideout!
self.index = -1
super
end
end
Plugin C1
Code: # ¥£¥ MeLT. ƒvƒ‰ƒOƒCƒ“C1 : ƒRƒCƒ“ƒ‰ƒCƒ“ ¥£¥
#
#==============================================================================
# Window_MenuGold
#==============================================================================
class Window_MenuGold < Window_Base
#
# ƒ‰ƒCƒ“ƒtƒ@ƒCƒ‹–¼ (Windowskins)
#
LINE = "MenuGoldLine"
#
# ‰Žæ‚èF
#
HEMCOLOR = Color.new(0,48,96,255)
#
# ˆÊ’u (0:¶Šñ‚¹, 2:‰EŠñ‚¹)
#
ALIGN = 0
#--------------------------------------------------------------------------
# --- ƒEƒBƒ“ƒhƒEƒXƒ‰ƒCƒfƒBƒ“ƒO‚ð“‹Ú ---
#--------------------------------------------------------------------------
include XRXS_WindowSliding
#--------------------------------------------------------------------------
# › ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
x = (ALIGN == 2 ? 512 : -48)
super(x, 404, 192, 58)
@slide_x_speed = (1 - ALIGN) * 8
self.opacity = 0
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.color = normal_color
self.contents.font.size = 21
refresh
end
#--------------------------------------------------------------------------
# › ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
line = RPG::Cache.windowskin(LINE)
self.contents.blt(0,4,line,line.rect)
self.contents.draw_hemming_text(0, 0, 96, 18, $game_party.gold.to_s, 2, HEMCOLOR)
end
end
#==============================================================================
# --- ƒƒjƒ…[ƒŒƒCƒAƒEƒg Šg’£’è‹` ---
#==============================================================================
class Scene_Menu
alias xrxs_melt_pi1_make_windows make_windows
def make_windows
xrxs_melt_pi1_make_windows
@windows.push(Window_MenuGold.new)
end
end
Plugin C2
Code: # ¥£¥ MeLT. ƒvƒ‰ƒOƒCƒ“C2 : ƒvƒŒƒCƒ^ƒCƒ€ƒNƒƒbƒN ¥£¥
#
#
#==============================================================================
# ƒƒjƒ…[ƒŒƒCƒAƒEƒgƒvƒ‰ƒOƒCƒ“u@Window_MenuPlayTime@v
#==============================================================================
class Window_MenuPlayTime < Window_Base
#
# ƒ^ƒCƒ€•\Ž¦ ƒtƒ@ƒCƒ‹–¼ (Windowskins)
#
TIMESET = "TimeSet"
#
# ˆÊ’u (0:¶Šñ‚¹, 2:‰EŠñ‚¹)
#
ALIGN = 2
#--------------------------------------------------------------------------
# --- ƒEƒBƒ“ƒhƒEƒXƒ‰ƒCƒfƒBƒ“ƒO‚ð“‹Ú ---
#--------------------------------------------------------------------------
include XRXS_WindowSliding
#--------------------------------------------------------------------------
# › ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
@skin = RPG::Cache.windowskin(TIMESET)
@skin_w = @skin.width / 12
w = 32 + @skin_w * 9
h = 32 + @skin.height
x = (ALIGN == 2 ? 664 - w : -32)
y = 428
super(x, y, w, h)
@slide_x_speed = (1 - ALIGN) * 8
self.opacity = 0
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# › ƒŠƒtƒŒƒbƒVƒ…‚ÆXV
#--------------------------------------------------------------------------
def refresh
# €”õ
self.contents.clear
rect = Rect.new(0, 0, @skin_w, @skin.height)
@total_sec = Graphics.frame_count / Graphics.frame_rate
n = @total_sec / 60 / 60
hour1 = n / 10
hour2 = n % 10
n = @total_sec / 60 % 60
min1 = n / 10
min2 = n % 10
n = @total_sec % 60
sec1 = n / 10
sec2 = n % 10
plan = [11, hour1, hour2,10,min1,min2,10,sec1,sec2]
# •`‰æ
x = 0
for ox in plan
rect.x = @skin_w * ox
self.contents.blt(x, 0, @skin, rect)
x += @skin_w
end
end
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
#==============================================================================
# --- ƒƒjƒ…[ƒŒƒCƒAƒEƒg Šg’£’è‹` ---
#==============================================================================
class Scene_Menu
alias xrxs_melt_pi2_make_windows make_windows
def make_windows
xrxs_melt_pi2_make_windows
@windows.push(Window_MenuPlayTime.new)
end
end
Plugin C3
Code: # ¥£¥ MeLT. ƒvƒ‰ƒOƒCƒ“C3 : ƒ}ƒbƒvƒl[ƒ€ƒwƒbƒ_[ ¥£¥
#
#
#==============================================================================
# Window_MenuMapName
#==============================================================================
class Window_MenuMapName < Window_Base
#
# ƒwƒbƒ_[ƒsƒNƒ`ƒƒ (Windowskin)
#
HEADER = "MenuHeader"
#
# ‰Žæ‚èF
#
HEMCOLOR = Color.new(96,96,0,255)
#--------------------------------------------------------------------------
# --- ƒEƒBƒ“ƒhƒEƒXƒ‰ƒCƒfƒBƒ“ƒO‚ð“‹Ú ---
#--------------------------------------------------------------------------
include XRXS_WindowSliding
#--------------------------------------------------------------------------
# › ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
#
@header = Sprite.new
@header.bitmap = RPG::Cache.windowskin(HEADER)
@header.y = -32
@header.z = 102
@header.opacity = 0
#
super(0, -48, 256, 64)
@slide_x_speed = 0
@slide_y_speed = 8
@slide_objects.push(@header)
self.opacity = 0
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.color = normal_color
self.contents.font.size = 21
refresh
end
#--------------------------------------------------------------------------
# › ƒŠƒtƒŒƒbƒVƒ…‚Ɖð•ú
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.draw_hemming_text(0, 0, 224, 32, $game_map.name, 1, HEMCOLOR)
end
def dispose
@header.dispose
super
end
end
#==============================================================================
# --- ƒƒjƒ…[ƒŒƒCƒAƒEƒg Šg’£’è‹` ---
#==============================================================================
class Scene_Menu
alias xrxs_melt_pi3_make_windows make_windows
def make_windows
xrxs_melt_pi3_make_windows
@windows.push(Window_MenuMapName.new)
end
end
#==============================================================================
# XRXS. ƒ}ƒbƒv–¼Žæ“¾‹@\
#==============================================================================
class Game_Map
#--------------------------------------------------------------------------
# › ƒ}ƒbƒv–¼‚ðŽæ“¾
#--------------------------------------------------------------------------
def name
$data_mapinfos = load_data("Data/MapInfos.rxdata") if $data_mapinfos.nil?
$data_mapinfos[@map_id].name
end
end
Plugin C4
Code: # ¥£¥ MeLT. ƒvƒ‰ƒOƒCƒ“C4 : ƒ”ƒ@ƒŠƒAƒuƒ‹A ¥£¥
#
#
#==============================================================================
# Window_MenuVariable1
#==============================================================================
class Window_MenuVariable1 < Window_Base
#
# ƒAƒCƒRƒ“ƒtƒ@ƒCƒ‹–¼ (Icons)
#
ICON = "skill_025"
#
# •`‰æ“à—e •Ï”ID
#
VARIABLE_ID = 11
#
# ‰Žæ‚èF
#
HEMCOLOR = Color.new(96,48,0,255)
#--------------------------------------------------------------------------
# --- ƒEƒBƒ“ƒhƒEƒXƒ‰ƒCƒfƒBƒ“ƒO‚ð“‹Ú ---
#--------------------------------------------------------------------------
include XRXS_WindowSliding
#--------------------------------------------------------------------------
# › ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
super(-32, 436, 140, 56)
self.opacity = 0
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.color = normal_color
self.contents.font.size = 21
refresh
end
#--------------------------------------------------------------------------
# › ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
icon = RPG::Cache.icon(ICON)
self.contents.blt(0,0,icon,icon.rect)
self.contents.draw_hemming_text(24, 0, 80, 24, $game_variables[VARIABLE_ID].to_s, 2, HEMCOLOR)
end
end
#==============================================================================
# --- ƒƒjƒ…[ƒŒƒCƒAƒEƒg Šg’£’è‹` ---
#==============================================================================
class Scene_Menu
alias xrxs_melt_pi4_make_windows make_windows
def make_windows
xrxs_melt_pi4_make_windows
@windows.push(Window_MenuVariable1.new)
end
end
Plugin C5
Code: # ¥£¥ MeLT. ƒvƒ‰ƒOƒCƒ“C5 : ƒ”ƒ@ƒŠƒAƒuƒ‹B ¥£¥
#
#
#==============================================================================
# Window_MenuVariable2
#==============================================================================
class Window_MenuVariable2 < Window_Base
#
# ƒAƒCƒRƒ“ƒtƒ@ƒCƒ‹–¼ (Icons)
#
ICON = "skill_026"
#
# •`‰æ“à—e •Ï”ID
#
VARIABLE_ID = 12
#
# ‰Žæ‚èF
#
HEMCOLOR = Color.new(96,48,0,255)
#--------------------------------------------------------------------------
# --- ƒEƒBƒ“ƒhƒEƒXƒ‰ƒCƒfƒBƒ“ƒO‚ð“‹Ú ---
#--------------------------------------------------------------------------
include XRXS_WindowSliding
#--------------------------------------------------------------------------
# › ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
super(124, 436, 140, 56)
self.opacity = 0
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.color = normal_color
self.contents.font.size = 21
refresh
end
#--------------------------------------------------------------------------
# › ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
icon = RPG::Cache.icon(ICON)
self.contents.blt(0,0,icon,icon.rect)
self.contents.draw_hemming_text(24, 0, 80, 24, $game_variables[VARIABLE_ID].to_s, 2, HEMCOLOR)
end
end
#==============================================================================
# --- ƒƒjƒ…[ƒŒƒCƒAƒEƒg Šg’£’è‹` ---
#==============================================================================
class Scene_Menu
alias xrxs_melt_pi5_make_windows make_windows
def make_windows
xrxs_melt_pi5_make_windows
@windows.push(Window_MenuVariable2.new)
end
end
Plugin C6
Code: # ¥£¥ MeLT. ƒvƒ‰ƒOƒCƒ“C6 : ƒ”ƒ@ƒŠƒAƒuƒ‹C ¥£¥
#
#
#==============================================================================
# Window_MenuVariable3
#==============================================================================
class Window_MenuVariable3 < Window_Base
#
# ƒAƒCƒRƒ“ƒtƒ@ƒCƒ‹–¼ (Icons)
#
ICON = "skill_027"
#
# •`‰æ“à—e •Ï”ID
#
VARIABLE_ID = 13
#
# ‰Žæ‚èF
#
HEMCOLOR = Color.new(96,48,0,255)
#--------------------------------------------------------------------------
# --- ƒEƒBƒ“ƒhƒEƒXƒ‰ƒCƒfƒBƒ“ƒO‚ð“‹Ú ---
#--------------------------------------------------------------------------
include XRXS_WindowSliding
#--------------------------------------------------------------------------
# › ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
super(344, 436, 140, 56)
@slide_x_speed = -8
self.opacity = 0
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.color = normal_color
self.contents.font.size = 21
refresh
end
#--------------------------------------------------------------------------
# › ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
icon = RPG::Cache.icon(ICON)
self.contents.blt(0,0,icon,icon.rect)
self.contents.draw_hemming_text(24, 0, 80, 24, $game_variables[VARIABLE_ID].to_s, 2, HEMCOLOR)
end
end
#==============================================================================
# --- ƒƒjƒ…[ƒŒƒCƒAƒEƒg Šg’£’è‹` ---
#==============================================================================
class Scene_Menu
alias xrxs_melt_pi6_make_windows make_windows
def make_windows
xrxs_melt_pi6_make_windows
@windows.push(Window_MenuVariable3.new)
end
end
Plugin C7
Code: # ¥£¥ MeLT. ƒvƒ‰ƒOƒCƒ“C7 : ƒ”ƒ@ƒŠƒAƒuƒ‹D ¥£¥
#
#
#==============================================================================
# Window_MenuVariable4
#==============================================================================
class Window_MenuVariable4 < Window_Base
#
# ƒAƒCƒRƒ“ƒtƒ@ƒCƒ‹–¼ (Icons)
#
ICON = "skill_024"
#
# •`‰æ“à—e •Ï”ID
#
VARIABLE_ID = 14
#
# ‰Žæ‚èF
#
HEMCOLOR = Color.new(96,48,0,255)
#--------------------------------------------------------------------------
# --- ƒEƒBƒ“ƒhƒEƒXƒ‰ƒCƒfƒBƒ“ƒO‚ð“‹Ú ---
#--------------------------------------------------------------------------
include XRXS_WindowSliding
#--------------------------------------------------------------------------
# › ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
super(500, 436, 140, 56)
@slide_x_speed = -8
self.opacity = 0
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.color = normal_color
self.contents.font.size = 21
refresh
end
#--------------------------------------------------------------------------
# › ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
icon = RPG::Cache.icon(ICON)
self.contents.blt(0,0,icon,icon.rect)
self.contents.draw_hemming_text(24, 0, 80, 24, $game_variables[VARIABLE_ID].to_s, 2, HEMCOLOR)
end
end
#==============================================================================
# --- ƒƒjƒ…[ƒŒƒCƒAƒEƒg Šg’£’è‹` ---
#==============================================================================
class Scene_Menu
alias xrxs_melt_pi7_make_windows make_windows
def make_windows
xrxs_melt_pi7_make_windows
@windows.push(Window_MenuVariable4.new)
end
end
Plugin C8
Code: # ¥£¥ MeLT. ƒvƒ‰ƒOƒCƒ“C8 : ƒ}ƒbƒvƒl[ƒ€ƒTƒCƒhƒo[ ¥£¥
#
#
#==============================================================================
# Window_MenuMapName
#==============================================================================
class Window_MenuMapName < Window_Base
#
# ƒTƒCƒhƒo[ƒXƒLƒ“ (Windowskin)
#
SIDE_BAR = "MenuSideBar"
#
# ‰Žæ‚èF
#
HEMCOLOR = Color.new(96,96,0,255)
#--------------------------------------------------------------------------
# --- ƒEƒBƒ“ƒhƒEƒXƒ‰ƒCƒfƒBƒ“ƒO‚ð“‹Ú ---
#--------------------------------------------------------------------------
include XRXS_WindowSliding
#--------------------------------------------------------------------------
# › ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
super(368, 400, 320, 64)
@slide_x_speed = -8
self.opacity = 0
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.color = normal_color
self.contents.font.size = 21
refresh
end
#--------------------------------------------------------------------------
# › ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
bitmap = RPG::Cache.windowskin(SIDE_BAR)
self.contents.blt(0,0, bitmap, bitmap.rect)
self.contents.draw_hemming_text(16, 0, 256, 28, $game_map.name, 1, HEMCOLOR)
end
end
#==============================================================================
# --- ƒƒjƒ…[ƒŒƒCƒAƒEƒg Šg’£’è‹` ---
#==============================================================================
class Scene_Menu
alias xrxs_melt_pi8_make_windows make_windows
def make_windows
xrxs_melt_pi8_make_windows
@windows.push(Window_MenuMapName.new)
end
end
#==============================================================================
# XRXS. ƒ}ƒbƒv–¼Žæ“¾‹@\
#==============================================================================
class Game_Map
#--------------------------------------------------------------------------
# › ƒ}ƒbƒv–¼‚ðŽæ“¾
#--------------------------------------------------------------------------
def name
$data_mapinfos = load_data("Data/MapInfos.rxdata") if $data_mapinfos.nil?
$data_mapinfos[@map_id].name
end
end
Plugin C9
Code: # ¥£¥ MeLT. ƒvƒ‰ƒOƒCƒ“C9 : ƒ~ƒbƒVƒ‡ƒ“ƒtƒbƒ^[ ¥£¥
#
#==============================================================================
# ƒ~ƒbƒVƒ‡ƒ“ •¶Žš—ñÝ’è
#==============================================================================
module Missons
def self.command
#
# ƒ~ƒbƒVƒ‡ƒ“ƒnƒbƒVƒ…‚ÌÝ’è
# ( ^•Ï”‚Ì’l=>"ƒ~ƒbƒVƒ‡ƒ“–¼" )
#
commands = {
1=>"‘Œ´‚ð“Ë”j‚¹‚æI",
2=>"‰B‚³‚ꂽ”è΂ð‘{õ‚¹‚æI",
3=>"–‚b‚ðŒ‚”j‚¹‚æI"
}
command = commands[$game_variables[2]] # ©‚±‚±‚ÉŽg—p‚·‚é•Ï”ID‚ðÝ’è
#
return command.to_s
end
end
#==============================================================================
# Window_MissonFooter
#==============================================================================
class Window_MissonFooter < Window_Base
#
# ƒtƒbƒ^ƒXƒLƒ“ (Windowskin)
#
FOOTER = "MenuFooter"
#
# ‰Žæ‚èF
#
HEMCOLOR = Color.new(96,96,0,255)
#--------------------------------------------------------------------------
# --- ƒEƒBƒ“ƒhƒEƒXƒ‰ƒCƒfƒBƒ“ƒO‚ð“‹Ú ---
#--------------------------------------------------------------------------
include XRXS_WindowSliding
#--------------------------------------------------------------------------
# › ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
super(-16, 464, 672, 64)
@slide_x_speed = 0
@slide_y_speed = -8
self.opacity = 0
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.color = normal_color
self.contents.font.size = 18
refresh
end
#--------------------------------------------------------------------------
# › ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
bitmap = RPG::Cache.windowskin(FOOTER)
text = Missons.command
self.contents.blt(0,0, bitmap, bitmap.rect)
self.contents.draw_hemming_text(96, 0, 544, 32, text, 0, HEMCOLOR)
end
end
#==============================================================================
# --- ƒƒjƒ…[ƒŒƒCƒAƒEƒg Šg’£’è‹` ---
#==============================================================================
class Scene_Menu
alias xrxs_melt_pi9_make_windows make_windows
def make_windows
xrxs_melt_pi9_make_windows
@windows.push(Window_MissonFooter.new)
end
end
Demo
Can be found on the author's site
http://xrxs.at-ninja.jp/MeLT/ProjectMeLT.exe
I have placed a mirror link here and have included a translated instruction document:
http://www.mediafire.com/?c52awp4z46m5r88
Note
I can't really help with troubleshooting this script as I'm not really a scripting expert but I have managed to get this working in one of my projects so in theory it should work for other RPG Maker XP projects as well.
|