#==============================================================================
# ** One-Man CMS
# * by Rune
#------------------------------------------------------------------------------
# Little configuration required:
#
# Must have three images in the pictures folder of your project named "HP_bar",
# "SP_bar" (both of these must be from 100 x 4 to 100 x 10 pixels) and one
# named "bar_border", this one must be 102 pixels in width and the height of
# your bars + 2 pixels, and must consist of a one pixel thick border for your
# HP/SP bars, and may include a darker colour in the centre.
#------------------------------------------------------------------------------
# * Credit:
# Rune
# Modern Algebra for the HP/SP bars coding and for the Window_Command edit
# (I'm 99.7% sure that was him).
#==============================================================================
#==============================================================================
# * HP/SP bar configuration
#==============================================================================
HP_BAR = RPG::Cache.picture("HP_bar") # Name of your HP bar
SP_BAR = RPG::Cache.picture("SP_bar") # Name of your SP bar
BAR_BORDER = RPG::Cache.picture("bar_border") # Name of your HP/SP bar border
DECREASE_STYLE = 0 # 0 = squash, 1 = crop
#==============================================================================
# * End of HP/SP bar configuration
#==============================================================================
#==============================================================================
# * MenuStatus bar configuration
#==============================================================================
$activecharid = 1 # Change this to match the current active character
# The number is the character's ID in the database
# I.e. Arshes = 1, Basil = 2, Cyrus = 3, etc...
# To change ingame, use a call script command and type:
# $activecharid = number
#==============================================================================
# * End of MenuStatus configuration
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# * Draw Battler
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# opacity : opacity
#--------------------------------------------------------------------------
def draw_actor_battler(actor, x, y, opacity)
char = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
self.contents.blt(x, y, char, char.rect, opacity)
end
end
#==============================================================================
# * End of Window_Base (Edit)
#==============================================================================
#==============================================================================
# * End of Window_Command (Rewrite)
#==============================================================================
#==============================================================================
# * End of Window_PlayTime (Edit)
#==============================================================================
#==============================================================================
# * End of Window_MenuStatus (Rewrite)
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Makes the Map appear in the background
@spriteset = Spriteset_Map.new
# Make command window
s1 = "Inventory"
s2 = "Abilities"
s3 = "Equipment"
s4 = "Status"
s5 = "Save Game"
s6 = "Quit Game"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6], 1, 2)
@command_window.index = @menu_index
@command_window.y = 240 - @command_window.height / 2
@command_window.x = 80
# If number of party members is 0
if $game_party.actors.size == 0
# Disable items, skills, equipment, and status
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
# If save is forbidden
if $game_system.save_disabled
# Disable save
@command_window.disable_item(4)
end
# Make status window
@status_window = Window_MenuStatus.new
# Make play time window
@playtime_window = Window_PlayTime.new
@playtime_window.x = 400
@playtime_window.y = 160
@playtime_window.opacity = 0
# Make gold window
@gold_window = Window_Gold.new
@gold_window.x = 400
@gold_window.y = 224
@gold_window.opacity = 0
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@command_window.dispose
@playtime_window.dispose
@spriteset.dispose
@gold_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@command_window.update
@playtime_window.update
@spriteset.update
@gold_window.update
@status_window.update
# If command window is active: call update_command
if @command_window.active
update_command
return
end
# If status window is active: call update_status
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when command window is active)
#--------------------------------------------------------------------------
def update_command
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to map screen
$scene = Scene_Map.new
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# If command other than save or end game, and party members = 0
if $game_party.actors.size == 0 and @command_window.index < 4
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Branch by command window cursor position
case @command_window.index
when 0 # item
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to item screen
$scene = Scene_Item.new
when 1 # skill
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to skill screen
$scene = Scene_Skill.new
when 2 # equipment
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to equip screen
$scene = Scene_Equip.new
when 3 # status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to status screen
$scene = Scene_Status.new
when 4 # save
# If saving is forbidden
if $game_system.save_disabled
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to save screen
$scene = Scene_Save.new
when 5 # end game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to end game screen
$scene = Scene_End.new
end
return
end
end
end
#==============================================================================
# * End of Scene_Menu
#==============================================================================
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach Nie możesz załączać plików na tym forum Możesz ściągać załączniki na tym forum