Solved, but in case other search here is the problem I was having.
I am using Galv's weapon proficiency and wanted a way to apply weapon xp to any actor who uses a skill without having to make multiple copies of the skill to apply to each individual actor.
by putting $gameVariables.setValue(1, a.actorId()); in the skill's damage formula, one can call the variable into the Galv script call with the following in a common event
$gameActors.actor($gameVariables.value(1)).gainWProfXp(100,01);
This allows one to use the variable to update the actor ID on the fly, and using the corresponding skill will add weapon proficiency to the weapon (01 in this case).
Note: In using Yanfly's battle engine core, this will show a hit to an enemy that deals 0 damage. To hide this, there is a section of Yanfly's BattleCore plugin that can be edited.
Change
} else if (result.hpAffected) {
to
} else if (result.hpAffected && result.hpDamage !== 0) {
Credit to Shaz in another thread for that solution.
This should allow one to make skills that do something other than deal damage (while secretly doing 0 damage unbeknownst to the player) and apply proficiency to the appropriate skill.
I am using Galv's weapon proficiency and wanted a way to apply weapon xp to any actor who uses a skill without having to make multiple copies of the skill to apply to each individual actor.
by putting $gameVariables.setValue(1, a.actorId()); in the skill's damage formula, one can call the variable into the Galv script call with the following in a common event
$gameActors.actor($gameVariables.value(1)).gainWProfXp(100,01);
This allows one to use the variable to update the actor ID on the fly, and using the corresponding skill will add weapon proficiency to the weapon (01 in this case).
Note: In using Yanfly's battle engine core, this will show a hit to an enemy that deals 0 damage. To hide this, there is a section of Yanfly's BattleCore plugin that can be edited.
Change
} else if (result.hpAffected) {
to
} else if (result.hpAffected && result.hpDamage !== 0) {
Credit to Shaz in another thread for that solution.
This should allow one to make skills that do something other than deal damage (while secretly doing 0 damage unbeknownst to the player) and apply proficiency to the appropriate skill.