Jump to content
Chris Barnett

Spike's Engine - Monetary System

Recommended Posts

Hello. I'm a bit late to the party but I'm sure I can find a couple things that haven't already been scripted. I wrote this mostly as a learning exercise. I code and script in C++ and bash almost exclusively, so if I've made some nub mistake, just let me know and I'll correct it. =)

At any rate, this is my take on the Oni Monetary System from days of old. It takes currency values and displays them in groups of Copper, Silver, Gold, and Platinum coins (Note: They don't actually have to be coins or even metal). It doesn't actually change the way gold works in any way, only the way it is displayed. You will need to inject some images for your coins into your IconSet. At the moment the coin's icon indices are required to be sequential, starting with the most valuable. This may change if there seems to be a need to assign non sequential icon indices.

If game_party.gold =1, then 1 copper piece will be displayed. There are 100 CP to 1 SP, and so on down the line. It also bumps the party's maximum gold up a couple digits (3 denomination version does not increase max gold).

Preview:

money.png



4 Denomination Script (1:100):

 

=begin
#===============================================================================
# Spike's Engine - Monetary System
#
# Version: 1.01
# Author: Chris Barnett
# Date: March 26th, 2012
# Credit: Give credit where credit is due 
#===============================================================================
# Description:
#
# This script displays currency values in terms of Copper, Silver, Gold, and
# Platinum coins. It doesn't actually change the way gold works in any way,
# only the way it is displayed.
#===============================================================================
# Instructions:
#
# Place this script above Main and below default scripts in the Script Editor.
# If you plan to integrate with Modern Algebra's Special Message Codes it
# would probably be wise to place this this script above it.
#
# You'll need to insert images for the coins into your IconSet resource. At
# the moment the script requires the coin's icon indices to be in sequential
# order, starting with the most valuable. I may unwrap the for loop if there
# seems to be a need to assign non sequential icon indices.
#
# You will then need to set ICON to the icon index of the least valuable coin.
#
# To integrate with Modern Algebra's Special Message Codes, Just paste
# the lines below into the icons section of convert_escape_characters
#
result.gsub!(/\iSMC/i) { "\i\[#{::SPIKE::GOLD::ICON}\]" rescue "" }
result.gsub!(/\iSMS/i) { "\i\[#{::SPIKE::GOLD::ICON-1}\]" rescue "" }
result.gsub!(/\iSMG/i) { "\i\[#{::SPIKE::GOLD::ICON-2}\]" rescue "" }
result.gsub!(/\iSMP/i) { "\i\[#{::SPIKE::GOLD::ICON-3}\]" rescue "" }
#
# To call up the icons in a message box use the following escape sequences.
#
# \iSMC for Copper
# \iSMS for Silver
# \iSMG for Gold
# \iSMP for Platinum
#
# NOTE!!! If you have any issues with this, please don't bother Modern Algebra
# about it. He already spent his time writing Special Message Codes and
# probably a fair amount of time answering questions about it. If you need
# assistance, please contact me directly. I am plenty willing to help.
#===============================================================================
# Known Bugs:
#
# A compatibility issue with Yanfly's Ace Save Engine has been reported
# but not yet confirmed. If you experience troubles, please let me know.
#===============================================================================
=end

$imported = {} if $imported.nil?
$imported["SE-Money"] = true

module SPIKE
module GOLD
BATTLE_ALIGN = 1 # Change to non 0 to push icons to the right when receiving loot in battle
ICON_POS = 4 # Increase to push icons right, decrease to pull left
TEXT_POS = 0 # Increase to push text right, decrease to pull left
OFFSET = -33 # Decrease to spread coins apart, increase to draw them closer
ICON = 191 # Change this to the icon index of the least valuable coin
HEIGHT = 0 # Increase to raise coins, decrease to lower
end
end

class Window_Base < Window
def draw_currency_value(value, unit, x, y, width)
value *= -1 if value < 0
pos = ::SPIKE::GOLD::ICON_POS
for i in 0..3
change = value % 100
value = value / 100
draw_icon(SPIKE::GOLD::ICON - i,width + pos + SPIKE::GOLD::OFFSET, y - SPIKE::GOLD::HEIGHT)
draw_text(x + SPIKE::GOLD::TEXT_POS, y, width + pos, line_height, change, 2)
pos += ::SPIKE::GOLD::OFFSET
end
end
end

class Game_Party < Game_Unit
def max_gold
return 99999999
end
def gain_gold(amount)
@gold = [[@gold + amount, 0].max, max_gold].min
end
def gold
return @gold
end
end

class Window_ShopBuy < Window_Selectable
def draw_currency_value(value, unit, x, y, width)
value *= -1 if value < 0
pos = SPIKE::GOLD::ICON_POS
for i in 0..3
change = value % 100
value = value / 100
if change != 0
draw_icon(SPIKE::GOLD::ICON - i,width + pos + SPIKE::GOLD::OFFSET, y - SPIKE::GOLD::HEIGHT)
draw_text(x + SPIKE::GOLD::TEXT_POS, y, width + pos, line_height, change, 2)
pos += SPIKE::GOLD::OFFSET
end
end
end
def draw_item(index)
item = @data[index]
rect = item_rect(index)
draw_item_name(item, rect.x, rect.y, enable?(item))
draw_currency_value(price(item), Vocab::currency_unit, rect.x + 4, rect.y, contents.width - SPIKE::GOLD::ICON_POS - 8)
end
end

class Window_ShopNumber < Window_Selectable
def draw_currency_value(value, unit, x, y, width)
value *= -1 if value < 0
pos = SPIKE::GOLD::ICON_POS
for i in 0..3
change = value % 100
value = value / 100
if change != 0
draw_icon(SPIKE::GOLD::ICON - i,width + pos + SPIKE::GOLD::OFFSET, y - SPIKE::GOLD::HEIGHT)
draw_text(x + SPIKE::GOLD::TEXT_POS, y, width + pos, line_height, change, 2)
pos += ::SPIKE::GOLD::OFFSET
end
end
end
end

module BattleManager
def self.gain_gold
if $game_troop.gold_total > 0
value = $game_troop.gold_total
result = ''
for i in 0..3
change = value % 100
value = value / 100
if change != 0
if SPIKE::GOLD::BATTLE_ALIGN == 0
result = ('\i[' + (::SPIKE::GOLD::ICON - i).to_s + ']' + change.to_s + ' ') + result
else
result = (change.to_s + '\i[' + (::SPIKE::GOLD::ICON - i).to_s + '] ') + result
end
end
end
$game_message.add('Found ' + result + '\.')
$game_party.gain_gold($game_troop.gold_total)
end
wait_for_message
end
end

# Uncomment for compatability with Yanfly's Ace Save Engine
#class Window_FileStatus < Window_Base
# def draw_save_gold(dx, dy, dw)
# return if @header[:party].nil?
# draw_currency_value(@header[:party].gold.group.to_i, Vocab::currency_unit, + SPIKE::GOLD::ICON_POS, dy, contents.width - SPIKE::GOLD::ICON_POS - 8)
# end
#end

class Game_Interpreter; include SPIKE::GOLD;
end

 



3 Denomination Script (1:100):

 

=begin
#===============================================================================
# Spike's Engine - Monetary System
#
# Version: 1.01
# Author: Chris Barnett
# Date: March 26th, 2012
# Credit: Give credit where credit is due 
#===============================================================================
# Description:
#
# This script displays currency values in terms of Copper, Silver, Gold, and
# Platinum coins. It doesn't actually change the way gold works in any way,
# only the way it is displayed.
#===============================================================================
# Instructions:
#
# Place this script above Main and below default scripts in the Script Editor.
# If you plan to integrate with Modern Algebra's Special Message Codes it
# would probably be wise to place this this script above it.
#
# You'll need to insert images for the coins into your IconSet resource. At
# the moment the script requires the coin's icon indices to be in sequential
# order, starting with the most valuable. I may unwrap the for loop if there
# seems to be a need to assign non sequential icon indices.
#
# You will then need to set ICON to the icon index of the least valuable coin.
#
# To integrate with Modern Algebra's Special Message Codes, Just paste
# the lines below into the icons section of convert_escape_characters
#
result.gsub!(/\iSMC/i) { "\i\[#{::SPIKE::GOLD::ICON}\]" rescue "" }
result.gsub!(/\iSMS/i) { "\i\[#{::SPIKE::GOLD::ICON-1}\]" rescue "" }
result.gsub!(/\iSMG/i) { "\i\[#{::SPIKE::GOLD::ICON-2}\]" rescue "" }
result.gsub!(/\iSMP/i) { "\i\[#{::SPIKE::GOLD::ICON-3}\]" rescue "" }
#
# To call up the icons in a message box use the following escape sequences.
#
# \iSMC for Copper
# \iSMS for Silver
# \iSMG for Gold
# \iSMP for Platinum
#
# NOTE!!! If you have any issues with this, please don't bother Modern Algebra
# about it. He already spent his time writing Special Message Codes and
# probably a fair amount of time answering questions about it. If you need
# assistance, please contact me directly. I am plenty willing to help.
#===============================================================================
# Known Bugs:
#
# A compatibility issue with Yanfly's Ace Save Engine has been reported
# but not yet confirmed. If you experience troubles, please let me know.
#===============================================================================
=end

$imported = {} if $imported.nil?
$imported["SE-Money"] = true

module SPIKE
module GOLD
BATTLE_ALIGN = 1 # Change to non 0 to push icons to the right when receiving loot in battle
ICON_POS = 8 # Increase to push icons right, decrease to pull left
TEXT_POS = -8 # Increase to push text right, decrease to pull left
OFFSET = -42 # Decrease to spread coins apart, increase to draw them closer
ICON = 531 # Change this to the icon index of the least valuable coin
HEIGHT = 0 # Increase to raise coins, decrease to lower
end
end

class Window_Base < Window
def draw_currency_value(value, unit, x, y, width)
value *= -1 if value < 0
pos = ::SPIKE::GOLD::ICON_POS
for i in 0..2
change = value % 100
value = value / 100
draw_icon(SPIKE::GOLD::ICON - i,width + pos + SPIKE::GOLD::OFFSET, y - SPIKE::GOLD::HEIGHT)
draw_text(x + SPIKE::GOLD::TEXT_POS, y, width + pos, line_height, change, 2)
pos += ::SPIKE::GOLD::OFFSET
end
end
end

class Game_Party < Game_Unit
def max_gold
return 999999
end
def gain_gold(amount)
@gold = [[@gold + amount, 0].max, max_gold].min
end
def gold
return @gold
end
end

class Window_ShopBuy < Window_Selectable
def draw_currency_value(value, unit, x, y, width)
value *= -1 if value < 0
pos = SPIKE::GOLD::ICON_POS
for i in 0..2
change = value % 100
value = value / 100
if change != 0
draw_icon(SPIKE::GOLD::ICON - i,width + pos + SPIKE::GOLD::OFFSET, y - SPIKE::GOLD::HEIGHT)
draw_text(x + SPIKE::GOLD::TEXT_POS, y, width + pos, line_height, change, 2)
pos += SPIKE::GOLD::OFFSET
end
end
end
def draw_item(index)
item = @data[index]
rect = item_rect(index)
draw_item_name(item, rect.x, rect.y, enable?(item))
draw_currency_value(price(item), Vocab::currency_unit, rect.x + 4, rect.y, contents.width - SPIKE::GOLD::ICON_POS - 8)
end
end

class Window_ShopNumber < Window_Selectable
def draw_currency_value(value, unit, x, y, width)
value *= -1 if value < 0
pos = SPIKE::GOLD::ICON_POS
for i in 0..2
change = value % 100
value = value / 100
if change != 0
draw_icon(SPIKE::GOLD::ICON - i,width + pos + SPIKE::GOLD::OFFSET, y - SPIKE::GOLD::HEIGHT)
draw_text(x + SPIKE::GOLD::TEXT_POS, y, width + pos, line_height, change, 2)
pos += ::SPIKE::GOLD::OFFSET
end
end
end
end

module BattleManager
def self.gain_gold
if $game_troop.gold_total > 0
value = $game_troop.gold_total
result = ''
for i in 0..2
change = value % 100
value = value / 100
if change != 0
if SPIKE::GOLD::BATTLE_ALIGN == 0
result = ('\i[' + (::SPIKE::GOLD::ICON - i).to_s + ']' + change.to_s + ' ') + result
else
result = (change.to_s + '\i[' + (::SPIKE::GOLD::ICON - i).to_s + '] ') + result
end
end
end
$game_message.add('Found ' + result + '\.')
$game_party.gain_gold($game_troop.gold_total)
end
wait_for_message
end
end

# Uncomment for compatability with Yanfly's Ace Save Engine
#class Window_FileStatus < Window_Base
# def draw_save_gold(dx, dy, dw)
# return if @header[:party].nil?
# draw_currency_value(@header[:party].gold.group.to_i, Vocab::currency_unit, + SPIKE::GOLD::ICON_POS, dy, contents.width - SPIKE::GOLD::ICON_POS - 8)
# end
#end

class Game_Interpreter; include SPIKE::GOLD;
end

 

 

 

4 Denomination Script (1:10):

 

=begin
#===============================================================================
# Spike's Engine - Monetary System
#
# Version: 1.01
# Author: Chris Barnett
# Date: March 26th, 2012
# Credit: Give credit where credit is due :)
#===============================================================================
# Description:
#
# This script displays currency values in terms of Copper, Silver, Gold, and
# Platinum coins. It doesn't actually change the way gold works in any way,
# only the way it is displayed.
#===============================================================================
# Instructions:
#
# Place this script above Main and below default scripts in the Script Editor.
# If you plan to integrate with Modern Algebra's Special Message Codes it
# would probably be wise to place this this script above it.
#
# You'll need to insert images for the coins into your IconSet resource. At
# the moment the script requires the coin's icon indices to be in sequential
# order, starting with the most valuable. I may unwrap the for loop if there
# seems to be a need to assign non sequential icon indices.
#
# You will then need to set ICON to the icon index of the least valuable coin.
#
# To integrate with Modern Algebra's Special Message Codes, Just paste
# the lines below into the icons section of convert_escape_characters
#
result.gsub!(/\iSMC/i) { "\i\[#{::SPIKE::GOLD::ICON}\]" rescue "" }
result.gsub!(/\iSMS/i) { "\i\[#{::SPIKE::GOLD::ICON-1}\]" rescue "" }
result.gsub!(/\iSMG/i) { "\i\[#{::SPIKE::GOLD::ICON-2}\]" rescue "" }
result.gsub!(/\iSMP/i) { "\i\[#{::SPIKE::GOLD::ICON-3}\]" rescue "" }
#
# To call up the icons in a message box use the following escape sequences.
#
# \iSMC for Copper
# \iSMS for Silver
# \iSMG for Gold
# \iSMP for Platinum
#
# NOTE!!! If you have any issues with this, please don't bother Modern Algebra
# about it. He already spent his time writing Special Message Codes and
# probably a fair amount of time answering questions about it. If you need
# assistance, please contact me directly. I am plenty willing to help.
#===============================================================================
# Known Bugs:
#
# A compatibility issue with Yanfly's Ace Save Engine has been reported
# but not yet confirmed. If you experience troubles, please let me know.
#===============================================================================
=end

$imported = {} if $imported.nil?
$imported["SE-Money"] = true

module SPIKE
module GOLD
BATTLE_ALIGN = 1 # Change to non 0 to push icons to the right when receiving loot in battle
ICON_POS = 4 # Increase to push icons right, decrease to pull left
TEXT_POS = 0 # Increase to push text right, decrease to pull left
OFFSET = -33 # Decrease to spread coins apart, increase to draw them closer
ICON = 191 # Change this to the icon index of the least valuable coin
HEIGHT = 0 # Increase to raise coins, decrease to lower
end
end

class Window_Base < Window
def draw_currency_value(value, unit, x, y, width)
value *= -1 if value < 0
pos = ::SPIKE::GOLD::ICON_POS
for i in 0..3
change = value if i == 3
change = value % 10 if i != 3
value = value / 10
draw_icon(SPIKE::GOLD::ICON - i,width + pos + SPIKE::GOLD::OFFSET, y - SPIKE::GOLD::HEIGHT)
draw_text(x + SPIKE::GOLD::TEXT_POS, y, width + pos, line_height, change, 2)
pos += ::SPIKE::GOLD::OFFSET
end
end
end

class Game_Party < Game_Unit
def max_gold
return 99999
end
def gain_gold(amount)
@gold = [[@gold + amount, 0].max, max_gold].min
end
def gold
return @gold
end
end

class Window_ShopBuy < Window_Selectable
def draw_currency_value(value, unit, x, y, width)
value *= -1 if value < 0
pos = SPIKE::GOLD::ICON_POS
for i in 0..3
change = value if i == 3
change = value % 10 if i != 3
value = value / 10
if change != 0
draw_icon(SPIKE::GOLD::ICON - i,width + pos + SPIKE::GOLD::OFFSET, y - SPIKE::GOLD::HEIGHT)
draw_text(x + SPIKE::GOLD::TEXT_POS, y, width + pos, line_height, change, 2)
pos += SPIKE::GOLD::OFFSET
end
end
end
def draw_item(index)
item = @data[index]
rect = item_rect(index)
draw_item_name(item, rect.x, rect.y, enable?(item))
draw_currency_value(price(item), Vocab::currency_unit, rect.x + 4, rect.y, contents.width - SPIKE::GOLD::ICON_POS - 8)
end
end

class Window_ShopNumber < Window_Selectable
def draw_currency_value(value, unit, x, y, width)
value *= -1 if value < 0
pos = SPIKE::GOLD::ICON_POS
for i in 0..3
change = value if i == 3
change = value % 10 if i != 3
value = value / 10
if change != 0
draw_icon(SPIKE::GOLD::ICON - i,width + pos + SPIKE::GOLD::OFFSET, y - SPIKE::GOLD::HEIGHT)
draw_text(x + SPIKE::GOLD::TEXT_POS, y, width + pos, line_height, change, 2)
pos += ::SPIKE::GOLD::OFFSET
end
end
end
end

module BattleManager
def self.gain_gold
if $game_troop.gold_total > 0
value = $game_troop.gold_total
result = ''
for i in 0..3
change = value if i == 3
change = value % 10 if i != 3
value = value / 10
if change != 0
if SPIKE::GOLD::BATTLE_ALIGN == 0
result = ('\i[' + (::SPIKE::GOLD::ICON - i).to_s + ']' + change.to_s + ' ') + result
else
result = (change.to_s + '\i[' + (::SPIKE::GOLD::ICON - i).to_s + '] ') + result
end
end
end
$game_message.add('Found ' + result + '\.')
$game_party.gain_gold($game_troop.gold_total)
end
wait_for_message
end
end

# Uncomment for compatability with Yanfly's Ace Save Engine
#class Window_FileStatus < Window_Base
# def draw_save_gold(dx, dy, dw)
# return if @header[:party].nil?
# draw_currency_value(@header[:party].gold.group.to_i, Vocab::currency_unit, + SPIKE::GOLD::ICON_POS, dy, contents.width - SPIKE::GOLD::ICON_POS - 8)
# end
#end

class Game_Interpreter; include SPIKE::GOLD;
end

 

 

 

3 Denomination Script (1:10):

 

=begin
#===============================================================================
# Spike's Engine - Monetary System
#
# Version: 1.01
# Author: Chris Barnett
# Date: March 26th, 2012
# Credit: Give credit where credit is due :)
#===============================================================================
# Description:
#
# This script displays currency values in terms of Copper, Silver, Gold, and
# Platinum coins. It doesn't actually change the way gold works in any way,
# only the way it is displayed.
#===============================================================================
# Instructions:
#
# Place this script above Main and below default scripts in the Script Editor.
# If you plan to integrate with Modern Algebra's Special Message Codes it
# would probably be wise to place this this script above it.
#
# You'll need to insert images for the coins into your IconSet resource. At
# the moment the script requires the coin's icon indices to be in sequential
# order, starting with the most valuable. I may unwrap the for loop if there
# seems to be a need to assign non sequential icon indices.
#
# You will then need to set ICON to the icon index of the least valuable coin.
#
# To integrate with Modern Algebra's Special Message Codes, Just paste
# the lines below into the icons section of convert_escape_characters
#
result.gsub!(/\iSMC/i) { "\i\[#{::SPIKE::GOLD::ICON}\]" rescue "" }
result.gsub!(/\iSMS/i) { "\i\[#{::SPIKE::GOLD::ICON-1}\]" rescue "" }
result.gsub!(/\iSMG/i) { "\i\[#{::SPIKE::GOLD::ICON-2}\]" rescue "" }
result.gsub!(/\iSMP/i) { "\i\[#{::SPIKE::GOLD::ICON-3}\]" rescue "" }
#
# To call up the icons in a message box use the following escape sequences.
#
# \iSMC for Copper
# \iSMS for Silver
# \iSMG for Gold
# \iSMP for Platinum
#
# NOTE!!! If you have any issues with this, please don't bother Modern Algebra
# about it. He already spent his time writing Special Message Codes and
# probably a fair amount of time answering questions about it. If you need
# assistance, please contact me directly. I am plenty willing to help.
#===============================================================================
# Known Bugs:
#
# A compatibility issue with Yanfly's Ace Save Engine has been reported
# but not yet confirmed. If you experience troubles, please let me know.
#===============================================================================
=end

$imported = {} if $imported.nil?
$imported["SE-Money"] = true

module SPIKE
module GOLD
BATTLE_ALIGN = 1 # Change to non 0 to push icons to the right when receiving loot in battle
ICON_POS = 8 # Increase to push icons right, decrease to pull left
TEXT_POS = -8 # Increase to push text right, decrease to pull left
OFFSET = -42 # Decrease to spread coins apart, increase to draw them closer
ICON = 531 # Change this to the icon index of the least valuable coin
HEIGHT = 0 # Increase to raise coins, decrease to lower
end
end

class Window_Base < Window
def draw_currency_value(value, unit, x, y, width)
value *= -1 if value < 0
pos = ::SPIKE::GOLD::ICON_POS
for i in 0..2
change = value if i == 2
change = value % 10 if i != 2
value /= 10
draw_icon(SPIKE::GOLD::ICON - i,width + pos + SPIKE::GOLD::OFFSET, y - SPIKE::GOLD::HEIGHT)
draw_text(x + SPIKE::GOLD::TEXT_POS, y, width + pos, line_height, change, 2)
pos += ::SPIKE::GOLD::OFFSET
end
end
end

class Game_Party < Game_Unit
def max_gold
return 9999
end
def gain_gold(amount)
@gold = [[@gold + amount, 0].max, max_gold].min
end
def gold
return @gold
end
end

class Window_ShopBuy < Window_Selectable
def draw_currency_value(value, unit, x, y, width)
value *= -1 if value < 0
pos = SPIKE::GOLD::ICON_POS
for i in 0..2
change = value if i == 2
change = value % 10 if i != 2
value /= 10
if change != 0
draw_icon(SPIKE::GOLD::ICON - i,width + pos + SPIKE::GOLD::OFFSET, y - SPIKE::GOLD::HEIGHT)
draw_text(x + SPIKE::GOLD::TEXT_POS, y, width + pos, line_height, change, 2)
pos += SPIKE::GOLD::OFFSET
end
end
end
def draw_item(index)
item = @data[index]
rect = item_rect(index)
draw_item_name(item, rect.x, rect.y, enable?(item))
draw_currency_value(price(item), Vocab::currency_unit, rect.x + 4, rect.y, contents.width - SPIKE::GOLD::ICON_POS - 8)
end
end

class Window_ShopNumber < Window_Selectable
def draw_currency_value(value, unit, x, y, width)
value *= -1 if value < 0
pos = SPIKE::GOLD::ICON_POS
for i in 0..2
change = value if i == 2
change = value % 10 if i != 2
value /= 10
if change != 0
draw_icon(SPIKE::GOLD::ICON - i,width + pos + SPIKE::GOLD::OFFSET, y - SPIKE::GOLD::HEIGHT)
draw_text(x + SPIKE::GOLD::TEXT_POS, y, width + pos, line_height, change, 2)
pos += ::SPIKE::GOLD::OFFSET
end
end
end
end

module BattleManager
def self.gain_gold
if $game_troop.gold_total > 0
value = $game_troop.gold_total
result = ''
for i in 0..2
change = value if i == 2
change = value % 10 if i != 2
value /= 10
if change != 0
if SPIKE::GOLD::BATTLE_ALIGN == 0
result = ('\i[' + (::SPIKE::GOLD::ICON - i).to_s + ']' + change.to_s + ' ') + result
else
result = (change.to_s + '\i[' + (::SPIKE::GOLD::ICON - i).to_s + '] ') + result
end
end
end
$game_message.add('Found ' + result + '\.')
$game_party.gain_gold($game_troop.gold_total)
end
wait_for_message
end
end

# Uncomment for compatability with Yanfly's Ace Save Engine
#class Window_FileStatus < Window_Base
# def draw_save_gold(dx, dy, dw)
# return if @header[:party].nil?
# draw_currency_value(@header[:party].gold.group.to_i, Vocab::currency_unit, + SPIKE::GOLD::ICON_POS, dy, contents.width - SPIKE::GOLD::ICON_POS - 8)
# end
#end

class Game_Interpreter; include SPIKE::GOLD;
end

 

 

Requirements:
None.

NOTE!!!
If you have any issues integrating Special Message Codes with this, please don't bother modern algebra about it. He already spent his time writing Special Message Codes and probably a fair amount of time answering questions about it. If you need assistance, please contact me directly. I am plenty willing to help.

Edited by Chris Barnett

Share this post


Link to post
Share on other sites

Great script - this is exactly what I needed :D

 

One question though: would it be possible to change it so that the gold window (not the shop window) will show 0 for denominations that there's nothing in, instead of hiding the icon? For example, 0 platinum, 15 gold, 0 silver, 50 copper.

Edited by Shadow Rebirth

Share this post


Link to post
Share on other sites

Great script - this is exactly what I needed :D

 

One question though: would it be possible to change it so that the gold window (not the shop window) will show 0 for denominations that there's nothing in, instead of hiding the icon? For example, 0 platinum, 15 gold, 0 silver, 50 copper.

Thanks for the feedback. Not only is is possible, it's done! ;)

 

I did find a bug in the script. I completely forgot to script anything for the battles, so the end of battle summary still had the old "X GP Found" style. I've since fixed this, but the script now requires modern algebra's Special Message Codes. Updating OP.

Share this post


Link to post
Share on other sites

Thanks, that looks great!

 

Also, I just noticed that this isn't quite compatible with Yanfly's Shop Options script. Specifically, in the receipt window the subtraction line show up like this:

 

shopwindow.png

Edited by Shadow Rebirth

Share this post


Link to post
Share on other sites

Also, I just noticed that this isn't quite compatible with Yanfly's Shop Options script. Specifically, in the receipt window the subtraction line show up like this:

 

Fixed

Share this post


Link to post
Share on other sites

Hello, I love the script and I would like to use it, however I can’t seem to figure out where to place the ICON IDs in the script. I have copied the code sections into the required script section (modern algebras script). When I run the game the icons are some random ones picked out of thin air. I am using an Icon Set that has 10688 icons, just not sure where to place the icons i plan on using. Any help would be great, thanks for the great script.

Share this post


Link to post
Share on other sites

it doesnt seam to work with yanflys save menu (the save menu doesnt show the icons and just adds G to the end of the gold value

Thanks for the bug report Pheebes. I'll have to grab yanflys save menu and get to work. Also, thanks for pointing Joyrexjrl in the right direction.

Hello, I love the script and I would like to use it, however I can’t seem to figure out where to place the ICON IDs in the script. I have copied the code sections into the required script section (modern algebras script). When I run the game the icons are some random ones picked out of thin air. I am using an Icon Set that has 10688 icons, just not sure where to place the icons i plan on using. Any help would be great, thanks for the great script.

Even though Pheebes already answered this, I'm going to address it in more detail as it's possible the line number might change in the future. The following line of the script will need to be altered according to your IconSet. If you don't know the icon index for your "Copper Coin" you can find it by entering any icon selector in the database editor. The icon index will be displayed in the lower left corner.

ICON = 364    # Change this to the icon index of the least valuable coin

Also note these instructions

# At the moment the script requires the coin's icon indices to be in sequential order, starting with the most valuable.

Share this post


Link to post
Share on other sites

it doesnt seam to work with yanflys save menu (the save menu doesnt show the icons and just adds G to the end of the gold value

 

Fixed. I've rewritten a bit of his script and included it at the end of mine. Just un-comment the lines at the bottom. Let me know if you see any problems. My testing was less than extensive. =P

Share this post


Link to post
Share on other sites

I'm not experiencing any issues like that on my end. It could be a compatibility issue. Are you using any other scripts that change the way gold is handled or displayed?

 

Just to be sure, I've re-uploaded the script.

Share this post


Link to post
Share on other sites

ah yes, thanks for the assistance. love the script, had to do some tile set editing to get the icons i needed for the currency.

Thanks for the feedback. Glad you were able to get it setup. If you notice any issues while using it, don't hesitate to let me know. :)

 

errrr i have 9999999 gold but when saved it only shows 9 gold

Could you take a screen cap of it? I think I know what you mean, but I want to make sure we're on the same page.

Edited by Chris Barnett

Share this post


Link to post
Share on other sites

yeah!!! that's awesome!!! but i only want copper, silver and gold coins without platinum. how can i change this?

This, really. Would it be possible?

Share this post


Link to post
Share on other sites

Hi there, friendly no-post lurker here.

Usually, I try to work around any/all of my problems regarding scripts. However, this time I'm actually going to try asking for some help:

Do you think that you could make this script compatible with Zylos' One-Person menu (over on RMRK)? The problem that I'm having, is that I only seem to be able to see the value of the lowest-ranked coin (i.e the money display is reduced to two digits).

Not being a scripter *at all*, I'm not sure whether I should be asking you or Zylos with his menu script, but thanks (in advance) for hearing me out

- Ebon

Share this post


Link to post
Share on other sites

yeah!!! that's awesome!!! but i only want copper, silver and gold coins without platinum. how can i change this?

This, really. Would it be possible?

 

Since this seems to at least a somewhat common request, I've made a version of the script for 3 denominations and updated the OP. I have not tested it for compatibility so let me know if it doesn't play nice with other scripts.

Share this post


Link to post
Share on other sites

Hi there, friendly no-post lurker here.

Usually, I try to work around any/all of my problems regarding scripts. However, this time I'm actually going to try asking for some help:

Do you think that you could make this script compatible with Zylos' One-Person menu (over on RMRK)? The problem that I'm having, is that I only seem to be able to see the value of the lowest-ranked coin (i.e the money display is reduced to two digits).

Not being a scripter *at all*, I'm not sure whether I should be asking you or Zylos with his menu script, but thanks (in advance) for hearing me out

- Ebon

 

I'll have to grab the script and take a look before I can make any promises. I'm currently waiting for the activation email for the account I just created there. As to whom you should be asking, I'm probably the right guy as my script will likely need to loaded after Zylo's, thus putting the onus of compatibility on me if compatibility is to be had. I can't make any claims to knowledge on that front though, having not seen the script yet.

Share this post


Link to post
Share on other sites

I'll have to grab the script and take a look before I can make any promises. I'm currently waiting for the activation email for the account I just created there.

 

For some reason I am unable to receive the activation email from RMRK. I've had it resent a couple times and still nothing. Would it be possible for you to PM or email me the script Ebon?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×