
astrin24;190606 said:Is there a way, the Customisation screen could appear after every battle?
class Scene_Battle
def battle_end(result)
$scene = Scene_Upgrade.new
end
end
def battle_end(result)
[B] # Clear in battle flag
$game_temp.in_battle = false
# Clear entire party actions flag
$game_party.clear_actions
# Remove battle states
for actor in $game_party.actors
actor.remove_states_battle
end
# Clear enemies
$game_troop.enemies.clear
# Call battle callback
if $game_temp.battle_proc != nil
$game_temp.battle_proc.call(result)
$game_temp.battle_proc = nil
end[/B]
# Switch to map screen
$scene = Scene_Upgrade.new
end
alias_method :synthesize_customization_battle_battle_end, :battle_end
def battle_end(result)
synthesize_customization_battle_battle_end(result)
$scene = Scene_Upgrade.new
end
Jirbytaylor;191538 said:This looks cool, I might use it myself. I'm just wondering how could I manually add 'Upgrade Points' with an event? For things like rewards after minigames.
$game_party.actors[id].upgrade_points += #
Jirbytaylor;192549 said:Thanks. Err... I tried it but it doesn't seem to work because of the length of the command.(stupid small Call script window :<) Although at first it know it's one line(deleting letters moves it to one line), when you re-open the window it becomes two lines (deleting letters does not fit it onto one line like before.)
I also found incompatability with ccoa's Advanced Weather system. If a weather includes screen flashes, like Storm with thunder, the flash appears but doesn't disapear if it flashes while the window is open. It only does when the customisation screen is closed.
$game_actors[id].upgrade_points += #
#=================================
# Syn's Upgrade Customization V4.8.61 (3/28/07)
# Created by Synthesize
# Help from Raziel, Trickster, Icedmetal57
#=================================
module Upgrade_Points
Points_Gained = 3 # Amount of points gained upon leveling.
Hp_rise = 12 # The amount of HP to raise per point
Sp_rise = 8 # The amount of SP to raise per point
Str_rise = 10 # The amount of STR to raise
Dex_rise = 3 # The amount of DEX to raise
Agi_rise = 2 # The amount of AGI to raise
Int_rise = 4 # The amount of INT to raise
Error_sound = '057-Wrong01' # Change the sound effect when Upgrade Points equals zero.
end
#=================================
# *Begin Script*
#=================================
#=================================
# *Create Points*
#=================================
class Game_Actor < Game_Battler
attr_accessor :upgrade_points
alias stat_point_lvlup_game_actor_setup setup
def setup(actor_id)
stat_point_lvlup_game_actor_setup(actor_id)
@upgrade_points = 0
end
def exp=(exp)
@exp = [[exp, 9999999].min, 0].max
# Level up
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
@upgrade_points += Upgrade_Points::Points_Gained
# Learn skill
for j in $data_classes[@class_id].learnings
if j.level == @level
learn_skill(j.skill_id)
end
end
end
while @exp < @exp_list[@level]
@level -= 1
end
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end
end
#=================================
# Begin Upgrade Code
#=================================
class Scene_Upgrade
#--------------------------------------------------------------------------
# Object Initalize
#--------------------------------------------------------------------------
def initialize(actor_index = 0)
@actor_index = actor_index
end
def main
@spriteset = Spriteset_Map.new
s1 = "Increase Health by #{Upgrade_Points::Hp_rise} "
s2 = "Increase Magic by #{Upgrade_Points::Sp_rise} "
s3 = "Increase Strength by #{Upgrade_Points::Str_rise} "
s4 = "Increase Dexterity by #{Upgrade_Points::Dex_rise} "
s5 = "Increase Agility by #{Upgrade_Points::Agi_rise} "
s6 = "Increase Intellegence by #{Upgrade_Points::Int_rise} "
# Set Command Window Data
@command_window = Window_Command.new(260, [s1, s2, s3, s4, s5, s6])
@command_window.x = 46
@command_window.y = 112
@command_window.z = 9999
@command_window.opacity = 200
@command_window.active = true
# Set Player Data
@actor = $game_party.actors[@actor_index]
@status_window = Window_Upgrade.new(@actor)
@status_window.opacity= 200
@status_window.x = 304
@status_window.y = 56
@status_window.z = 9999
# Set Raise Window Data
@raise_window = Window_Raise.new
@raise_window.x = 46
@raise_window.y = 56
@raise_window.z = 9999
@raise_window.opacity = 200
@raise_window.visible = false
# Set Actor Tab Window Data
@actor_window = Window_ActorTab.new(@actor)
@actor_window.x = 304
@actor_window.y = 0
@actor_window.z = 9999
@actor_window.opacity = 200
@actor_window.visible = true
# Set Controls Window
@controls_window = Window_Controls.new
@controls_window.opacity= 200
@controls_window.x = 46
@controls_window.y = 333
@controls_window.z = 9999
@controls_window.visible = true
# Graphics Transition
Graphics.transition
# Main Loop
loop do
# Update Graphics
Graphics.update
# Update Input
Input.update
# Renew
update
# Discontinue Loop
if $scene != self
break
end
end
# Prepare Transition
Graphics.freeze
# Dispose Windows
@command_window.dispose
@status_window.dispose
@raise_window.dispose
@controls_window.dispose
@spriteset.dispose
@actor_window.dispose
end
#--------------------------------------------------------------------------
# Update
#--------------------------------------------------------------------------
def update
@command_window.update
@raise_window.update
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cursor_se)
@actor_index += 1
@actor_index %= $game_party.actors.size
$scene = Scene_Upgrade.new(@actor_index)
return
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
$scene = Scene_Upgrade.new(@actor_index)
return
end
# If command window is active: call update_command
if @command_window.active
update_command
return
# End IF
end
# End Def
end
#=================================
# *Update Command*
#=================================
def update_command
@raise_window.update
if Input.trigger?(Input::B)
# Play Cancel SE
$game_system.se_play($data_system.cancel_se)
# Load Map
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0
if @actor.upgrade_points > 0 and @actor.maxhp < 9999
$game_system.se_play($data_system.decision_se)
@actor.maxhp += Upgrade_Points::Hp_rise
@actor.hp += Upgrade_Points::Hp_rise
@actor.upgrade_points -= 1
@status_window.refresh
@raise_window.visible = true
else
@raise_window.visible = false
$game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound))
end
when 1
if @actor.upgrade_points > 0 and @actor.maxsp < 9999
$game_system.se_play($data_system.decision_se)
@actor.maxsp += Upgrade_Points::Sp_rise
@actor.sp += Upgrade_Points::Sp_rise
@actor.upgrade_points -= 1
@status_window.refresh
@raise_window.visible = true
else
@raise_window.visible = false
$game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound))
end
when 2
if @actor.upgrade_points > 0 and @actor.str < 9999
$game_system.se_play($data_system.decision_se)
@actor.str += Upgrade_Points::Str_rise
@actor.upgrade_points -= 1
@status_window.refresh
@raise_window.visible = true
else
@raise_window.visible = false
$game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound))
end
when 3
if @actor.upgrade_points > 0 and @actor.dex < 9999
$game_system.se_play($data_system.decision_se)
@actor.dex += Upgrade_Points::Dex_rise
@actor.upgrade_points -= 1
@status_window.refresh
@raise_window.visible = true
else
@raise_window.visible = false
$game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound))
end
when 4
if @actor.upgrade_points > 0 and @actor.agi < 9999
$game_system.se_play($data_system.decision_se)
@actor.agi += Upgrade_Points::Agi_rise
@actor.upgrade_points -= 1
@status_window.refresh
@raise_window.visible = true
else
@raise_window.visible = false
$game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound))
end
when 5
if @actor.upgrade_points > 0 and @actor.int < 9999
$game_system.se_play($data_system.decision_se)
@actor.int += Upgrade_Points::Int_rise
@actor.upgrade_points -= 1
@status_window.refresh
@raise_window.visible = true
else
@raise_window.visible = false
$game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound))
end
end
end
end
end
#============================================================
# Begin Windows
#============================================================
#=================================
# *Status Window*
#=================================
class Window_Upgrade < Window_Base
def initialize(actor)
super(32, 32, 315, 416)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial" # Font used in Raise Window
self.contents.font.size = 18 # Font Size in Raise Window
@actor = actor
self.opacity = 200
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_graphic(@actor, 122, 60)
draw_actor_class(@actor, 176, 3)
draw_actor_level(@actor, 6, 3)
draw_actor_state(@actor, 95, 48)
if @actor.upgrade_points >= 1
self.contents.font.color = system_color
if @actor.hp < 9999
self.contents.draw_text(170, 70, 100, 100, "=>")
end
if @actor.sp < 9999
self.contents.draw_text(170, 94, 100, 100, "=>")
end
if @actor.str < 999
self.contents.draw_text(170, 158, 100, 100, "=>")
end
if @actor.dex < 999
self.contents.draw_text(170, 182, 100, 100, "=>")
end
if @actor.agi < 999
self.contents.draw_text(170, 206, 100, 100, "=>")
end
if @actor.int < 999
self.contents.draw_text(170, 230, 100, 100, "=>")
end
self.contents.font.color = normal_color
@hp_preview = @actor.hp + Upgrade_Points::Hp_rise
@mhp_preview = @actor.maxhp + Upgrade_Points::Hp_rise
if @actor.hp < 9999
self.contents.draw_text(200, 70, 100, 100, "#{@hp_preview}/#{@mhp_preview}")
end
@sp_preview = @actor.sp + Upgrade_Points::Sp_rise
@msp_preview = @actor.maxsp + Upgrade_Points::Sp_rise
if @actor.sp < 9999
self.contents.draw_text(200, 94, 100, 100, "#{@sp_preview}/#{@msp_preview}")
end
@str_preview = @actor.str + Upgrade_Points::Str_rise
if @actor.str < 999
self.contents.draw_text(200, 158, 100, 100, "#{@str_preview}")
end
@dex_preview = @actor.dex + Upgrade_Points::Dex_rise
if @actor.dex < 999
self.contents.draw_text(200, 182, 100, 100, "#{@dex_preview}")
end
@agi_preview = @actor.agi + Upgrade_Points::Agi_rise
if @actor.agi < 999
self.contents.draw_text(200, 206, 100, 100, "#{@agi_preview}")
end
@int_preview = @actor.int + Upgrade_Points::Int_rise
if @actor.int < 999
self.contents.draw_text(200, 230, 100, 100, "#{@int_preview}")
end
end
draw_actor_hp(@actor, 4, 104, 172)
draw_actor_sp(@actor, 4, 128, 172)
draw_actor_exp(@actor, 4, 152)
draw_actor_parameter(@actor, 4, 192, 3)
draw_actor_parameter(@actor, 4, 216, 4)
draw_actor_parameter(@actor, 4, 240, 5)
draw_actor_parameter(@actor, 4, 264, 6)
x = contents.text_size("Points:").width
text = "Points:"
text2 = "#{@actor.upgrade_points}"
self.contents.font.color = system_color
self.contents.draw_text(190, 360, x, 32, text)
self.contents.font.color = normal_color
self.contents.draw_text(200+x, 360, (self.width/2), 32, text2.to_s)
end
end
#--------------------------------------------------------------------------
# Raise Window
#--------------------------------------------------------------------------
class Window_Raise< Window_Base
def initialize
super(0, 0, 260, 60)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial" # Font used in Raise Window
self.contents.font.size = 21 # Font Size in Raise Window
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 180, 30, "Attribute Increased.")
end
end
#=================================
#--------------------------------------------------------------------------
# ActorTab Window
#--------------------------------------------------------------------------
class Window_ActorTab< Window_Base
def initialize(actor)
super(0, 0, 120, 60)
@actor = actor
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial" # Font used in Raise Window
self.contents.font.size = 21 # Font Size in Raise Window
refresh
end
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 3)
end
end
#=================================
#--------------------------------------------------------------------------
# Controls Window
#--------------------------------------------------------------------------
class Window_Controls < Window_Base
def initialize
super(0, 0, 260, 60)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial" # Font used in Raise Window
self.contents.font.size = 20 # Font Size in Raise Window
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 200, 30, "Q: Shift <- W: Shift-> ")
end
end
#=================================
I make this version of the script try it and let me know.vrdi said:Okay, I noticed a problem with it, when you maximize one of the stats, you can still add to it, which...y'know, shouldn't really happen....
#=================================
# Syn's Upgrade Customization V4.8.61 (3/28/07)
# Created by Synthesize
# Help from Raziel, Trickster, Icedmetal57
# Revised Version by The Sleeping Leonhart (7/9/07)
#=================================
module Upgrade_Points
Points_Gained = 3 # Amount of points gained upon leveling.
Hp_rise = 12 # The amount of HP to raise per point
Sp_rise = 8 # The amount of SP to raise per point
Str_rise = 10 # The amount of STR to raise
Dex_rise = 3 # The amount of DEX to raise
Agi_rise = 2 # The amount of AGI to raise
Int_rise = 4 # The amount of INT to raise
Hp_limit = 9999 # The max amount of HP
Sp_limit = 999 # The max amount of SP
Str_limit = 999 # The max amount of STR
Dex_limit = 999 # The max amount of DEX
Agi_limit = 999 # The max amount of AGI
Int_limit = 999 # The max amount of INT
Error_sound = '057-Wrong01' # Change the sound effect when Upgrade Points equals zero.
end
#=================================
# *Begin Script*
#=================================
#=================================
# *Create Points*
#=================================
class Game_Actor < Game_Battler
attr_accessor :upgrade_points
alias stat_point_lvlup_game_actor_setup setup
def setup(actor_id)
stat_point_lvlup_game_actor_setup(actor_id)
@upgrade_points = 0
end
def exp=(exp)
@exp = [[exp, 9999999].min, 0].max
# Level up
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
@upgrade_points += Upgrade_Points::Points_Gained
# Learn skill
for j in $data_classes[@class_id].learnings
if j.level == @level
learn_skill(j.skill_id)
end
end
end
while @exp < @exp_list[@level]
@level -= 1
end
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end
end
#=================================
# Begin Upgrade Code
#=================================
class Scene_Upgrade
#--------------------------------------------------------------------------
# Object Initalize
#--------------------------------------------------------------------------
def initialize(actor_index = 0)
@actor_index = actor_index
end
def main
@spriteset = Spriteset_Map.new
s1 = "Increase Health by #{Upgrade_Points::Hp_rise} "
s2 = "Increase Magic by #{Upgrade_Points::Sp_rise} "
s3 = "Increase Strength by #{Upgrade_Points::Str_rise} "
s4 = "Increase Dexterity by #{Upgrade_Points::Dex_rise} "
s5 = "Increase Agility by #{Upgrade_Points::Agi_rise} "
s6 = "Increase Intellegence by #{Upgrade_Points::Int_rise} "
# Set Command Window Data
@command_window = Window_Command.new(260, [s1, s2, s3, s4, s5, s6])
@command_window.x = 46
@command_window.y = 112
@command_window.z = 9999
@command_window.opacity = 200
@command_window.active = true
# Set Player Data
@actor = $game_party.actors[@actor_index]
@status_window = Window_Upgrade.new(@actor)
@status_window.opacity= 200
@status_window.x = 304
@status_window.y = 56
@status_window.z = 9999
# Set Raise Window Data
@raise_window = Window_Raise.new
@raise_window.x = 46
@raise_window.y = 56
@raise_window.z = 9999
@raise_window.opacity = 200
@raise_window.visible = false
# Set Actor Tab Window Data
@actor_window = Window_ActorTab.new(@actor)
@actor_window.x = 304
@actor_window.y = 0
@actor_window.z = 9999
@actor_window.opacity = 200
@actor_window.visible = true
# Set Controls Window
@controls_window = Window_Controls.new
@controls_window.opacity= 200
@controls_window.x = 46
@controls_window.y = 333
@controls_window.z = 9999
@controls_window.visible = true
# Graphics Transition
Graphics.transition
# Main Loop
loop do
# Update Graphics
Graphics.update
# Update Input
Input.update
# Renew
update
# Discontinue Loop
if $scene != self
break
end
end
# Prepare Transition
Graphics.freeze
# Dispose Windows
@command_window.dispose
@status_window.dispose
@raise_window.dispose
@controls_window.dispose
@spriteset.dispose
@actor_window.dispose
end
#--------------------------------------------------------------------------
# Update
#--------------------------------------------------------------------------
def update
@command_window.update
@raise_window.update
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cursor_se)
@actor_index += 1
@actor_index %= $game_party.actors.size
$scene = Scene_Upgrade.new(@actor_index)
return
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
$scene = Scene_Upgrade.new(@actor_index)
return
end
# If command window is active: call update_command
if @command_window.active
update_command
return
# End IF
end
# End Def
end
#=================================
# *Update Command*
#=================================
def update_command
@raise_window.update
if Input.trigger?(Input::B)
# Play Cancel SE
$game_system.se_play($data_system.cancel_se)
# Load Map
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0
if @actor.upgrade_points > 0 and @actor.maxhp < Upgrade_Points::Hp_limit
$game_system.se_play($data_system.decision_se)
@actor.maxhp += Upgrade_Points::Hp_rise
@actor.hp += Upgrade_Points::Hp_rise
if @actor.hp > Upgrade_Points::Hp_limit
@actor.hp = Upgrade_Points::Hp_limit
end
if @actor.maxhp > Upgrade_Points::Hp_limit
@actor.maxhp = Upgrade_Points::Hp_limit
end
@actor.upgrade_points -= 1
@status_window.refresh
@raise_window.visible = true
else
@raise_window.visible = false
$game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound))
end
when 1
if @actor.upgrade_points > 0 and @actor.maxsp < Upgrade_Points::Sp_limit
$game_system.se_play($data_system.decision_se)
@actor.maxsp += Upgrade_Points::Sp_rise
@actor.sp += Upgrade_Points::Sp_rise
if @actor.sp > Upgrade_Points::Sp_limit
@actor.sp = Upgrade_Points::Sp_limit
end
if @actor.maxsp > Upgrade_Points::Sp_limit
@actor.maxsp = Upgrade_Points::Sp_limit
end
@actor.upgrade_points -= 1
@status_window.refresh
@raise_window.visible = true
else
@raise_window.visible = false
$game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound))
end
when 2
if @actor.upgrade_points > 0 and @actor.str < Upgrade_Points::Str_limit
$game_system.se_play($data_system.decision_se)
@actor.str += Upgrade_Points::Str_rise
if @actor.str > Upgrade_Points::Str_limit
@actor.str = Upgrade_Points::Str_limit
end
@actor.upgrade_points -= 1
@status_window.refresh
@raise_window.visible = true
else
@raise_window.visible = false
$game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound))
end
when 3
if @actor.upgrade_points > 0 and @actor.dex < Upgrade_Points::Dex_limit
$game_system.se_play($data_system.decision_se)
@actor.dex += Upgrade_Points::Dex_rise
if @actor.dex > Upgrade_Points::Dex_limit
@actor.dex = Upgrade_Points::Dex_limit
end
@actor.upgrade_points -= 1
@status_window.refresh
@raise_window.visible = true
else
@raise_window.visible = false
$game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound))
end
when 4
if @actor.upgrade_points > 0 and @actor.agi < Upgrade_Points::Agi_limit
$game_system.se_play($data_system.decision_se)
@actor.agi += Upgrade_Points::Agi_rise
if @actor.agi > Upgrade_Points::Agi_limit
@actor.agi = Upgrade_Points::Agi_limit
end
@actor.upgrade_points -= 1
@status_window.refresh
@raise_window.visible = true
else
@raise_window.visible = false
$game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound))
end
when 5
if @actor.upgrade_points > 0 and @actor.int < Upgrade_Points::Int_limit
$game_system.se_play($data_system.decision_se)
@actor.int += Upgrade_Points::Int_rise
if @actor.int > Upgrade_Points::Int_limit
@actor.int = Upgrade_Points::Int_limit
end
@actor.upgrade_points -= 1
@status_window.refresh
@raise_window.visible = true
else
@raise_window.visible = false
$game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound))
end
end
end
end
end
#============================================================
# Begin Windows
#============================================================
#=================================
# *Status Window*
#=================================
class Window_Upgrade < Window_Base
def initialize(actor)
super(32, 32, 315, 416)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial" # Font used in Raise Window
self.contents.font.size = 18 # Font Size in Raise Window
@actor = actor
self.opacity = 200
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_graphic(@actor, 122, 60)
draw_actor_class(@actor, 176, 3)
draw_actor_level(@actor, 6, 3)
draw_actor_state(@actor, 95, 48)
if @actor.upgrade_points >= 1
self.contents.font.color = system_color
if @actor.hp < Upgrade_Points::Hp_limit
self.contents.draw_text(170, 70, 100, 100, "=>")
end
if @actor.sp < Upgrade_Points::Sp_limit
self.contents.draw_text(170, 94, 100, 100, "=>")
end
if @actor.str < Upgrade_Points::Str_limit
self.contents.draw_text(170, 158, 100, 100, "=>")
end
if @actor.dex < Upgrade_Points::Dex_limit
self.contents.draw_text(170, 182, 100, 100, "=>")
end
if @actor.agi < Upgrade_Points::Agi_limit
self.contents.draw_text(170, 206, 100, 100, "=>")
end
if @actor.int < Upgrade_Points::Int_limit
self.contents.draw_text(170, 230, 100, 100, "=>")
end
self.contents.font.color = normal_color
@hp_preview = @actor.hp + Upgrade_Points::Hp_rise
@mhp_preview = @actor.maxhp + Upgrade_Points::Hp_rise
if @actor.maxhp < Upgrade_Points::Hp_limit
if @hp_preview < Upgrade_Points::Hp_limit
if @mhp_preview < Upgrade_Points::Hp_limit
self.contents.draw_text(200, 70, 100, 100, "#{@hp_preview}/#{@mhp_preview}")
else
self.contents.draw_text(200, 70, 100, 100, "#{@hp_preview}/#{Upgrade_Points::Hp_limit}")
end
else
self.contents.draw_text(200, 70, 100, 100, "#{Upgrade_Points::Hp_limit}/#{Upgrade_Points::Hp_limit}")
end
end
@sp_preview = @actor.sp + Upgrade_Points::Sp_rise
@msp_preview = @actor.maxsp + Upgrade_Points::Sp_rise
if @actor.maxsp < Upgrade_Points::Sp_limit
if @sp_preview < Upgrade_Points::Sp_limit
if @msp_preview < Upgrade_Points::Sp_limit
self.contents.draw_text(200, 94, 100, 100, "#{@sp_preview}/#{@msp_preview}")
else
self.contents.draw_text(200, 94, 100, 100, "#{@sp_preview}/#{Upgrade_Points::Sp_limit}")
end
else
self.contents.draw_text(200, 94, 100, 100, "#{Upgrade_Points::Sp_limit}/#{Upgrade_Points::Sp_limit}")
end
end
@str_preview = @actor.str + Upgrade_Points::Str_rise
if @actor.str < Upgrade_Points::Str_limit
if @str_preview < Upgrade_Points::Str_limit
self.contents.draw_text(200, 158, 100, 100, "#{@str_preview}")
else
self.contents.draw_text(200, 158, 100, 100, "#{Upgrade_Points::Str_limit }")
end
end
@dex_preview = @actor.dex + Upgrade_Points::Dex_rise
if @actor.dex < Upgrade_Points::Dex_limit
if @dex_preview < Upgrade_Points::Dex_limit
self.contents.draw_text(200, 182, 100, 100, "#{@dex_preview}")
else
self.contents.draw_text(200, 182, 100, 100, "#{Upgrade_Points::Dex_limit }")
end
end
@agi_preview = @actor.agi + Upgrade_Points::Agi_rise
if @actor.agi < Upgrade_Points::Agi_limit
if @agi_preview < Upgrade_Points::Agi_limit
self.contents.draw_text(200, 206, 100, 100, "#{@agi_preview}")
else
self.contents.draw_text(200, 206, 100, 100, "#{Upgrade_Points::Agi_limit }")
end
end
@int_preview = @actor.int + Upgrade_Points::Int_rise
if @actor.int < Upgrade_Points::Int_limit
if @int_preview < Upgrade_Points::Int_limit
self.contents.draw_text(200, 230, 100, 100, "#{@int_preview}")
else
self.contents.draw_text(200, 230, 100, 100, "#{Upgrade_Points::Int_limit }")
end
end
end
draw_actor_hp(@actor, 4, 104, 172)
draw_actor_sp(@actor, 4, 128, 172)
draw_actor_exp(@actor, 4, 152)
draw_actor_parameter(@actor, 4, 192, 3)
draw_actor_parameter(@actor, 4, 216, 4)
draw_actor_parameter(@actor, 4, 240, 5)
draw_actor_parameter(@actor, 4, 264, 6)
x = contents.text_size("Points:").width
text = "Points:"
text2 = "#{@actor.upgrade_points}"
self.contents.font.color = system_color
self.contents.draw_text(190, 360, x, 32, text)
self.contents.font.color = normal_color
self.contents.draw_text(200+x, 360, (self.width/2), 32, text2.to_s)
end
end
#--------------------------------------------------------------------------
# Raise Window
#--------------------------------------------------------------------------
class Window_Raise< Window_Base
def initialize
super(0, 0, 260, 60)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial" # Font used in Raise Window
self.contents.font.size = 21 # Font Size in Raise Window
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 180, 30, "Attribute Increased.")
end
end
#=================================
#--------------------------------------------------------------------------
# ActorTab Window
#--------------------------------------------------------------------------
class Window_ActorTab< Window_Base
def initialize(actor)
super(0, 0, 120, 60)
@actor = actor
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial" # Font used in Raise Window
self.contents.font.size = 21 # Font Size in Raise Window
refresh
end
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 3)
end
end
#=================================
#--------------------------------------------------------------------------
# Controls Window
#--------------------------------------------------------------------------
class Window_Controls < Window_Base
def initialize
super(0, 0, 260, 60)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial" # Font used in Raise Window
self.contents.font.size = 20 # Font Size in Raise Window
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 200, 30, "Q: Shift <- W: Shift-> ")
end
end
#=================================