[RMXP] adding more battle commands

i've been wondering to myself how can i add more battle commands
i just have Fight & Escape
(and Auto if you include the SG Auto-Battle script made by sandgolem)
i just want to add a 4th selection into the battle commands.
i just have Fight & Escape
That sounds like party commands. What else did you want to have there?
Does your actor commands show properly?
well (probably) yeah. because im using the SG Auto Battle script
it adds and Auto command which it has [Auto] [Repeat] & [Wait]
i want to add a additional 4th command, do YOU know how add more commands?
do YOU know how add more commands?
I could fudge it and maybe get it working. I don't use XP really.
@KK20 is one of your best chances to get a modification of this. He does a lot of XP scripting.

You also need to specify what command to add and what does it do? You haven't said that yet.
@KK20 is such a great guy that helps me 🙂
and about the command i was going to add a Navi(gator) command
with has the skill Analyze to scan the enemy and see their stats
i found out how to make the Analysis mechanic from this > Skill Making - Analyze
Problem though is your analyze guide assumes the actor is using a skill, which then triggers a common event. Why do you need an entirely new command?
it be like this |> Navi(gator)/Support > Analyze > Select an enemy
Navi(gator): Give me a sec, i'll scan the target.
(like) one turn later
[Shows enemy stats]
or something like that.
This is starting to breach "custom battle system" territory, which is not something I support.
AH!? im sorry i didn't mean that...
before i add any additional scripts
the 2 commands are just Fight & Escape
plz i need to make my game good ;_;
Well here's part of it. I don't know what to do from this point.
Spoiler: Navi for autobattle command
Ruby:
#==========================================================================
# ** SG Auto Battle
#==========================================================================
# by sandgolem
# Version 2
# January 15th, 2008
#==========================================================================

module SG
 AutoBattleBase = ['Automatic','Command','Run Away','Navi(Gator)']
 AutoBattleCommands = ['Attack','Repeat','Wait']
 NaviCommands = ['Analyze']
 AutoBattleOpac = 160
 AutoBattleSwitch = 0
 AutoBattleX = 64
 AutoBattleY = 59
 NaviBattleSwitch = 0
 NaviBattleOpac = 160
 NaviBattleX = 364
 NaviBattleY = 59
end

#==========================================================================
#
# To check for updates or find more scripts, visit:
#       http://www.gamebaker.com/rmxp/scripts/
# Our RMVX scripts: http://www.gamebaker.com/rmvx/scripts/
#
# Instructions: http://www.gamebaker.com/rmxp/scripts/e/auto-battle.php
# Discussion/Help: http://forums.gamebaker.com/showthread.php?t=9
#
#==========================================================================

if Object.const_defined?('SDK')
 SDK.log('SG Auto Battle', 'sandgolem', 2, '15.01.08')
 @sg_autobattle_disabled = true if !SDK.enabled?('SG Auto Battle')
end

if !@sg_autobattle_disabled
#--------------------------------------------------------------------------

begin
 SDK.log_overwrite(:Window_PartyCommand, :draw_item)
 SDK.log_overwrite(:Window_PartyCommand, :initialize)
 SDK.log_overwrite(:Window_PartyCommand, :update_cursor_rect)
rescue
end

class Window_PartyCommand < Window_Selectable
 def initialize
   super(0, 0, 640, 64)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.back_opacity = 160
   @commands = SG::AutoBattleBase
   @item_max = 4
   @column_max = 4
   if !$game_switches[SG::AutoBattleSwitch]
     draw_item(0, normal_color)
   else
     draw_item(0, disabled_color)
   end
   draw_item(1, normal_color)
   draw_item(2, $game_temp.battle_can_escape ? normal_color : disabled_color)
   draw_item(3, normal_color)
   self.index = 1
   self.visible = false
   self.active = false
 end

 def draw_item(index, color)
   self.contents.font.color = color
   rect = Rect.new(35 + index * 140, 0, 150, 32)
   self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
   self.contents.draw_text(rect, @commands[index], 1)
 end

 def update_cursor_rect
   self.cursor_rect.set(35 + index * 140, 0, 150, 32)
 end
