How to create stacking buffs/debuffs similar to Pokemon?

Mahoken

Veteran
Veteran
Joined
Nov 24, 2013
Messages
41
Reaction score
3
First Language
English
Primarily Uses
I want to be able to make stacking buffs/defbuffs that go by Pokemon's rule. In Pokemon, you can increase or decrease a specific stat up to 6 times (stages). 


Something like:


+1 = 150% stat


+2 = 200% stat


+3 = 250% stat


or


-1 = 66% stat


-2 = 50% stat


-3 = 40% stat


I'm not sure how I could make this, so any help would be appreciated! Maybe there's a script out there that I don't know of.

2da12cfeec8ec1bed208ff344a291e22.png
 

boomy

Veteran
Veteran
Joined
Jan 6, 2013
Messages
125
Reaction score
103
First Language
English
Yanfly's buffs and states core allows you to change how many times a buff or debuff can stack
In the plugin settings there is are a few options for stacking buffs (Buff settings):


Default Limit: 6


Maximum Limit: 6


Buff Formula: Blah

Normally, MV allows buffs to stack twice. In pokemon, as you have stated, buffs can be stacked up 6 times.
Your main issue is formula. The buff formula in Yanfly's plugin (default formula) is: No. of stacks x factor + 1


This formula doesn't work well with Pokemon which uses:
(No. of stacks + 2) / 2 for buffs and
2 / (No. of stacks + 2) for debuffs


At the moment, the only way I can think of to incorporate this formula will be:

if (this._buffs[paramId] > 0) { (this._buffs[paramId] + 2) / 2 } else { (2 / (this._buffs[paramId] + 2) }


Note that the formulas are different depending if it's a debuff or a buff.
Also, evasion and accuracy cannot be modified in this way (you will have to use a state or something along those lines)

 
 

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

Latest Threads

Latest Posts

Latest Profile Posts

"You can thank my later", "But you haven't done anything", "Well, that's why ..."
Are we allowed to post about non-RPG Maker games?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

Forum statistics

Threads
105,884
Messages
1,017,238
Members
137,608
Latest member
Arm9
Top