Game_System
Under the Public Instance Variables, add the following:
attr_accessor :victory_count # number of victories
Under initialize, add:
@victory_count = 0
Scene_Battle
Look for def display_exp_and_gold, place the following underneath $game_party.gain_gold(gold):
$game_system.victory_count += 1
Scene_Menu
In def start, add:
@victory_window = Window_Victory.new(0, 175)
In def terminate, add:
@victory_window.dispose
In def update, add:
@victory_window.update
Create a new entry, entitled Window_Victory, and paste the following code:
class Window_Victory < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, WLH + 32)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 16
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
return if Graphics.frame_count % 10 != 0
self.contents.clear
self.contents.draw_text(0, WLH * 0, 120, WLH, "# Victories:")
self.contents.draw_text(0, WLH * 0, 120, WLH, $game_system.victory_count.to_s, 2)
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
refresh
end
end
This will display the "# Victories" on the Status Menu. It can be expanded for other things as well, such as the number of saves, the number of inn stays, etc.