Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
Sign in to follow this  
EmilyAnnCoons

Gold Display Fix

Recommended Posts

This fixes the gold display so that, instead of showing as one big jumbled number, it adds commas! Just replace the ENTIRE refresh command in Window_Gold with the following:

 

def refresh

  #Advanced Gold Display mini-script by Dubealex.

  self.contents.clear

  case $game_party.gold
 when 0..999
   gold = $game_party.gold
 when 1000..9999
   gold = $game_party.gold.to_s
   array = gold.split(//)
   gold = array[0].to_s+","+array[1].to_s+array[2].to_s+array[3].to_s
 when 10000..99999
   gold = $game_party.gold.to_s
   array = gold.split(//)
   gold = array[0].to_s+array[1].to_s+","+array[2].to_s+array[3].to_s+array[4].to_s
 when 100000..999999
   gold = $game_party.gold.to_s
   array = gold.split(//)
   gold = array[0].to_s+array[1].to_s+array[2].to_s+","+array[3].to_s+array[4].to_s+array[5].to_s
 when 1000000..9999999
   gold = $game_party.gold.to_s
   array = gold.split(//)
   gold = array[0].to_s+","+array[1].to_s+array[2].to_s+array[3].to_s+","+array[4].to_s+array[5].to_s+array[6].to_s
 end

  self.contents.font.color = text_color(6)
  gold_word = $data_system.words.gold.to_s + ":"
  cx = contents.text_size(gold_word).width
  cx2=contents.text_size(gold.to_s).width
  self.contents.draw_text(4, 0, 120-cx-2, 32, gold_word)
  self.contents.font.color = text_color(0)
  self.contents.draw_text(124-cx2+2, 0, cx2, 32, gold.to_s, 2)
end
end

 

You can even edit the text color by finding

self.contents.font.color = text_color(6)

and changing the number that is in the parentheses ()

Share this post


Link to post
Share on other sites

Give credit where credit is due, thats just common respect...

Share this post


Link to post
Share on other sites

err...whoops...I thought I had -goes and fixes it- Thanks for noticing.

 

EDIT: Also...I just noticed, line 3 of the script says

#Advanced Gold Display mini-script by Dubealex.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...