lower resistance to an element only if already weak to it

yo, i looked around a bit but couldn't find anything about this, so here i go.


i want to have a state that lowers an enemy's resistance to an element, but only if they're already weak to it. basically i want the resistance to go from anywhere below 100% to between -5% and -25% from that number. (there would be 5 different versions of the state that reduce the resistance by 5%, 10%, 15%, 20% and 25%) i'm guessing common events could deal with this but i can't really figure out how to go about that because there doesn't seem to be a way to turn element resistance into a variable, unless i just missed it or something. a script would be fine as well.


if that's confusing in any way, i guess i could explain it by this one skill in shin sekaiju no meikyuu / etrian odyssey untold called "analyze", i believe? it makes effective elemental attacks more effective, but i want the same effect for only one element at a time. (though, that skill only applies to attacks done by the user if i remember correctly, i want this to apply to all attacks that hit the enemy.)


so, is this at all possible?
It would be a little extra work but you could apply states to the foes' at turn 0 in troop events that correspond to the elemental weakness you want them to have; example "Fire weak," it wouldn't actually be something that alters  stats rather it could be something you use to check for in conditional branches in your common events.
It is definitly possible, honestly I would do it with formulae and a little script, that because I think it is faster to achieve. But, ofc you can do it using common events and states. I can imagine of a few ways to do it. The question is, which method do you prefer? Once you decide your method I Can give you more informations. Unfortunatly atm I don't have enough time to give you a dettailed explaination of both methods 🙁
It is definitly possible, honestly I would do it with formulae and a little script, that because I think it is faster to achieve. But, ofc you can do it using common events and states. I can imagine of a few ways to do it. The question is, which method do you prefer? Once you decide your method I Can give you more informations. Unfortunatly atm I don't have enough time to give you a dettailed explaination of both methods 🙁



i would probably prefer the faster option with the formulae and the script then
Ok, and how exactly do you want to choose between the stage of your weakness? I mean, how are you going to decide if the enemy is going to have it elemental resistance lowered by 5, 10, 15, 20 or 25%?
Ok, and how exactly do you want to choose between the stage of your weakness? I mean, how are you going to decide if the enemy is going to have it elemental resistance lowered by 5, 10, 15, 20 or 25%?



the skill that causes the effect can be upgraded from level 1 up to level 5, each level adding an extra 5%
Here I am, sorry for not answering yesterday but I ad no time. I created something you can use for that purpose. I decided to add few more things so it could be used for other purposes too. You can find the script here. To use it you have to create a state for each stage of your weakness. That was the easiest and fastest way I could think of (the other one was creating more states to increase enemies' weaness to a particular element but that way you had to handle many states at once).


Everything you need to know is written in the instructions. I hope it works for you. I didn't have time to test it deeply but in a fresh project you are able to add a scaling weakness so it should do the trick.

Original thread: https://forums.rpgmakerweb.com/threads/lower-resistance-to-an-element-only-if-already-weak-to-it.71867/