end

class Game_Actor < Game_Battler
 attr_accessor :sg_autoaction, :sg_autosecondary, :sg_autotargets
end

class Window_SG_Autobattle < Window_Selectable 
 def initialize
   super(SG::AutoBattleX,SG::AutoBattleY,182,128)
   @item_max = 3
   @commands = SG::AutoBattleCommands
   self.contents = Bitmap.new(150,96)
   self.visible = false
   self.back_opacity = SG::AutoBattleOpac
   self.index = 0
   redraw
 end

 def redraw
   self.contents.clear
   for i in 0...@item_max
     draw_item(i, normal_color)
   end
 end
 
 def draw_item(index, color)
   self.contents.font.color = color
   rect = Rect.new(4,32*index,self.contents.width-8,32)
   self.contents.fill_rect(rect,Color.new(0, 0, 0, 0))
   self.contents.draw_text(rect,@commands[index],1)
 end

 def disable_item(index)
   draw_item(index, disabled_color)
 end
end

class Window_SG_Navibattle < Window_Selectable 
 def initialize
   super(SG::NaviBattleX,SG::NaviBattleY,182,60)
   @item_max = 1
   @commands = SG::NaviCommands
   self.contents = Bitmap.new(150,96)
   self.visible = false
   self.back_opacity = SG::NaviBattleOpac
   self.index = 0
   redraw
 end

 def redraw
   self.contents.clear
   for i in 0...@item_max
     draw_item(i, normal_color)
   end
 end
 
 def draw_item(index, color)
   self.contents.font.color = color
   rect = Rect.new(4,32*index,self.contents.width-8,32)
   self.contents.fill_rect(rect,Color.new(0, 0, 0, 0))
   self.contents.draw_text(rect,@commands[index],1)
 end

 def disable_item(index)
   draw_item(index, disabled_color)
 end
end

