I have come in with two fixes and two problems!
FIX 1: TSR Popups is fundamentally incompatible with Yanfly State Protection, which for me is a disaster because a lot of my states revolve around it. However, I figured out how to fix it!
Go over to
Game_Action.prototype.executeDamage in TSR_Popups and comment it out. Then, replace it with this:
JavaScript:
//----
// Comment out executeDamage & put this below it!
//----
TSR.Popups.Game_Action_executeDamage = Game_Action.prototype.executeDamage;
Game_Action.prototype.executeDamage = function(target, value) {
TSR.Popups.Game_Action_executeDamage.call(this, target, value);
var result = target.result();
result._haveElementEffect = (value < 0)? false : this.checkElementalResponse(target);
let immune = result.ElementImmune
if (value === 0 || !this.isHpEffect() || immune) {
result.critical = false;
}
if (result.critical && TSR.Popups.critical_show) {
result._StateResistRequest = false
result._haveElementEffect = false;
}
};
This will allow TSR Popups to show weak/resisted/immune popups like normal while still allowing Yanfly State Protection to function.
FIX 2: The State function will display the names of
all states, including filler ones the player is not meant to see. My fix, however, is very simple!
In
Sprite_Damage.prototype.createEffects, add this conditional branch under
var stateId = chgStates;:
JavaScript:
if ($dataStates[chgStates[s][0]].iconIndex === 0) {
string = '';
} else {
string = prefix + $dataStates[chgStates[s][0]].name;
}
What this does is prevent the names of states with no icon (icon index 0) from having their names displayed, giving you the developer control on how which states are shown.
FIX 2.5: State names bounce the longer the name is, which is extremely annoying. The fix for this is easy too.
Change
sprite.dy = -i; in the same section to be -
So it doesn't bounce out of control if the state name is super long.
PROBLEM 1: It doesn't show the element pop-ups when enemies/actors take lethal blows, aka. a super-effective/resisted attack KO's them.
PROBLEM 2: And the reason I made this post to begin with - when an actor/enemy take an elemental hit (resisted/weak/immune, whatever) and then they get hit with a damage over time state...
The element pop-up will still be attached to damage-over-time effect. It doesn't clear properly until you get hit with another attack.
EX. Johnny is afflicted by Poison. He shows damage over time normally when the turn ends.
Then he gets hit by a Super Effective dark attack. The "weak" pop-up will stay stuck under his damage over time pop-up, so a prospective player will probably think "did he get hit with another super effective attack when I wasn't looking" when in reality it's just poison.
It's very bizarre. It seems the element function only updates properly when you take damage from attacks, not damage over time.
@TSR , do you have any idea how to fix this?