mike_312

Veteran
Veteran
Joined
Nov 16, 2020
Messages
70
Reaction score
8
First Language
Español
Primarily Uses
RMMV
hello everyone, I have the passiveskill plugin that adds a passive skill to a character, but in the end it's just a state and it falls short. Does anyone know how to make passive skills more complete? for example do, when a character has 20% of life, increase her attack. Or when a character is hit with X element, their defense increases. Putting conditions on passive abilities is what I'm looking for. used rpg maker mv
 

eomereolsson

Veteran
Veteran
Joined
Sep 29, 2021
Messages
543
Reaction score
461
First Language
German
Primarily Uses
RMMV
This sounds like a job for Yanfly's Auto Passive States and Buffs & States Core with a bit of custom javascript notetags.

First let's look at how to make passive skills in general:
Make a skill with the occasion "never", give it the appropriate name and description and give it the notetag <Passive State: x>. I also like to give these skills the <Hide in Battle> notetag from Yanfly's Skill Core, though that is optional. Actually implement the skills effect through the state x.

Your first skill is easy to implement. Just make it increase the attack stat through the normal traits from the editor. In addition give it the notetag <Passive Condition: HP Below 20%>

The second skill is a bit harder. This is where we also need the Buffs and States Core and another plugin by Astfgl66.
First, let's establish a counter that tells us how often our battler has been hit by element x in game variable y.
JavaScript:
<custom react effect>
   if (this.item().damage.elementId == x) $gameVariables.setValue(y, $gameVariables.value(y) + 1);
</custom react effect>
Now we can use variable y with Astfgl66's flat stat bonus rates to increase the battler's def.
Finally, if we want the counter to restart each battle, we use another notetag from Buff's and States Core.
JavaScript:
<Custom Battle Effect>
   $gameVariables.setValue(y, 0);
</Custom Battle Effect>
If you don't want to use the notetag, make sure to initalize variable y in an event before the first battle.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,289
Reaction score
4,240
First Language
English
Primarily Uses
RMMV
I also like to give these skills the <Hide in Battle> notetag from Yanfly's Skill Core, though that is optional.
I'm curious - why do you like to? I'm sure you know that a passive skill with an Occasion of Never already doesn't show up in battle (or the menu), so why bother with a notetag? Is it just a sort of compulsive organizational thing, or is there a purpose I'm not thinking of?
 

eomereolsson

Veteran
Veteran
Joined
Sep 29, 2021
Messages
543
Reaction score
461
First Language
German
Primarily Uses
RMMV
To be completely honest, I didn't know that it wouldn't show up anyways with the occasion "never". I just kind of assumed that it would be greyed out :rswt
 

Latest Threads

Latest Posts

Latest Profile Posts

Hello! I’d like to ask where is a good place to start logging about my game dev progress as production of my game goes forth
In one of our campus classrooms was a bag full of stuff people forgot there... my bag. That I forgot there xD
You know your room is too tiny for how much stuff you have when it gives you literal insomnia. I just cleared a bunch of stuff out and man it feels good!
1670381555475.png
Meet the Kernel. You encounter him in cyberspace. He's important!
I released a test version of my game on itch.io. If anyone wants to check it out, here's the link (for now in Brazilian Portuguese only, sorry).

https://rafael-lobo.itch.io/insolita

Forum statistics

Threads
127,094
Messages
1,183,900
Members
167,010
Latest member
GreenBoiGG
Top