class Scene_Battle
 alias_method :sg_autobattle_main, :main
 def main
   @sg_autowindow = Window_SG_Autobattle.new
   @sg_autowindow.active = false
   @sg_autowindow.visible = false
   @sg_naviwindow = Window_SG_Navibattle.new
   @sg_naviwindow.active = false
   @sg_naviwindow.visible = false
   sg_autobattle_main
   @sg_autowindow.dispose
   @sg_naviwindow.dispose
 end
 
 alias_method :sg_autobattle_update, :update
 def update
   sg_autobattle_update
   if @sg_autowindow.active
     if @sg_autowindow.visible
       sg_update_autowindow
       @sg_autowindow.update
     else
       @sg_autowindow.visible = true
     end
   end
   if @sg_naviwindow.active
     if @sg_naviwindow.visible
       sg_update_naviwindow
       @sg_naviwindow.update
     else
       @sg_naviwindow.visible = true
     end
   end
 end
 
 def sg_update_autowindow
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.buzzer_se)
     @sg_autowindow.active = false
     @sg_autowindow.visible = false
     @party_command_window.active = true
     @party_command_window.index = 1
     @phase = 2
   end
   if Input.trigger?(Input::C)
     case @sg_autowindow.index
     when 0
       sg_phase2_allbasic(0)
     when 1
       if $game_temp.battle_turn != 0
         sg_phase2_lastaction
       else
         $game_system.se_play($data_system.buzzer_se)
       end
     when 2
       sg_phase2_allbasic(1)
     end
   end
 end
 
 def sg_update_naviwindow
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.buzzer_se)
     @sg_naviwindow.active = false
     @sg_naviwindow.visible = false
     @party_command_window.active = true
     @party_command_window.index = 1
     @phase = 2
   end
   if Input.trigger?(Input::C)
     case @sg_naviwindow.index
     when 0
       sg_phase2_navi
     end
   end
 end

 def sg_autowindow_setup
   if $game_switches[SG::AutoBattleSwitch]
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   $game_system.se_play($data_system.decision_se)
   @party_command_window.active = false
   @sg_autowindow.active = true
   @phase = 1337
   if $game_temp.battle_turn != 0
     @sg_autowindow.redraw
     @sg_autowindow.index = 1
   else
     @sg_autowindow.disable_item(1)
   end
 end

 def sg_naviwindow_setup
   if $game_switches[SG::NaviBattleSwitch]
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   $game_system.se_play($data_system.decision_se)
   @party_command_window.active = false
   @sg_naviwindow.active = true
 end

 def update_phase2
   if Input.trigger?(Input::L)
     @party_command_window.index = 0
     sg_autowindow_setup
   end
   @party_command_window.index = 2 if Input.trigger?(Input::B)
   if Input.trigger?(Input::C)
     case @party_command_window.index
     when 0
       sg_autowindow_setup
     when 1
       $game_system.se_play($data_system.decision_se)
       start_phase3
     when 2
       sg_update2_escape_check
     when 3
       sg_naviwindow_setup
     end
     return
   end
 end

 def sg_update2_escape_check
   if !$game_temp.battle_can_escape
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   $game_system.se_play($data_system.decision_se)
   update_phase2_escape
 end
 
 alias_method :sg_autobattle_start4, :start_phase4
 def start_phase4
   @sg_autowindow.active = false
   @sg_autowindow.visible = false
   for i in $game_party.actors
     i.sg_autoaction = i.current_action.kind
     i.sg_autosecondary = i.current_action.basic if i.sg_autoaction == 0
     i.sg_autosecondary = i.current_action.skill_id if i.sg_autoaction == 1
     i.sg_autosecondary = i.current_action.item_id if i.sg_autoaction == 2
     i.sg_autotargets = i.current_action.target_index
   end
   sg_autobattle_start4
 end
 
 def sg_phase2_allbasic(type)
   $game_system.se_play($data_system.decision_se)
   for i in $game_party.actors
     i.current_action.kind = 0
     i.current_action.basic = type
   end
   start_phase4
 end
 
 def sg_phase2_navi
   $game_system.se_play($data_system.decision_se)
   @party_command_window.active = false
   @sg_naviwindow.active = false
   @sg_naviwindow.visible = false
 end

 def sg_phase2_lastaction
   $game_system.se_play($data_system.decision_se)
   for i in $game_party.actors
     if i.sg_autoaction != nil
       i.current_action.kind = i.sg_autoaction
       i.current_action.basic = i.sg_autosecondary if i.sg_autoaction == 0
       i.current_action.skill_id = i.sg_autosecondary if i.sg_autoaction == 1
       i.current_action.item_id = i.sg_autosecondary if i.sg_autoaction == 2
       i.current_action.target_index = i.sg_autotargets
     else
       i.current_action.kind = 0
       i.current_action.basic = 0
     end
   end
   start_phase4
 end
end

#--------------------------------------------------------------------------
end

#==========================================================================
# End of file! You can find more of my scripts at http://www.gamebaker.com
#==========================================================================
ok the Navi(gator) option is here
now the final step is...
how to insert the Analysis Scan event into the Analyze commmand
ummmm.....
how do i insert the Analysis Scan event into the Analyze command???
@KK20 do you how to insert common events into the Analyze command???
By extensively rewriting the battle system, which I don't do such requests.
oof
Which analyze command script have you been using so far?
@kyonides
uhh...i dunno
but while i was searching into the chaos-project script database index [RMXP]
i found an actual analyze script
you think it will connect with the updated sg auto battle script?
if so, then how?
I dunno anything about the sg auto battle script you mentioned above so I can't tell you if they'd work together or not...
im using the SG Auto Battle script
I dunno anything about the sg auto battle script
There is where he linked it.

Original thread: https://forums.rpgmakerweb.com/threads/rmxp-adding-more-battle-commands.121884/