MV [Resolved] Skill that adds permanent passive HP regen state

Hi all, I'm trying to add in a Skill thats only purpose is to add a permanent passive HP Regen state with Yanfly's Passive States in MV (i.e. when you buy this skill, the character now permanently has 2% HP Regen), but I can't for the life of me understand why it's not working.

Here's the Skill database:
1768077891406.png

Here's the state:
1768077897853.png

(I was trying both the +hrg from Parameter Control and the Baseline Regen, but neither seem to work). In game; we can see nothing is showing in the status menu, and no regen happens in battle (this battler has self-damaging skills, and this regen is supposed to part-compensate):
1768077904805.png
when you buy this skill
exactly how is this being done? if the actor has access to the skill, but hasnt "learned" it, then they wouldnt have any associated passive.

also provide a screenshot of your plugin manager so that your load order can be confirmed.
exactly how is this being done? if the actor has access to the skill, but hasnt "learned" it, then they wouldnt have any associated passive.

also provide a screenshot of your plugin manager so that your load order can be confirmed.
For testing purposes, I am just adding the skill to the actor directly via the database right now. However, when the skill is working, I will add to the Skill Tree setup I have going.

I doubt my oppressively long plugin list will help anyone much, it actually makes a screenshot too large to be uploaded here so I've had to split into two, but if you insist:


The YEP plugins are organised perfectly by the website, however, if that is the concern.
The YEP plugins are organised perfectly by the website, however, if that is the concern.
perfect

For testing purposes, I am just adding the skill to the actor directly via the database right now.
that exactly is what i was talking about. a skill added to an actor via a trait doesnt count as being "learned" and passives will not be counted. the skill has to be learned, which in terms of the regular engine is only via leveling up a class or is using the learn skill event command.

assuming your skill tree plugin has the actors learn the skill it should be fine (i.e Game_Actor.learnSkill()), but just adding the skill to them via a database trait wouldnt do anything
perfect


that exactly is what i was talking about. a skill added to an actor via a trait doesnt count as being "learned" and passives will not be counted. the skill has to be learned, which in terms of the regular engine is only via leveling up a class or is using the learn skill event command.

assuming your skill tree plugin has the actors learn the skill it should be fine (i.e Game_Actor.learnSkill()), but just adding the skill to them via a database trait wouldnt do anything
Thanks. That's really weird IMHO that it doesn't initialise the passive.

But thanks, yes, adding it in via the skill tree script call instead and it works fine.

It's always something silly like that! Ty
That's really weird IMHO that it doesn't initialise the passive.
It's intentional. A state can already give an actor additional skills, but if skills now also come with states, and states can give skills, which can give states... now your game has crashed because you've hit an infinite loop.
So by design, the plugin only looks at "learned skills" to get passives from because skills being "learned" vs "known" is a distinction the engine already makes. It prevents the loop entirely since a state can make an actor "know" a skill , but it can't make an actor "learn" the skill.
It's intentional. A state can already give an actor additional skills, but if skills now also come with states, and states can give skills, which can give states... now your game has crashed because you've hit an infinite loop.
So by design, the plugin only looks at "learned skills" to get passives from because skills being "learned" vs "known" is a distinction the engine already makes. It prevents the loop entirely since a state can make an actor "know" a skill , but it can't make an actor "learn" the skill.
Makes sense, the amount of times I've accidently created a killer loop myself when modding other games is pretty funny, so yeah.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/resolved-skill-that-adds-permanent-passive-hp-regen-state.181882/