Advanced Individual Battle Commands V4.2

I seriously like this script's functionality, suits my game style down to the ground.

The only thing I'd just like to check, is it possible to make it compatible with special characters in the names of skills?

For example, one of my characters is Norse-esque, and the magic command should read "Sei?r" but instead comes out "Seir" - and accented vowels similarly go missing.

I can use a different title for the moment, but he's got the ? in his name so I'd prefer to keep it in synch, if possible.

Even so, though - much applause and many thanks!

EDIT: and, of course, the symbol goes missing in my post, too. That should be the letter eth above.
[QUOTE=fortysixand2;212158]I seriously like this script's functionality, suits my game style down to the ground.

The only thing I'd just like to check, is it possible to make it compatible with special characters in the names of skills?

For example, one of my characters is Norse-esque, and the magic command should read "Sei?r" but instead comes out "Seir" - and accented vowels similarly go missing.

I can use a different title for the moment, but he's got the ? in his name so I'd prefer to keep it in synch, if possible.

Even so, though - much applause and many thanks!

EDIT: and, of course, the symbol goes missing in my post, too. That should be the letter eth above.[/QUOTE]

How about saving BattleCommands.rxdata as UTF-8? (It worked for Korean or Japanese, but I'm not sure for other language)
yeah loading info from a text file doesn't like those characters

for now use this code for a workaround

class Scene_Title
  alias_method :trick_rename_main, :main
  def main
    trick_rename_main
    #$data_commands[id].name = ""
    #code here
  end
end
Expand to see the code.


Goes in a new script above main

The Format for this is
$data_commands[id].name = aString
Expand to see the code.


replace id with the commands id and aString is a string object so an example of this would be

$data_commands[1].name = "OWN Seph!"
Expand to see the code.


This changes the name of the command to whatever you want also works for
.description, .help_text, and .name_set just set these to the same value from the text file for these for example

$data_commands[1].description = "This command owns Seph!!!11!!!111! lolz"
$data_commands[1].help_text = "LOL OMG SEPH IS OWNED!!!"
$data_commands[1].name_set = [['actor', {1 => 'I', 2 => 'OWN', 3 => 'SEPH'}]]
Expand to see the code.


...or Landarma's post would work
Well, I tried Landarma's suggestion, and it worked a charm! But, em, thanks anyways Trickster. You're a star. :D
Found it. This is script which mess all.

Content Hidden Spoiler
=begin
=========================================
Professional Title Screen ver. 2.0 English Translation
Script by パラ犬, Edited by Kio !! :D
http://rpg.para.s3p.net/
-->Released and translated by Sonicia.
Search for my name (Sonicia)for the customizing place where you can arange the
graphics where you want them. Please credit Kio, who orginally made this script
compatable, and me for translating, releasing, and finding out how to use it.
Note, in a few rare spots there is still Japanese, since it was code I didnt
change it for fear of messing it up. All comments are translated by Sonicia.

Note: you need continue.png, continue_active.png, newgame.png,
newgame_active.png, shutdown.png, and shutdown_active.png in your game's
graphics\title folder. The graphics must be the same size, both active and inactive.
This means that if you have an arrow or text make that one first, duplicate,
then erase the arrow and edit the rest of the picture or it will be set off.
=========================================

=========================================
Title menu picture
=========================================
=end
module PARA_TITLE_CUSTOM

# Menu command picture, (true/false)
IMG_MENU = true

#↓---Menu command picture Setting---
#Character string of menu command
#MENU_NEWGAME = ?new game? # new game
MENU_NEWGAME = "ニューゲーム" # ニューゲーム
#MENU_LOAD = ?continuing? # continuing
MENU_LOAD = "コンティニュー" # コンティニュー
#MENU_END = ?shutdown? # shutdown
MENU_END = "シャットダウン" # シャットダウン

# window frame (true/false)
WINDOW_TRANS = false
#Transparency of the window frame
WINDOW_OPACITY = 160

#Side size (horizontal?) of # window
WINDOW_WIDTH = 192
#Vertical position of window (0: Coordinate appointment/
#1: The left edge/2: Center/3: Right hand edge)
WINDOW_ALIGN = 2
#When # ?coordinate appointment? being, abscissa of the window
WINDOW_POS_X = 0
#Vertical position of # window (0: Coordinate appointment/
#1: Top/2: Center/3: Bottom)
WINDOW_VALIGN = 0
#When ?coordinate appointment? being, ordinate of the window
WINDOW_POS_Y = 288


#==========================================
=begin
Sonicia
Customize the location and the graphics make sure you change
only the numbers, 250 is approxamtely the center of
the vertical screen.
Make sure that the command pictures are in the ?Graphics/Titles? folder
=end
#==========================================
=begin
#New Game Graphic
IMG_NEWGAME = ["newgame","newgame_active"]
IMG_NEWGAME_X = 100 # Horizontal position
IMG_NEWGAME_Y = 160 # Vertical position
#Continue Graphic
IMG_LOAD = ["continue","continue_active"]
IMG_LOAD_X = 250 # Horizontal position
IMG_LOAD_Y = 160 # Vertical position
#Shut Down Graphic
IMG_END = ["shutdown","shutdown_active"]
IMG_END_X = 400 # Horizontal position
IMG_END_Y = 160 # Vertical position
=end
#My orginal settings for reference Copy and paste if you need to
#New Game Graphic
IMG_NEWGAME = ["newgame","newgame_active"]
IMG_NEWGAME_X = 250 # Horizontal position
IMG_NEWGAME_Y = 260 # Vertical position
#Continue Graphic
IMG_LOAD = ["continue","continue_active"]
IMG_LOAD_X = 250 # Horizontal position
IMG_LOAD_Y = 300 # Vertical position
#Shut Down Graphic
IMG_END = ["shutdown","shutdown_active"]
IMG_END_X = 250 # Horizontal position
IMG_END_Y = 340 # Vertical position


#END CUSTOMIZABLE AREA
#============================================
#Synthetic method of picture (0: Usually/1: Addition/2: Subtraction)
BLEND_TYPE = 0
end


#------------------------------------------------------------------------------

#======================================
# â–  Scene_Title
#======================================

class Scene_Title
#--------------------------------------------------------------------------
# - Main processing
#--------------------------------------------------------------------------
def main
#If battle test
if $BTEST
battle_test
return
end
# Load database
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
# Make system object
$game_system = Game_System.new
# Make title graphic
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
# Make command window
s1 = PARA_TITLE_CUSTOM::MENU_NEWGAME
s2 = PARA_TITLE_CUSTOM::MENU_LOAD
s3 = PARA_TITLE_CUSTOM::MENU_END
w = PARA_TITLE_CUSTOM::WINDOW_WIDTH
@command_window = Window_Command.new(w, [s1, s2, s3])
if PARA_TITLE_CUSTOM::WINDOW_TRANS
@command_window.opacity = 0
else
@command_window.back_opacity = PARA_TITLE_CUSTOM::WINDOW_OPACITY
end
# Position of the window
case PARA_TITLE_CUSTOM::WINDOW_ALIGN
when 0
@command_window.x = PARA_TITLE_CUSTOM::WINDOW_POS_X
when 1
@command_window.x = 0
when 2
@command_window.x = ( 640 - @command_window.width ) / 2
when 3
@command_window.x = 640 - @command_window.width
end
case PARA_TITLE_CUSTOM::WINDOW_VALIGN
when 0
@command_window.y = PARA_TITLE_CUSTOM::WINDOW_POS_Y
when 1
@command_window.y = 0
when 2
@command_window.y = ( 480 - @command_window.height ) / 2
when 3
@command_window.y = 480 - @command_window.height
end
# Continue enabled determinant
# Check if at least one save file exists
# If enabled, make @continue_enabled true; if disabled, make it false
@continue_enabled = true
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata")
@continue_enabled = true
end
end
# If continue is enabled, move cursor to "Continue"
# If disabled, display "Continue" text in gray
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
# Command Picture
if PARA_TITLE_CUSTOM::IMG_MENU
@command_window.visible = false
@command_img1 = Sprite.new
@command_img1.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img1.x = PARA_TITLE_CUSTOM::IMG_NEWGAME_X
@command_img1.y = PARA_TITLE_CUSTOM::IMG_NEWGAME_Y
@command_img2 = Sprite.new
@command_img2.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
@command_img2.x = PARA_TITLE_CUSTOM::IMG_LOAD_X
@command_img2.y = PARA_TITLE_CUSTOM::IMG_LOAD_Y
@command_img3 = Sprite.new
@command_img3.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])
@command_img3.x = PARA_TITLE_CUSTOM::IMG_END_X
@command_img3.y = PARA_TITLE_CUSTOM::IMG_END_Y
# If continue is enabled, move cursor to "Continue"
# If disabled, display "Continue" text in gray
if @continue_enabled
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[1])
else
@command_img2.opacity = 160
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[1])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
end
end
# Play title BGM
$game_system.bgm_play($data_system.title_bgm)
# Stop playing ME and BGS
Audio.me_stop
Audio.bgs_stop
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of command window
@command_window.dispose
if PARA_TITLE_CUSTOM::IMG_MENU
@command_img1.dispose
@command_img2.dispose
@command_img3.dispose
end
# Graphics Dispose
@sprite.bitmap.dispose
@sprite.dispose
end


