I need this hud in my game, can anyone make an script with these images and sounds? (attached)
I want the "Low Health.wav" to loop like in LTTP when your health is low.
There is an preview of how i want it attached.
What would those keys be for? How would you be using them as well?
And I'll make this for you shouldn't take long.
[Update]
I'm, nearly done I just need you to answer my questions. Here is what I have.
[spoiler=Script]
#===============================================================================
# Created by: Mr Wiggles
# V 1.0
#===============================================================================
#
# Instructions:
# Place above main in the scripts data base, and be sure the place all of the
# resources in their proper places.
#
#===============================================================================
# CONFIG
#===============================================================================
HP_LOW = 20 # Percent at which to play low hp SE.
HP_SE_WAIT = 60 # Frames to wait to play SE again.
HP_SE_VOL = 100 # Volume to play low hp SE at.
#===============================================================================
class Window_HUD < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
@actor = $game_party.actors[0]
@hp_se_wait = 0
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
#-----------------------
# Make HUD
base = RPG::Cache.picture('Base')
self.contents.blt(0, 0, base, Rect.new(0, 0, 640, 480))
#-----------------------
# Draw HP
percent = @actor.hp / @actor.maxhp.to_f
hp_bar = RPG::Cache.picture('HP Bar')
self.contents.blt(276, 16, hp_bar, Rect.new(0, 0, 91 * percent, 11))
# play low hp SE
@hp_se_wait -= 1 if @hp_se_wait > 0
if ((percent * 100) < HP_LOW) and @hp_se_wait == 0
@hp_se_wait = HP_SE_WAIT
Audio.se_play("Audio/SE/" + "Low Health", HP_SE_VOL, 100)
end
#-----------------------
# Draw SP
percent = @actor.sp / @actor.maxsp.to_f
sp_bar = RPG::Cache.picture('SP Bar')
self.contents.blt(276, 35, sp_bar, Rect.new(0, 0, 91 * percent, 11))
#-----------------------
# Draw Equipment
# weapon
if @actor.weapon_id != 0
weapon_icon = RPG::Cache.icon($data_weapons[@actor.weapon_id].icon_name)
self.contents.blt( 27, 36, weapon_icon, Rect.new(0, 0, 24, 24))
end
# shield
if @actor.armor1_id != 0
shield_icon = RPG::Cache.icon($data_armors[@actor.armor1_id].icon_name)
self.contents.blt( 59, 36, shield_icon, Rect.new(0, 0, 24, 24))
end
# head
if @actor.armor2_id != 0
head_icon = RPG::Cache.icon($data_armors[@actor.armor2_id].icon_name)
self.contents.blt( 27, 64, head_icon, Rect.new(0, 0, 24, 24))
end
# body
if @actor.armor3_id != 0
body_icon = RPG::Cache.icon($data_armors[@actor.armor3_id].icon_name)
self.contents.blt( 59, 64, body_icon, Rect.new(0, 0, 24, 24))
end
#-----------------------
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
# Dim hud if its in the way
# define HUD size
hud_size_x = 400
hud_size_y = 120
hud_location_x = -10
hud_location_y = -10
range_x = hud_size_x + hud_location_x
range_y = hud_size_y + hud_location_y
# get player location
player_x = ($game_player.real_x - $game_map.display_x) / 4
player_y = ($game_player.real_y - $game_map.display_y) / 4
player_y -= 30 if player_x <= 150 and player_y >= range_y
# if HUD is in the way
if player_x < range_x and player_x > hud_location_x - 5 and
player_y > hud_location_y and player_y < range_y
self.contents_opacity -= 10 if self.contents_opacity > 120
else
self.contents_opacity += 10 if self.contents_opacity < 255
end
# Refresh HUD
refresh
end
end
#==============================================================================
# * Scene_Map
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# * Main Draw
#--------------------------------------------------------------------------
alias hud_main main
def main
@hud = Window_HUD.new
hud_main
@hud.dispose
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
alias hud_update update
def update
hud_update
@hud.update
end
end
[/spoiler]
I want the key bar to show all keys with /K) in the name. (example: /K)Bronze key will be added while Gold key won't. Becouse it doesn't contain /K).)
I hope you understand what i mean.
yea I get what you mean... I'll update when I add it in.
do you want it to appear in any sort of order? cause that will need you to edit a little thing like " \k1 for gold, or \k2 for bronze " and then gold would appear on the far right and bronze would appear first.
[edit] it would just be easier/ faster to have you impute the four id numbers of the items that are keys. Would that be ok?
Here it is... you'll need to input the item IDs of the keys at the top of the script. if its not what you want just tell me. :D
[spoiler=Script]
#===============================================================================
# Created by: Mr Wiggles
# V 1.2
#===============================================================================
#
# Instructions:
# Place above main in the scripts data base, and be sure the place all of the
# resources in their proper places.
#
#===============================================================================
# CONFIG
#===============================================================================
HP_LOW = 20 # Percent at which to play low hp SE.
HP_SE_WAIT = 60 # Frames to wait to play SE again.
HP_SE_VOL = 100 # Volume to play low hp SE at.
BRONZE_ID = 1 # Item ID of the first key in the HUD
SILVER_ID = 2 # Item ID of the second key in the HUD
GOLD_ID = 3 # Item ID of the third key in the HUD
PLATINUM_ID = 4 # Item ID of the fourth key in the HUD
#===============================================================================
class Window_HUD < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
@actor = $game_party.actors[0]
@hp_se_wait = 0
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
#-----------------------
# Make HUD
base = RPG::Cache.picture('Base')
self.contents.blt(0, 0, base, Rect.new(0, 0, 640, 480))
#-----------------------
# Draw HP
percent = @actor.hp / @actor.maxhp.to_f
hp_bar = RPG::Cache.picture('HP Bar')
self.contents.blt(276, 16, hp_bar, Rect.new(0, 0, 91 * percent, 11))
# play low hp SE
@hp_se_wait -= 1 if @hp_se_wait > 0
if ((percent * 100) < HP_LOW) and @hp_se_wait == 0
@hp_se_wait = HP_SE_WAIT
Audio.se_play("Audio/SE/" + "Low Health", HP_SE_VOL, 100)
end
#-----------------------
# Draw SP
percent = @actor.sp / @actor.maxsp.to_f
sp_bar = RPG::Cache.picture('SP Bar')
self.contents.blt(276, 35, sp_bar, Rect.new(0, 0, 91 * percent, 11))
#-----------------------
# Draw Equipment
# weapon
if @actor.weapon_id != 0
weapon_icon = RPG::Cache.icon($data_weapons[@actor.weapon_id].icon_name)
self.contents.blt( 27, 36, weapon_icon, Rect.new(0, 0, 24, 24))
end
# shield
if @actor.armor1_id != 0
shield_icon = RPG::Cache.icon($data_armors[@actor.armor1_id].icon_name)
self.contents.blt( 59, 36, shield_icon, Rect.new(0, 0, 24, 24))
end
# head
if @actor.armor2_id != 0
head_icon = RPG::Cache.icon($data_armors[@actor.armor2_id].icon_name)
self.contents.blt( 27, 64, head_icon, Rect.new(0, 0, 24, 24))
end
# body
if @actor.armor3_id != 0
body_icon = RPG::Cache.icon($data_armors[@actor.armor3_id].icon_name)
self.contents.blt( 59, 64, body_icon, Rect.new(0, 0, 24, 24))
end
#-----------------------
# Draw Keys
# bronze key
if $game_party.item_number(BRONZE_ID) > 0
bronze_icon = RPG::Cache.icon($data_items[BRONZE_ID].icon_name)
self.contents.blt( 120, 18, bronze_icon, Rect.new(0, 0, 24, 24))
end
# silver key
if $game_party.item_number(SILVER_ID) > 0
silver_icon = RPG::Cache.icon($data_items[SILVER_ID].icon_name)
self.contents.blt( 148, 18, silver_icon, Rect.new(0, 0, 24, 24))
end
# gold key
if $game_party.item_number(GOLD_ID) > 0
gold_icon = RPG::Cache.icon($data_items[GOLD_ID].icon_name)
self.contents.blt( 176, 18, gold_icon, Rect.new(0, 0, 24, 24))
end
# platinum key
if $game_party.item_number(PLATINUM_ID) > 0
platinum_icon = RPG::Cache.icon($data_items[PLATINUM_ID].icon_name)
self.contents.blt( 204, 18, platinum_icon, Rect.new(0, 0, 24, 24))
end
#-----------------------
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
# Dim hud if its in the way
# define HUD size
hud_size_x = 400
hud_size_y = 120
hud_location_x = -10
hud_location_y = -10
range_x = hud_size_x + hud_location_x
range_y = hud_size_y + hud_location_y
# get player location
player_x = ($game_player.real_x - $game_map.display_x) / 4
player_y = ($game_player.real_y - $game_map.display_y) / 4
player_y -= 30 if player_x <= 150 and player_y >= range_y
# if HUD is in the way
if player_x < range_x and player_x > hud_location_x - 5 and
player_y > hud_location_y and player_y < range_y
self.contents_opacity -= 10 if self.contents_opacity > 120
else
self.contents_opacity += 10 if self.contents_opacity < 255
end
# Refresh HUD
refresh
end
end
#==============================================================================
# * Scene_Map
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# * Main Draw
#--------------------------------------------------------------------------
alias hud_main main
def main
@hud = Window_HUD.new
hud_main
@hud.dispose
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
alias hud_update update
def update
hud_update
@hud.update
end
end
[/spoiler]
Thanks! I added a gold counter to the base image. I want the numbers to be on the right side of the coin.
sure no problem ill add it in for ya...
do you wanna be able to edit the font, size, and color?
You can decide for me.
Here you are, you can change the color and font at the top.
[spoiler=Script]
#===============================================================================
# Created by: Mr Wiggles
# V 1.3
#===============================================================================
#
# Instructions:
# Place above main in the scripts data base, and be sure the place all of the
# resources in their proper places.
#
#===============================================================================
# CONFIG
#===============================================================================
HP_LOW = 20 # Percent at which to play low hp SE.
HP_SE_WAIT = 60 # Frames to wait to play SE again.
HP_SE_VOL = 100 # Volume to play low hp SE at.
BRONZE_ID = 1 # Item ID of the first key in the HUD
SILVER_ID = 2 # Item ID of the second key in the HUD
GOLD_ID = 3 # Item ID of the third key in the HUD
PLATINUM_ID = 4 # Item ID of the fourth key in the HUD
# Color of gold text in HUD (R, B, G, O)
GOLD_COLOR = Color.new(255, 255, 255, 255)
# Font to use for gold text in HUD
GOLD_FONT = "Times New Roman"
#===============================================================================
class Window_HUD < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
@actor = $game_party.actors[0]
@hp_se_wait = 0
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
#-----------------------
# Make HUD
base = RPG::Cache.picture('Base')
self.contents.blt(0, 0, base, Rect.new(0, 0, 640, 480))
#-----------------------
# Draw HP
percent = @actor.hp / @actor.maxhp.to_f
hp_bar = RPG::Cache.picture('HP Bar')
self.contents.blt(276, 16, hp_bar, Rect.new(0, 0, 91 * percent, 11))
# play low hp SE
@hp_se_wait -= 1 if @hp_se_wait > 0
if ((percent * 100) < HP_LOW) and @hp_se_wait == 0
@hp_se_wait = HP_SE_WAIT
Audio.se_play("Audio/SE/" + "Low Health", HP_SE_VOL, 100)
end
#-----------------------
# Draw SP
percent = @actor.sp / @actor.maxsp.to_f
sp_bar = RPG::Cache.picture('SP Bar')
self.contents.blt(276, 35, sp_bar, Rect.new(0, 0, 91 * percent, 11))
#-----------------------
# Draw Equipment
# weapon
if @actor.weapon_id != 0
weapon_icon = RPG::Cache.icon($data_weapons[@actor.weapon_id].icon_name)
self.contents.blt( 27, 36, weapon_icon, Rect.new(0, 0, 24, 24))
end
# shield
if @actor.armor1_id != 0
shield_icon = RPG::Cache.icon($data_armors[@actor.armor1_id].icon_name)
self.contents.blt( 59, 36, shield_icon, Rect.new(0, 0, 24, 24))
end
# head
if @actor.armor2_id != 0
head_icon = RPG::Cache.icon($data_armors[@actor.armor2_id].icon_name)
self.contents.blt( 27, 64, head_icon, Rect.new(0, 0, 24, 24))
end
# body
if @actor.armor3_id != 0
body_icon = RPG::Cache.icon($data_armors[@actor.armor3_id].icon_name)
self.contents.blt( 59, 64, body_icon, Rect.new(0, 0, 24, 24))
end
#-----------------------
# Draw Keys
# bronze key
if $game_party.item_number(BRONZE_ID) > 0
bronze_icon = RPG::Cache.icon($data_items[BRONZE_ID].icon_name)
self.contents.blt( 120, 18, bronze_icon, Rect.new(0, 0, 24, 24))
end
# silver key
if $game_party.item_number(SILVER_ID) > 0
silver_icon = RPG::Cache.icon($data_items[SILVER_ID].icon_name)
self.contents.blt( 148, 18, silver_icon, Rect.new(0, 0, 24, 24))
end
# gold key
if $game_party.item_number(GOLD_ID) > 0
gold_icon = RPG::Cache.icon($data_items[GOLD_ID].icon_name)
self.contents.blt( 176, 18, gold_icon, Rect.new(0, 0, 24, 24))
end
# platinum key
if $game_party.item_number(PLATINUM_ID) > 0
platinum_icon = RPG::Cache.icon($data_items[PLATINUM_ID].icon_name)
self.contents.blt( 204, 18, platinum_icon, Rect.new(0, 0, 24, 24))
end
#-----------------------
# Draw Gold
self.contents.font.name = GOLD_FONT
self.contents.font.color = GOLD_COLOR
self.contents.draw_text(407, 7, 120, 32, $game_party.gold.to_s, 0)
#-----------------------
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
# Dim hud if its in the way
# define HUD size
hud_size_x = 480
hud_size_y = 120
hud_location_x = -10
hud_location_y = -10
range_x = hud_size_x + hud_location_x
range_y = hud_size_y + hud_location_y
# get player location
player_x = ($game_player.real_x - $game_map.display_x) / 4
player_y = ($game_player.real_y - $game_map.display_y) / 4
player_y -= 30 if player_x <= 150 and player_y >= range_y
# if HUD is in the way
if player_x < range_x and player_x > hud_location_x - 5 and
player_y > hud_location_y and player_y < range_y
self.contents_opacity -= 10 if self.contents_opacity > 120
else
self.contents_opacity += 10 if self.contents_opacity < 255
end
# Refresh HUD
refresh
end
end
#==============================================================================
# * Scene_Map
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# * Main Draw
#--------------------------------------------------------------------------
alias hud_main main
def main
@hud = Window_HUD.new
hud_main
@hud.dispose
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
alias hud_update update
def update
hud_update
@hud.update
end
end
[/spoiler]
Are you good at menus? If so, then i want you to make a script with these. (attached.)
The Equip and Save/load menu can be default for the moment.
When you select "SAVE" i want to get a window with four choises on. (Save,Load,Quit,Cancel)
And i want it to work with the hud. Becouse i need both of them in my game (Lucifer's Quest)
The game only have one actor. So when pressing equip/stats you will only get the window for the first actor.
It will take me longer then the hud but im sure I can get it done.
some questions...
what does "map" go to? (script)
you want the pink area to see through to map?
Also some thoughts, I don't think there is a font to match the writing you have i can use images but it will take longer.
And will you need every thing done like this? (Menu, Window_File, Items Window, Equip Window,...)
Side note, are you any good at character sprites?
[edit] - Here I started work on it I got thus far...
[spoiler=Menu Script]
#===============================================================================
# ** Game Menu Script
#-------------------------------------------------------------------------------
# Created by: Mr Wiggles
# V 0.6
#===============================================================================
# CONFIG
#===============================================================================
STATUS_WIN_FONT = 'Times New Roman' # Font for status window
#===============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
#---------------------------
# Make commands
s1 = $data_system.words.item
s2 = $data_system.words.equip
s3 = "Status"
s4 = "Map"
s5 = "Save"
@commands = Window_Command.new(160, [s1, s2, s3, s4, s5])
@commands.index = @menu_index
@commands.visible = false
# If number of party members is 0
if $game_party.actors.size == 0
# Disable items, skills, equipment, and status
@commands.disable_item(0)
@commands.disable_item(1)
@commands.disable_item(2)
@commands.disable_item(3)
end
# If save is forbidden
if $game_system.save_disabled
# Disable save
@commands.disable_item(4)
end
#---------------------------
# Make Windows
# Status Window
@status_window = Window_Menu_Status.new
# Make Map back
@spriteset = Spriteset_Map.new
# Make Command Window
@command_window = Window_Commands.new
#---------------------------
# 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
@commands.dispose
@status_window.dispose
@spriteset.dispose
@command_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@commands.update
@status_window.update
@command_window.update(@commands.index)
update_command
end
#--------------------------------------------------------------------------
# * Command window location update
#--------------------------------------------------------------------------
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 @commands.index < 4
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Branch by command window cursor position
case @commands.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 # equipment
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to equipment screen
$scene = Scene_Equip.new(0)
when 2 # status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to status screen
$scene = Scene_Status.new(0)
when 3 # map
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
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
end
return
end
end
end #class
#==============================================================================
# ** Window_MenuStatus
#==============================================================================
class Window_Menu_Status < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(-20, -20, 700, 600)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
@actor = $game_party.actors[0]
@x = 165
@y = 56
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# Draw window back
status_window = RPG::Cache.picture('Status')
self.contents.blt(@x, @y, status_window, Rect.new(0, 0, 640, 480))
# Draw battler
battler = RPG::Cache.battler(@actor.battler_name, @actor.battler_hue)
self.contents.blt(@x + 270, @y + 40, battler, Rect.new(0, 0, 640, 480))
#-------------------------
# Draw HP Bar
percent = @actor.hp / @actor.maxhp.to_f
hp_bar = RPG::Cache.picture('HP Bar2')
offset = 207 - 103 * percent
self.contents.blt(@x + 54, @y + offset, hp_bar, Rect.new(0, 0, 16, 103 * percent))
#-------------------------
# Draw SP Bar
percent = @actor.sp / @actor.maxsp.to_f
sp_bar = RPG::Cache.picture('SP Bar2')
offset = 207 - 103 * percent
self.contents.blt(@x + 26, @y + offset, sp_bar, Rect.new(0, 0, 16, 103 * percent))
#-------------------------
# Draw actor info
# set up text
self.contents.font.name = STATUS_WIN_FONT
self.contents.font.color = Color.new(255, 255, 255, 255)
# draw name
self.contents.font.size = 50
self.contents.draw_text(@x + 10, @y - 20, 200, 100, @actor.name, 0)
self.contents.font.size = 15
# draw level
self.contents.draw_text(@x + 178, @y + 77, 120, 32, @actor.level.to_s, 0)
# draw state
state = make_battler_state_text(@actor, 160, true)
self.contents.draw_text(@x + 174, @y + 89, 120, 32, state, 0)
# draw INT
self.contents.draw_text(@x + 155, @y + 100, 120, 32, @actor.int.to_s, 0)
# draw DEX
self.contents.draw_text(@x + 155, @y + 111, 120, 32, @actor.dex.to_s, 0)
# draw AGI
self.contents.draw_text(@x + 155, @y + 122, 120, 32, @actor.agi.to_s, 0)
# draw STR
self.contents.draw_text(@x + 160, @y + 133, 120, 32, @actor.str.to_s, 0)
# draw ATK
self.contents.draw_text(@x + 160, @y + 144, 120, 32, @actor.atk.to_s, 0)
# draw PDEF
self.contents.draw_text(@x + 165, @y + 155, 120, 32, @actor.pdef.to_s, 0)
# draw MDEF
self.contents.draw_text(@x + 165, @y + 166, 120, 32, @actor.mdef.to_s, 0)
#-------------------------
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
refresh
end
end
#==============================================================================
# ** Window_Commands
#==============================================================================
class Window_Commands < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
@curser_pos = 0
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# Draw Menu Back
command_window = RPG::Cache.picture('Commando')
self.contents.blt(26, 26,command_window, Rect.new(0, 0, 640, 480))
# Create Gold
self.contents.draw_text(54, 295, 200, 32, $game_party.gold.to_s, 0)
# Create Arrow
arrow = RPG::Cache.picture('Arrow')
x = @curser_pos * 16 + 54
self.contents.blt(34, x, arrow, Rect.new(0, 0, 640, 480))
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update(menu_index)
@curser_pos = menu_index
refresh
end
end
#==============================================================================
# ** Scene_Save
#==============================================================================
class Scene_Save < Scene_File
#--------------------------------------------------------------------------
# * Decision Processing
#--------------------------------------------------------------------------
def on_decision(filename)
# Play save SE
$game_system.se_play($data_system.save_se)
# Write save data
file = File.open(filename, "wb")
write_save_data(file)
file.close
# If called from event
if $game_temp.save_calling
# Clear save call flag
$game_temp.save_calling = false
# Switch to map screen
$scene = Scene_Map.new
return
end
# Switch to menu screen
$scene = Scene_Menu.new(4)
end
#--------------------------------------------------------------------------
# * Cancel Processing
#--------------------------------------------------------------------------
def on_cancel
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# If called from event
if $game_temp.save_calling
# Clear save call flag
$game_temp.save_calling = false
# Switch to map screen
$scene = Scene_Map.new
return
end
# Switch to menu screen
$scene = Scene_Menu.new(4)
end
end
#==============================================================================
# ** Scene_Load
#------------------------------------------------------------------------------
# This class performs load screen processing.
#==============================================================================
class Scene_Load < Scene_File
#--------------------------------------------------------------------------
# * Decision Processing
#--------------------------------------------------------------------------
def on_decision(filename)
# If file doesn't exist
unless FileTest.exist?(filename)
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play load SE
$game_system.se_play($data_system.load_se)
# Read save data
file = File.open(filename, "rb")
read_save_data(file)
file.close
# Restore BGM and BGS
$game_system.bgm_play($game_system.playing_bgm)
$game_system.bgs_play($game_system.playing_bgs)
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Cancel Processing
#--------------------------------------------------------------------------
def on_cancel
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to title screen
$scene = Scene_Title.new
end
end
#==============================================================================
# ** Scene_Equip
#==============================================================================
class Scene_Equip
#--------------------------------------------------------------------------
# * Frame Update (when right window is active)
#--------------------------------------------------------------------------
def update_right
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to menu screen
$scene = Scene_Menu.new(1)
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# If equipment is fixed
if @actor.equip_fix?(@right_window.index)
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Activate item window
@right_window.active = false
@item_window.active = true
@item_window.index = 0
return
end
# If R button was pressed
if Input.trigger?(Input::R)
# Play cursor SE
$game_system.se_play($data_system.cursor_se)
# To next actor
@actor_index += 1
@actor_index %= $game_party.actors.size
# Switch to different equipment screen
$scene = Scene_Equip.new(@actor_index, @right_window.index)
return
end
# If L button was pressed
if Input.trigger?(Input::L)
# Play cursor SE
$game_system.se_play($data_system.cursor_se)
# To previous actor
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# Switch to different equipment screen
$scene = Scene_Equip.new(@actor_index, @right_window.index)
return
end
end
end
#==============================================================================
# ** Scene_Status
#==============================================================================
class Scene_Status
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to menu screen
$scene = Scene_Menu.new(2)
return
end
# If R button was pressed
if Input.trigger?(Input::R)
# Play cursor SE
$game_system.se_play($data_system.cursor_se)
# To next actor
@actor_index += 1
@actor_index %= $game_party.actors.size
# Switch to different status screen
$scene = Scene_Status.new(@actor_index)
return
end
# If L button was pressed
if Input.trigger?(Input::L)
# Play cursor SE
$game_system.se_play($data_system.cursor_se)
# To previous actor
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# Switch to different status screen
$scene = Scene_Status.new(@actor_index)
return
end
end
end
[/spoiler]
Also do you have a window skin for the save. load scenes? I put this together real quick...
You forgot the SP and HP bar.
The "map" goes to a world map. And the pink area is where you will see through to map.
I will make the letters/numbers later.
I love making characters.
I didn't have any windowskin for it, so thanks!
BTW: I just love your scripts.
Would you mind completing a task for me? I just need some more help on creating the character suffixes for my game, and i was wondering if you could do a few if i give you all of the stuff.
So world map? like they enter zones or something? and how do they go about exiting?
Like a teleport to the world map? (you'll need to use 3 var. world map id, x, y. and you can set those in events so you can make it bring them where ever you want.
{edit} Yea but i updated it with them in there, sorry i sent it then realized so i added it in.
the one ^ up there does have SP and HP in it.
I edited the commando window. (attached)
What's a suffix? And about the world map, how do you mean?
I need to go to school now.
I'll update with your new attachment. (can't find it)
Well im using an ABS for my game called XAS, and when you use your equipped items and weapons on the map to attack it will change the player graphic to a suffix that you have set for that Tool.
(when i use the sword it shows the player swinging the sword)
Well what i was wondering is if the player walks around on the world map and then enters the towns or places they're on top of. And then if when they use "Map" from the menu they teleport back to the world map and our out side of the place where they entered.
I will make some suffixes for you.
And about the map, i won't have any ff styled world map. I was more thinking of showing a picture of the world.
But it's a really smart idea.
There could be places like castles and fortresses where you won't be able to escape to map.
Here's the letters/numbers you wanted.
Sorry, i was in a hurry and forgot to attach the commando menu. Here you go.
Well the letters are not what i meant, sorry. I was just wondering if you have a font file that you where using, cause i can't use the image for the text on the screen.
I'm updating with the new comando now.
for the world map, unless you find a world map script, ill have to write one for you.
Cool, I'll PM you the stuff for the suffixes i need, thanks.
[Update]
[spoiler=Script]
#===============================================================================
# ** Game Menu Script
#-------------------------------------------------------------------------------
# Created by: Mr Wiggles
# V 0.6
#===============================================================================
# CONFIG
#===============================================================================
STATUS_WIN_FONT = 'Times New Roman' # Font for status window
#===============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
#---------------------------
# Make commands
s1 = $data_system.words.item
s2 = $data_system.words.equip
s3 = "Status"
s4 = "Map"
s5 = "Save"
s6 = "Load"
s7 = "Quit"
@commands = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
@commands.index = @menu_index
@commands.visible = false
# If number of party members is 0
if $game_party.actors.size == 0
# Disable items, skills, equipment, and status
@commands.disable_item(0)
@commands.disable_item(1)
@commands.disable_item(2)
@commands.disable_item(3)
end
# If save is forbidden
if $game_system.save_disabled
# Disable save
@commands.disable_item(4)
end
# If a save file exsists
@loading_disabled = true
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata")
@loading_disabled = false
end
end
#---------------------------
# Make Windows
# Status Window
@status_window = Window_Menu_Status.new
# Make Map back
@spriteset = Spriteset_Map.new
# Make Command Window
@command_window = Window_Commands.new
#---------------------------
# 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
@commands.dispose
@status_window.dispose
@spriteset.dispose
@command_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@commands.update
@status_window.update
@command_window.update(@commands.index)
update_command
end
#--------------------------------------------------------------------------
# * Command window location update
#--------------------------------------------------------------------------
def update_command
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Return to title for Scene_Load
$game_system.return_to_menu = false
# 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 @commands.index < 4
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Branch by command window cursor position
case @commands.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 # equipment
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to equipment screen
$scene = Scene_Equip.new(0)
when 2 # status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to status screen
$scene = Scene_Status.new(0)
when 3 # map
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
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 # load
# If there is no save file
if @loading_disabled == true
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Return to game Menu
$game_system.return_to_menu = true
# Switch to load screen
$scene = Scene_Load.new
when 6 # quit
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Return to title for Scene_Load
$game_system.return_to_menu = false
# Call Scene_End
$scene = Scene_End.new
end
return
end
end
end #class
#==============================================================================
# ** Window_MenuStatus
#==============================================================================
class Window_Menu_Status < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(-20, -20, 700, 600)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
@actor = $game_party.actors[0]
@x = 165
@y = 56
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# Draw window back
status_window = RPG::Cache.picture('Status')
self.contents.blt(@x, @y, status_window, Rect.new(0, 0, 640, 480))
# Draw battler
battler = RPG::Cache.battler(@actor.battler_name, @actor.battler_hue)
self.contents.blt(@x + 270, @y + 40, battler, Rect.new(0, 0, 640, 480))
#-------------------------
# Draw HP Bar
percent = @actor.hp / @actor.maxhp.to_f
hp_bar = RPG::Cache.picture('HP Bar2')
offset = 207 - 103 * percent
self.contents.blt(@x + 54, @y + offset, hp_bar, Rect.new(0, 0, 16, 103 * percent))
#-------------------------
# Draw SP Bar
percent = @actor.sp / @actor.maxsp.to_f
sp_bar = RPG::Cache.picture('SP Bar2')
offset = 207 - 103 * percent
self.contents.blt(@x + 26, @y + offset, sp_bar, Rect.new(0, 0, 16, 103 * percent))
#-------------------------
# Draw actor info
# set up text
self.contents.font.name = STATUS_WIN_FONT
self.contents.font.color = Color.new(255, 255, 255, 255)
# draw name
self.contents.font.size = 50
self.contents.draw_text(@x + 10, @y - 20, 200, 100, @actor.name, 0)
self.contents.font.size = 15
# draw level
self.contents.draw_text(@x + 178, @y + 77, 120, 32, @actor.level.to_s, 0)
# draw state
state = make_battler_state_text(@actor, 160, true)
self.contents.draw_text(@x + 174, @y + 89, 120, 32, state, 0)
# draw INT
self.contents.draw_text(@x + 155, @y + 100, 120, 32, @actor.int.to_s, 0)
# draw DEX
self.contents.draw_text(@x + 155, @y + 111, 120, 32, @actor.dex.to_s, 0)
# draw AGI
self.contents.draw_text(@x + 155, @y + 122, 120, 32, @actor.agi.to_s, 0)
# draw STR
self.contents.draw_text(@x + 160, @y + 133, 120, 32, @actor.str.to_s, 0)
# draw ATK
self.contents.draw_text(@x + 160, @y + 144, 120, 32, @actor.atk.to_s, 0)
# draw PDEF
self.contents.draw_text(@x + 165, @y + 155, 120, 32, @actor.pdef.to_s, 0)
# draw MDEF
self.contents.draw_text(@x + 165, @y + 166, 120, 32, @actor.mdef.to_s, 0)
#-------------------------
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
refresh
end
end
#==============================================================================
# ** Window_Commands
#==============================================================================
class Window_Commands < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
@curser_pos = 0
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# Draw Menu Back
command_window = RPG::Cache.picture('Commando')
self.contents.blt(26, 26,command_window, Rect.new(0, 0, 640, 480))
# Create Gold
self.contents.draw_text(54, 295, 200, 32, $game_party.gold.to_s, 0)
# Create Arrow
arrow = RPG::Cache.picture('Arrow')
x = @curser_pos * 16 + 54
self.contents.blt(34, x, arrow, Rect.new(0, 0, 640, 480))
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update(menu_index)
@curser_pos = menu_index
refresh
end
end
#==============================================================================
# ** Game_System
#--------------------------------------------------------------------------
# Sets up variables
#==============================================================================
class Game_System
attr_accessor :return_to_menu
alias game_menu_init initialize
def initialize
game_menu_init
@return_to_menu = false
end
end
#==============================================================================
# ** Scene_Save
#==============================================================================
class Scene_Save < Scene_File
#--------------------------------------------------------------------------
# * Decision Processing
#--------------------------------------------------------------------------
def on_decision(filename)
# Play save SE
$game_system.se_play($data_system.save_se)
# Write save data
file = File.open(filename, "wb")
write_save_data(file)
file.close
# If called from event
if $game_temp.save_calling
# Clear save call flag
$game_temp.save_calling = false
# Switch to map screen
$scene = Scene_Map.new
return
end
# Switch to menu screen
$scene = Scene_Menu.new(4)
end
#--------------------------------------------------------------------------
# * Cancel Processing
#--------------------------------------------------------------------------
def on_cancel
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# If called from event
if $game_temp.save_calling
# Clear save call flag
$game_temp.save_calling = false
# Switch to map screen
$scene = Scene_Map.new
return
end
# Switch to menu screen
$scene = Scene_Menu.new(4)
end
end
#==============================================================================
# ** Scene_Load
#==============================================================================
class Scene_Load < Scene_File
#--------------------------------------------------------------------------
# * Cancel Processing
#--------------------------------------------------------------------------
def on_cancel
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Determan where to go.
if $game_system.return_to_menu == true
# Switch to menu screen
$scene = Scene_Menu.new(5)
else
# Switch to title screen
$scene = Scene_Title.new
end
end
end
#==============================================================================
# ** Scene_Equip
#==============================================================================
class Scene_Equip
#--------------------------------------------------------------------------
# * Frame Update (when right window is active)
#--------------------------------------------------------------------------
def update_right
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to menu screen
$scene = Scene_Menu.new(1)
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# If equipment is fixed
if @actor.equip_fix?(@right_window.index)
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Activate item window
@right_window.active = false
@item_window.active = true
@item_window.index = 0
return
end
end
end
#==============================================================================
# ** Scene_Status
#==============================================================================
class Scene_Status
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to menu screen
$scene = Scene_Menu.new(2)
return
end
end
end
#==============================================================================
# ** Scene_End
#==============================================================================
class Scene_End
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to menu screen
$scene = Scene_Menu.new(6)
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # to title
command_to_title
when 1 # shutdown
command_shutdown
when 2 # quit
command_cancel
end
return
end
end
#--------------------------------------------------------------------------
# * Process When Choosing [Cancel] Command
#--------------------------------------------------------------------------
def command_cancel
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to menu screen
$scene = Scene_Menu.new(6)
end
end
[/spoiler]
Wow! You should post the script in script database.
It's amazing. You should call it "Picture-based 1-man CMS" or something.
Aw shucks, nah, it was built for your game. And besides I'd have to change a few things and the user would have to know a little about scripting to use it.
You still need the Window_File done? (save and load)
Also what about the Map command?
About that map command, i want it to show a picture called Map.png. (lttp styled map, exept the mode 7)
The map should only work if you have the world map item. (use item ID)
When i get home i will make the map picture. (im in school right now)
ok, cool... Yea I'll make it set up just they way it does for those keys in the HUD I wrote. (enter map items ID at the top of the script)
Thanks!
Srry for double posting, but i needed to bump this.
Let's use this world map for the moment. It's from Zelda.
k, I'll make it so that the player can scroll around on it too with the arrow keys.
do you want something like a blinking dot on a location when you need it?
Yes, that would be great!
k, do you wanna control it by variables. (map x, map Y)
I have never really understanded the use of variables.
If you want to, can you make a demo of it?
yea sure no problem.
[Updated]
Demo attached with how to use the world map, it is set up so that the map can be any size, you can move it around with the arrow keys as well.
Thank you!
BTW: Mspaint isn't good for portraits, but exelent for spriting.
huh, i just use photo shop.
Me too, but mspaint is good for small edits.
Could you make a script that enables you to have more then 4 frames on a player (or character)?
I want the character sprites to include (4F). It means the sprite has 4 frames, While (8F) is 8 frames.
It should allow a more smooth walking animation.
(i have an example sprite attached.)
EDIT: oops, i pressed the new reply button instead of the edit button.
Actually i have a script that some one else made that allows you to do that.
If the English sounds a little odd, its because I translated it.
#==============================================================================
# Increase in migratory pattern Ver 1.00
# Distributor support URL
# By COGHWELL
# http://members.jcom.home.ne.jp/cogwheel/
#==============================================================================
# The script allows the image of the character has more
# Than 4 frames.
#
# To set the amount of frames enough to define the name
# Image as follows.
#
# Hero[X].png
#
# In place of X place the desired amount of frames
#==============================================================================
#==============================================================================
# ? Game_Character (Split Definition 2)
#------------------------------------------------------------------------------
# Handle character classes. This class Game_Player Game_Event class
# Is used as a superclass of the class.
#==============================================================================
class Game_Character
#--------------------------------------------------------------------------
# ? Frame update
#--------------------------------------------------------------------------
def update
# During a jump, move, branch stopped
if jumping?
update_jump
elsif moving?
update_move
else
update_stop
end
# If the count exceeds the maximum Animation
# ? The maximum speed of 18 moves from the base value minus 1 *
# Filename [n] if contains the normal (n-1) / 4 speed pattern update
if @character_name[/\[(\d+)\]/]
@anime_count = 20 if @anime_count > 0 and @pattern == @original_pattern
if @anime_count * ($1.to_i - 1) / 4 > 18 - @move_speed * 2
# If the animation is stopped at the stop and OFF
if not @step_anime and @stop_count > 0
# Back to the original pattern
@pattern = @original_pattern
# ON when stopped while anime or if the move
else
# Update pattern
@pattern = @pattern % ($1.to_i - 1) + 1
end
# Clear animation count
@anime_count = 0
end
else
# Handle regular updating of the character pattern (just copy and paste the default process)
if @anime_count > 18 - @move_speed * 2
# If the animation is stopped at the stop and OFF
if not @step_anime and @stop_count > 0
# Restore the original pattern
@pattern = @original_pattern
# ON when stopped while anime or if the move
else
# Update pattern
@pattern = (@pattern + 1) % 4
end
# Clear animation count
@anime_count = 0
end
end
# If it is waiting
if @wait_count > 0
# Reduce wait time
@wait_count -= 1
return
end
# If you are forced migration route
if @move_route_forcing
# Move Custom
move_type_custom
return
end
# If you run an event waiting or locked
if @starting or lock?
# Mobility is no
return
end
# Stop a certain value count (calculated from the frequency of movement) exceeds
if @stop_count > (40 - @move_frequency * 2) * (6 - @move_frequency)
# Branch movement type
case @move_type
when 1 # Random
move_type_random
when 2 # Aproach
move_type_toward_player
when 3 # Custom
move_type_custom
end
end
end
end
#==============================================================================
# ? Sprite_Character
#------------------------------------------------------------------------------
# The sprite character display. Game_Character an instance of the class
# Monitor and automatically alters the state of the sprite.
#==============================================================================
class Sprite_Character < RPG::Sprite
#--------------------------------------------------------------------------
# ? Frame update
#--------------------------------------------------------------------------
def update
super
# Tile ID, file name, if different from current ones in any color
if @tile_id != @character.tile_id or
@character_name != @character.character_name or
@character_hue != @character.character_hue
# Tile ID file name, remember the hue
@tile_id = @character.tile_id
@character_name = @character.character_name
@character_hue = @character.character_hue
# If tile ID value is valid
if @tile_id >= 384
self.bitmap = RPG::Cache.tile($game_map.tileset_name,
@tile_id, @character.character_hue)
self.src_rect.set(0, 0, 32, 32)
self.ox = 16
self.oy = 32
# If tile ID value is invalid
else
self.bitmap = RPG::Cache.character(@character.character_name,
@character.character_hue)
# Filename [n] containing the case next to the number of variations: n, Length: 4 considered
if @character.character_name[/\[(\d+)\]/]
@cw = bitmap.width / $1.to_i
@ch = bitmap.height / 4
# Filename [D] does not contain, beside the usual: 04, height: 4 and
else
@cw = bitmap.width / 4
@ch = bitmap.height / 4
end
self.ox = @cw / 2
self.oy = @ch
end
end
# Set the visible state
self.visible = (not @character.transparent)
# If the character graphics
if @tile_id == 0
# Set the source rectangle
sx = @character.pattern * @cw
sy = (@character.direction - 2) / 2 * @ch
self.src_rect.set(sx, sy, @cw, @ch)
end
# Set sprite coordinates
self.x = @character.screen_x
self.y = @character.screen_y
self.z = @character.screen_z(@ch)
# Opacity, synthetic methods, and set the depth of bush
self.opacity = @character.opacity
self.blend_type = @character.blend_type
self.bush_depth = @character.bush_depth
# Animation
if @character.animation_id != 0
animation = $data_animations[@character.animation_id]
animation(animation, true)
@character.animation_id = 0
end
end
end
# If you change the notations used in the menu screen graphic patterns often incidentally
#==============================================================================
# ? Window_Base
#------------------------------------------------------------------------------
# Super class of all windows in the game.
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# Graphics rendering ?
# Actor: actor
# X: X coordinate which to draw
# Y: Y coordinate which to draw
#--------------------------------------------------------------------------
def draw_actor_graphic (actor, x, y)
bitmap = RPG::Cache.character (actor.character_name, actor.character_hue)
if actor.character_name [/\[(\d+)\]/]
cw = bitmap.width / $1.to_i
ch = bitmap.height / 4
else
cw = bitmap.width / 4
ch = bitmap.height / 4
end
src_rect = Rect.new (0, 0, cw, ch)
self.contents.blt (x - cw / 2, y - ch, bitmap, src_rect)
end
end
#==============================================================================
# ? Window_SaveFile
#------------------------------------------------------------------------------
# To save screen and load screens, save the file window.
#==============================================================================
class Window_SaveFile < Window_Base
#--------------------------------------------------------------------------
# Refresh ?
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# Draw a file number
self.contents.font.color = normal_color
name = "File#(@ file_index + 1)"
self.contents.draw_text(4, 0, 600, 32, name)
@name_width = contents.text_size(name).width
# If the file is saved
if @file_exist
# Draw a character
for i in 0 ... @characters.size
bitmap = RPG::Cache.character(@characters[i] [0], @characters[i] [1])
if @characters[i] [0] [/\[(\d+)\]/]
cw = bitmap.width / $1.to_i
ch = bitmap.height / 4
else
cw = bitmap.width / 4
ch = bitmap.height / 4
end
src_rect = Rect.new(0, 0, cw, ch)
x = 300 - @characters.size * 32 + i * 64 - cw / 2
self.contents.blt (x, 68 - ch, bitmap, src_rect)
end
# Draw Play time
hour = @total_sec / 60 / 60
min = @total_sec / 60% 60
sec = @total_sec% 60
time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 8, 600, 32, time_string, 2)
# Draw a time stamp
self.contents.font.color = normal_color
time_string = @time_stamp.strftime("%Y/%m/%d%H:%M")
self.contents.draw_text(4, 40, 600, 32, time_string, 2)
end
end
end
#==============================================================================
# ? Game_Player
#------------------------------------------------------------------------------
# Handle class player. Decision and the event starts, and scroll the map
# Have a function. Instances of this class is $game_player reference.
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# Update Animation ?
#--------------------------------------------------------------------------
def anime_update
# If the count exceeds the maximum Animation
# The maximum speed of 18 moves from the base value minus 1 *
# Filename [n] if contains the normal (n-1) / 4 speed pattern update
if @character_name [/\[(\d+)\]/]
@anime_count = 20 if @anime_count > 0 and @pattern == @original_pattern
if @anime_count * ($1.to_i - 1) / 4 > 18 - @move_speed * 2
# If the animation is stopped at the stop and OFF
if not @step_anime and @stop_count> 0
# Restore the original pattern
@pattern = @original_pattern
# ON when stopped while anime or if the move
else
# Update pattern
@pattern = @pattern % ($1.to_i - 1) + 1
end
# Clear animation count
@anime_count = 0
end
else
# Handle regular updating of the character pattern (just copy and paste the default process)
if @anime_count > 18 - @move_speed * 2
# If the animation is stopped at the stop and OFF
if not @step_anime and @stop_count > 0
# Restore the original pattern
@pattern = @original_pattern
# ON when stopped while anime or if the move
else
# Update pattern
@pattern = (@pattern + 1) % 4
end
# Clear animation count
@anime_count = 0
end
end
end
end
It doesn't work with pixel movement.
In which order are they in the data base?
Is this script above or bellow the pixel movement?
Also try to put it in there in a different position. "like above everything, if its bellow everything"
It's below.