How to add a variable to the target's parameter using damage formula

I am trying to create a skill that increases an ally's attack (Scope: 1 ally) by the value of a variable (increasing it by the value of the user's magic attack (+ a.mat) would work also).

I've been having some success at this by applying States and then using a common event to apply parameter changes based on whether or not a state is inflicted.  But it's starting to get rather complicated... especially with multiple enemies.  So I was wondering if it's possible to use the damage formula itself to simply add to the target's parameter by either a variable or the user's magic attack.

This would save me a lot of eventing if it were.  If anyone knows any alternate methods that would more easily obtain this objective I would like to hear about them also.
I believe it should be $gameVariables.value(n)

edit: i think i read this all wrong, are you talking about using a game variable to do something or?


edited edit: to my knowledge i dont know without a script for a way to change the scope that a skill will affect. Unless someone wants to chime in and correct me 😛 , but i guess im still not clear on exactly u mean.
I believe it should be $gameVariables.value(n)

edit: i think i read this all wrong, are you talking about using a game variable to do something or?
I was hoping there was a way I could increase the target's Attack by either the value of a variable or the instigator's Magic Attack while inside the damage formula.

That way i would not have to create a separate common event for each instigator to apply the correct changes to the target's parameter.  Does that make more sense or am I still losing you?

 

edited edit: to my knowledge i dont know without a script for a way to change the scope that a skill will affect. Unless someone wants to chime in and correct me  😛 , but i guess im still not clear on exactly u mean.

 
I'm not wanting to change the scope that a skill will affect so that's ok. 

What I'm wanting to change is the amount by which the skill increases the target's Attack.  And I would like for these changes to be based on either the value of a variable or the instigator's Magic Attack.
Well creating a skill that increases the targets attack is easy, as you could just add a state to the skill that after damage increases the targets attack by adding a.addState(X) to the damage formula (x being the state in question). Then to make the state specific you may find some use in http://forums.rpgmakerweb.com/index.php?/topic/48777-quasi-params-plus/ scripts, which allows more control over what states do. Am i getting this right? if not maybe give a more specific example of what you need it to do
Well creating a skill that increases the targets attack is easy, as you could just add a state to the skill that after damage increases the targets attack by adding a.addState(X) to the damage formula (x being the state in question). Then to make the state specific you may find some use in http://forums.rpgmak...si-params-plus/ scripts, which allows more control over what states do. Am i getting this right? if not maybe give a more specific example of what you need it to do
Would it be just as easy to create a skill that increases the target's attack by a specific amount related either to the value of a variable or the instigator's magic attack value?

If so - could you give an example of how to write it?

A specific example would be a skill that when used on an ally or self increases the ally's attack power by an amount equal to the instigator's Magic Attack.  Similar to how a healing spell works - only instead of restoring life it adds Attack.

The problem with using States is they aren't instigator specific and apply general effects to the target.  So I would have to make every Skill and State unique to that specific instigator in order to apply the correct changes... unless I am missing something? That's why I was hoping to do the parameter changes through the damage formula instead. 
The problem with that is to my knowledge there is no way within the damage formula to increase a targets attack. So the easier way to me is have an attack that then applies the state with the desired affect, you could make the state have no icon so its invisible. else i don't know of a way to do it directly from the damage formula
The problem with that is to my knowledge there is no way within the damage formula to increase a targets attack. So the easier way to me is have an attack that then applies the state with the desired affect, you could make the state have no icon so its invisible. else i don't know of a way to do it directly from the damage formula
I see.  I was afraid of that.

I may have added this after you read my post so I'll describe it again.

The problem I am running into when using States to increase a target's attack is that I don't know how to access the instigator's information.  So I would have to limit the State to a single instigator - that way I know by what value to increase the target's attack power during the State.  Otherwise it would be a general value that doesn't differentiate between who actually cast the spell.

Does that make any sense to you?
When you say instigator, are you saying the user or the target?
When you say instigator, are you saying the user or the target?
The user - the person who is actually casting the spell and not the target.  Because it's the user's Magic Attack that I want to influence the amount of Attack the spell gives and not the targets.

I think I can make it work with States - but it's going to be a nightmare to event.  I was hoping I could save myself a lot of trouble and just do it with the damage formula similarly to how you can restore HP by just putting 0 + a.mat into the formula.  

Would have been real nice if I could have just written something like atk = +a.mat into the skill instead of having to create a unique state for every enemy just so I can keep track of the instigator/user who is applying the state. 

Original thread: https://forums.rpgmakerweb.com/threads/how-to-add-a-variable-to-the-targets-parameter-using-damage-formula.54330/