Attack Skill command
This script allows you to determine an actor’s attack skill based on different properties such as the actor’s equips, currently applied states, class, or the actor itself.
You can dynamically change the attack skill during battle by simply changing one of these properties.
By default, the attack command executes the “attack” skill, which is skill 1 in the skills database.
Download
Script: download here
Required: Command Manager
Installation
Place this script below Command Manager and above Main
Usage
Note-tag actors, classes, weapons, armors, or states with
<attack skill: ID PRIORITY>
For some skill ID.
The priority is used if you have multiple states or equips with a
attack skill ID. the highest priority is taken in this case, and if multiple
attack skill ID’s have equal priority, then whichever appears first is taken.
If you would like to use a formula for the ID, you will need to use the
extended note-tag:
<attack skill> id: FORMULA priority: x </attack skill> You can use any valid formula that returns a number. The following formula variables are available:
a - the current battler you are inputting commands for t - game troop p - game party v - game variables s - game switches
If your actor does not have a custom attack skill ID, then it defaults to
the actor’s attack skill. If the actor does not have a custom attack skill,
then it defaults to the class attack skill. Finally, it will default to skill
1 if no custom attack skills are defined.
Hello!
I ran into an issue while using this script. I get the following error upon launching a Battle Test and choosing “Fight”.
Script ‘Hime Attack Skill Command’ line 165: NoMethodError occurred.
Undefined method ‘attack_skill_id’ for 16:FixNum
I was attempting to set skill #16 as my default attack skill, and wrote in the actor’s and class’ note sections.
I have the script installed below Command Manager as instructed.
Hello,
I have been testing this script and been getting
“line “Attack Skill” 159: NoMethodError
undefined method priority for 1:fixnum”
I’m currently also using other scripts, includig Yanfly’s extra equip slots, and have the command manager for this above this one.
Try disabling the other scripts and see if it still occurs.
Hello, i’m having a problem with this script. Here is what the error says:
Script ‘Attack Skill’ line 179: NameError occurred.
uninitialized constant Object::Game_BattlerCommand
Help?
By the way, the error occurs every time i launch my game.
Do you have the command manager installed and placed above this script?
Hello. Having a bit of an issue getting this to work.
Trying to put a notetag in my armor like this:
When I attack, no matter if I have it equipped or not, I get this error:
Script ‘Commands’ line 808: TypeError occurred
no implicit conversion from nil to integer
Any suggestions?
What is the “Commands” script? What is on line 808?
ok i got it, just replace “id” with “s”. facepalm
question: how do you write a formula using s? does it go by s(n) = true? or would s(n) or s[n] would suffice? i tried s(n) and s[n] on it’s own and it didn’t work.
What is “s”? Do you mean the switches? You would write s[1] to refer to switch 1.
Hi hime, i’m refering to the attack skill command, just not really sure how i should go about using a formula for it.
i’m basically changing the default attack skill to skill id 171 ( where i have the actor learn it via a battle event). what i’m doing now is activating this change via switches, like s[171] for skill id 171 for example.
do you have some pointers on how i can write it with this tag?
as in:
171: s[171]? == true
priority: 3
</attack skill>
perhaps? hope i’m making sense.
oh btw, do you know that your note manager would decompress all vx ace engine notes onto the data folder? And it is possible to update the notetags directing from those decompressed files instead of using a src tag in the notetag section. like actor1.txt for actor1 for eg 🙂
You can use this kind of formula
However, if you have a lot of conditions, you might define a method in
Game_Actor
such asAnd then you can use the formula
Thx Hime, got it.