"Toggle Row Battle Command" for CDR - Rows

I'm using CDR ROWS, so I need a in-battle command for toggling row position. CDR Rows got a Skill Notetag for a toggle command. This command HAS to be the LAST in the list for gameplay convenience.

But I'm using Victor Scripts (like Target Arrow) so I cannot use "YANFLY Command List Manager" 'cuz Target Arrow works only with his scripts, like Direct Command. Using Direct Command  I cant organize the skill order as it always places bellow ATTACK.

I've played around scripts and found this:

  def make_command_list
    return unless @actor
    add_attack_command
    add_skill_commands
    add_item_command
    add_guard_command


   (Toggle Row command here)
  end


Thats the order. I've managed to set guard in a proper position, but my limited scripting skills wont allow me to add a propper row command.

I've tried to use this DEFINITION for toggle row in some tests:

def toggle_row
    @back = !back?
  end


How do I link it to the command? I dont know, I've tried doing myself using some references but I've failed.

If any scripter could help me out, I would be thankful!
Damn! Looks like I'm unlucky recently! No help! I didnt thought it was that hard to do...
Nugem, please do not bump your topic unless it has been 72 hours later since your last post. You can review our forum rules here. Thank you.


In fact, since this is a question about a script that's presented on these forums, your question really should have been put into that thread.


Look at the way the current menu options are set up - each menu option has something in the Window_ActorCommand as well as the Scene_Battle scripts. You need to do the same thing - in Scene_Battle, add a handler as well as the method called by the handler (which will just call @actor.toggle_row or something like that), and in Window_ActorCommand add the menu option.


Since I don't know how many of the scripts you're using are doing something different to the RTP scripts, I'm not going to go into any more detail than that - YOU will have to look at the scripts and determine where the changes should be made, and if @actor is available in Scene_Battle, and what to use instead if it isn't.
Nugem, please do not bump your topic unless it has been 72 hours later since your last post. You can review our forum rules here. Thank you.

In fact, since this is a question about a script that's presented on these forums, your question really should have been put into that thread.

Look at the way the current menu options are set up - each menu option has something in the Window_ActorCommand as well as the Scene_Battle scripts. You need to do the same thing - in Scene_Battle, add a handler as well as the method called by the handler (which will just call @actor.toggle_row or something like that), and in Window_ActorCommand add the menu option.

Since I don't know how many of the scripts you're using are doing something different to the RTP scripts, I'm not going to go into any more detail than that - YOU will have to look at the scripts and determine where the changes should be made, and if @actor is available in Scene_Battle, and what to use instead if it isn't.
Understood. Sorry 'bout that. Won't be doing again.

I Will follow your instructions and mess again with the scripts. 

I'm pretty sure I won't be sucessful cuz' I'm pretty bad with it, but...anything, I'll inform.
Are you using any scripts that modify the battle windows - in particular action selection for each actor?
Are you using any scripts that modify the battle windows - in particular action selection for each actor?
Hmmm...Maybe this screenshoot talks more than words:

[IMG]http://i.imgur.com/iDkGTci.jpg?1[/IMG]

Besides "VE Target Arrow" and "Direct Command" the battle windows changes are essencialy aesthetic, like changing positions.

*Sorry for the bad graphics, they are just placeholders.
[IMG]http://i.imgur.com/lrlRIHY.jpg?1[/IMG]

So, I was messing around and managed to make the command. Created a lot of lines though. But my command links to a VOCAB and...where I set it besides the database?! It's like this:

  #--------------------------------------------------------------------------  # * Adição do comando de defesa para lista  #--------------------------------------------------------------------------  def add_row_command    add_command(Vocab::row, :row)  endWell, I'll keep trying...
Nugem, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


Vocab is the module at the very top of your scripts. You can add it in there, or you can just put the text instead of Vocab::row.


I think the hard thing will be making the actor USE the command. All the commands that are there, put something into the actions list, and then another class deals with the action when it's meant to happen. Whether you do the same thing or not depends on whether you want them to use a turn swapping rows. If you don't, you'll need to execute it straight away, but NOT pass on to the next person for their turn (because the actor still needs something in their action list).
That's not really my problem.

See:

  #--------------------------------------------------------------------------  # * Definição de ação Row  #--------------------------------------------------------------------------  def set_row    set_skill(8) <<< Database skill for Toggle Row Skill  end endI can be dumb at scripting, but with propper guidance I can solve some puzzles like this one.

