States do Damage over time by element

States do Elemental Damage v1.02
Created by Roninator2​

Introduction
A request from WitchAmy to have Damage Over Time get resisted by elemental resistance

Features
- Allows States inflicted on the actor to cause damage each turn
- Damage is reduced or increased by resistances
- Resistances can be placed on Actor, Class or Equipment
- Each of those three can be enabled or disabled
- Also supports damage by percentage - similar to poison (mhp * hrg)
- Damage can also be a fixed value
- resistance value can be additive, meaning added together before calculating the damage adjustment
* this allows you to have resistances on actors and classes combine to give a higher resistance value.
or this can be left to false which will adjust the damage for each stage.
- Works for actors and enemies

e.g. damage = 100
actor resists 20%
damage = 80
class resist 20%
damage = 64
armour resists 20%
damage = 51

vs combined
actor, class & equip = 60%
damage = 40

How to Use
Put below Materials and Above Main
Place tag in the state note box
<element damage: 3, 15, 1>

Images
Spoiler: Images
setup
1694876005846.png
1694876131512.png


1694876157701.png
1694876183284.png


Script
Spoiler: Script

Credit and Thanks
- Roninator2

Terms of use
Follow the original Authors terms of use where applicable
- When not made by me (Roninator2)
Free for all uses in RPG Maker except nudity
Anyone using this script in their project before these terms
were changed are allowed to use this script even if it conflicts
with these new terms. New terms effective 03 Apr 2024
No part of this code can be used with AI programs or tools
Credit must be given
game crashed with the following error when tried to deal elemental damage via your script
1694720778790.png
game crashed with the following error when tried to deal elemental damage via your script
An option not accounted for. The enemy doing regeneration of hp. No problem.
I assume you would want the enemy to do the default hp regen?
I'll update the script in a second.
An option not accounted for. The enemy doing regeneration of hp. No problem.
I assume you would want the enemy to do the default hp regen?
I'll update the script in a second.
no, the state was only dealing the custom DOT from your script
1694747407862.png
the state was only dealing the custom DOT from your script
Yes but the enemy has the state and the Poison damage over time would normally be the HRG - 10%
But if your making states that can apply to enemy and actors then I'll need to adjust for the enemies.
Give me a little bit to work that in.
Yes but the enemy has the state and the Poison damage over time would normally be the HRG - 10%
But if your making states that can apply to enemy and actors then I'll need to adjust for the enemies.
Give me a little bit to work that in.
ah i see, good luck then
ah i see, good luck then
You didn't check my edit timeline
1694872575887.png


1694872556055.png


It's done. Test it out
You didn't check my edit timeline
ah my bad, there is no notif for edits so i missed that
It's done. Test it out
now the DOT just does not appear at all
now the DOT just does not appear at all
You'll have to provide more detail than that.
My test project works fine.
I only added in support for the enemy to receive damage nothing else changed.

setup
1694876005846.png
1694876131512.png

1694876157701.png
1694876183284.png
You'll have to provide more detail than that.
My test project works fine.
I only added in support for the enemy to receive damage nothing else changed.

setup
View attachment 276726View attachment 276728
View attachment 276730View attachment 276731
I have a skill called Toxic Bite which applies Poisoned state
1694879602655.png
1694879611954.png

The skill works and then the state applies properly. However, at the end of the turn, there is no indication that the enemy has lost health nor does it actually reduce their hp upon closer inspection
The skill works and then the state applies properly. However, at the end of the turn, there is no indication that the enemy has lost health nor does it actually reduce their hp upon closer inspection
Well the script now works for enemies, it is likely that you have another script changing the damage for enemies.

However
1. the formula does not need 0 +, just use a.atk * 5.2 - b.def *2.6
2. What is the enemies resistances?
Well the script now works for enemies, it is likely that you have another script changing the damage for enemies.

However
1. the formula does not need 0 +, just use a.atk * 5.2 - b.def *2.6
2. What is the enemies resistances?
1. i know, i was using Quick Formula for the skill's damage and it just leaves the 0 there
2. they enemy i tested the skill on does not have any resistances
1. i know, i was using Quick Formula for the skill's damage and it just leaves the 0 there
2. they enemy i tested the skill on does not have any resistances
OK so I ignored this for a while because I was sure you were doing something wrong,
but then I thought "Does he mean if the enemy does not have any element association to the element that is damaging then it doesn't apply?"
Then I tested it out.
And nope, all works good.
1697047973790.png
1697047997922.png

1697048064075.png
1697047984360.png

So it is something conflicting in your project or something you have done that is making it not work.
I was just looking for one of these a week or so ago and I guess I missed this lol. Works really well, but (and I may just be dumb or its a script conflict) it seems like the DoT cant kill. Not a huge issue, the player can just give them a little love tap lol.

Original thread: https://forums.rpgmakerweb.com/threads/states-do-damage-over-time-by-element.161104/