Giving a skill conditional xparams

Is it possible to manipulate a skill's accuracy/critical rate/etc through the use of formulas? For example there is two skills i want to make, one that gives the next used skill a 100% accuracy (essentially a lock on skill that doesn't require states) and another whose accuracy increases when a switch is on/variable is n (essentially how the attack thunder works in pokemon: if its raining accuracy is 100%, otherwise its 70%). I think i have an idea for the latter, but i don't know how reliable it would be

s[n1] == true? c.hit = 100: else c.hit = 70; s[n2] == true? c.hit = 30: else c.hit = 70 # switches are placeholders, just an exampleIf it helps, i am using Yanfly's Lunatic damage and Tsuki's formula manager
Nope... The way it is handled by default is that the get function for xparams simply load out all the features that affects that xparam and return it's total. So you'd need to either add/remove features on the go, or modify the script method for getting the xparams.


Try using Yanfly's Xparam formulas.
The damage formula gets evaluated only when the skill hits it's target. So whatever you place there can only affect things AFTER the skill has been successfull - you cannot edit the chance of the skill itself by something that gets checked only after success...
Is it possible to make the lock on skill without states though (essentially, it would increase the HIT of the next skill, but only on the user and the specific target)
No non-scripted method or evented that I know of...

some other notes

1) You can make a state that raises hit but you cannot set it to only work for a specific target

But you could do something like when you use the first skill, it saves the target to a variable

$game_variables[ID] = b ; damage_formulaor short version
Code:
v[ID]=b ; damage_formula
Then make the other skill as certain hit then just check if the target is the same as the saved one, if yes, deal damage, if not, set damage to 0
Code:
v[ID] == b ? damage_formula : 0
But of course if any skill that should follow skill 1 should hit for sure then this method is not applicable...I do suggest Yanfly's Param Formulas then you can modify the hit formula to take those into account somehow
Thanks. I will try it with a combination of Yanfly's extra parameters and Lunatic objects

Original thread: https://forums.rpgmakerweb.com/threads/giving-a-skill-conditional-xparams.45741/