[RMXP] KGC_SeparationCommand [solved]

So I found this script and I was intrigued about it.
Here's a breakdown of the script:

  • It adds the ability to assign custom battle commands to each actor in the game.
  • You can configure the arrangement of battle commands (such as Attack, Skill, Guard, Item, and individual commands) for each character.
  • Each character can have their own set of custom battle commands, which can include skills or actions specific to that character.
◆ 個別戦闘コマンド - KGC_SeparationCommand ◆

For some reason no new command is being shown and also no new menu-point created. I am stuck basically.
This is a script you found elsewhere and then translated it?

That is great, for yourself to be used. Seems to be done very well too. But you are not supposed to share someone else's work, even a translated version, without their permission.
This is a script you found elsewhere and then translated it?

That is great, for yourself to be used. Seems to be done very well too. But you are not supposed to share someone else's work, even a translated version, without their permission.
Oh I See. So next time I should Just make a reference to the script?

Edited Post
Now I feel bad, as if I made you remove it. 😛 It wasn't meant like that, though.

However... It might say, wherever it was originally posted, that it can be shared. That would be permission. 😛 But if not, than you might want to try and ask for permission. I hope the makers are still active, though. This seems like an old script.

Other than that, I wouldn't know how to share translated scripts without sharing someone elses work... It is always somewhat of a debate on what is or is not okay to be shared, in those gray area cases.
Now I feel bad, as if I made you remove it. 😛 It wasn't meant like that, though.

However... It might say, wherever it was originally posted, that it can be shared. That would be permission. 😛 But if not, than you might want to try and ask for permission. I hope the makers are still active, though. This seems like an old script.

Other than that, I wouldn't know how to share translated scripts without sharing someone elses work... It is always somewhat of a debate on what is or is not okay to be shared, in those gray area cases.

Don't feel bad, the Script is 15+ years old and only available in japanese so I thought I was being smart by translating it so support could be done easier.

As great as the Code seems, for me it does not work what so ever. There are similar Scripts available but they use SDK and I don't wanna use that for just one script.

If I understood the Script correctly it should display "No Command" in the Battle Menu if nothing is set. But even then booting into a fresh, new file and inserting the script there nothing changes. The script is also available for VX with a Demo but I don't have VX and XP/VX compatibility is a whole other thing.
If I understood the Script correctly it should display "No Command" in the Battle Menu if nothing is set.
The actor must still be configured with a nil command in their @sep_command_list, e.g.
Code:
$game_actors[1].set_sep_command(
0, 0)
The list is initialized as an empty array, so the logic that renders the "No Command" action is skipped since the loop doesn't run:
Ruby:
  def get_separation_command(battler)
    commands = []
    sp_com = battler.sep_command_list
    sp_com.each { |com|
      if com == nil || com == 0
        commands << KGC::SPCMD_NO_COMMAND
      else
        commands << $data_skills[com].name
      end
    }
    return commands
  end
If you'd like it to display anyways with an empty array, then you'd make this edit:
Ruby:
  def get_separation_command(battler)
    commands = []
    sp_com = battler.sep_command_list
    return [KGC::SPCMD_NO_COMMAND] if sp_com.empty?
   
    sp_com.each { |com|
      if com == nil || com == 0
        commands << KGC::SPCMD_NO_COMMAND
      else
        commands << $data_skills[com].name
      end
    }
    return commands
  end

  def disable_separataion_command(battler)
    sp_com = battler.sep_command_list
    if sp_com.empty?
      @actor_command_window.disable_item(@sep_command_range.first)
      return
    end
   
    sp_com.size.times { |i|
      unless battler.sep_command_set?(i) &&
          battler.skill_can_use?(battler.sep_command(i))
        @actor_command_window.disable_item(i + @sep_command_range.first)
      end
    }
  end
For some reason no new command is being shown and also no new menu-point created.
I need more information in how you're using the script + script calls. Had no issues in a new project.
The actor must still be configured with a nil command in their @sep_command_list, e.g.
Code:
$game_actors[1].set_sep_command(
0, 0)
The list is initialized as an empty array, so the logic that renders the "No Command" action is skipped since the loop doesn't run:
Ruby:
  def get_separation_command(battler)
    commands = []
    sp_com = battler.sep_command_list
    sp_com.each { |com|
      if com == nil || com == 0
        commands << KGC::SPCMD_NO_COMMAND
      else
        commands << $data_skills[com].name
      end
    }
    return commands
  end
If you'd like it to display anyways with an empty array, then you'd make this edit:
Ruby:
  def get_separation_command(battler)
    commands = []
    sp_com = battler.sep_command_list
    return [KGC::SPCMD_NO_COMMAND] if sp_com.empty?
 
    sp_com.each { |com|
      if com == nil || com == 0
        commands << KGC::SPCMD_NO_COMMAND
      else
        commands << $data_skills[com].name
      end
    }
    return commands
  end

  def disable_separataion_command(battler)
    sp_com = battler.sep_command_list
    if sp_com.empty?
      @actor_command_window.disable_item(@sep_command_range.first)
      return
    end
 
    sp_com.size.times { |i|
      unless battler.sep_command_set?(i) &&
          battler.skill_can_use?(battler.sep_command(i))
        @actor_command_window.disable_item(i + @sep_command_range.first)
      end
    }
  end

I need more information in how you're using the script + script calls. Had no issues in a new project.
Thanks KK, but as I read this I figured it Out. I did the script call wrong. I assumed character Slot 1 was ID = 0 but I had to switch it to

Code:
$game_actors[1].set_sep_command = 1

and it works now. No further Changes were needed actually. The script call was wrong.

A shame it overwrites my custom battle command Window (Had a nice horizontal one) but i'll figure this Out later.

Closed for solved

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/rmxp-kgc_separationcommand-solved.168373/