Compatibility: Battle Command List and Weapon Attack Replace

The following scripts are available on Yanfly Channel.


Battle Command List allows customization based on actors and classes:





Weapon Attack Replace allows linking weapons to skill use:





However, WAR skills still show up written as "Attack" in the command list, even skills with the <command name: string> notetag.


How difficult would it be to make these work together, so that "Attack" is replaced with either the name of the skill or the weapon linked to that skill?
Yanfly's "Battle Command List" script sets the first skill "Attack" as the default attack skill. That is why the WAR skills do not show up in the command list.

I have a workaround that consists of multiple actor and skill notetags, a common event, multiple switches, and multiple conditional branches if you are interested.

How complicated that can be depends on how many playable actors you have, and how many different weapon skills for each actor that you intend to have.
Well the WAR skills are still used, their names/effects are just hidden during selection - it only displays the targets, and I thought that might confuse players.  I have non-attack weapons (ex. the Wood Staff casting Heal) so I might have to rename Attack to something like "Primary" as a placeholder.

What was your workaround?
Hi, thanks for waiting, Kest!

The workarounds I have here do not require the "Weapon Attack Replace" script.

The following is an example of how to event this with the "Battle Command List" script to activate different attack skills with different weapons.

Example:

Playable characters : 2 (Eric, Natalie)

Weapon types : 3 (Attack, Windslash, Heal)

Method 1 (using the "hide until switch: x" notetag):

Spoiler
Actors

[SIZE=14.4444446563721px]In either the relevant 'Actors' or 'Classes' tab, add the following notetag to the two actors.[/SIZE]

Eric:

<command list>

Skill 11

Skill 12

Skill 13

Defend

etc.

</command list>

Natalie:

<command list>

Skill 14

Skill 15

Skill 16

Defend

etc.

</command list>
 

Skills


In the 'Skills' tab, add the following notetags to the following skills:

Skill 11 : <command hide until switch: 11>

Skill 12 : <command hide until switch: 12>

Skill 13 : <command hide until switch: 13>

 

Skill 14 : <command hide until switch: 14>

Skill 15 : <command hide until switch: 15>

Skill 16 : <command hide until switch: 16>

 

[SIZE=14.4444446563721px]Make sure the Skill Type for each skill is set to 'None'.[/SIZE]



 

Common event


- At the start of the game, set an autorun event to turn a switch on for the common event (eg. common event 1) with the trigger set to 'parallel process'.

 

- In the contents, create the following conditional branches :

-> Conditional Branch: $game_actors[1].equips[0].nil?

--> Control Switches: [0011..0013] = OFF

Branch End

-> Conditional Branch: [Eric] is [Hand Ax] equipped.

--> Control Switches: [0011] = ON

[SIZE=14.4444446563721px]--> Control Switches: [0012..0013] = OFF[/SIZE]

Branch End

-> Conditional Branch: [Eric] is [Wind Sword] equipped.

--> Control Switches: [0012] = ON

[SIZE=14.4444446563721px]--> Control Switches: [0011] = OFF[/SIZE]

--> Control Switches: [0013] = OFF

Branch End

-> Conditional Branch: [Eric] is [Healing Staff] equipped.

--> Control Switches: [0013] = ON

[SIZE=14.4444446563721px]--> Control Switches: [0011..0012] = OFF[/SIZE]

[SIZE=14.4444446563721px]Branch End[/SIZE]


-> Conditional Branch: $game_actors[2].equips[0].nil?

--> Control Switches: [0014..0016] = OFF

Branch End

-> Conditional Branch: [Natalie] is [Hand Ax] equipped.

--> Control Switches: [0014] = ON

[SIZE=14.4444446563721px]--> Control Switches: [0015..0016] = OFF[/SIZE]

Branch End

-> Conditional Branch: [Natalie] is [Wind Sword] equipped.

--> Control Switches: [0015] = ON

[SIZE=14.4444446563721px]--> Control Switches: [0014] = OFF[/SIZE]

--> Control Switches: [0016] = OFF

Branch End

-> Conditional Branch: [Natalie] is [Healing Staff] equipped.

--> Control Switches: [0016] = ON

[SIZE=14.4444446563721px]--> Control Switches: [0014..0015] = OFF[/SIZE]

[SIZE=14.4444446563721px]Branch End[/SIZE]

 

[SIZE=14.4444446563721px]- Add a "Wait" command 'x' frames (5-60) at the end of the common event to prevent the parallel process from slowing down the game.[/SIZE]

[SIZE=14.4444446563721px][/SIZE]

 

[SIZE=14.4444446563721px]For multiple weapons using the same weapon skill, you can use this script call in the conditional branches:[/SIZE]


$game_actors[x].weapons.include?($data_weapons[y]) || [SIZE=14.4444446563721px]$game_actors[x].weapons.include?($data_weapons[y])[/SIZE]

 

where 'x' is your actor's location in the actor database, and 'y' is the location of your weapon in the weapon database.

 

'||' means 'or'

 

Example :

 

[SIZE=14.4444446563721px]$game_actors[1].weapons.include?($data_weapons[3]) || [/SIZE][SIZE=14.4444446563721px]$game_actors[1].weapons.include?($data_weapons[12]) [/SIZE][SIZE=14.4444446563721px]|| [/SIZE][SIZE=14.4444446563721px]$game_actors[1].weapons.include?($data_weapons[15])[/SIZE]





Method 2 (using the "hide until learn" notetag):

Spoiler
[SIZE=14.4444446563721px]Actors[/SIZE]

[SIZE=14.4444446563721px]In either the relevant 'Actors' or 'Classes' tab, add the following notetag to the two actors.[/SIZE]

Eric:

<command list>

Skill 11

Skill 12

