Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Changing amount of gold during game play.

I need some help. Is there a way to change how much gold the party can hold through out the game? i.e. Like in zelda when you find a bigger wallet to hold more rupees.

Any help appreciated!! Thanks.
 

Kraft

Sponsor

you would have to use a script for that... are you wanting this fix for RMXP or VX?

There is a script for RMXP, but I think you would need to request a conversion if you want it for VX... I dont know of one that has been released.

~Kraft
 
Couldn't you just event it?

condition branch BIG WALLET in inventory
if in inventory
  conditional branch player's gold = 100 or above
      above 100: change gold=100
      below 100: add gold +1 
if not in inventory
  conditional branch player's gold = 50 or above    (let's say that 50 is the limit for your first wallet)
      above 50: change gold=50
      below 50: add gold +1                                (or however much you want to give away)


then, as for the battles where you obtain gold, make sure to put a parallel process for whatever maps have battles on, and then "limit" the gold again! (conditional branch big wallet, if not then limit to small wallet (50 gold).

In theory, this should work.
:) Just edit if you have a large amount of wallets.
 
You can create a common event on Parallel Processing that limits the amount of gold. So when you have a big wallet that limits gold to 100, you use the common event to subtract gold until it's 100.
 
Ok, thanks. But how is it that you would make it so that it would automatically change the gold to (i,e) 100? I can only find the increase and decrease constants, but not making it a set amount.
 

hosaii

Member

Very simple!
Just go to see Game_Party. You will find a method like this:
Code:
  def gain_gold(n)
    @gold = [[@gold + n, 0].max, 9999999].min
  end
When you change it to this:
Code:
  def gain_gold(n)
    @gold = [[@gold + n, 0].max, $game_variable[1]].min
  end
you can use the 1st game variable to decide how much the limit is.
Remember the game variable is 0 when you use it first time without any setting.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top