#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # New game
command_new_game
when 1 # Continue
command_continue
when 2 # Shutdown
command_shutdown
end
end
if PARA_TITLE_CUSTOM::IMG_MENU
if Input.repeat?(Input::UP) or Input.repeat?(Input::DOWN)
case @command_window.index
when 0 # New Game
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[1])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])
when 1 # Continue Game
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[1])
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])
when 2 # End Game
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[1])
end
end
end
end
def command_new_game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Stop BGM
Audio.bgm_stop
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each type of game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
$Game_Globe = Game_Globe.new
$Game_Globe.add_world("Leran")
$Game_Globe.add_location(0, ["Herelt", 294, 57, 11, 16, 67])
# Set up initial party
$game_party.setup_starting_members
# Set up initial map position
$game_map.setup($data_system.start_map_id)
# Move player to initial position
$game_player.moveto($data_system.start_x, $data_system.start_y)
# Refresh player
$game_player.refresh
# Run automatic change for BGM and BGS set with map
$game_map.autoplay
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Command: Continue
#--------------------------------------------------------------------------
def command_continue
# If continue is disabled
unless @continue_enabled
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to load screen
$scene = Scene_Load.new
end
#--------------------------------------------------------------------------
# * Command: Shutdown
#--------------------------------------------------------------------------
def command_shutdown
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Fade out BGM, BGS, and ME
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# Shutdown
$scene = nil
end
#--------------------------------------------------------------------------
# * Battle Test
#--------------------------------------------------------------------------
def battle_test
# Load database (for battle test)
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Set up party for battle test
$game_party.setup_battle_test_members
# Set troop ID, can escape flag, and battleback
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
# Play battle start SE
$game_system.se_play($data_system.battle_start_se)
# Play battle BGM
$game_system.bgm_play($game_system.battle_bgm)
# Switch to battle screen
$scene = Scene_Battle.new
end
end
Expand to see the code.



