How would I go about setting up a money system with Gold Copper and Silver?

So really I am looking for how I would set this up in my item info struct for pricing and sell pricing for multiple currencies ie: Sword cost 1gold 2silver 5copper/ sell to price 50 silver etc. If there is a specific video you all know of to point me in the direction that would be great or if someone would take the time and explain that would be awesome. I get how to do a basic currency. I have that set up currently. Im looking for a bit more elaborate.

Thanks in advance all!

Providing 1g = 100s = 10000c, this sword actually costs 10205 copper. The code uses copper only but, when presented to the player, we convert it to g/s/c - just for display purposes.

This way you do not need a struct to keep track of anything, everything costs int Copper under the hood. The divisors are up to you and can be anything. You’ll probably take advantage of:


It’s similar to tracking time. You keep track of seconds only, and if someone looks at the clock, we convert it to h:m:s.

Brilliant, I was waaaaay over thinking this!

So the way I want to do it is 100 copper = 1 silver, 100 silver = 1 gold, there wont be any pickups of coin, just what Mobs drop. my question is how do I convey that the PC just looted ie: 2g 10s ? I guess the hardest thing for me is how to do this in the inventory GUI.

For something super straighforward:

  • a small function in the library (so any blueprint can call it); it converts copper to copper, silver, gold and formats output text:

image

  • the player’s widget is just a text block:

  • player getting random money by spamming 1 (not sure how you need widgets to work, this is a widget component):


Mr Columbus

image

That’s more of a design question. Is this for 1st person / 3rd / top down - what game style, are we pirates? Are we chasing after Diablo? Maybe it’s 2d?

You could animate the counter and let it be the only indication. Or, in addition, have a small widget fading away showing the most recent value collected.

There is a reason you’re of Hero status on here! Thank you so much I will just need to build upon this to get it to my Character, and then on to mine enemies. Its for a small RPG I am working on…really as a learning an implementation experience this is incredibly helpful. I realize how simple it is now lol…I was super way over thinking this.

1 Like