Kalat-Bovine

Villager
Member
Joined
Jul 12, 2022
Messages
10
Reaction score
3
First Language
English
Primarily Uses
RMMV
I'm attempting to make a move in RPG Maker MV similar to Substitute from the pokemon games. For those that are not familiar with the move, you can read about it here.

My current struggles with it are trying to make a state that goes away when the person that has it gets hit while not taking damage. Setting it up with 1000% def and mdf and remove by damage just results in permanent damage immunity, and if I try to give it an evasion rate that will make it so the user takes full damage when they get hit which is not what I want.

I did find a similar question answered by users Zalerinian and Shaz, but It didn't give me an answer that could really help me out with what I'm needing.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
5,553
Reaction score
3,619
First Language
English
Primarily Uses
RMMV
My current struggles with it are trying to make a state that goes away when the person that has it gets hit while not taking damage.
This is easily done with Yanfly's Buffs and States Core, a free plugin. Put in your state's notetags:
Code:
<Custom React Effect>
if (this.checkDamageType([1, 5]))
{
    value=0;
    user.removeState(X);
}
</Custom React Effect>

where X is the ID of the state.
 

Kalat-Bovine

Villager
Member
Joined
Jul 12, 2022
Messages
10
Reaction score
3
First Language
English
Primarily Uses
RMMV
This is easily done with Yanfly's Buffs and States Core, a free plugin. Put in your state's notetags:
Code:
<Custom React Effect>
if (this.checkDamageType([1, 5]))
{
    value=0;
    user.removeState(X);
}
</Custom React Effect>

where X is the ID of the state.
Would I need to change the (this.checkDamageType([1, 5]) effect to include every element I have?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
5,553
Reaction score
3,619
First Language
English
Primarily Uses
RMMV
That doesn't have anything to do with elements. It will return true if the skill Damage Type is HP Damage or HP Drain. I figured that was a sensible condition for what you were asking for - if you want the state to go off regardless of whether the skill is doing MP Damage or Healing, you can remove the if line and the two braces.
 

Kalat-Bovine

Villager
Member
Joined
Jul 12, 2022
Messages
10
Reaction score
3
First Language
English
Primarily Uses
RMMV
That doesn't have anything to do with elements. It will return true if the skill Damage Type is HP Damage or HP Drain. I figured that was a sensible condition for what you were asking for - if you want the state to go off regardless of whether the skill is doing MP Damage or Healing, you can remove the if line and the two braces.
I just didn't know exactly what it meant. I'm very new to working with RPG Maker and even more so with moves, so help like this is very much appreciated. That being said, it does not seem to remove the state after they take the 0 damage hit.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
5,553
Reaction score
3,619
First Language
English
Primarily Uses
RMMV
Did you replace X with the correct state ID?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
5,553
Reaction score
3,619
First Language
English
Primarily Uses
RMMV
That's the correct syntax.
 

sunnyFVA

how a demon do
Veteran
Joined
Nov 6, 2021
Messages
41
Reaction score
45
First Language
English
Primarily Uses
RMMV
Would it not be target.removeState(x) rather than user.removeState(x) ? Since the target of the attack is the battler that needs to have the state removed?

Also, if this "block one hit of any magnitude" implementation satisfies your needs, then no worries. But if you are concerned with emulating Substitute more fully, you'll want to determine how you want the "Substitute's HP" to be calculated (In Pokemon, it is equal to the HP spent to use the move) and work both that value and the damage the sub has taken so far into the logic.
 
Last edited:

Kalat-Bovine

Villager
Member
Joined
Jul 12, 2022
Messages
10
Reaction score
3
First Language
English
Primarily Uses
RMMV
Would it not be target.removeState(x) rather than user.removeState(x) ? Since the target of the attack is the battler that needs to the state removed?

Also, if this "block one hit of any magnitude" implementation satisfies your needs, then no worries. But if you are concerned with emulating Substitute more fully, you'll want to determine how you want the "Substitute's HP" to be calculated (In Pokemon, it is equal to the HP spent to use the move) and work both that value and the damage the sub has taken so far into the logic.
This small fix worked! Thank you both for the help, I appreciate it!
 

Latest Threads

Latest Profile Posts

DamageEvil_5.png added!
index.php

Rendering the intro for the 4 time today, everytime it finished I noticed something that I found off and had to fix it and render it all over again...
Would not be so bad if it was not for my PC having the speed of a slug.:kaoswt2:
Tried something. Little sneak peak of Unity AD.
M42S7Us.gif

It's the little things. Lengthened the time the bar fades in and out to be a bit more comfortable.

Forum statistics

Threads
125,738
Messages
1,173,121
Members
164,888
Latest member
EternalLord
Top