Victory Count Script

EDIT: This tutorial will be updated and moved to Scripts Tutorials soon.

I was asked some time ago how to add a “Victory Count” – i.e. a counter for the number of battles won – so decided to experiment and this is the result. This is a very simple script modification, directly modifying various parts of the code.

Under the Public Instance Variables, add the following:

attr_accessor :victory_count          # number of victories

Under initialize, add:

@victory_count = 0

Look for def display_exp_and_gold, place the following underneath $game_party.gain_gold(gold):

$game_system.victory_count += 1

In def start, add:

@victory_window =, 175)

In def terminate, add:


In def update, add:


Create a new entry, entitled Window_Victory, and paste the following code:

class Window_Victory   #--------------------------------------------------------------------------
# * Object Initialization
def initialize(x, y)
super(x, y, 160, WLH + 32)
self.contents = - 32, height - 32)
self.contents.font.size = 16
# * Refresh
def refresh
return if Graphics.frame_count % 10 != 0
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)
# * Frame Update
def update

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.

2 thoughts on“Victory Count Script

  1. You’re right, it would be. Although, admittedly, this is just a very basic method. I’m getting ready to update most of the scripts/scriptlets I have on here anyway. It’s about that time! Thanks for commenting (and reminding me about aliasing!).