Hello. a.atk is a stat which affects the general attack of an actor. That's fine but somewhat problematic I you want to use certain skills which aren't involve any weapon.
I need a possibility to calculate the damage without adding the damage which the weapon would inflict. Is there any stat for this or any good way to accomplish such a thing?
Use two different attack stats with one representing the damage from the weapon, and the other representing additional damage from other sources such as Character or Equipment. Then your normal attack can be:
a.atk +a.___ - b.def
or whatever, and then you can have a skill that does something like
2 + a.___ - b.def
or maybe just
a.___ - b.def
or whatever kind of formula you want to use.
Try this code:
(a.atk - a.equips()[0].atk)
That's the user's atk minus the atk from the current weapon slot.
Note that "equips()[0]" refers to your weapon slots, and in the default engine this includes dual weilding. However Equiping Plugins like Yanfly's Equip Core & Himeworks Equip Slots change how this function works.
For Yanfly this means the code refers to the first equip slot you have. Regardless if it's a weapon or not.
Thanks so much you two! I thought I had to invent a entire new stat for this which wouldn't be so effortless like it seems.
But that are convinient and adequate solutions. Both of them.