Dollars and cents

● ARCHIVED · READ-ONLY
Started by CrazyCrab 10 posts View original ↗
  1. Hi everyone,

    In my current game the player will be buying some mundane items and I don't want him or her to pay 50 dollars for a tomato.

    Is there a way to replace the normal all integer gold system with the usual XX.xx system?

    Thanks!
  2. You can, but things like item values in the database will suffer.

    You can always make every time money is shown it appear as itself divided by 100.0? this way at least it will seem so.
  3. Can you even enter decimal numbers for item prices? Do they "stick" when you save in the editor, close and reopen it?
  4. that's what I meant, sorry, I'm terrible explaining
  5. Wouldn't it be pretty easy to make a script where it ads a dot before the last 2 numbers and a '0' before any number that's lower than 100.

    That way if you would set the price of an item to 2050 G it would show as 20.50 $ ingame, and 50 G would show as 0.50 $.? 
  6. that's what I said, a script that shows the money as divided by 100.0 would do exactly that
  7. Waterguy said:
    that's what I said, a script that shows the money as divided by 100.0 would do exactly that
    Sorry, man.

    I thought you meant he should divide it himself and enter result in the database normally which wouldn't work ... 
  8. Waterguy said:
    that's what I said, a script that shows the money as divided by 100.0 would do exactly that
    A script can change the display in the game - it can not change the values in the database.
    Which means that you can make a gold value of 2345 G to appear as 23.45$ in the game, but the value in the editor and the database will remain 2345.
  9. that's why I said "shows" Andar :p
    As in, in-game
  10. Another possibility is to use one of the scripts which allows you to trade from one thing to another, and have "cents" and "dollars."


    Charge cents for tomatoes and dollars for Gold Armor. =]


    Swap cents for dollars and dollars for cents.


    SCript


    http://theolized.blogspot.com/2013/08/theo-crafting-system.html


    note that an English Version is available in the downloads