Skill 13

Defend

etc.

</command list>

Natalie:

<command list>

Skill 11

Skill 12

Skill 13

Defend

etc.

</command list>
 

Skills


In the 'Skills' tab, add the following notetags to the following skills:

Skill 11 : <command hide until learn>

Skill 12 : <command hide until [SIZE=14.4444446563721px]learn>[/SIZE]

Skill 13 : <command hide until [SIZE=14.4444446563721px]learn>[/SIZE]

 

Make sure the Skill Type for each skill is set to 'None'.



 

Common event


- At the start of the game, set an autorun event to turn a switch on for the common event (eg. common event 1) with the trigger set to 'parallel process'.

 

- In the contents, create the following conditional branches :

-> Conditional Branch: $game_actors[1].equips[0].nil?

--> Change Skills: [Eric], - [Attack]

[SIZE=14.4444446563721px]--> Change Skills: [Eric], - [Windslash][/SIZE]

[SIZE=14.4444446563721px]--> Change Skills: [Eric], - [Heal][/SIZE]

Branch End

-> Conditional Branch: [Eric] is [Hand Ax] equipped.

--> Change Skills: [Eric], + [Attack]

[SIZE=14.4444446563721px]--> Change Skills: [Eric], - [Windslash][/SIZE]

[SIZE=14.4444446563721px]--> Change Skills: [Eric], - [Heal][/SIZE]

Branch End

-> Conditional Branch: [Eric] is [Wind Sword] equipped.

--> Change Skills: [Eric], - [Attack]

[SIZE=14.4444446563721px]--> Change Skills: [Eric], + [Windslash][/SIZE]

[SIZE=14.4444446563721px]--> Change Skills: [Eric], - [Heal][/SIZE]

[SIZE=14.4444446563721px]Branch End[/SIZE]

-> Conditional Branch: [Eric] is [Healing Staff] equipped.

--> Change Skills: [Eric], - [Attack]

[SIZE=14.4444446563721px]--> Change Skills: [Eric], - [Windslash][/SIZE]

[SIZE=14.4444446563721px]--> Change Skills: [Eric], + [Heal][/SIZE]

[SIZE=14.4444446563721px]Branch End[/SIZE]


-> Conditional Branch: $game_actors[2].equips[0].nil?

--> Change Skills: [Natalie], - [Attack]

[SIZE=14.4444446563721px]--> Change Skills: [Natalie], - [Windslash][/SIZE]

[SIZE=14.4444446563721px]--> Change Skills: [Natalie], - [Heal][/SIZE]

Branch End

-> Conditional Branch: [Natalie] is [Hand Ax] equipped.

--> Change Skills: [Natalie], + [Attack]

[SIZE=14.4444446563721px]--> Change Skills: [Natalie], - [Windslash][/SIZE]

[SIZE=14.4444446563721px]--> Change Skills: [Natalie], - [Heal][/SIZE]

Branch End

-> Conditional Branch: [Natalie] is [Wind Sword] equipped.

--> Change Skills: [Natalie], - [Attack]

[SIZE=14.4444446563721px]--> Change Skills: [Natalie], + [Windslash][/SIZE]

[SIZE=14.4444446563721px]--> Change Skills: [Natalie], - [Heal][/SIZE]

Branch End

-> Conditional Branch: [Natalie] is [Healing Staff] equipped.

--> Change Skills: [Natalie], - [Attack]

[SIZE=14.4444446563721px]--> Change Skills: [Natalie], - [Windslash][/SIZE]

[SIZE=14.4444446563721px]--> Change Skills: [Natalie], + [Heal][/SIZE]

[SIZE=14.4444446563721px]Branch End[/SIZE]

 

[SIZE=14.4444446563721px]- Add a "Wait" command 'x' frames (5-60) at the end of the common event to prevent the parallel process from slowing down the game.[/SIZE]

[SIZE=14.4444446563721px][/SIZE]

 

[SIZE=14.4444446563721px]For multiple weapons using the same weapon skill, you can use this script call in the conditional branches:[/SIZE]


$game_actors[x].weapons.include?($data_weapons[y]) || [SIZE=14.4444446563721px]$game_actors[x].weapons.include?($data_weapons[y])[/SIZE]

 

where 'x' is your actor's location in the actor database, and 'y' is the location of your weapon in the weapon database.

 

'||' means 'or'

 

Example :

 

[SIZE=14.4444446563721px]$game_actors[1].weapons.include?($data_weapons[3]) || [/SIZE][SIZE=14.4444446563721px]$game_actors[1].weapons.include?($data_weapons[12]) [/SIZE][SIZE=14.4444446563721px]|| [/SIZE][SIZE=14.4444446563721px]$game_actors[1].weapons.include?($data_weapons[15])[/SIZE]





If you need screenshot examples of these methods, please PM me as I only have dropbox.

Hope that helps. ^^
Thanks for your reply, and for spending the time on this. That second method seems promising, and I will give it a shot.

Though if anyone can make the two yanfly scripts compatible, that would be best of all.
I did not test this, but you can try putting this little snippet below both scripts:

class Window_ActorCommand < Window_Command #-------------------------------------------------------------------------- # * Add Attack Command to List #-------------------------------------------------------------------------- def add_attack_command cmd_name = $data_skills[@actor.attack_skill_id].name add_command(cmd_name, :attack, @actor.attack_usable?) endendThis should, in theory, make your attack command name the same as your name of the skill set up for the weapon attack.Note that any script below this snippet which overwrites this method will make this snippet ineffective!
I have not encountered any errors yet, this snippet seems to work effortlessly!

Original thread: https://forums.rpgmakerweb.com/threads/compatibility-battle-command-list-and-weapon-attack-replace.35534/