Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Different Gold Window
#1
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.

(Split gold display: Dubealex)
(Idea of the different icon depending of the amount: Jimme Reashu)

First import (or copy) the icons (gold1, ..., gold5) and replace the script Window_Gold...

Code:
#==============================================================================
# ■ Window_Gold
#------------------------------------------------------------------------------
#  ゴールドを表示するウィンドウです。
#==============================================================================

class Window_Gold < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype  # "Gold" window font
    self.contents.font.size = $defaultfontsize
    refresh
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
  end
end

...with that:

Code:
#-----------------------------------------------------------------
class Window_Gold < Window_Base
#-----------------------------------------------------------------
  def initialize
    super(0, 0, 160, 64)
    self.contents = Bitmap.new (width - 32, height - 32)
    self.contents.font.size = $defaultfontsize
    self.contents.font.name = $defaultfonttype
    refresh
  end
#-----------------------------------------------------------------
  def refresh
    self.contents.clear
    if $game_party.gold < 1
      icon = RPG::Cache.icon("")
    elsif $game_party.gold < 100
      icon = RPG::Cache.icon("gold1")
    elsif $game_party.gold < 250
      icon = RPG::Cache.icon("gold2")
    elsif $game_party.gold < 500
      icon = RPG::Cache.icon("gold3")
    elsif $game_party.gold < 1000
      icon = RPG::Cache.icon("gold4")
    else
      icon = RPG::Cache.icon("gold5")
    end
    gold = $game_party.gold.to_s
    unless gold.size > 4
      money = gold
    else
      case gold.size
      when 5
        ary = gold.slice!(0,2)
        money = ary + ","+ gold
      when 6
        ary = gold.slice!(0,3)
        money = ary + ","+ gold
      when 7
        ary1 = gold.slice!(0,4)
        ary2 = ary1.slice!(1,4)
        money = ary1 + ","+ ary2 +","+ gold
      end
    end
    self.contents.draw_text (0,0,104,32,money.to_s,2)
    self.contents.blt(104,5,icon, Rect.new(0,0,24,24))
  end
#-----------------------------------------------------------------
end
#-----------------------------------------------------------------

Note: If you use a different gold window in other script (like a custom menu) copy my script into it.
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Display a gold window on the map Chronic_NG 0 2,734 12-04-2006, 01:00 PM
Last Post: Chronic_NG
  Description Window Caldaron 0 2,521 10-09-2006, 01:00 PM
Last Post: Caldaron
  Coordinate Window on the map Slanter 0 2,283 08-29-2006, 01:00 PM
Last Post: Slanter
  Location Window Eccid 0 2,077 09-11-2005, 01:00 PM
Last Post: Eccid
  New Command Window SephirothSpawn 0 1,911 07-15-2005, 01:00 PM
Last Post: SephirothSpawn
  Custom message window dragonslayer 0 2,123 03-25-2005, 01:00 PM
Last Post: dragonslayer
  Floating Window gatene 0 1,979 03-22-2005, 01:00 PM
Last Post: gatene
  Advanced Gold Display Dubealex 0 2,372 02-12-2005, 01:00 PM
Last Post: Dubealex



Users browsing this thread: