=begin #=============================================================================== Title: Battle Test Profiles Author: Hime Date: Mar 19, 2014 -------------------------------------------------------------------------------- ** Change log Mar 19, 2014 - Initial release -------------------------------------------------------------------------------- ** Terms of Use * Free to use in commercial/non-commercial projects * No real support. The script is provided as-is * Will do bug fixes, but no compatibility patches * Features may be requested but no guarantees, especially if it is non-trivial * Credits to Hime Works in your project * Preserve this header -------------------------------------------------------------------------------- ** Description This script allows you to create "battle test profiles" which will be used to set up your battle test rather than the default battle test UI. A battle test profile is simply a troop event page. You can specify any number of actors that will participate in the battle, use event commands to set up their levels, equips, and any other custom data provided by other scripts that the battle test UI does not support. By putting together a battle test setup event, you can store different test profiles as separate pages, allowing you to re-use them for future tests. Utilized fully, you can greatly cut down battle testing time. -------------------------------------------------------------------------------- ** Installation Place this script below Materials and above Main -------------------------------------------------------------------------------- ** Usage Start by creating a comment on your troop event page and write This will tell the engine that this page is used for setting up your battle test. You should have it run on turn 0 because it doesn't run automatically. Now you want to add some actors to your test battle party using the "change party" event command. Any actors that you add will appear in the test battle. You can then do anything you want, such as changing their levels and equips, adding states, and so on. If you want to save this test profile, simply remove the comment at the top so the engine doesn't automatically try to read it. #=============================================================================== =end $imported = {} if $imported.nil? $imported[:TH_BattleTestProfiles] = true #=============================================================================== # ** Configuration #=============================================================================== module TH module Battle_Test_Profiles Regex = //im end end #=============================================================================== # ** Rest of script #=============================================================================== class Game_Party < Game_Unit def battle_test_actors return @battle_test_actors if @battle_test_actors @battle_test_actors = [] pages = $data_troops[$data_system.test_troop_id].pages pages.each do |page| cmd = page.list[0] if cmd.code == 108 && cmd.parameters[0] =~ TH::Battle_Test_Profiles::Regex page.list.each do |cmd| if cmd.code == 129 @battle_test_actors << cmd.parameters[0] end end end end return @battle_test_actors end #----------------------------------------------------------------------------- # Replaced. Pulls actors from the list of actors from the config #----------------------------------------------------------------------------- def setup_battle_test_members battle_test_actors.each do |id| actor = $game_actors[id] actor.recover_all add_actor(actor.id) end end alias :th_battle_test_profiles_max_battle_members :max_battle_members def max_battle_members $BTEST ? battle_test_actors.size : th_battle_test_profiles_max_battle_members end end