Multiple Currencies

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
255
Reaction score
112
First Language
English
Primarily Uses
RMMZ
Multiple Currencies
v1.2
-- Discontinued --
Due to re-releasing this plugin (new and improved) along with a couple of others in my Economics Trinity plugin, this will no longer be supported, and the github version is removed. If you still want to use THIS version, it'll still be available on this post.

Update(1.2):
* Added alternative currencies to buy and sell items not connected with your other currencies put into the plugin parameters
* There was an issue when trying to Load Game, would not recognize the functions. They have been moved and made "unique" so they can work but not clash with any other plugins (hopefully).

Setting Up Alternate Currencies(New with v1.2!):
Setup the item/weapon/armor in the database as normal, including price. However, change the price to the number of "AltCurrency" you wish to trade for. Then place a notetag in that item's notefield:
<AltCurrency type id>

type = Item or Weapon or Armor
id = the itemId of item/weapon/armor in database.

Example: <AltCurrency Item 5>

Better Explination: Differences between the 2 notetags:
<CURRENCY: ID>
This is the notetag on an item you want to be bought and sold in that currency (that is listed as a currency item that is defined in the plugin parameters.
* This allows the system to know what to convert it as for a 'base number'. Base Number refers to the lowest form of currency (last entry in the parameters that = 1 in exchange rate.

So if you set the following:
Code:
Item1 = Gold | Exchange: 100,
Item2 = Silver | Exchange: 10,
Item3 = Copper | Exchange: 1
- and you have a set of clothes that has a price of 5, and <Currency: 3>, this means it will cost 5 Copper Pieces to purchase.

<ALTCURRENCY TYPE ID>
This is the notetag to use for items you want to purchase or sell with a currency item that is NOT in the listed currencies (plugin parameters). It works independently of the system so it doesn't convert to or from a base number.

About:
Gain and spend multiple types of currencies from the classic "Gold, Silver, and Copper" to more realistic monetary items (Dollars, Rubles, Yen, etc). This plugin is part of my "Economy" series to add more life to your world. For instructions how to setup, read the Help section. The "TLDR" version:
* Setup items in database (define which are currencies, and which one cost other currencies)
* Setup plugin parameters to match

Plugin Order:
- LvMZ_Factions.js
- LvMZ_Economy.js
- LvMZ_Currencies.js (this one)

Terms of Use:
* Free to use and modify for commercial and noncommercial games, with credit.
* Do NOT remove my name from the Author of this plugin
* Do NOT reupload this plugin (modified or otherwise) anywhere other than these forums

Screenshots:
Ex1.pngEx2.pngEx3.png
 

Attachments

Last edited:

Knightmare

Knight of the Night
Veteran
Joined
Mar 14, 2012
Messages
1,210
Reaction score
287
First Language
English
Primarily Uses
RMMV
Do I need those other 2 plugins to use this and if so how do I get them?
 

Kupotepo

Fantasy realist/Advocatus Diaboli
Veteran
Joined
Jul 5, 2017
Messages
1,916
Reaction score
1,999
First Language
Thai
Primarily Uses
RMMV
Thank you and nice to meet you. You made my day with your currency plugin restore the functionality of MV to MZ. And wow, the Factions plugin too that is incredible.
:vxmegane:
 

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
255
Reaction score
112
First Language
English
Primarily Uses
RMMZ
Do I need those other 2 plugins to use this and if so how do I get them?
Nope! All the plugins are independent of each other, but are made so they CAN work together. The other 2 plugins are not yet available (am currently working on Factions right now, Economics.js is almost done as well). No timeline yet, but hopefully sooner than later lol
 

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
255
Reaction score
112
First Language
English
Primarily Uses
RMMZ
Thank you and nice to meet you. You made my day with your currency plugin restore the functionality of MV to MZ. And wow, the Factions plugin too that is incredible.
:vxmegane:
Indeed. Factions is mostly going to be a library of functions for developers to use. Will have:
- "Factions" (such as Nobles, Merchants, Commoners, pirates, anything you input really!): Depending on what other plugins or setup you use, you can make it so "Thieves" factions will stalk "Commoners", or have shops (LvMZ_Economics) base prices (up or down) depending on factions, and so on!
--> Factions will also have a personal relations gauge "Reputation" which like above, might have certain events chase (or flee) from other events/player, etc.

- "Races" (If there's any racial tension between shopkeepers or in general (Humans vs Non-Humans - like The Witcher series), etc.

- "Relations" (Like "The Sims", you could be acquaintances, friends, even lovers!) Also may affect prices of shops from Economicsplugin.

- "Titles" (If you're a King/Queen, then you should be darn well getting things nearly free! :p)
 

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
255
Reaction score
112
First Language
English
Primarily Uses
RMMZ
There has been an update - A few fixes, might need to re-download and overwrite. (then refresh inside the plugin manager). Sorry about that.
 

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
255
Reaction score
112
First Language
English
Primarily Uses
RMMZ
Currencies updated! (v1.2) - Now with alternative currencies independent of your others for buying and selling. Want to trade "Magic Stars" for a potion rather than gold, silver, or copper? Now you can!

Or perhaps you're making a survival game where people trade "Food" for "Clothes" or "Medicine"? Well you can do that too!
 

Kupotepo

Fantasy realist/Advocatus Diaboli
Veteran
Joined
Jul 5, 2017
Messages
1,916
Reaction score
1,999
First Language
Thai
Primarily Uses
RMMV
@Iordvalinar, I think I confuse about the logic of your plugin. Get your plugin now, it is working.
I just simplified the steps for beginner users.
1. Need to create an item as a currency creating whatever you want gem, silver, or something else.
2. Create the second item and in its note tag put <AltCurrency Item id [of the current item you have created.] >
:LZSsmile:
From what I understand <Currency: itemId> out of use and <AltCurrency Item 5> is a new call, correct? That is why I am not calling anything bug. It is in the plugin about currencies which I can direct to the id of items.
 
Last edited:

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
255
Reaction score
112
First Language
English
Primarily Uses
RMMZ
@Iordvalinar, I think I confuse about the logic of your plugin. Get your plugin now, it is working.
I just simplified the steps for beginner users.
1. Need to create an item as a currency creating whatever you want gem, silver, or something else.
2. Create the second item and in its note tag put <AltCurrency Item id [of the current item you have created.] >
:LZSsmile:
From what I understand <Currency: itemId> out of use and <AltCurrency Item 5> is a new call, correct? That is why I am calling anything bug. It is in the plugin about currencies which I can direct to the id of items.
Alright so the differences between:
<Currency: id>
or
<AltCurrency type id>

Are two different notetags (not to be used simultaneously. I should've explained this better and I'm sorry. So:
<CURRENCY: ID>
This is the notetag on an item you want to be bought and sold in that currency (that is listed as a currency item - as you mentioned- that is defined in the plugin parameters.
* This allows the system to know what to convert it as for a 'base number'. Base Number refers to the lowest form of currency (last entry in the parameters that = 1 in exchange rate.

So if you set Item1 = Gold, Item2 = Silver, Item3 = Copper, and you have a set of clothes that has a price of 5, and <Currency: 3>, this means it will cost 5 Copper Pieces to purchase.

<ALTCURRENCY TYPE ID>
This is the notetag to use for items you want to purchase or sell with a currency item that is NOT in the listed currencies (plugin parameters). It works independently of the system so it doesn't convert to or from a base number.
 

Fifix

Villager
Member
Joined
Jul 1, 2015
Messages
16
Reaction score
3
First Language
Polish
Primarily Uses
RMMZ
This is exactly what I was looking for :eek:
Thank you so much for this amazing plugin! :wub:wub
 

Kupotepo

Fantasy realist/Advocatus Diaboli
Veteran
Joined
Jul 5, 2017
Messages
1,916
Reaction score
1,999
First Language
Thai
Primarily Uses
RMMV
@lordvalinar, sorry for the miscommunication. Jumping to imgur and snapshot back and forth lol.
That is why I am not calling anything bug. It is in the plugin about currencies which
I suppose to put the word not. Because, I found the currency button on the update currency plugin of yours. I understand now, but thank you for concern. At the first look, I get lost a little but I understand their functions now.
Thank you for explaining the plugin functionality to me.
Your plugins are ok and no bug to see.
 
Last edited:

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
255
Reaction score
112
First Language
English
Primarily Uses
RMMZ
I just want people to be aware, there is going to be another update on this in the near future. Some severe re-work has been done with Factions and Economy(WIP), and will need to make a few changes with Currencies to get them all in-sync (not the band... hehe).

So if there are any issues, please report them and I'll try to get the fix in before I release the Economic Trinity set/demo!
 

Fifix

Villager
Member
Joined
Jul 1, 2015
Messages
16
Reaction score
3
First Language
Polish
Primarily Uses
RMMZ
I just want people to be aware, there is going to be another update on this in the near future. Some severe re-work has been done with Factions and Economy(WIP), and will need to make a few changes with Currencies to get them all in-sync (not the band... hehe).

So if there are any issues, please report them and I'll try to get the fix in before I release the Economic Trinity set/demo!
I'm getting a type error each time I try to equip/unequip a character with a piece of gear or weapon:
"Cannot read property 'id' of null".

I'm using VisuStella plugins.

Edit: It looks like one of other plugins was causing this. When disabled it now works well.
 

Attachments

Last edited:

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
255
Reaction score
112
First Language
English
Primarily Uses
RMMZ
I'm getting a type error each time I try to equip/unequip a character with a piece of gear or weapon:
"Cannot read property 'id' of null".

I'm using VisuStella plugins.
Ah okay that's a quick fix. The issue is because there's no item. I'll give some quick instructions to fix (since next upload won't be until the demo, then this thread will be obsolete):

Find "LordV_Currencies.prototype.isCurrency = function(item)", around line 206 or so, and make sure it looks like this:
JavaScript:
LordV_Currencies.prototype.isCurrency = function(item) {
    if (!item) return false;
    return this._units.map(e => Number(e.id)).includes(item.id);
};
 

Fifix

Villager
Member
Joined
Jul 1, 2015
Messages
16
Reaction score
3
First Language
Polish
Primarily Uses
RMMZ
Thank you very much for your quick response and a way to fix the problem :biggrin:
It's working perfectly now!
 

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
255
Reaction score
112
First Language
English
Primarily Uses
RMMZ
Glad I could help ^_^ And also no problem, I don't really have a life (THE CODE IZ TEH LYFE!!!) lol so I'm usually checking forums or discord for feedback, suggestions, etc.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Any thoughts on my hexagon map system?
Idk where this post would go, so how do you change the font of the choice selection window? I have a different font for the game so it looks a little odd could someone tell me where this would go on the forum?
RPG Maker MZ demo -project with some new features:
I don't really have a use for this guy, I just wanted to build a plague doctor.

Join us for a session of the new update starting at 3PM EST! There will be a Steam code giveaway! Click here!

Forum statistics

Threads
104,616
Messages
1,007,590
Members
136,092
Latest member
Anansi
Top