Can you say me where the problem with this is?
umm yeah that script rewrites methods in Scene_Title which is going to turn off alot of new-game-type-data scripts like this one Scene_Title is one of the notorious places for errors because of that :p

Fortunately....
Paradog;s Custom Title
Thanks :) Now it works perfectly :)

EDIT: Uhm...if I would make a command which enables some skills, is possible to make that skills learnt by level?

Example: Your Demo's Fire Starter. Is possible to make that you have immediately Fire, Fire2 at level 25 and Fire3 at level 50?
Look at the demo's "Holy" skill to see how to do that.
No. Holy add all the skill at once.

EDIT: Nope, that's right...sorry and thanks :)
[QUOTE=WeissRaben;212459]Thanks :) Now it works perfectly :)

EDIT: Uhm...if I would make a command which enables some skills, is possible to make that skills learnt by level?

Example: Your Demo's Fire Starter. Is possible to make that you have immediately Fire, Fire2 at level 25 and Fire3 at level 50?[/QUOTE]

yes use the skills parameter you will have to use the Hash form of it

Quote:
The Skills Parameter
You may enter a string, an array, or a hash here

Array
This array contains all of the skill ids the command can use great for if you want certain skills for a command

String
Example skill.element_set.include?(1) will make the command contain all fire skills
the string holds a condition that is passed through each skill if true then the skill will be on the list

