Coin Currency

banner-monete.png
Coin Currency​
v1.2, by Holy87​

Features

Shows coins instead of digits for the player's owned gold, like in many RPG like World of Warcraft, Dragon Age. It will shown in Gold Window, messages and shop. The coins will appear like this:

ydn9.png


Instead of 24,690G.

By default, 1 Silver = 100 Bronze and 1 Gold = 100 Silver.

How to Use

Paste this script under Materials and before the Main. If you want to show coins in game dialogues, just use the escape string \M[value], where value is the number of the gold. For example, \M[32503] will show 3 gold, 25 silver and 3 bronze.

RPG Maker doesn't provide icons for bronze and silver, so I've inserted it into this iconset for try. Use it as you want.

Spoiler
eM7Hudt.png
Script

You can find this script on GitHub.

FAQ

Q: Can I use this script for my commercial project?

A: Yes, you can. all my scripts are distributed under CC-BY license. You just have to credit me.

Q: What if the script is not compatible with others?

A: Just reply this topic and request the compatibilty for a determined script. If you want, you can also pull a commit in the script's GitHub and I will insert it in the Master branch.
Cool, how to set the item price on the shop?
Cool, how to set the item price on the shop?
You have to do nothing, just set the item price as usual, the script will automatically convert it. For example, An item that costs 200G will be shown as 2 silver coins, and another that costs 15000G will be shown as 1 gold and 50 silver.
Nice, thank you!
Hey Holy87, nice script. Seeing this made my day, it really fits the game I'm making.

I have a problem though, it's not the script, it's just me.

I'm using XS-Menu Delux and as you can see in the image below (ignore actor face), your gold system doesn't show up on the top right corner. Completely understandable, as I attached in the picture, the script is telling the menu to show the gold in the old way (line 144). Can you tell me exactly what I have to write there?

I'll try to fix it myself but I thought it would be good to post this here for future users having this problem.

Thanks in advance.

[IMG]http://i1135.photobucket.com/albums/m639/Torqus7/problem.jpg[/IMG]
Hey Holy87, nice script. Seeing this made my day, it really fits the game I'm making.

I have a problem though, it's not the script, it's just me.

I'm using XS-Menu Delux and as you can see in the image below (ignore actor face), your gold system doesn't show up on the top right corner. Completely understandable, as I attached in the picture, the script is telling the menu to show the gold in the old way (line 144). Can you tell me exactly what I have to write there?

I'll try to fix it myself but I thought it would be good to post this here for future users having this problem.

Thanks in advance.
Of course it doesn't work with custom menus. I've made a patch for you, paste it under the Xail System Core

class Window_Base < Window  alias cc_patch_draw_ft draw_font_text unless $@  def draw_font_text(text, x, y, width, alignment, font, size, color, bold = true, shadow = true)    unless text == "COINCURRENCY"      cc_patch_draw_ft(text, x, y, width, alignment, font, size, color, bold, shadow)    else      draw_currency_value($game_party.gold, "", x, y, width)    end  endendAnd replace the string where you show the gold using "COINCURRENCY". I.E.

Code:
# DETAILS:    # Setup details here. (Recommended to use the default ones since you will    # need a bit RGSS knowledge to add more.)    def self.details      ["COINCURRENCY",      "Steps: #{$game_party.steps}",      "Collected Items: #{$game_party.all_items.size}",      "Map: #{$data_mapinfos[$game_map.map_id].name}",      "Leader: #{$game_party.leader.name}",      "Battle Count: #{$game_system.battle_count}",      "Save Count: #{$game_system.save_count}",      "Party Members: #{$game_party.all_members.size}",      "Highest Level: #{$game_party.highest_level}",      "Variable I: #{$game_variables[1]}",      "Variable II: #{$game_variables[2]}"]    end
Wow thank you! It works just perfect.
I love it! Thanks you very much Holy 87,im a follower of your works since a long time...

Just a little sugestion,it is posible to show the icons even if you dont have money?

Excuse me for my bad english and greetings from Argentina.
I love it! Thanks you very much Holy 87,im a follower of your works since a long time...

Just a little sugestion,it is posible to show the icons even if you dont have money?

Excuse me for my bad english and greetings from Argentina.
Thanks, if you want to show the coin also if you not have gold, change the line 83 (if bronzes > 0) to if bronzes >= 0
Sorry if I'm being annoying... but I changed my menu to Galv's Menu Themes Engine and I have the same problem I had before.

This time the difference is that there's no way to modify how the currency is shown without editing the hard part of the script.

Though I think the solution is around lines 690 and 722.

I would really appreciate some help.
Sorry if I'm being annoying... but I changed my menu to Galv's Menu Themes Engine and I have the same problem I had before.

This time the difference is that there's no way to modify how the currency is shown without editing the hard part of the script.

Though I think the solution is around lines 690 and 722.

I would really appreciate some help.
Just comment this method at line 723

Code:
  def draw_currency_value(value, unit, x, y, width)    cx = text_size(unit).width    change_color(mtheme::GAME_INFO_TXT_COLOR)    draw_text(x, y, width - cx - 2, line_height, value, 2)    change_color(system_color)    draw_text(x, y, width, line_height, unit, 2)  end
Thank you for the help, again.
Hey Holy! I wanted to use this awesome script for my game and it works great, but, for some reason when I sell something the amount says - instead +. It does add up but it's not displayed properly, First time it shows nothing (+ or -) but after I move on other item or other window, it shows - like in the window. It adds 2 51 30 + 15= 2 51 45 but there is a minus. Can you help out?
Untitled.png
Hey Holy! I wanted to use this awesome script for my game and it works great, but, for some reason when I sell something the amount says - instead +. It does add up but it's not displayed properly, First time it shows nothing (+ or -) but after I move on other item or other window, it shows - like in the window. It adds 2 51 30 + 15= 2 51 45 but there is a minus. Can you help out?
You already made a support request thread. Why are you asking this issue here? You shouldn't do that.
Hey, while I'm already here, anyone here uses Modern Algebra Quest Journal script? Was wondering if anyone thought about it and made some compabilites since the currency reward don't change it still uses default gold icon instead of new system like 1g 20s 40c it will show 124gold (example). They still show the same gold icon instead this script currency gold, silver, copper.

This is the zip for script since for some reason it won't let me upload here whole script, maybe it's too big.

Anyway, if anyone has any idea how to do it, I would apprecaite any advise since I don't know how to write scripts to make it compatible. Any suggestion how to write text in script amount of money will receive upon finishing it or a way to show different icons and numbers, otherwise I can't use this awesome script and that would be a waste. Cheers and sorry to bother you people again.

Original thread: https://forums.rpgmakerweb.com/threads/coin-currency.43554/