Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ==============================================================================
- # ▼▼▼▼▼▼ TroyZ - Currency Display Mods ▼▼▼▼▼▼
- # ==============================================================================
- # Script by : Agung Prasetyo(TroyZ)
- # Contact me by : - Email agung.endisnear.xyz@gmail.com
- # - Forum RPGMakerID, username TroyZ
- # - Handphone 085756289121
- # Engine : VXAce
- # Level : Easy
- # Version : 1.0
- # ------------------------------------------------------------------------------
- # Change Logs :
- # 13 June 2013 : Version 1.0 released
- # ------------------------------------------------------------------------------
- # How this work :
- # This little script will give you an ability to alter how to show the gold in
- # the menu, in the shop, and also when gold window popup using \$.
- # ------------------------------------------------------------------------------
- # How to use :
- # Place it between material and main. Choose your currency mode :
- # 1. Mode 1, the currency will be drawn normally with the unit.
- # 2. Mode 2, the currency will be drawn with currency icon and without the unit.
- # 3. Mode 3, the currency will be drawn with currency icon and its unit.
- # If you use either mode 2 or 3, you'll need to specifiy the currency icon inside
- # the module
- # ------------------------------------------------------------------------------
- # Compatibility issues :
- # I haven't get any compatibility issues actually. It works with almost many
- # menu engine, as long they didn't also alter the Window_Gold.
- # ------------------------------------------------------------------------------
- # Who to credit :
- # - Allah swt. : For the chance of living that he has given to me.
- # - Nabi Muhammad saw. : As a leader and messenger and prophet of Muslim.
- # I'm proud to be your follower. :)
- # - Agung Prasetyo(TroyZ) : Thats me, of course, the ones that made this script. :P
- # ------------------------------------------------------------------------------
- # License :
- # - Free Game : Just credit those names above.
- # - Commercial Game : Same as free game's license.
- # ------------------------------------------------------------------------------
- $imported = {} if $imported.nil?
- $imported[:TroyZ_CurrencyDisplayMods] = true
- # ------------------------------------------------------------------------------
- # Configuration of script starts here
- # ------------------------------------------------------------------------------
- module AGUNG
- CURRENCY_MODE = 1 # change this number into currency mode that suit your needs
- CURRENCY_ICON = 361 # only applies to mode 2 and 3. specify the currency icon index
- end
- # ------------------------------------------------------------------------------
- # End of Configuration
- # ------------------------------------------------------------------------------
- class Window_Base < Window
- # ----------------------------------------------------------------------------
- # New method, for currency mode 2
- # ----------------------------------------------------------------------------
- def draw_currency_value_without_unit(value, x, y, width)
- cx = text_size(value).width
- change_color(normal_color)
- draw_text(x, y, width - 2, line_height, value, 2)
- change_color(system_color)
- end
- end
- class Window_Gold < Window_Base
- # ----------------------------------------------------------------------------
- # Overwrite refresh
- # ----------------------------------------------------------------------------
- include AGUNG
- def refresh
- contents.clear
- case CURRENCY_MODE
- when 1
- draw_currency_value(value, currency_unit, 4, 0, contents.width - 8)
- when 2
- draw_currency_value_without_unit(value, 4, 0, contents.width - 8)
- draw_icon(CURRENCY_ICON,0,0)
- when 3
- draw_currency_value(value, currency_unit, 4, 0, contents.width - 8)
- draw_icon(CURRENCY_ICON,0,0)
- end
- end
- end
- # ------------------------------------------------------------------------------
- # END OF SCRIPT
- # ------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement