This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.
Hello everyone on CA I was searching around and found this script.. No credit to me, but to Drago del fato.. Where ever he/she is at.. By the way all credit will go to you. Thanks :clap: :alright:
Note: I hope I don't make anybody mad.gif by adding someone elses work here.
If I did please remove this post from the board..
Put the script in a new one above main, call it anything. When you gain a level, you go to the status screen to choose your skills. You can change all that information at the beggenning of the script.
Of course some of you like SPN, Mr. DJ, Me, Sepirothspawn maybe able to change the window skin to something better. In truth I have no knowledge on how to do it so I'll let the "Gods" handle it..
Put the script in a new one above main, call it anything.
When you gain a level, you go to the status screen to choose your skills.
You can change all that information at the beggenning of the script.
Click to open for the code.
Code:
#=====================================================
# Drago del fato's Level Up Point Spend System
# ---------------------------------------------
# Written by Drago del Fato
# Version 2.4
# Just insert a new script above main and call it whatever you want.
#=====================================================
#--Res Text
PSPEND_LVUPTEXT = "New Level! Do you want to Level up?"
PSPEND_SPTEXT = "Special Points Left:"
PSPEND_ANSWERS = ["Yes!","No"]
PSPEND_HELP_TEXT = ["Change Strength...","Change Agility...",
"Change Dexterity...","Change Inteligence...","Change Maximum Health Points...",
"Change Maximum Skill Points...","Reset all Values to Normal...","Finnish Editing...."]
PSPEND_B1 = "Reset"
PSPEND_B2 = "Done!"
LVUP_TEXT = "(Lv Up!)"
DESC_TEXT = "LEFT - Decrease, RIGHT - Increase,C - Confirm,B - Exit"
when 6
self.contents.font.color = color
self.contents.draw_text(rect,PSPEND_B1)
when 7
self.contents.font.color = color
self.contents.draw_text(rect,PSPEND_B2)
end
end
def disable_item(index)
draw_item(index, disabled_color)
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
return
end
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
if row > self.top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
cursor_width = self.width / @column_max - 32
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * 32 - self.oy
self.cursor_rect.set(@x - 10, y, self.width - @x - 17, 32)
end
end
#End of Part Four
#Part Five - Making Scene_Status to show level up window when character
#get's a new level
class Scene_Status
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
if $scene != self
break
end
end
Graphics.freeze
@h.z = 0
@c.z = 1
@status_window.z = 2
@status_window.dispose
@h.dispose
@c.dispose
return
end
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
@status_window.dispose
end
def update_pspend_lvup_win
@c.update
if Input.trigger?(Input::cool.gif
$game_system.se_play($data_system.cancel_se)
$PSPEND_ACTORS[@actor.id - 1] = false
$scene = Scene_Menu.new
return
end
if Input.trigger?(Input::C)
case @c.index
when 0
$game_system.se_play($data_system.decision_se)
$scene = Scene_PSPEND_Main_Screen.new(@actor.id - 1)
return
when 1
$game_system.se_play($data_system.cancel_se)
$PSPEND_ACTORS[@actor.id - 1] = false
$scene = Scene_Menu.new
return
end
end
end
end
#End of Part Five
#Part Six - Hell is coming...AAAAAAAAH!
class Scene_PSPEND_Main_Screen
def initialize(actor_id_index)
@actor_ind = actor_id_index
main
end
def main
@help = Window_Help.new
@spend = PSPEND_CUSTOM_WINDOW.new(@actor_ind)
@spend.y = 64
@spend.z = 99998
@help.z = 99998
Graphics.transition
loop do
Graphics.update
Input.update
update_spend_help_win
if $scene != self
break
end
end
Graphics.freeze
@spend.dispose
@help.dispose
end
def update_spend_help_win
@spend.update
@help.update
@help.set_text(PSPEND_HELP_TEXT[@spend.index])
if Input.trigger?(Input::cool.gif
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new
$PSPEND_POINTS[@actor_ind] = $PSPEND_RET
$PSPEND_ACTORS[@actor_ind] = false
return
end
if Input.repeat?(Input::RIGHT)
unless $PSPEND_POINTS[@actor_ind] > 0
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.cursor_se)
$PSPEND_POINTS[@actor_ind] -= 1
case @spend.index
when 0
$PSPEND_ADD[1] += STRENGTH_ADD
when 1
$PSPEND_ADD[2] += AGILITY_ADD
when 2
$PSPEND_ADD[3] += DEXTERITY_ADD
when 3
$PSPEND_ADD[4] += INTELIGENCE_ADD
when 4
$PSPEND_ADD[5] += HP_ADD
when 5
$PSPEND_ADD[6] += SP_ADD
when 6
$PSPEND_POINTS[@actor_ind] += 1
when 7
$PSPEND_POINTS[@actor_ind] += 1
end
@spend.refresh
return
end
if Input.repeat?(Input::LEFT)
unless $PSPEND_POINTS[@actor_ind] < $PSPEND_RET
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.cursor_se)
case @spend.index
when 0
if $PSPEND_ADD[1] <= $ACTORD.str
$game_system.se_play($data_system.buzzer_se)
return
end
$PSPEND_ADD[1] -= STRENGTH_ADD
when 1
if $PSPEND_ADD[2] <= $ACTORD.agi
$game_system.se_play($data_system.buzzer_se)
return
end
$PSPEND_ADD[2] -= AGILITY_ADD
when 2
if $PSPEND_ADD[3] <= $ACTORD.dex
$game_system.se_play($data_system.buzzer_se)
return
end
$PSPEND_ADD[3] -= DEXTERITY_ADD
when 3
if $PSPEND_ADD[4] <= $ACTORD.int
$game_system.se_play($data_system.buzzer_se)
return
end
$PSPEND_ADD[4] -= INTELIGENCE_ADD
when 4
if $PSPEND_ADD[5] <= $ACTORD.maxhp
$game_system.se_play($data_system.buzzer_se)
return
end
$PSPEND_ADD[5] -= HP_ADD
when 5
if $PSPEND_ADD[6] <= $ACTORD.maxsp
$game_system.se_play($data_system.buzzer_se)
return
end
$PSPEND_ADD[6] -= SP_ADD
when 6
$PSPEND_POINTS[@actor_ind] -= 1
when 7
$PSPEND_POINTS[@actor_ind] -= 1
end
$PSPEND_POINTS[@actor_ind] += 1
@spend.refresh
return
end
if Input.trigger?(Input::C)
case @spend.index
when 6
@spend.refresh(true)
when 7
$ACTORD.str = $PSPEND_ADD[1]
$ACTORD.agi = $PSPEND_ADD[2]
$ACTORD.dex = $PSPEND_ADD[3]
$ACTORD.int = $PSPEND_ADD[4]
$ACTORD.maxhp = $PSPEND_ADD[5]
$ACTORD.maxsp = $PSPEND_ADD[6]
$game_system.se_play($data_system.decision_se)
$scene = Scene_Menu.new
$PSPEND_ACTORS[@actor_ind] = false
return
end
end
end
end
#End of Part Six - Yipee!!! I made it!
#Part Seven - Save Load part!
class Scene_Save < Scene_File
def write_save_data(file)
characters = []
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
characters.push([actor.character_name, actor.character_hue])
end