First question: I'm using Yanfly's code for Stacking Damage over time. It works as intended. I want to create multiple types of stacking DoTs that deal different kinds of elemental damage, eg: poison, burning, drowning. Dunno how to accomplish this. Yanfly has a script that lets you establish what kind of damage a dot state does (using <DoT Element: x> in notes), but so far I haven't been able to mesh the two effects together. Can anyone offer any advice?
Second question: I want to make an item that performs a random skill from a list of possible skills. My plan--and this seems to be the common way to do this--was to call a common event that assigns a random variable, then run through a list of conditional branches until the variable is hit. I ran into a problem right away: because it's an item, any actor can use it. And because any actor can use it, there's no way to use the Force Action event, since that requires a specific actor. Is there a workaround to this?
Second question: I want to make an item that performs a random skill from a list of possible skills. My plan--and this seems to be the common way to do this--was to call a common event that assigns a random variable, then run through a list of conditional branches until the variable is hit. I ran into a problem right away: because it's an item, any actor can use it. And because any actor can use it, there's no way to use the Force Action event, since that requires a specific actor. Is there a workaround to this?
Code:
<Custom Apply Effect>
// Make sure the stack count exists.
target._stackingDrowning = target._stackingDrowning || 0;
// Increase the stack count.
target._stackingDrowning += 1;
</Custom Apply Effect>
<Custom Remove Effect>
// Reset the stack count.
target._stackingDrowning = 0;
</Custom Remove Effect>
<Custom Regenerate Effect>
// Make sure the stack count exists.
target._stackingDrowning = target._stackingDrowning || 1;
// Sets the maximum amount of stacks to 5.
var stacks = Math.min(5, target._stackingDrowning);
// The damage formula used per tick.
var damage = stacks * origin.mat * 2;
// Play Drowning animation on the target.
target.startAnimation(1);
// 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>