Jump to content

Alternative currency?


Tristam

Recommended Posts

I'm trying to make a new vending machine that uses something besides CasinoCoins.  Looking over the XML files, it seems like all traders are required to use CasinoCoins thanks to the very first line in the Trader.xml.  Trying to duplicate this and make a second Trader section below it only causes errors, regardless of name and content thanks to it being a "base" line.  Has anyone found a way to make a second currency?

Link to comment
Share on other sites

You're probably right.  I tried adding a second currency by putting ,ammomagnumball (or w/e the real text is) next to casinocoins at the top, no dice.  I tried making a second entry, but that gives an error.  Ultimately, I decided to go my initial route and just put bags down like everyone else  until a solution is found or created.  Just as well, as I had two other huge speedbumps in that I couldn't figure out work arounds.  This was meant to be a Starter Class mod, and I wanted to give people custom currency-- say 10 coins, and then let them buy things from their own person vending machine.  Tier 0-1 things would cost 1 coin, tier 3 would cost 3.  A sort of "build your own kit" setup.  But without custom currency, there's nothing keeping someone from holding their machine until they get more CasinoCoins and buying everything, or having a friend do it for them on established worlds.  I also couldn't figure out how to make each item only cost 1-3 currency without making each and everyone its own group.

Problems for later.

Link to comment
Share on other sites

Yeah, there is no way to use multiple currencies either. The game's entire monetary system assumes only one type of currency.

 

If you know programming: the name of the item to use as currency is kept in a static class variable. That same variable is used whenever any monetary transaction is made. A transaction involves creating a stack of items (Dukes in this case), and when that stack is created, it is created using the item name. So if you have any string in there that doesn't match the name of a single item, a stack can't be created, and errors ensue. That process happens throughout the codebase, so modding it is a practical impossibility. Also, the currency amount is displayed in the UI (above the backpack inventory), so you'd also need to modify the UI and hook it up to the modded code.

 

...If you don't know programming, then all you really need to know is that it's not possible. C'est la vie.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...