01-05-2006, 01:00 PM
Victory counter in menu
by garfunkle
Jan 5 2006
This is a really easy edit that will be good for beginner scripters like me.
Above main create Window_Victory and place this code inside it
Then go to Scene_Menu and find line 45-48
Still in Scene_Menu find line 77
Then find line 88
NOTE by GoldenShadow: it doesn't count anything. I'll tell you when it counts:
NOW it counts. Next time, take SephirothSpawn serious, he's a master in scripts.
If he says it's not counting, it ain't counting. Say, wasn't there another guy who made
something like this before? It's so vague...
Anyway, good work so far, garfunkle!
Peace.
by garfunkle
Jan 5 2006
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.
No support is given. If you are the owner of the thread, please contact administration.
This is a really easy edit that will be good for beginner scripters like me.
Above main create Window_Victory and place this code inside it
Code:
#==============================================================================
# ¦ Window_Victory
#------------------------------------------------------------------------------
# ??????????????????????
#==============================================================================
class Window_Victory < Window_Base
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype # "Number of Victorys" window font
self.contents.font.size = $defaultfontsize
refresh
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def refresh
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Victorys")
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, $game_variables[2].to_s, 2)
end
end
Then go to Scene_Menu and find line 45-48
Code:
REPLACE
# ??????????
@steps_window = Window_Steps.new
@steps_window.x = 0
@steps_window.y = 320
WITH
# Make victory window
@victory_window = Window_Victory.new
@victory_window.x = 0
@victory_window.y = 320
Still in Scene_Menu find line 77
Code:
REPLACE
@steps_window.dispose
WITH
@victory_window.dispose
Then find line 88
Code:
REPLACE
@steps_window.update
WITH
@victory_window.update
NOTE by GoldenShadow: it doesn't count anything. I'll tell you when it counts:
Code:
REPLACE
#--------------------------------------------------------------------------
# * Battle Ends
# result : results (0:win 1:lose 2:escape)
#--------------------------------------------------------------------------
def battle_end(result)
# 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
# Switch to map screen
$scene = Scene_Map.new
end
WITH
#--------------------------------------------------------------------------
# * Battle Ends
# result : results (0:win 1:lose 2:escape)
#--------------------------------------------------------------------------
def battle_end(result)
# 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
# Switch to map screen
$game_variables[2] += 1 ############ <== Added line
$scene = Scene_Map.new
end
NOW it counts. Next time, take SephirothSpawn serious, he's a master in scripts.
If he says it's not counting, it ain't counting. Say, wasn't there another guy who made
something like this before? It's so vague...
Anyway, good work so far, garfunkle!
Peace.