Hash
a bit more complicated but alot more powerful
Integer value case 1 { skill.id => value, skill.id => value}
in this case value is the minimum level required to use the skill

Array for value case 2 {skill.id => [v1,v2]}
in this case v1 is the minumum level required to use the skill and v2 is the actor id that can use the skill

String for value case 3 {skill.id => "condition"}
in this case the string condition is evaluated and if true then the skill can be used for more advanced effects


so in your case case 1 (Integer) or case 2 (Array) would be appropriate

the value would be

case 1 - {7 => 1, 8 => 25, 9 => 50}
case 2 - (7 => [1, actor_id], 8 => [25, actor_id], 9 => [50, actor_id]}

In the first case any actor with the command can have those skills if you don't want that to happen then choose case two and replace actor_id with the actor's id
[QUOTE=WeissRaben;212487]No. Holy add all the skill at once.[/QUOTE]
The demo characters are set in the database to start off at level 20, by which level all the Light skills have been learned.
Have started getting an error:

Script 'Windows' line 165: NoMethodError occurred.

undefined method `dispose' for nil:NilClass


It happens when I've selected a skill to use from one character's list and then go to open the next character's list. (Both lists set up to be learned by level using the hash.)
It doesn't help me one bit if you don't give me the line the error appears on

  # * Refresh
Expand to see the code.


That is my line 165
This is what I have for 165, copied straight from the demo I grabbed from your box.net link:
Quote:
164: # Dispose the contents and reset
165: self.contents.dispose
166: self.contents = nil


EDIT: Okay sorry, didn't have the latest version but so now - still have the same error, line 175 in Windows script for version 4.2.
what other scripts are you using mainly ones that mess with Window_Skill

since by the time the refresh method is called self.contents should already be a bitmap so there is a conflict somewhere.
= EDIT =
Scrub all that, I figured out the problem.

I checked and it was affecting only actor class #2 in my database. As I was planning to do all my skill-setup with the hash using this script and remove the normal skill window, I had removed all his normal level-learned skills in the DB. As soon as I set him to learn generic skill #1 at level 1 (which will never show as the skill window is hidden) the error disappeared.
I didn't know if I should post in this thread or the Conditional Turns CBS thread so I hope this is the right place. I'm using this script with your Conditional Turns CBS, DerVVulfman's Limit Break script, DerVVulfman's script that draws the limit break bar with your gradient bars, your Full MACL 2.0, and tons of other scripts. Anyway, I get this error after I select Fight in the Fight/Escape window in the beginning of battle:

Script 'Windows' line 30: NoMethodError occured.

undefined method `battle_commands' for nil:Nilclass

This is what I have on line 30:
return if @actor == actor and @commands == actor.battle_commands
Did you try changing the order of the scripts?

Can I see a demo of the scripts conflicting?
Ok here's an empty demo with all the scripts I use in the exact same order.

http://www.savefile.com/files/834984

I didn't have any problems before I updated the CBS and Advanced Battle Commands and got MACL 2.0 Full Pack.

Thank you in advance.:D
hmm, change the line causing the error to

return if @actor == nil || (@actor == actor && @commands == actor.battle_commands)
Expand to see the code.


that may work, but it is untested also It would help more if I had the required images in your demo I have been busy lately, sorry for the delayed reply
Ok, that fixed that problem but now when someone's time meter fills up a blank box appears in the upper right corner. Here's a screenshot to make things easier:

