+x% Hit on level up

TL😀R :


I want a way, any way, to add a hit increase per level to a class.


Formula should be customisable as to give différent classes varying bonuses.


I've actually been trying really hard alon on this one, here is what i tried ;


Using Hime's on level custom event plugin


Failed : Could'nt add + hit without script calls


Using a YF auto passive state that would be added to a class notetag


This felt so smart and doable, something like :


actor = $gameActors.actor(1);if
user.level = 1
actor.addHit(0.05)
else
if
user.level = 2
actor.addHit(0.1)


[...]


Of course then i realised this wasn't like trying to speak spanish ; waving my hands at the screen didn't help.


Then came setting up variables as actor level and using them in note tags to multiply a hit chance like :


<hit Plus: +user.level * 0.05>


but i dont think the extraparam plugin supports those methods


but to no successes so far.


Frustrating thing is, i'm sure that each of these options is viable... it's just me ^^


So if you have pointers.. 


Would you kindly enlighten me ?
A better solution would be to use one of the passive skill plugins instead of automatic states.


Then you can have the passive skill learned at the level in the class tab and don't need any special conditions on the notetags.


There are two such plugins available on the master plugin list, one uses weapons and one uses states in the database to set the effects of the passive.
That is indeed yet another elegant way to do it, however, after checking both plugins, one applies a state, and the other indeed goes through a weapon, neither allowing me easy access to a +0.05 hit * level, or means to express it.


(For simplicity's sake i'd like to avoid using gimmicks like giving the same skill 10 times at level up, (which i could probably already do, using a different state each time with +5%)


until i'm positive that there is no "simple" solution to this pinch


Thanks for a quick answer however, i'm always pleasantly surprised


Edit : Ohhhhh; unless you mean simply use a +5% but stack it like a regular skill every level.... i could work with that...


If you have a formula solution, for learning's sake, i'd love to see it, else, thanks for solving this problem !


Edit 2 : good god, you know you've been reading too much code when you start using If / else in your everyday sentences
no, I don't have a formula solution - those plugins indeed require an added passive skill for each increase - I was looking more at your title than at the explanation when I answered, and for a few +HIT% additions that works better than the other solutions.


A third option would be to use a combination of two plugins: one for dynamic traits (giving a script command to add traits to actors) combined with a plugin to execute a common event on levelup (where you check the level and process the dynamic trait command when needed.


That would result in a lot of added +5% internally, but none of that would be visible as they would not be linked to skills or states.
you could try yanfly's extra param plug in  but you wouldnt be able to change it for each indiviual class
It's been solved using basic ressources.


Using said plugin :


- wouldn't provide a class per class basis as needed


- Would imply using heavy "If" and a.level, since ennemies don't have level by default


As for how i did it, based on Andar's answer, i simply created a skill that added a bonus of +5%, made it passive, and gave it every level i needed it, on a class per class basis

Original thread: https://forums.rpgmakerweb.com/threads/x-hit-on-level-up.71474/