Ring Actor Battle Command Menu

Ring Actor Battle Command Menu

~Explanation of Request~
When used, after selecting 'Fight' in the first menu after entering battle, the script will display icons around the first actor. As the player selects what they want each actor to do, the ring of icons will show up the actor the player is currently selecting commands for. If the player enters, say, an item menu, the ring will dissapear.

Also, with this, new commands will have their own menu now. Say, an actor knows these skills: Jump, Hammer, Fireball, and the player selects the command Jump. The skill Jump will appear in that menu, but not Hammer, Fireball, etc. Sort of like commands in this script (see spoiler)
Said script Spoiler
  1. #==============================================================================
  2. # Individual Battle Commands
  3. # by Atoa
  4. # Based on Charlie Lee script
  5. # Modified by Atoa, to work with ACBS
  6. #==============================================================================
  7. # Following some suggestions, i've made some changes to the individual
  8. # battle commands script
  9. #
  10. # Now you can not only add an command to an skill, you can also add an command
  11. # to an actor (like in RM2000/2003/VX) and add an skill directly to an command
  12. # so if you select the command, the skill will be used without opening the
  13. # skill menu
  14. #
  15. #
  16. # IMPORTANT: If you using the Add-On 'Atoa ATB' or 'Atoa CTB', put this script
  17. # *bellow* the ATB/CTB Add-On.
  18. #==============================================================================
  19.  
  20. module N01
  21.   # Do not remove or change these lines
  22.   Skill_Command = {}
  23.   Actor_Command = {}
  24.   Usable_Command = {}
  25.   # Do not remove or change these lines
  26.  
  27.   # Show command list in status menu?
  28.   Show_Commands_In_Menu = true
  29.  
  30.   # Position of command window in status menu
  31.   Menu_Commands_Postition = [16,160]
  32.   # Note: you must edit the status menu, or the command window will stay above
  33.   # other informations
  34.  
  35.   # Command Window Border Opacity
  36.   Command_Window_Border_Opacity = 255
  37.  
  38.   # Command Window Back Opacity
  39.   Command_Window_Back_Opacity = 160
  40.    
  41.   # Max number of commands shown
  42.   Max_Commands_Shown = 5
  43.  
  44.   # Skill Commands.
  45.   # These commands appear automatically when an actor learn one of the skill
  46.   # that is part of the command.
  47.   #
  48.   # Skill_Command[Command_Name] = [Skills_IDs]
  49.   #
  50.   Skill_Command['Magic'] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  51.     16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  52.     35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
  53.     54, 55, 56]
  54.  
  55.   Skill_Command['Techs'] = [57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
  56.     69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80]
  57.  
  58.   Skill_Command['Unite'] = [98,99,100,101,102,103]
  59.  
  60.   Skill_Command['Overdrive'] = [119]
  61.  
  62.   Skill_Command['Summon'] = [120,121,122,123]
  63.  
  64.   # Actor Commands.
  65.   # These are the commands linked to the actors, they will be shown even if
  66.   # the actor has none of the skill of this command.
  67.   # You can add the same command for different actors, the list of skills shown
  68.   # will be separated for each
  69.   #
  70.   # Actor_Command[Command_Name] = {Actor_id => [Skills_IDs]}
  71.   #
  72.   Actor_Command['Skill'] = {1 => [85,86,89,93,118], 2 => [84,87,88,93,105,106,107],
  73.     3 => [96,108,109,111,112,114]}
  74.    
  75.   Actor_Command['Wizzardry'] = {4 => [95,110,113,115,116,117]}
  76.  
  77.   # Usable Commands.
  78.   # These commands are linked directly to an skill. Once you choose one of them
  79.   # you will use without opening the skill menu.
  80.   # This command appear automatically once the actor learn the skill linked to
  81.   # the command. The skill linked to the command aren't shown in the skill
  82.   # menu outside battle
  83.   #
  84.   # Direct_Comman[Command_Name] = Skill_ID
  85.   #
  86.   Usable_Command['Steal'] = 83
  87.  
  88.   Usable_Command['Cat Form'] = 97
  89.  
  90.   Usable_Command['Return Summon'] = 124
  91. end
  92.  
  93. #==============================================================================
  94. # ? Atoa Module
  95. #==============================================================================
  96. $atoa_script['SBS Individual Commands'] = true
  97.  
  98. #==============================================================================
  99. # ? Game_Actor
  100. #==============================================================================
  101. class Game_Actor
  102.   #--------------------------------------------------------------------------
  103.   include N01
  104.   #--------------------------------------------------------------------------
  105.   attr_accessor :individual_commands
  106.   #--------------------------------------------------------------------------
  107.   alias acbs_setup_ibc setup
  108.   def setup(actor_id)
  109.     acbs_setup_ibc(actor_id)
  110.     @individual_commands = []
  111.   end
  112.   #--------------------------------------------------------------------------
  113.   def refresh_commands
  114.     @individual_commands = []
  115.     for i in [email hidden]
  116.       skill = $data_skills[@skills[i]]
  117.       if skill != nil
  118.         for command in Skill_Command.dup
  119.           if command[1].include?(skill.id) and not @individual_commands.include?(command[0])
  120.             @individual_commands << command[0]
  121.           end
  122.         end
  123.         for command in Usable_Command.dup
  124.           if command[1] == skill.id and not @individual_commands.include?(command[0])
  125.             @individual_commands << command[0]
  126.           end
  127.         end        
  128.       end
  129.     end
  130.     for command in Actor_Command.dup
  131.       if command[1].include?(@actor_id) and not @individual_commands.include?(command[0])
  132.         @individual_commands << command[0]
  133.       end
  134.     end
  135.   end
  136. end
  137.  
  138. #==============================================================================
  139. # ? Game_Party
  140. #==============================================================================
  141. class Game_Party
  142.   #--------------------------------------------------------------------------
  143.   include N01
  144.   #--------------------------------------------------------------------------
  145.   alias acbs_add_actor_ibc add_actor
  146.   #--------------------------------------------------------------------------
  147.   def add_actor(actor_id)
  148.     acbs_add_actor_ibc(actor_id)
  149.     actor = $game_actors[actor_id]
  150.     actor.refresh_commands
  151.   end
  152. end
  153.  
  154. #==============================================================================
  155. # ? Scene_Battle
  156. #==============================================================================
  157. class Scene_Battle
  158.   #--------------------------------------------------------------------------
  159.   include N01
  160.   #--------------------------------------------------------------------------
  161.   attr_accessor :escape_name
  162.   #--------------------------------------------------------------------------
  163.   alias acbs_phase3_setup_command_window_ibc phase3_setup_command_window
  164.   def phase3_setup_command_window
  165.     acbs_phase3_setup_command_window_ibc
  166.     @active_battler.refresh_commands
  167.     s1 = $data_system.words.attack
  168.     s2 = $data_system.words.item
  169.     s3 = $data_system.words.guard
  170.     s4 = @escape_name if @escape_type == 0
  171.     @individual_commands = [s1] + @active_battler.individual_commands + [s2, s3]
  172.     if @escape_type == 0
  173.       @individual_commands = [s1]+  @active_battler.individual_commands + [s2, s3, s4]
  174.     end
  175.     @actor_command_window.dispose
  176.     @actor_command_window = Window_Command.new(160, @individual_commands, @active_battler)
  177.     comand_size = (@individual_commands.size >= 5 ? 5 : @individual_commands.size)
  178.     @actor_command_window.x = COMMAND_WINDOW_POSITION[0]
  179.     @actor_command_window.y = COMMAND_WINDOW_POSITION[1] + 120 - 24 * comand_size
  180.     @actor_command_window.opacity = Command_Window_Border_Opacity
  181.     @actor_command_window.back_opacity = Command_Window_Back_Opacity
  182.     @actor_command_window.z = 4500
  183.     @actor_command_window.index = 0
  184.     @actor_command_window.active = true
  185.     @actor_command_window.visible = true
  186.     @active_battler_window.refresh(@active_battler)
  187.     @active_battler_window.visible = BATTLER_NAME_WINDOW
  188.     @active_battler_window.x = COMMAND_WINDOW_POSITION[0]
  189.     @active_battler_window.y = COMMAND_WINDOW_POSITION[1] + 56 - 24 * comand_size
  190.     @active_battler_window.z = 4500
  191.   end
  192.   #--------------------------------------------------------------------------
  193.   alias acbs_update_phase3_basic_command_ibc update_phase3_basic_command
  194.   def update_phase3_basic_command
  195.     @direct_command = false
  196.     if Input.trigger?(Input::B)
  197.       $game_system.se_play($data_system.cancel_se)
  198.       phase3_prior_actor
  199.       return
  200.     end
  201.     if Input.trigger?(Input::C)
  202.       @command_name = @actor_command_window.commands[@actor_command_window.index]
  203.       case @command_name
  204.       when $data_system.words.attack
  205.         $game_system.se_play($data_system.decision_se)
  206.         @active_battler.current_action.kind = 0
  207.         @active_battler.current_action.basic = 0
  208.         start_enemy_select
  209.       when $data_system.words.guard
  210.         $game_system.se_play($data_system.decision_se)
  211.         @active_battler.current_action.kind = 0
  212.         @active_battler.current_action.basic = 1
  213.         phase3_next_actor
  214.       when $data_system.words.item
  215.         $game_system.se_play($data_system.decision_se)
  216.         @active_battler.current_action.kind = 2
  217.         start_item_select
  218.       when @escape_name
  219.         if $game_temp.battle_can_escape == false
  220.           $game_system.se_play($data_system.buzzer_se)
  221.           return
  222.         end
  223.         $game_system.se_play($data_system.decision_se)
  224.         update_phase2_escape
  225.         return
  226.       end
  227.       if @active_battler != nil and
  228.         @active_battler.individual_commands.include?(@command_name)
  229.         if Usable_Command.include?(@command_name)
  230.           unless @active_battler.skill_can_use?(Usable_Command[@command_name])
  231.             $game_system.se_play($data_system.buzzer_se)
  232.             return
  233.           end
  234.           @active_battler.current_action.kind = 1
  235.           @commands_category = @command_name
  236.           @direct_command = true
  237.           start_command_select(Usable_Command[@command_name])
  238.         else
  239.           $game_system.se_play($data_system.decision_se)
  240.           @active_battler.current_action.kind = 1
  241.           @commands_category = @command_name
  242.           start_skill_select
  243.         end
  244.       end
  245.       return
  246.     end
  247.     acbs_update_phase3_basic_command_ibc
  248.   end
  249.   #--------------------------------------------------------------------------
  250.   alias acbs_start_skill_select_ibc start_skill_select
  251.   def start_skill_select
  252.     acbs_start_skill_select_ibc
  253.     @skill_window.dispose
  254.     @skill_window = Window_Skill.new(@active_battler, @commands_category)
  255.     @skill_window.help_window = @help_window
  256.   end
  257.   #--------------------------------------------------------------------------
  258.   def start_command_select(skill_id)
  259.     if Input.trigger?(Input::C)
  260.       @skill = $data_skills[skill_id]
  261.       if @skill.nil? or not @active_battler.skill_can_use?(@skill.id)
  262.         $game_system.se_play($data_system.buzzer_se)
  263.         return
  264.       end
  265.       $game_system.se_play($data_system.decision_se)
  266.       @active_battler.current_action.skill_id = @skill.id
  267.       if @skill.extension.include?("TARGETALL")
  268.         start_select_all_battlers
  269.         return
  270.       elsif @skill.scope == 2 or (@skill.scope < 3 and @skill.extension.include?("RANDOMTARGET"))
  271.         start_select_all_enemies
  272.         return
  273.       elsif @skill.scope == 4 or (@skill.scope > 2 and @skill.extension.include?("RANDOMTARGET"))
  274.         start_select_all_actors
  275.         return
  276.       end
  277.       if @skill.scope == 1
  278.         start_enemy_select
  279.       elsif @skill.scope == 3 or @skill.scope == 5
  280.         start_actor_select
  281.       else
  282.         phase3_next_actor
  283.       end
  284.       return
  285.     end
  286.   end
  287.   #--------------------------------------------------------------------------
  288.   def active_command_window
  289.     @actor_command_window.active = true
  290.     @actor_command_window.visible = true
  291.     @help_window.visible = false
  292.     @active_battler_window.visible = true if BATTLER_NAME_WINDOW
  293.   end
  294.   #--------------------------------------------------------------------------
  295.   alias acbs_update_phase3_enemy_select_ibc update_phase3_enemy_select
  296.   def update_phase3_enemy_select
  297.     if Input.trigger?(Input::B) and @direct_command
  298.       $game_system.se_play($data_system.cancel_se)
  299.       end_enemy_select
  300.       active_command_window
  301.       return
  302.     end
  303.     if Input.trigger?(Input::C) and @direct_command
  304.       $game_system.se_play($data_system.decision_se)
  305.       @active_battler.current_action.target_index = @enemy_arrow.index
  306.       end_enemy_select
  307.       phase3_next_actor
  308.       @help_window.visible = false
  309.       return
  310.     end
  311.     acbs_update_phase3_enemy_select_ibc
  312.   end
  313.   #--------------------------------------------------------------------------
  314.   alias acbs_update_phase3_actor_select_ibc update_phase3_actor_select
  315.   def update_phase3_actor_select
  316.     if Input.trigger?(Input::B) and @direct_command
  317.       $game_system.se_play($data_system.cancel_se)
  318.       end_actor_select
  319.       active_command_window
  320.       return
  321.     end
  322.     if Input.trigger?(Input::C) and @direct_command
  323.       $game_system.se_play($data_system.decision_se)
  324.       @active_battler.current_action.target_index = @actor_arrow.index
  325.       end_actor_select
  326.       phase3_next_actor
  327.       @help_window.visible = false
  328.       return
  329.     end
  330.     acbs_update_phase3_actor_select_ibc
  331.   end
  332.   #--------------------------------------------------------------------------
  333.   alias acbs_update_phase3_select_all_enemies_ibc update_phase3_select_all_enemies
  334.   def update_phase3_select_all_enemies
  335.     @enemy_arrow_all.update_multi_arrow
  336.     if Input.trigger?(Input::B) and @direct_command
  337.       $game_system.se_play($data_system.cancel_se)
  338.       end_select_all_enemies
  339.       active_command_window
  340.       return
  341.     end
  342.     if Input.trigger?(Input::C) and @direct_command
  343.       $game_system.se_play($data_system.decision_se)
  344.       end_select_all_enemies
  345.       phase3_next_actor
  346.       @help_window.visible = false
  347.       return
  348.     end
  349.     acbs_update_phase3_select_all_enemies_ibc
  350.   end
  351.   #--------------------------------------------------------------------------
  352.   alias acbs_update_phase3_select_all_actors_ibc update_phase3_select_all_actors
  353.   def update_phase3_select_all_actors
  354.     @actor_arrow_all.update_multi_arrow
  355.     if Input.trigger?(Input::B) and @direct_command
  356.       $game_system.se_play($data_system.cancel_se)
  357.       end_select_all_actors
  358.       active_command_window
  359.       return
  360.     end
  361.     if Input.trigger?(Input::C) and @direct_command
  362.       $game_system.se_play($data_system.decision_se)
  363.       end_select_all_actors
  364.       phase3_next_actor
  365.       @help_window.visible = false
  366.       return
  367.     end
  368.     acbs_update_phase3_select_all_actors_ibc
  369.   end      
  370.   #--------------------------------------------------------------------------
  371.   alias acbs_update_phase3_select_all_battlers_ibc update_phase3_select_all_battlers
  372.   def update_phase3_select_all_battlers
  373.     @battler_arrow_all.update_multi_arrow
  374.     if Input.trigger?(Input::B) and @direct_command
  375.       $game_system.se_play($data_system.cancel_se)
  376.       end_select_all_battlers
  377.       active_command_window
  378.       return
  379.     end
  380.     if Input.trigger?(Input::C) and @direct_command
  381.       $game_system.se_play($data_system.decision_se)
  382.       end_select_all_battlers
  383.       phase3_next_actor
  384.       @help_window.visible = false
  385.       return
  386.     end
  387.     acbs_update_phase3_select_all_battlers_ibc
  388.   end      
  389. end
  390.  
  391. #==============================================================================
  392. # ? Window_Skill
  393. #==============================================================================
  394. class Window_Skill < Window_Selectable
  395.   #--------------------------------------------------------------------------
  396.   include N01
  397.   #--------------------------------------------------------------------------
  398.   def initialize(actor, skill_command_type = '')
  399.     super(0, 128, 640, 352)
  400.     @skill_command_type = skill_command_type
  401.     @actor = actor
  402.     @column_max = 2
  403.     refresh
  404.     self.index = 0
  405.     if $game_temp.in_battle
  406.       self.y = 320
  407.       self.height = 160
  408.       self.z = 900
  409.       self.back_opacity = MENU_OPACITY
  410.     end
  411.   end
  412.   #--------------------------------------------------------------------------
  413.   def refresh
  414.     if self.contents != nil
  415.       self.contents.dispose
  416.       self.contents = nil
  417.     end
  418.     @data = []
  419.     for i in [email hidden]
  420.       skill = $data_skills[@actor.skills[i]]
  421.       if skill != nil and $game_temp.in_battle and skill_in_command?(skill)
  422.         @data << skill
  423.       elsif skill != nil and not $game_temp.in_battle
  424.         for command in  Usable_Command.dup
  425.           @data << skill unless command[1] == skill.id or @data.include?(skill)
  426.         end
  427.       end
  428.     end
  429.     @item_max = @data.size
  430.     if @item_max > 0
  431.       self.contents = Bitmap.new(width - 32, row_max * 32)
  432.       for i in 0...@item_max
  433.         draw_item(i)
  434.       end
  435.     end
  436.   end
  437.   #--------------------------------------------------------------------------
  438.   def skill_in_command?(skill)
  439.     if Skill_Command[@skill_command_type] != nil and
  440.        Skill_Command[@skill_command_type].include?(skill.id)
  441.       return true
  442.     elsif Actor_Command[@skill_command_type] != nil and
  443.        Actor_Command[@skill_command_type].include?(@actor.id) and
  444.        Actor_Command[@skill_command_type][@actor.id].include?(skill.id)
  445.       return true
  446.     end
  447.     return false
  448.   end
  449. end
  450.  
  451. #==============================================================================
  452. # ? Window_Command
  453. #==============================================================================
  454. class Window_Command < Window_Selectable
  455.   #--------------------------------------------------------------------------
  456.   include N01
  457.   #--------------------------------------------------------------------------
  458.   attr_accessor :commands
  459.   #--------------------------------------------------------------------------
  460.   def initialize(width, commands, battler = nil)
  461.     if $scene.is_a?(Scene_Battle)
  462.       comand_size = (commands.size >= 5 ? 192 : commands.size * 32 + 32)
  463.       max_comand = Max_Commands_Shown * 32 + 32
  464.     else
  465.       comand_size =  commands.size * 32 + 32
  466.       max_comand = comand_size
  467.     end
  468.     comand_size = [comand_size, max_comand].min
  469.     super(0, 0, width, comand_size)
  470.     @battler = battler
  471.     @item_max = commands.size
  472.     @commands = commands
  473.     self.contents = Bitmap.new(width - 32, @item_max * 32)
  474.     refresh
  475.     self.index = 0
  476.   end
  477.   #--------------------------------------------------------------------------
  478.   def refresh
  479.     self.contents.clear
  480.     for i in 0...@item_max
  481.       if $scene.is_a?(Scene_Battle) and @battler != nil and
  482.          Usable_Command.include?(@commands[i]) and not
  483.          @battler.skill_can_use?(Usable_Command[@commands[i]])
  484.         draw_item(i, disabled_color)
  485.       elsif $scene.is_a?(Scene_Battle) and @commands[i] == $scene.escape_name and
  486.          $game_temp.battle_can_escape == false
  487.         draw_item(i, disabled_color)
  488.       else
  489.         draw_item(i, normal_color)
  490.       end
  491.     end
  492.   end
  493. end
  494.  
  495. #==============================================================================
  496. # ? Scene_Status
  497. #==============================================================================
  498. class Scene_Status
  499.   #--------------------------------------------------------------------------
  500.   include N01
  501.   #--------------------------------------------------------------------------
  502.   alias acbs_main_scenestatus_ibc main
  503.   def main
  504.     set_command_window if Show_Commands_In_Menu
  505.     acbs_main_scenestatus_ibc
  506.     @command_window.dispose if Show_Commands_In_Menu
  507.   end
  508.   #--------------------------------------------------------------------------
  509.   def set_command_window
  510.     actor = $game_party.actors[@actor_index]
  511.     actor.refresh_commands
  512.     s1 = $data_system.words.attack
  513.     s2 = $data_system.words.item
  514.     s3 = $data_system.words.guard
  515.     @individual_commands = [s1] + actor.individual_commands + [s2, s3]
  516.     @command_window = Window_Command.new(160, @individual_commands, actor)
  517.     @command_window.x = Menu_Commands_Postition[0]
  518.     @command_window.y = Menu_Commands_Postition[1]
  519.     @command_window.z = 1000
  520.     @command_window.active = false
  521.     @command_window.index = -1
  522.   end
  523. end
Expand to see the code.



~Features Desired~
    Compatible with Tankentai XP
    Icons are displayed in a ring. If the player presses left or right, the ring will go counter/clockwise and make a sound. When in a different menu other than selecting an actor, the ring will dissapear. While choosing, one icon should be normal with nothing applied (the one that the player has it's imaginary cursor over at that moment) and the rest should be dimmed or transparent. Transparent preferably.
    Also, with this, new commands will have their own menu now. Say, an actor knows these skills: Jump, Hammer, Fireball, and the player selects the defined-in-the-script command Jump. The skill Jump will appear in that menu, but not Hammer, Fireball, etc. because in the script only Jump was defined to appear. Sort of like commands in the script above (see spoiler above)
    Should be compatible with Dargor's Large Party if it's needed--though I'd like it so I could use script commands so we could still pick party members in battle :D
    Display 7 blocks or more if possible

~Example~
Big Image, Warning! Spoiler
Image


Sort of like that, except with 7 blocks. :-X

It's pretty big but it's not like I'm requesting a whole battle system. Thanks if you take this on.

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