Permanently Debuff Enemy

Hello,

This is for a commercial project.

I'm looking for a script to permanently debuff an enemy for the duration of the battle. In the software, the highest wait time possible is 1000 turns. I have no idea how many turns the player will need. It may be that 1000 is high enough - but I can't be sure. Maybe apply the effect multiple times? How many? I'm not comfortable with any number below infinity simply because then I would be saying that the debuff cancels after x turns, which should not be the case.

It would break my battle system if the debuff was removed during battle, so I need it active until the battle ends.

Any ideas?

Thanks 🙂
Make it a state instead of a buff, and set the duration to until battle end. Then it can never be removed except by skills or items which remove it (and provided the enemy is never given those, it will become permanent).

Edit: Though, I will say that if  your battle goes 1000 turns for any reason, either the player is really bad or your battle system is really broken. I think even that marathon end battle in Persona 3 doesn't go over 250 turns, and most players report it taking them 3 hours. 1000 turns is probably a 12 - 15 hour battle in real time. So if you really need it to be a buff, just set it 1000 as *no* battle should ever go that long.
If this can be accomplished from within the software, this thread may have to be moved to another forum.

Let's see if it works though.

I set the debuff rate to [DEF] * 100%.

I think this means that once applied, the debuff will surely take effect.

So now, how do I control how much the stat drops for a particular enemy?

So I set that up in the parameters tab?

I see rate of change. Does this mean that the stat's value will change over time? I was hoping for a fixed value drop unique to each enemy.

And, does the order of the Features in the setup matter?

Thanks.
I think you got it all wrong somehow. You set in the features tab what it actually does to the target. Nothing more or less. So DEF * 100 means that it will set their DEF stat to 100% of its original, which means it stays the same. And that is where you set how much it drops by (or increases). But, note that everything is percents, so the system is going to multiply the original stats by the percent you put in there.

Example: if you want a state to lower the enemies DEF by 20%, you would set in the features tab DEF * 80% (as lowering by 20% means 80% is left over).

If you want the change to be a fixed number though that does require a script, as the software only handles percentage changes to stats.
An alternative, straightforward and with absolute assurance that it will do what you want, is to make a state which debuffs the amount you want.  Set the removal of the state to 'Battle End'.  That way it will stay there no matter how long, or short, your battle is.  Then have your skill, or whatever, inflict that state.

Suppose, however, that you want this to be a skill which the character can use in other battles, with just an ordinary debuff.  There are ways to do that if you have the database id of the boss enemy that you want this to apply to.  Is that what you want?
An alternative, straightforward and with absolute assurance that it will do what you want, is to make a state which debuffs the amount you want.  Set the removal of the state to 'Battle End'.  That way it will stay there no matter how long, or short, your battle is.  Then have your skill, or whatever, inflict that state.

Suppose, however, that you want this to be a skill which the character can use in other battles, with just an ordinary debuff.  There are ways to do that if you have the database id of the boss enemy that you want this to apply to.  Is that what you want?
This seems to be the best method for this. I'm running into a problem though. I want to activate the skill when a certain enemy dies.

This is what I've tried so far:

1 - I've tried to force the action when enemy's HP is 0% or below, but it seems that the enemy dies before the events are performed, and dead enemies can't perform actions.

2 - When at the end of turn, for the span of battle, a conditional branch checks if enemy has death inflicted, but then we run back into the original issue - dead enemies can't perform actions.

3 - I've tried to make a placeholder enemy without a battle sprite to perform the action when conditions are met. But the placeholder becomes selectable in battle to attack.

4 - I've tried to make the placeholder inactive by making it appear halfway from the options. But enemies that are in the Appear Halfway state are inactive so they can't perform actions.

Edit:

Okay, I've found that I can use the change enemy state event. That seems to work. I'll continue testing.
How I've handled things that I need to run when an enemy dies is this way:

-Start of battle, add the state immortal to the enemy (this assumes you didn't touch the default states any).

-Set an troop event to run when Enemy HP is 0% or less.

-Inside the troop event, do the following, in this order:

-1: Remove the immortal state.

-2: Do the action they are supposed to do.

-3: Add the state KO to the enemy.

What this does is it keeps them alive long enough to perform their action, then they die. I use it mainly for death speeches, or for battles that are supposed to end when you kill one specific enemy out of the group.

Original thread: https://forums.rpgmakerweb.com/threads/permanently-debuff-enemy.44792/