Home Creators Posts Import Register Favorites Logout

Downloads

Content

Implements a currency system for your game which can handle unlimited custom currencies.

! SEE BOTTOM OF POST FOR UPDATES !

Hi all, introducing [CGMZ] Currency System!

This plugin creates a currency system that can handle more than one currency. It does not touch the default currency set up in the database, so should be highly compatible with other plugins that utilize the default currency in some way.

Currencies can be undiscovered or discovered, and this will determine which currencies the player sees when they open the currency scene. Currencies can have their own customizable icon, name, short currency unit, description, max amount, and associated color.

Currently, the currency system works by setting the current "main currency" which causes the game to use different currencies in things such as the gold display window or the shop. The game starts with the "default" currency selected, but you can change the main currency to any valid currency id you have set up which will then be the main currency. Plugin commands exist for getting the currency amount or the current main currency so you can easily use conditional branches based on the new currencies.

As always, please leave your suggestions for other features you'd like to see as part of this plugin here or in my discord!

Alpha Update April 24, 2023: Hi all, this plugin has been updated today to add a way to variable increase/decrease custom currencies. It also adds custom currencies as a drop from enemies using notetags on the enemy notebox. Documentation has been updated to show how this new notetag can be used.

This update adds the gold double item effect for custom currencies. To use, add the new note tag to any weapon/armor note box. Then, when the player has a party member wearing one of those weapons or armors who is participating in battle, the currency drops for custom currencies will be doubled.

This update also added common window options for the currency scene, including windowskin, window padding, window background opacity, and window tone for each window in the scene. Along with this, the Currency Help Window in the scene will now obey the transparent windows option like the other windows.

Currency descriptions were changed from note type to multiline_string type. Your old descriptions should still work, but they may have incorrect text codes and quotation marks. You will need to manually fix your descriptions for currencies when you update.

This plugin also had some changes to how the internal code worked to increase compatibility. It should no longer matter which order this plugin is in compared to other [CGMZ] plugins that implement custom currency functionality. It should also allow third party plugins to properly display gold amounts in the default gold window. This plugin also now warns when it detects invalid JSON from invalid parameter setup instead of crashing. Keep in mind these warnings are still important to fix, as they will prevent the plugin from reading your parameters that were set up incorrectly.

This update adds the option to have different prices for items in the various custom currencies you set up. For example, if you want a shop that sells a potion for 100g and another that sells a potion for 5 gems, you can now do that. You can also set the sell price as well, for when the player sells their items to the custom currency shop. This can help you create a way to transfer currencies through shops, or prevent the transfer of currencies through shops.

This update also added an option to take up the Touch UI space at the top of the scene if Touch UI is disabled. A bug was fixed where the max currency being set to 0 was not infinite.

This version adds a currency exchange scene. You can now give the player the option to exchange one currency for another. The rate can either be automatically calculated which will go by a new internal value assigned to each currency, or it can be manually provided in the plugin command. This should allow you to create various currency exchange locations that can be more or less favorable to the player with their rate. See below gif for how it can look:

This update also added some quality of life changes. The icon and color parameters now use the built in icon or color selectors. The Transparent Windows parameter has been removed, in favor of setting each window's background type individually with Dim as an option too.

An integration with [CGMZ] Scene Backgrounds was added for both the currency bag and currency exchange scenes. An integration with [CGMZ] Controls Window was also added for both scenes. 

This version adds some more customization options to the currency bag scene. You can now opt to display the help window on top or on bottom. You can set the number of columns in the currency select window. You can control both the left and right side text for the currency as shown in the currency bag scene.

A bug with the currency exchange scene was fixed, as it previously treated a currency max of 0 as 0 instead of as infinite. It should now allow you to trade for infinite currency if the currency max is set to 0.

An integration with [CGMZ] Window Backgrounds was added for the currency bag windows, so you can now display a background image in those windows including scrolling parallax.

This version adds an integration with [CGMZ] Window Settings which is how you can control any window in this plugin's windowskin, tone, style, and more. It also added [CGMZ] Window Backgrounds integration for the exchange scene windows.

A bug was fixed with the exchange window being too small to fit its text when Touch UI was turned off.

This version adds New! marker text to currencies that the player has not yet viewed in the currency bag. This text only shows up in the currency bag. This appears for both currencies that start the game as discovered as well as currencies that are discovered mid-game. It can help the player easily identify currencies that they were just introduced to.

A bug was fixed when this plugin was used with [CGMZ] Menu Customizer to properly draw the correct currency info in the custom gold window.

A default currency object is now created, which should make integrations easier. This also now allows you to call the exchange scene with the default currency, previously you could only exchange custom currencies.

This version adds object tracking. You can now set up your custom currencies to track an item, weapon, armor, or variable amount. This plugin will handle syncing the object amount with the currency amount, and you can change it either through the normal plugin commands or through normal event commands or item usage.

For example, if set to track an item, and you use the event command to gain that item, the currency will also sync with the new item amount in the player inventory. Same thing if the player consumes an item, the currency will also be consumed. Note that negative currency amounts are currently not supported, so in the case of variable tracking you should avoid setting the variable value to a negative amount.

See below gif for tracking an item:

The default currency cannot track an object. Currencies that track objects still support all the standard currency metadata, such as full name, icon, currency unit, color, etc. They are displayed as normal custom currencies. However, for item/weapon/armor, the maximum goes by the inventory max instead of the currency max.

This update also added a new plugin command to change currency amount. This is less limited than others as it can do any operation (multiply, mod, etc).

This version adds the option to use a game variable to set the maximum amount of a currency. This will allow you to start the game with a lower maximum, and increase the amount the player can hold over time throughout your game. If set, this will override the static max currency parameter.

This version also fixes a bug with the selling price when set to use a custom currency being the same as the buying price.

Files

Comments

Anthony Mazur

Does this plugin support allowing a shop that can trade in multiple currencies. I.e. shop that sells items for blue gems, red gems, or gold? I planned on having a feature where there are distinct or discrete currencies for different items. For example, Red gems buy skill books, while blue gems are required to buy gear. Based on the documentation in the plugin it sounds like only one currency will display upon shop event, but maybe i'm misunderstanding.

Sky Relics

Hi I am new here and love the demo's you make for the plugins they help a lot so I can see what I doing wrong and right. If you have time can you make a demo for this as well? When I use it gold say A lot and not a number.

Casper Gaming

Hi, I usually do not make demos for alpha/beta plugins since they are subject to change significantly. If your gold says "A lot" and not a number, that is probably another plugin doing it as my plugins do not have that functionality.

Sky Relics

Ok I understand I will trying to figure what plugin is, making the it mess up.

Casper Gaming

To figure out which plugin might be causing it, you can turn non-CGMZ plugins off one by one and then test and then you know the last one you turned off before it started working is the one causing the issue.