http://i148.photobucket.com/albums/s15/ ... battle.jpg[/IMG]

I tried pressing enter and it gave me this error:

http://i148.photobucket.com/albums/s15/ ... /Error.jpg[/IMG]

Thanks and I hope I'm not to much of a problem.
Would it be possible to merge this script with the Simple Escape Command script?
@Bearcat

Ok to merge any command adding scripts with this I'll use this as an example

delete the code in red take note of the code in blue

#==============================================================================
# ●● Simple Escape Command
#------------------------------------------------------------------------------
# Trickster ([email hidden])
# Version 1.0
# Date 4/2/07
# Goto rmxp.org for updates/support/bug reports
#------------------------------------------------------------------------------
# This script adds an Escape Command to the Battle Commands and when used
# It escapes from battle. Also removes the Attack Escape Window in battle (phase2)
#==============================================================================

#--------------------------------------------------------------------------
# Begin SDK Log
#--------------------------------------------------------------------------
SDK.log('Simple Escape Command', 'Trickster', 1.0, '4/2/07')

#--------------------------------------------------------------------------
# Begin SDK Requirement Check
#--------------------------------------------------------------------------
SDK.check_requirements(2.0, [1, 2, 3, 4])

#--------------------------------------------------------------------------
# Begin SDK Enabled Check
#--------------------------------------------------------------------------
if SDK.enabled?('Simple Escape Command')
 
class Scene_Battle
  [COLOR=Red]#--------------------------------------------------------------------------
  # * Main Window Delete anything in this method about the @actor_command_window since everything is about the command window delete the whole thing
  #--------------------------------------------------------------------------
  alias_method :trick_escape_battle_main_window, :main_window
  def main_window
    # The Usual
    trick_escape_battle_main_window
    # Get Commands
    commands = @actor_command_window.commands.dup
    # Push Escape
    commands << SDK::Scene_Commands::Scene_Battle::Escape
    # Push Escape
    @actor_command_window.commands = commands
  end
