RMMV [Buffs and States Core]Skill that consumes debuff stacks to deal bonus damage

KaitlynKitty

Regular
Regular
Joined
Apr 6, 2021
Messages
176
Reaction score
60
First Language
English
Primarily Uses
RMMV
A skill I'm working on should do bonus damage for every stack of the agility debuff present on the target. I skimmed around the plugin's guide, but couldn't find anything that tells you have to use the current buff or debuff stacks in calculations. I saw an example of one in use, but I want to be sure I'm extrapolating correctly. Currently the damage formula reads as following:

(a.atk*2)+(b._debuffs(6)*10)-b.def
 

Tray

Regular
Regular
Joined
Sep 7, 2018
Messages
50
Reaction score
10
First Language
English
Primarily Uses
RMMV
well i have something along this line for my own game but its not 1 skill its broken into 2 skills

1 to asorbe buffs from monsters that then turns into a new buff on the character

2nd skill then uses those stacks to incress its damage bassed on the # of stacks

if you want i can post them lol. longs your using yanflys Buff and States core
 

KaitlynKitty

Regular
Regular
Joined
Apr 6, 2021
Messages
176
Reaction score
60
First Language
English
Primarily Uses
RMMV
well i have something along this line for my own game but its not 1 skill its broken into 2 skills

1 to asorbe buffs from monsters that then turns into a new buff on the character

2nd skill then uses those stacks to incress its damage bassed on the # of stacks

if you want i can post them lol. longs your using yanflys Buff and States core
I just need to know the function that returns the value of debuffs.
 

Tray

Regular
Regular
Joined
Sep 7, 2018
Messages
50
Reaction score
10
First Language
English
Primarily Uses
RMMV
if (target.isStateAffected(stateId)) {
var stacks = target._states.filter(function(state) {
return state.id === stateId;
}).length;
damage += stacks * 50;
}

should work just change the ID to the ID of the state your looking for and you can change the damage multiplyed at the end to what you want this is assuming your using yanfly buff and state core aswell to add the stacks to the state as thats what this is checking for

also to clerify the damage at the end is multiplying by that number equal to the stacks so 2 stacks means 100damge 3 =150 and so on ontop the normal damage from the skill this way you can still use the skill regardless but customize it to your liking. If you would like to also change it at some point you could easily modify it to take all buffs or debuffs into count or just add 1 or 2 more to it

again as this is assuming your using the buff and state core you would put this in the note of the skill and use <Custom Apply Effect>
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,043
Reaction score
8,975
First Language
English
Primarily Uses
RMMV
should work just change the ID to the ID of the state your looking for
The OP is not looking for a state, she's talking about debuffs.

@KaitlynKitty - your thread title and your post say two different things. Your title mentions "consuming" the debuffs, which means they'd be gone after the attack resolves. Do you want that? Or do you just want to incorporate them into the damage calculation?
 

KaitlynKitty

Regular
Regular
Joined
Apr 6, 2021
Messages
176
Reaction score
60
First Language
English
Primarily Uses
RMMV
The OP is not looking for a state, she's talking about debuffs.

@KaitlynKitty - your thread title and your post say two different things. Your title mentions "consuming" the debuffs, which means they'd be gone after the attack resolves. Do you want that? Or do you just want to incorporate them into the damage calculation?
The consumption is a separate function(or rather consumption has two aspects, and I'm only asking for how to implement the other), because it would be inefficient to implement the removal of the debuff in the damage formula. Far better to just use built in remove debuff, unless that will only remove one stack?
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,043
Reaction score
8,975
First Language
English
Primarily Uses
RMMV
No, that will do what you want - I was just checking because you mentioned it in the title then not during the thread. I wanted to make sure you knew how to do it.
 

KaitlynKitty

Regular
Regular
Joined
Apr 6, 2021
Messages
176
Reaction score
60
First Language
English
Primarily Uses
RMMV
No, that will do what you want - I was just checking because you mentioned it in the title then not during the thread. I wanted to make sure you knew how to do it.
Just to be sure, the damage formula calculates first, and then triggers the other effects, right? If it removes the debuff first, that would cause issues.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,043
Reaction score
8,975
First Language
English
Primarily Uses
RMMV
Correct, effects happen after any hit is resolved.
 

Latest Threads

Latest Profile Posts

Resisting the urge to bust out watching spooky things all over. I still have days until it's Halloween month, gotta ration!
Made a free sample pack + leftovers. Free Sample Pack 1
I'm curious, how many hours in RPG Maker do you have? I'm clocked in at 2100 hours on MV and the vast majority of it is for one game. I wish I could track how much I used XP back in the day, I was on it a lot.
Why is it so early? Can I have twenty more minutes of sleep, please?
DK
Do you like this design?

GIF.gif

Forum statistics

Threads
134,810
Messages
1,250,849
Members
177,606
Latest member
Buffinto
Top