The command is working, but it has no vocab and I'm stuck at it. I'm still messing around trying to figure it out.

I've droped it in VOCAB:

def self.row;         command(23);  end   # RowThe program is prolly' trying to find "command 23" in "$data_system.terms.commands[command_id]" or somethings...still trying to get this logic.
No. In the Vocab module, just add this:

Code:
row = "Toggle Row"
Because there IS no slot in the Terms tab for this, you can't use a command() for it. Look at how the ShopBuy, ShopSell, etc are set up, and copy them.
No. In the Vocab module, just add this:

row = "Toggle Row"Because there IS no slot in the Terms tab for this, you can't use a command() for it. Look at how the ShopBuy, ShopSell, etc are set up, and copy them.
I've tried but throws an error:

Code:
Undefined method `row' for Vocab:Module
Try changing it from row to Row

module Vocab Row = "Toggle Row"endclass Window_ActorCommand < Window_Command def add_row_command add_command(Vocab::Row, :row) endend(and you don't have to quote my post when you're replying immediately afterwards 😉 )
Yeehaa!!

It works!!

Thanks for the support Shaz!!

Now, I'm thinking 'bout making a tutorial for addin' custom skill to command list!
The above code works for me. Make sure any previous "attempts" you made are not still lying around interfering with things, in either of those classes/modules.
All that's all! Thanks for the support Shaz!

I'm leaving a tutorial script I made to help people with similar problems!

I dont think this deserves it's own thread!

Spoiler
#==============================================================================# ** CUSTOM DIRECT SKILL ORDER - for Battle Command Organization#------------------------------------------------------------------------------#  A simple tutorial-script made for adding a Direct Skill and quickly organize#  the BATTLE COMMAND.#  To create a DIRECT COMMAND just replace all the script's SKILLNAME#  with any name. Then, replace the whole SKILL_ID with the Skill ID#  from Database.#==============================================================================module Vocab  #--------------------------------------------------------------------------  # * Skill Vocab - Name of the Button  # MIND UPPERCUSE ON SKILL NAME!  #--------------------------------------------------------------------------  Skillname = "Skillname"  endclass Game_Action  #--------------------------------------------------------------------------  # * Skill Definition  # REPLACE THE WHOLE "SKILL_ID" WITH THE DESIRED SKILL ID ON THE DATABASE.  #--------------------------------------------------------------------------  def set_skillname    set_skill(SKILL_ID)  endendclass Window_ActorCommand < Window_Command  #--------------------------------------------------------------------------  # * Command List Creation  # PLACE THEM IN THE ORDER YOU WANT TO BE SHOWN IN-BATTLE.  #--------------------------------------------------------------------------  def make_command_list    return unless @actor    add_attack_command    add_skill_commands    add_item_command    add_guard_command    add_skillname_command  end  #--------------------------------------------------------------------------  # * Adding Skill Command to the list  # MIND UPPERCASE ON "Vocab Skillname"!  #--------------------------------------------------------------------------  def add_skillname_command    add_command(Vocab::Skillname, :skillname)  endendclass Scene_Battle < Scene_Base  #--------------------------------------------------------------------------  # * Window creation for Battle Command  #--------------------------------------------------------------------------  def create_actor_command_window    @actor_command_window = Window_ActorCommand.new    @actor_command_window.viewport = @info_viewport    @actor_command_window.set_handler🙂attack, method🙂command_attack))    @actor_command_window.set_handler🙂skill,  method🙂command_skill))    @actor_command_window.set_handler🙂guard,  method🙂command_guard))    @actor_command_window.set_handler🙂item,   method🙂command_item))    @actor_command_window.set_handler🙂skillname,   method🙂command_skillname))    @actor_command_window.set_handler🙂cancel, method🙂prior_command))    @actor_command_window.x = Graphics.width  end  #--------------------------------------------------------------------------  # * Comamand [skillname]  #  # Replace the third line with the "target select" you want:  # next_command - Use the skill immediately.  # select_enemy_selection - Select an enemy target.  # select_actor_selection - Select an friendly target.  #--------------------------------------------------------------------------  def command_skillname    BattleManager.actor.input.set_skillname    select_enemy_selection  endend
*My first "script". Yeah, its just a replacer, but I'm happy I managed to put it all together without 'END' syntax errors hehe   
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/toggle-row-battle-command-for-cdr-rows.18648/