[/COLOR]
  #--------------------------------------------------------------------------
  # * Start Party Command Phase
  #--------------------------------------------------------------------------
  alias_method :trick_escape_battle_start_phase2, :start_phase2
  def start_phase2
    # The Usual
    trick_escape_battle_start_phase2
    # Disable party command window
    @party_command_window.active = false
    @party_command_window.visible = false
    # Start Phase 3
    start_phase3
  end
  [COLOR=Red]#--------------------------------------------------------------------------
  # * Command : Escape Not needed see the code in blue for the alternative
  #--------------------------------------------------------------------------
  def update_phase3_command_escape
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Set action
    @active_battler.current_action.kind = [COLOR=Blue]0[/COLOR]
    @active_battler.current_action.basic = [COLOR=Blue]2[/COLOR]
    # Go to command input for next actor
    [COLOR=Blue]phase3_next_actor[/COLOR]
  end[/COLOR]
  [COLOR=Red]#--------------------------------------------------------------------------
  # * Check Commands 99% of the time edits to this method are not needed so just delete it
  #--------------------------------------------------------------------------
  alias_method(:trick_escape_battle_phase3_basic_command_input,
    :phase3_basic_command_input)
  def phase3_basic_command_input
    # Return if no active battler
    return if @active_battler == nil
    # Call Original
    trick_escape_battle_phase3_basic_command_input
    # Loads Current Command
    command = @actor_command_window.command
    # Run Escape if command is escape
    if command == SDK::Scene_Commands::Scene_Battle::Escape
      update_phase3_command_escape
    end
  end[/COLOR]
  #--------------------------------------------------------------------------
  # * Make Basic Action Results
  #--------------------------------------------------------------------------
  alias_method(:trick_escape_battle_make_basic_action_result,
    :make_basic_action_result)
  def make_basic_action_result
    # The Usual
    trick_escape_battle_make_basic_action_result
    # If escape
    if (@active_battler.is_a?(Game_Actor) and
      @active_battler.current_action.basic == 2)
      make_basic_action_result_escape
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Make Basic Action Results - Escape
  #--------------------------------------------------------------------------
  def make_basic_action_result_escape
    # Setup Agi and number
    enemies_agi, enemies_number = 0, 0
    # Run Through Each Enemy
    $game_troop.enemies.each do |enemy|
      # Skip if non-existant
      next if not enemy.exist?
      # Add Agi
      enemies_agi += enemy.agi
      # Increase Number
      enemies_number += 1
    end
    # Calculate enemy agility average
    enemies_agi /= enemies_number.to_f if enemies_number > 0
    # Setup Agi and number
    actors_agi, actors_number = 0, 0
    # Run Through Each Actor
    $game_party.actors.each do |actor|
      # Skip if non-existant
      next if not actor.exist?
      # Add Agi
      actors_agi += actor.agi
      # Increase Number
      actors_number += 1
    end
    # Calculate actor agility average
    actors_agi /= actors_number.to_f if actors_number > 0
    # Get Chance
    chance = 50 * actors_agi / enemies_agi if @active_battler.is_a?(Game_Actor)
    chance = 50 * enemies_agi / actors_agi if @active_battler.is_a?(Game_Enemy)
    # Determine if escape is successful
    success = rand(100) < chance
    # If Actor
    if @active_battler.is_a?(Game_Actor)
      # If escape is successful and possible to escape
      if success and $game_temp.battle_can_escape
        # Play escape SE
        $game_system.se_play($data_system.escape_se)
        # Return to BGM before battle started
        $game_system.bgm_play($game_temp.map_bgm)
        # Battle ends
        battle_end(1)
      # If escape is failure
      else
        # Display Cannot Escape
        @help_window.set_text('Cannot Escape', 1)
      end
    # If Enemy
    else
      # If Escape is successful
      if success
        # Display "Escape" in help window
        @help_window.set_text('Escape', 1)
        # Escape
        @active_battler.escape
      else
        # Escape Failed
        @phase4_step = 1
      end
    end
  end
end
#--------------------------------------------------------------------------
# End SDK Enabled Check
#--------------------------------------------------------------------------
end
Expand to see the code.


already deleted version
Content Hidden Spoiler
#==============================================================================
# ●● Simple Escape Command
#------------------------------------------------------------------------------
# Trickster ([email hidden])
# Version 1.0
# Date 4/2/07
# Goto rmxp.org for updates/support/bug reports
#------------------------------------------------------------------------------
# This script adds an Escape Command to the Battle Commands and when used
# It escapes from battle. Also removes the Attack Escape Window in battle (phase2)
#==============================================================================

#--------------------------------------------------------------------------
# Begin SDK Log
#--------------------------------------------------------------------------
SDK.log('Simple Escape Command', 'Trickster', 1.0, '4/2/07')

#--------------------------------------------------------------------------
# Begin SDK Requirement Check
#--------------------------------------------------------------------------
SDK.check_requirements(2.0, [1, 2, 3, 4])

#--------------------------------------------------------------------------
# Begin SDK Enabled Check
#--------------------------------------------------------------------------
if SDK.enabled?('Simple Escape Command')
 
