Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ╔══════════════════════════════════════════════════════╤═══════╤════════════╗
- # ║ Flashing TP Gauge │ v1.00 │ (11/21/14) ║
- # ╠══════════════════════════════════════════════════════╧═══════╧════════════╣
- # ║ Author : William Couillard ║
- # ║ Thanks : Galv (http://galveraxe.wordpress.com) ║
- # ║ E-Mail : cooliebk18@yahoo.com ║
- # ║ Website : http://ffdiscovery.wikia.com ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ ABOUT ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ This script changes the behavior of the TP gauge to begin flashing when ║
- # ║ it is filled to a certain amount. ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ TERMS OF USE ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ ► Do not edit the script's header or comments. ║
- # ║ ► Free to use in commercial projects as long as proper credit is given to ║
- # ║ ALL the names in the above header. ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ FEATURES ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ ► Allow the TP gauge to begin flashing once it reaches a certain amount. ║
- # ║ ► User can set the amount of TP needed to begin flashing. ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ KNOWN ISSUES ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ ► This script may not be compatible with scripts that overwrite the ║
- # ║ draw_actor_tp method in Window_Base. ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ CHANGE LOG ║
- # ╠═════════════════════════════════════════════════════════════════╤═════════╣
- # ║ ■ November 21, 2014 : Initial release. │ (v1.00) ║
- # ╠═════════════════════════════════════════════════════════════════╧═════════╣
- # ║ NEXT VERSION ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ ■ Compatibility with scripts displaying TP gauges in menus. ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ OVERWRITTEN METHODS ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ This script overwrites a method in Window_Base. ║
- # ╟───────────────────────────────────────────────────────────────────────────╢
- # ║ ■ class Window_Base < Window ║
- # ║ ► def draw_actor_tp ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ ALIASED METHODS ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ This script alises two methods in Scene_Battle. ║
- # ╟───────────────────────────────────────────────────────────────────────────╢
- # ║ ■ class Scene_Battle < Scene_Base ║
- # ║ ► def update ║
- # ║ ► def update_for_wait ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ NEW METHODS ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ There is a single new method introduced in this script. ║
- # ╟───────────────────────────────────────────────────────────────────────────╢
- # ║ ■ class Window_Base < Window ║
- # ║ ► def random_tp_gauge_color ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ INSTRUCTIONS ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ Simply paste this script anywhere ABOVE the Main Process script and BELOW ║
- # ║ Scene_Battle. ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ IMPORT SETTING ║
- # ╚═══════════════════════════════════════════════════════════════════════════╝
- $imported = {} if $imported.nil? # Do not edit
- $imported["WC-Flashing_TP_1.00"] = true # Do not edit
- # ╔═══════════════════════════════════════════════════════════════════════════╗
- # ║ CUSTOMIZATION MODULE ║
- # ╚═══════════════════════════════════════════════════════════════════════════╝
- module COOLIE
- module FLASH_TP
- # ╔═══════════════════════════════════════════════════════════════════════╗
- # ║ The color IDs below will make up the flashing gauge ║
- # ║ Example: use any IDs from 0 to 31 ║
- # ╚═══════════════════════════════════════════════════════════════════════╝
- FLASH_TP_COLORS = [10, 18, 0, 14, 27]
- # ╔═══════════════════════════════════════════════════════════════════════╗
- # ║ The minimum amount of TP needed for the gauge to begin flashing ║
- # ║ Example: 100 ║
- # ╚═══════════════════════════════════════════════════════════════════════╝
- FLASH_TP_ACTIVATE = 100
- end # FLASH_TP
- end # COOLIE
- class Window_Base < Window
- # ╔═══════════════════════════════════════════════════════════════════════════╗
- # ║ New Method: Random TP Gauge Color ║
- # ╚═══════════════════════════════════════════════════════════════════════════╝
- def random_tp_gauge_color
- @cycle = rand(COOLIE::FLASH_TP::FLASH_TP_COLORS.count)
- return COOLIE::FLASH_TP::FLASH_TP_COLORS[@cycle]
- end # random_tp_gauge_color
- # ╔═══════════════════════════════════════════════════════════════════════════╗
- # ║ Overwrite Method: Draw Actor TP ║
- # ╚═══════════════════════════════════════════════════════════════════════════╝
- def draw_actor_tp(actor, x, y, width = 124)
- if actor.tp >= COOLIE::FLASH_TP::FLASH_TP_ACTIVATE
- draw_gauge(x, y, width, actor.tp_rate, text_color(random_tp_gauge_color), text_color(random_tp_gauge_color))
- else
- draw_gauge(x, y, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
- end # if
- change_color(system_color)
- draw_text(x, y, 30, line_height, Vocab::tp_a)
- change_color(tp_color(actor))
- draw_text(x + width - 42, y, 42, line_height, actor.tp.to_i, 2)
- end # draw_actor_tp
- end # Window_Base
- class Scene_Battle < Scene_Base
- # ╔═══════════════════════════════════════════════════════════════════════════╗
- # ║ Alias Method: Update ║
- # ╚═══════════════════════════════════════════════════════════════════════════╝
- alias flashing_tp_update update
- def update
- flashing_tp_update
- refresh_status
- end # update
- # ╔═══════════════════════════════════════════════════════════════════════════╗
- # ║ Alias Method: Update For Wait ║
- # ╚═══════════════════════════════════════════════════════════════════════════╝
- alias flashing_tp_update_for_wait update_for_wait
- def update_for_wait
- flashing_tp_update_for_wait
- refresh_status
- end # update_for_wait
- end # Scene_Battle
- # ╔═══════════════════════════════════════════════════════════════════════════╗
- # ║ END OF SCRIPT ║
- # ╚═══════════════════════════════════════════════════════════════════════════╝
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement