Extra Gold XP & ACE - Printable Version

+- Save-Point (
+-- Forum: Material Development (
+--- Forum: Scripts Database (
+--- Thread: Extra Gold XP & ACE (/thread-8364.html)

Extra Gold XP & ACE - kyonides - 09-09-2021

Extra Gold XP & ACE

by Kyonides Arkanthes


Usually you could just change a method in the Game_Party class to set a permanent limit for the amount of gold the party can keep in its purse. This scriptlet pretends to override that by allowing you the game developer to change the Maximum Gold Limit in game at any given time.

It includes several script calls for your convenience so please read the instructions, namely the Script Calls section of my scriptlet. By the way, I forgot to mention that you can also set an initial maximum limit by modifying the value of the MAX_GOLD constant. It's the only constant there so you won't miss it! Grinning

There are no screenshots for this changes had never relied on any GUI at all. Winking

# * Extra Gold XP & ACE
#   Scripter : Kyonides Arkanthes
#   2021-09-09


*** Script Calls ***

- Check out how much Extra Gold the party has earned - They cannot spend it!

- Reach Maximum Gold Limit

- Check out what is the current Maximum Gold Limit

- Change Maximum Gold Limit at Any Given Time In Game
$game_party.max_gold = NewLimit

- Has the Party's Purse reached the Maximum Gold Limit?


class Game_Party
  MAX_GOLD = 9999
  alias :kyon_extra_gold_gm_pty_init :initialize
  def initialize
    @max_gold = MAX_GOLD
    @extra_gold = 0

  def gain_gold(amount)
    next_gold = [[@gold + amount, 0].max, max_gold].min
    diff = @gold - next_gold
    @extra_gold += diff if diff > 0
    @gold = next_gold

  def extra_gold_to_purse
    diff = max_gold - @gold
    @extra_gold -= diff
    @gold = diff > 0 ? max_gold : @gold
  def gold_max?() max_gold == @gold end
  attr_reader :extra_gold
  attr_accessor :max_gold

Terms & Conditions

Free for use anywhere. Grinning
Include me in your game credits! Laughing
That's all, folks! Winking