[RMMV] DARKEST DUNGEON DOT SYSTEM

Posts

Pages: 1
How would you go about re-creating the DoT system from Darkest Dungeon? If you are not familiar with the game, DoT damage stacks each time it is applied, but each stack also wears off after 3 turns independently from each other.

There is a great Yanfly tips & tricks page for stacking DoT:
http://www.yanfly.moe/wiki/Damage_Over_Time_Stacking_(MV_Plugin_Tips_%26_Tricks)

But the problem with this script is that if you keep re-applying, the DoT amount continues to stack and never wears off or decreases. I want each stack of DoT to be removed 3 turns after it is applied.
The simplest way I can think of would be to duplicate the state instead of stacking its effect.

But that's just a thought. I have no experience with RMMV plugins.
author=Avee
The simplest way I can think of would be to duplicate the state instead of stacking its effect.

But that's just a thought. I have no experience with RMMV plugins.

Is that possible? I would think that would require several different versions of the same state, and if State 1 is applied, then apply State 2, etc... Is there a simpler way that I'm totally missing?

I tried adding a "Turn Counter" variable that increases by 1 at the start of each turn and resets to 1 after reaching 3. I modified the Yanfly DoT Stacking Script but it's not working. FYI I have no experience scripting, I can just understand well enough to make minor tweaks, so this is way above my head.

<Category: Bypass Death Removal>

<Custom Apply Effect>
// Make sure the stack count exists.
target._stackingPoison = target._stackingPoison || 0;
// Increase the stack count.
target._stackingPoison += 1;
// Get value of Turn Counter variable
var t = $gameVariables.value(11);
// Set counter for each stack of DoT applied this turn
if (t === 1)
{var x += 1;
}
if (t === 2)
{var y += 1;
}
if (t === 3)
{var z += 1;
}
</Custom Apply Effect>

<Custom Remove Effect>
// Reset the stack count.
target._stackingPoison = 0;
</Custom Remove Effect>

<Custom Regenerate Effect>
// Make sure the stack count exists.
target._stackingPoison = target._stackingPoison || 1;
var t = $gameVariables.value(11);
if (t === 1)
{var stacks = target._stackingPoison - y;
}
if (t === 2)
{var stacks = target._stackingPoison - z;
}
if (t === 3)
{var stacks = target._stackingPoison - x;
}
// The damage formula used per tick.
var damage = stacks * 20;
// Play poison animation on the target.
target.startAnimation(59);
// Target takes HP damage.
target.gainHp(-damage);
// Play the popup.
target.startDamagePopup();
// Clear the results.
target.clearResult();
// Check if the target is dead.
if (target.isDead()) {
// If the target is dead, make it collapse.
target.performCollapse();
}
</Custom Regenerate Effect>
Pages: 1