Good morning! A little question about money:) In one of my projects I want to have three currency types: Gold, silver and copper. I'm wondering how to make the exchange rate: 100 copper = 1 silver, 100 silver = 1 gold. As for item prices, I'm guessing I'd maybe have to use a formula for the price? I'm not too sure. :/ Thanks!!
  • In inventory tab there is currency tab. You can have multiple currencies. The first currency is a base currency so you set it as copper. Every other currency exchange rate will be expressed in the base currency. So set up silver exchange as a 100 and gold as 10 000 (100 x 100).
  • Thanks @JMR! Much appreciated! How would I go about actually pricing things, as well? Say, the cost of a potion is 1 silver and 5 copper. How can I go about assigning that cost to the item? :)
  • 105 coppers? I still haven't tried using currencies in my project, but I think if you have 1 silver and 5 coppers the game will accept it as 105 coppers (and vice versa) when you want to buy something.
  • Prices are defined in the base currency (i.e. the 1st currency in the list), i.e. you can't really mix different currencies when defining the price.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • @gamingislove Ahh, gotcha. Thanks!! :)
  • edited February 2020
    Sorry is this post accurate?
    The docs say:

    Exchange Rates: The exchange rates between the different currencies.
    The first currency is used as base and always set to 1. All other currencies will use the base currency for calculating exchange rates, e.g. Currency A is the base currency, currency B has an exchange rate of 1.5 - 1 money of currency A will be worth 1.5 money in currency B.
    So I *think* that I need to setup rates like:
    Gold: 1
    Silver: 10
    Copper: 100
    Platinum: 0.01

    In order to have 100 copper = 10 silver = 1 gold and have 1 platinum = 100 gold.

    Then is it right item prices are in Gold (first currency) so to have something worth 5 copper I need to set the value to 0.05 ?

    It does seem like it would be simpler (not needing to work with small floats) if it was the other way around, but the way the Currency A / B reads seems like the base currency needs to be the biggest. The response to the OP suggests that the base should be the smallest. Which is it?
    Post edited by Warspawn on
  • Prices and exchange rates are set up in relation to the base currency, i.e. the 1st currency in the list. Also, currencies are only whole numbers, i.e. you can't have like 1.5 gold.

    How you want to set that up is completely up to you.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • The quote that has 1.5 is from the Ork documentation. Also what I need to understand is relation to the base.

    So if first is Gold: 1 and 2nd is Silver: 10 does that mean that 10 silver = 1 gold?
    OR
    Do I need to make Silver: 1 and Gold: 10 to make 10 silver = 1 gold?
  • Yeah, you can have an exchange rate of 1.5 - just you can't have 1.5 gold, as currency is only in whole numbers.
    E.g. gold to silver exchange rate of 1.5 would make 10 gold to 15 silver, but 1 gold to 1 silver.

    If gold is your base currency (which has always an exchange rate of 1) and silver has an exchange rate of 10, 1 gold will be 10 silver.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Hmmm so where and how are the exchange rates used? If the value of items can only be in base currency then it sounds like I want the base currency to be copper, and then use decimal exchange rates so that the value of items can be just really large whole numbers. Then I presume that I would need to use the exchange rates manually in shop UI to get the 1gp 10sp effect.

    So if I want a system where
    1 platinum = 100 gold = 1000 silver = 10000 copper
    then the exchange rate would be:
    Copper: 1
    Silver: 0.01
    Gold: 0.001
    Platinum: 0.0001

    then item prices would be copper based so 1 silver 5 copper is 15 copper (value), and an item worth 1 gold 3 silver is 130 copper.

    and then since the currencies are separate inventory items that don't automatically convert? (or do they?) then I'll need to hook into various places that transactions occur and do exchange math (formula?)??
  • Exchange rates are pretty much only used by shops to calculate the buy/sell prices in the shop's currency, or to exchange currency via the Exchange Inventory Money node. Shops also only sell in their currency, so there's no automatic exchange happening between different currencies.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Sorry to necro but this was the closest to what I was looking for.

    Reading above, what I'm understanding now is that there is no ready made way to have Denominations of a currency.

    The currency system is more like for having faction vendors for example that only take a certain type of currency that perhaps you set up to only be obtained in certain ways.

    It is not meant to have like a base 10 this is a Penny, this is a Nickel, this is a Dime, but all 3 of those coins are a fraction of a Dollar.

    Is that correct?
    Can one use the Exchange Inventory Money node in schematic Open on a shop to create denominations?

    Thanks!
  • Yes, that's correct.
    You can use the exchange node to exchange your currencies into a single one.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.