class Scene_Battle
  #--------------------------------------------------------------------------
  # * Start Party Command Phase
  #--------------------------------------------------------------------------
  alias_method :trick_escape_battle_start_phase2, :start_phase2
  def start_phase2
    # The Usual
    trick_escape_battle_start_phase2
    # Disable party command window
    @party_command_window.active = false
    @party_command_window.visible = false
    # Start Phase 3
    start_phase3
  end
  #--------------------------------------------------------------------------
  # * Make Basic Action Results
  #--------------------------------------------------------------------------
  alias_method(:trick_escape_battle_make_basic_action_result,
    :make_basic_action_result)
  def make_basic_action_result
    # The Usual
    trick_escape_battle_make_basic_action_result
    # If escape
    if (@active_battler.is_a?(Game_Actor) and
      @active_battler.current_action.basic == 2)
      make_basic_action_result_escape
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Make Basic Action Results - Escape
  #--------------------------------------------------------------------------
  def make_basic_action_result_escape
    # Setup Agi and number
    enemies_agi, enemies_number = 0, 0
    # Run Through Each Enemy
    $game_troop.enemies.each do |enemy|
      # Skip if non-existant
      next if not enemy.exist?
      # Add Agi
      enemies_agi += enemy.agi
      # Increase Number
      enemies_number += 1
    end
    # Calculate enemy agility average
    enemies_agi /= enemies_number.to_f if enemies_number > 0
    # Setup Agi and number
    actors_agi, actors_number = 0, 0
    # Run Through Each Actor
    $game_party.actors.each do |actor|
      # Skip if non-existant
      next if not actor.exist?
      # Add Agi
      actors_agi += actor.agi
      # Increase Number
      actors_number += 1
    end
    # Calculate actor agility average
    actors_agi /= actors_number.to_f if actors_number > 0
    # Get Chance
    chance = 50 * actors_agi / enemies_agi if @active_battler.is_a?(Game_Actor)
    chance = 50 * enemies_agi / actors_agi if @active_battler.is_a?(Game_Enemy)
    # Determine if escape is successful
    success = rand(100) < chance
    # If Actor
    if @active_battler.is_a?(Game_Actor)
      # If escape is successful and possible to escape
      if success and $game_temp.battle_can_escape
        # Play escape SE
        $game_system.se_play($data_system.escape_se)
        # Return to BGM before battle started
        $game_system.bgm_play($game_temp.map_bgm)
        # Battle ends
        battle_end(1)
      # If escape is failure
      else
        # Display Cannot Escape
        @help_window.set_text('Cannot Escape', 1)
      end
    # If Enemy
    else
      # If Escape is successful
      if success
        # Display "Escape" in help window
        @help_window.set_text('Escape', 1)
        # Escape
        @active_battler.escape
      else
        # Escape Failed
        @phase4_step = 1
      end
    end
  end
end
#--------------------------------------------------------------------------
# End SDK Enabled Check
#--------------------------------------------------------------------------
end
Expand to see the code.

now you have to use my script to create the command should be something like this

Quote:
id x
name whatever
kind 0
type 2
next_method phase3_next_actor


But the next_method parameter is not required since if you leave it off it assumes the next method is phase3_next_actor so


Quote:
id x
name whatever
kind 0
type 2


