Alkaline

Veteran
Veteran
Joined
Jun 30, 2020
Messages
45
Reaction score
8
First Language
English
Primarily Uses
RMMV
Is there a way I can set an enemy to gain resistance after being hit with attacks of the same type? (i.e. after 3 fire attacks the enemy now takes half damage from fire)?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,715
Reaction score
9,875
First Language
German
Primarily Uses
RMMV
yes and no.

you can add as many elemental damage rates to an enemy as you want, they will simply multiply each other.
doing so after a time will require it to be a state, and theoretically this can be done by a troop event checking for most conditions.

unfortunately the conditions you specify are a bit complex to be handled by events, especially if there are many possible attacks of the same element.

so your best guess might be to look for a plugin that could handle this.
 

Alkaline

Veteran
Veteran
Joined
Jun 30, 2020
Messages
45
Reaction score
8
First Language
English
Primarily Uses
RMMV
I feel like Im getting close to event programming this in the troops menu, but I cant seem to be able to count and keep track of how many times the fire move, for example, was used...
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,715
Reaction score
9,875
First Language
German
Primarily Uses
RMMV
that needs to be done in the skill, either by calling a common event that counts the correct variables up or by a javascript command in the damage formula that does the same.
both ways require different variables for different targets and will have problems of targeting the correct variable.

there are reasons why I said this is difficult to do by events.
 

dzgword

Villager
Member
Joined
Oct 26, 2016
Messages
9
Reaction score
1
First Language
English
Primarily Uses
There a way where you can do it with one hit if you are using Yanfly's scripts


I would say start there, Maybe add a variable to each element and if variable gets to the number you set activate that state for resistance if its for one enemy.
 

sawworm

Sir Waste Time A Lot
Veteran
Joined
Jul 28, 2013
Messages
141
Reaction score
43
First Language
Turkish
Primarily Uses
RMVXA
Is there a way I can set an enemy to gain resistance after being hit with attacks of the same type? (i.e. after 3 fire attacks the enemy now takes half damage from fire)?
Alright, you need to setup a troop event for that and that needs to check some variables for that.
On skill tab on your fire skill put that into formula before the damage:
$gameVariables.setValue(21, $gameVariables.value(21)+1);
Change the 21 to what your fire variable will be.
Then add a state to change element resist.
Back to troop events, make one event page like that Conditions: Turn End - Span: Turn
on the bottom: if the enemy has 3> fire variable
add state Fire Resist to enemy.
After the battle ends set those element variables to 0 (I recommend using a common event to reset them). I hope this helps.
 

Alkaline

Veteran
Veteran
Joined
Jun 30, 2020
Messages
45
Reaction score
8
First Language
English
Primarily Uses
RMMV
Alright, you need to setup a troop event for that and that needs to check some variables for that.
On skill tab on your fire skill put that into formula before the damage:
$gameVariables.setValue(21, $gameVariables.value(21)+1);
Change the 21 to what your fire variable will be.
Then add a state to change element resist.
Back to troop events, make one event page like that Conditions: Turn End - Span: Turn
on the bottom: if the enemy has 3> fire variable
add state Fire Resist to enemy.
After the battle ends set those element variables to 0 (I recommend using a common event to reset them). I hope this helps.
Awesome! I had something similar set up where I had a common event as an effect of the skill use to count up the variable, I just wasn't able to get the state to show up but now it works perfectly!

Thanks a lot!
Funny enough my variable was also number 21, but what does that line do for the damage formula?
 

sawworm

Sir Waste Time A Lot
Veteran
Joined
Jul 28, 2013
Messages
141
Reaction score
43
First Language
Turkish
Primarily Uses
RMVXA
Awesome! I had something similar set up where I had a common event as an effect of the skill use to count up the variable, I just wasn't able to get the state to show up but now it works perfectly!

Thanks a lot!
Funny enough my variable was also number 21, but what does that line do for the damage formula?
Whenever you cast or do a skill, it adds +1 to the 21st variable~
 

Latest Threads

Latest Profile Posts

I know I'll put one of my game's sprites here to give the illusion that I am a productive member of game society.
handelspriteanim.gif
Preparing untested English localization for DOWNFALLEN.

unknown-43.png
Sometimes I wonder if I feature creep... 225 magic spells is a lot lol.
Being hit with nostalgia for something that's gone is both a great thing and so sad.

But being a creative means having ideas for bringing stuff back to life, which can be frustrating and rewarding in it's own right.

Forum statistics

Threads
124,499
Messages
1,164,054
Members
163,327
Latest member
Baticles
Top