Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #------------------------------------------------------------------------------
- # ?????ADON237 RANDOM BATTLE TRANSITIONS?????
- # Date Created: 7/25/2015
- #------------------------------------------------------------------------------
- # Description: Simple scriptlet that allows for pre-defined randomized
- # battle transitions. Also allows for a variable determining which battle
- # transition is used granted it is not 0.
- # It's basically a bunch of conditional statements.
- #------------------------------------------------------------------------------
- # Notes: Should be compatible with most any script granted that it isn't
- # drastically rewriting Scene_Map, specifically perform_battle_transition.
- # THERE MAY BE AN ISSUE WITH BATTLE_TRANSITION_5 NEVER BEING PICKED!
- # JUST A WARNING, BUT IT'S NOT DEFINITE EITHER.
- #------------------------------------------------------------------------------
- # CONFIGURATION
- # Replace in the Double Quotes (" ") what images you want loaded as transitions.
- # Supported up to 5 different transitions, but you can easily add more.
- #------------------------------------------------------------------------------
- module ADONRBT
- BATTLE_TRANSITION_1 = "Graphics/System/BattleStart"
- BATTLE_TRANSITION_2 = "Graphics/System/BattleStart2"
- BATTLE_TRANSITION_3 = "Graphics/System/BattleStart3"
- BATTLE_TRANSITION_4 = "Graphics/System/BattleStart4"
- BATTLE_TRANSITION_5 = "Graphics/System/BattleStart5"
- #------------------------------------------------------------------------------
- # If your TRANSITION_VARIABLE has a value that is a non-zero natural number
- # between 1 and 5, the battle transition will be whatever is set in that battle
- # transition #.
- #------------------------------------------------------------------------------
- # Ex: TRANSITION_VARIABLE[96] is set to 3, the BattleStart graphic will be
- # BattleStart3.
- #------------------------------------------------------------------------------
- # If TRANSITION_VARIABLE has a value 0, a random choice will be made from the
- # predefined battlestart graphics. If it's at 6 or some other number not
- # between 0-5, the default BattleStart graphic will be used.
- #------------------------------------------------------------------------------
- # If you ONLY WANT your battle transitions to be randomized, please set
- # TRANSITION_VARIABLE to 0 in the configuration.
- #------------------------------------------------------------------------------
- TRANSITION_VARIABLE = 96 # Set to 0 if you only want battlestarts randomized.
- end
- # End of Configuration
- #------------------------------------------------------------------------------
- class Scene_Map < Scene_Base
- include ADONRBT
- #--------------------------------------------------------------------------
- # ? Transition Performed Before Battle Starts
- #--------------------------------------------------------------------------
- def perform_battle_transition
- if $game_variables[TRANSITION_VARIABLE] == 0
- $game_variables[TRANSITION_VARIABLE] = rand(5)
- if $game_variables[TRANSITION_VARIABLE] == 1
- Graphics.transition(60, BATTLE_TRANSITION_1, 100)
- Graphics.freeze
- elsif $game_variables[TRANSITION_VARIABLE] == 2
- Graphics.transition(60, BATTLE_TRANSITION_2, 100)
- Graphics.freeze
- elsif $game_variables[TRANSITION_VARIABLE] == 3
- Graphics.transition(60, BATTLE_TRANSITION_3, 100)
- Graphics.freeze
- elsif $game_variables[TRANSITION_VARIABLE] == 4
- Graphics.transition(60, BATTLE_TRANSITION_4, 100)
- Graphics.freeze
- elsif $game_variables[TRANSITION_VARIABLE] == 5
- Graphics.transition(60, BATTLE_TRANSITION_5, 100)
- Graphics.freeze
- elsif $game_variables[TRANSITION_VARIABLE] == 0
- Graphics.transition(60, BATTLE_TRANSITION_5, 100)
- Graphics.freeze
- end
- $game_variables[TRANSITION_VARIABLE] = 0
- elsif $game_variables[TRANSITION_VARIABLE] == 1
- Graphics.transition(60, BATTLE_TRANSITION_1, 100)
- Graphics.freeze
- elsif $game_variables[TRANSITION_VARIABLE] == 2
- Graphics.transition(60, BATTLE_TRANSITION_2, 100)
- Graphics.freeze
- elsif $game_variables[TRANSITION_VARIABLE] == 3
- Graphics.transition(60, BATTLE_TRANSITION_3, 100)
- Graphics.freeze
- elsif $game_variables[TRANSITION_VARIABLE] == 4
- Graphics.transition(60, BATTLE_TRANSITION_4, 100)
- Graphics.freeze
- elsif $game_variables[TRANSITION_VARIABLE] == 5
- Graphics.transition(60, BATTLE_TRANSITION_5, 100)
- Graphics.freeze
- else
- Graphics.transition(60, "Graphics/System/BattleStart", 100)
- Graphics.freeze
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement