I do get the idea as to how to use variables to make a second “currency” of sorts, but I also want this currency to show up in the menu and such.
With the amount of stuff I’d like to do with this alternate currency, I thought it would be easier to ask if there was a way or plugin to add a second currency to the game, rather than putting a lot of work into making it out of variables when there may be an easier way. Any advice?
Maybe you could use an item. And to make an enemy drop bulk of the item… You could make different versions of such item that split apart into more of the currency.
Since I don’t know if there’s an existing plugin for something like this, here goes some general ideas.
For the currency itself there’s a couple easy solutions:
- A variable. You might think it’s not good but it actually saves you the more general work: increasing and decreasing that number.
- Items. Still a solid option, however you’ll have to deal with the maximum being 99. But also comes with built-in add/take functions. It also has a place in your menu, so hypothetically you don’t need to make any custom UI for it. On the other hand, not sure if the inventory between all the other items is the best place to have it.
Now there’s a couple things you’ll need to define somewhere.
- Item costs. You could reuse the built-in item cost from the database, but you might actually want to set your own.
- Where this currency shows.
- What kind of shop you want to sell these.
A shop of this kind is 100% doable with just event commands, but it’ll definitely take a bit more effort. The easiest solution is of course using the “Show choices” command.
If you do not want variables, you need a plugin for this, several factors have to be taken into account
- You need a way to give a second currency price to all items, and store that in the item database. Plugins often work with notetags for that
- You need to add additionnal currency units in that plugin, probably configuration
- You probably need a plugin command to open a shop with a chosen currency
- Finally, you need to save that new currency value in the player data
I don’t know if a plugin exists, but you can create one with those ideas - if you’re famillar with plugin development. Else… variables it is 
This is pretty easy to work around if you need to, though.
Ok, I’ll use a variable. Thanks everyone
1 Like