The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => VXA Scripts Database => Topic started by: tSwitch on April 13, 2012, 04:36:38 PM

Title: [VXA] NAM's Random Battle Transitions
Post by: tSwitch on April 13, 2012, 04:36:38 PM
NAM'S Random Battle Transitions
Version: 1.0
Author: NAMKCOR
Date: 04/13/2012

Version History



<Version 1.0> - First Release


Planned Future Versions

none

Description


With simple configuration, you too can have a myriad number of random battle transitions for your RPG Maker VX Ace title.

Features

Easily set up as many random battle transitions as you want[/li][/list]

Screenshots

Battle transitions are animated, and I don't have the time to make a .gif, so you don't get any >:C


Instructions

Configuration:
Ensure that all of your BattleStart graphics are named as follows: BattleStart_X.png, where X is the number.
Example: if we had 3 BattleStart graphics, I would name them:

BattleStart_1.png
BattleStart_2.png
BattleStart_3.png


At Configuration Point A (labeled in the script), set the 'return' value to the number of BattleStart graphics in your Graphics/System folder.

Script


Code: [Select]
#==============================================================================
# ** NAMKCOR's Random Battle Transition
#------------------------------------------------------------------------------
#  Override to the standard Scene_Map to allow for random selection of
#  multiple battle transition graphics.
#
#  Configuration:
#  > Ensure that all of your BattleStart graphics are named as follows:
#    BattleStart_X.png, where X is the number.
#
#  > Example: if we had 3 BattleStart graphics, I would name them:
#    BattleStart_1.png, BattleStart_2.png, and BattleStart_3.png
#
#  > At Configuration Point A, set the 'return' value to the number
#    of BattleStart graphics in your System folder.
#==============================================================================

module NAMKCOR
 
  #============================================================================
  # Configuration Point A
  #============================================================================
  def self.battle_transition_count
    return 10
  end
 
#==============================================================================
# DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING!
# YOU HAVE BEEN WARNED!
#==============================================================================
 
  def self.battle_transition_graphic
    return "Graphics/System/BattleStart_" +
           (rand(battle_transition_count) + 1).to_s
  end

end

class Scene_Map < Scene_Base
  def perform_battle_transition
    Graphics.transition(60, NAMKCOR.battle_transition_graphic, 100)
    Graphics.freeze
  end
end

Support


Please message me here on RMRK, or at Rockman922@hotmail.com for support.

Known Compatibility Issues

none.

Demo


This script should be easy enough to set up, but if people end up needing a demo, I'll upload one.

Terms of Use


 :ccbyncsa:
Title: Re: [VXA] NAM's Random Battle Transitions
Post by: Mushu on April 16, 2012, 03:42:59 PM
I needed this. I was trying to pick one battle transition over another and was getting a headache.
Title: Re: [VXA] NAM's Random Battle Transitions
Post by: tSwitch on March 19, 2014, 06:41:26 PM
Linking to a solution to an encryption-based problem that another user contacted me about.

RPG Maker Web (http://forums.rpgmakerweb.com/index.php?/topic/25141-random-battle-transitions-script-leads-to-crash-on-encryption/#entry240954).

Just on the off chance that someone needs it here.