What is the code to add a debuff on a target?

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,087
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
Try:
Code:
target.addDebuff(paramId, turns);
Replace paramId with a number from 0~7 indicating which parameter to affect: mhp, mmp, atk, def, mat, mdf, agi, luk respectively. Replace turns with the number of turns the buff should last. For example, to apply a 3-turn agi debuff:
Code:
target.addDebuff(6, 3);

...or, if your "debuff" is actually a state:
Code:
target.addState(7);
^ This will add state ID 7 to the target, change the number as needed. :)
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Why not just use the skill "effects" box to add the debuff?
 
Joined
Apr 25, 2019
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMV
Try:
Code:
target.addDebuff(paramId, turns);
Replace paramId with a number from 0~7 indicating which parameter to affect: mhp, mmp, atk, def, mat, mdf, agi, luk respectively. Replace turns with the number of turns the buff should last. For example, to apply a 3-turn agi debuff:
Code:
target.addDebuff(6, 3);
Thanks so much! :)

Why not just use the skill "effects" box to add the debuff?
It's a move that hits a few times and I want the debuff to only be applied once, it was a bit of an overkill when it was applying a defense buff over and over after each hit lol


Edit: Tested it and it turns out this wasn't the solution I was looking for. It still applies the debuff after each hit >_>
 
Last edited:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
You probably need to use a different notetag instead of the post damage eval.. Or use a check if the target already has a debuff
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top