just replace x and whatever with any number (that hasn't been used already) and a name




@Jonny

In a new script above main but below Advanced Battle Commands and Timer Battle System Base

class Scene_Battle 
#--------------------------------------------------------------------------
  # * Go to Command Input for Next Actor
  #--------------------------------------------------------------------------
  def phase3_next_actor(flag = true)
    # End Action For Battler if made an action
    phase3_end_action if @active_battler != nil && flag
    # Actor blink effect OFF
    $game_party.actors.each {|actor| actor.blink = false}
    # Call Block The Number of Times There are Actors
    $game_party.actors.size.times do
      # Advance actor index
      @actor_index = (@actor_index + 1) % $game_party.actors.size
      # Get Active Battler
      @active_battler = $game_party.actors[@actor_index]
      # Set Blink To True
      @active_battler.blink = @active_battler.inputable?
      # Break if can accept input
      if @active_battler.inputable?
        # Set index to 0
        @actor_command_window.index = 0
        # Clear Action
        @active_battler.current_action.clear
        # Set Actor
        @actor_command_window.actor = @active_battler
        # Break
        break
      end
      # Actor blink effect OFF
      @active_battler.blink = false if @active_battler != nil
      # Set Active Battler to Nil
      @active_battler = nil
    end
    # Set To Unselectable if no active battler
    @actor_index = -1 if @active_battler == nil
    # Set up actor command window
    phase3_setup_command_window
  end
  #--------------------------------------------------------------------------
  # * Go to Command Input of Previous Actor
  #--------------------------------------------------------------------------
  def phase3_prior_actor
    # Actor blink effect OFF
    $game_party.actors.each {|actor| actor.blink = false}
    # Call Block The Number of Times There are Actors
    $game_party.actors.size.times do
      # Get Previous Index
      @actor_index = (@actor_index - 1) % $game_party.actors.size
      # Get Active Battler
      @active_battler = $game_party.actors[@actor_index]
      # Set Blink to True
      @active_battler.blink = @active_battler.inputable?
      # Break if can accept input
      if @active_battler.inputable?
        # Set index to 0
        @actor_command_window.index = 0
        # Set Actor
        @actor_command_window.actor = @active_battler
        # Break
        break
      end
      # Actor blink effect OFF
      @active_battler.blink = false if @active_battler != nil
      # Set Active Battler to Nil
      @active_battler = nil
    end
    # Set To Unselectable if no active battler
    @actor_index = -1 if @active_battler == nil
    # Set up actor command window
    phase3_setup_command_window
  end
end
Expand to see the code.


Delete this from Advanced Battle Commands
  #--------------------------------------------------------------------------
  # * Actor Command Window Setup
  #--------------------------------------------------------------------------
  alias_method(:trick_aibc_phase3_setup_command_window,
    :phase3_setup_command_window)
  def phase3_setup_command_window
    # The Usual
    trick_aibc_phase3_setup_command_window
    # Set Actor
    @actor_command_window.actor = @active_battler
  end
Expand to see the code.


If that doesn't work tell me because I have already merged this script with TRTAB (actually it's not the actual CBS it isn't compatible with it is Timer Battle System Base that is causing the problem) once, but I forgot what I did
Okay, I got it to work, but not exactly how you said. Here's what I did:
  1. Copied escape script as you edited
  2. Set up "do nothing" command with "make_basic_action_result_escape" as the next method
  3. Did NOT remove Actor Command Window Setup (that caused a buggy window like Jonny had).

Thanks for your help!
Ok it doesn't fix it. I get the same error but the error message changes to line 300.
Opps sorry for taking too long here is the patch

Timer Battle System compatibility Patch

class Scene_Battle
  #--------------------------------------------------------------------------
  # * Actor Command Window Setup
  #--------------------------------------------------------------------------
  def phase3_setup_command_window
    # Disable party command window
    @party_command_window.active = false
    @party_command_window.visible = false
    # Enable actor command window
    @actor_command_window.active = true
    @actor_command_window.visible = true
    # Set actor command window position
    @actor_command_window.x = @actor_index * 160
    # Set Actor
    @actor_command_window.actor = @active_battler
    # If Active Battler is nil
    if @active_battler == nil or not @active_battler.inputable?
      # Disable actor command window
      @actor_command_window.active = false
      @actor_command_window.visible = false
    end
  end
end
Expand to see the code.


It worked for TRTAB so it should surely work for CTB and ATB as well
Well, I get the same error again. I tried a bunch of different combinations since I didn't know how I was supposed to add it. I tried adding both the fixing scripts and deleting what you told me earlier, I tried adding only that script in your last post, and I tried adding only the script in your last post and deleting what you told me earlier.
this is compatible with the postality knights version of RMXP, right?
last time i tried a script like this i could not get it to work
*bump*
I haven't forgotten you here it is

class Scene_Battle
  #--------------------------------------------------------------------------
  # * Actor Command Window Setup
  #--------------------------------------------------------------------------
  def phase3_setup_command_window
    # Disable party command window
    @party_command_window.active = false
    @party_command_window.visible = false
    # Enable actor command window
    @actor_command_window.active = true
    @actor_command_window.visible = true
    # If Active Battler is defined
    if @active_battler != nil
      # Set actor command window position
      @actor_command_window.x = @actor_index * 160
      # Set Actor
      @actor_command_window.actor = @active_battler
    end
    # If Active Battler is nil
    if @active_battler == nil or not @active_battler.inputable?
      # Disable actor command window
      @actor_command_window.active = false
      @actor_command_window.visible = false
    end
  end
end
Expand to see the code.


missed one line which messed it up :-/

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=4462