State Immune Pop-Up

Status
Not open for further replies.

Cythera

Veteran
Veteran
Joined
Jul 31, 2019
Messages
38
Reaction score
26
First Language
English
Primarily Uses
RMMV
Hello! I've been trying to add in a state immune pop-up and have not been very successful :(
I link states frequently to player skills - one skill has a 60% Stun chance, another has a 45% Burn chance, etc etc. However, some enemies are immune to these states. I want to implement a short text pop-up that says "State Immunity" or similar when an enemy is hit with a skill that has a state linked to it, so players don't waste turns using the same skill to inflict the state when the enemy is immune.
I have tried to use SRD's Battle Pop-Up Customizer, however it doesn't appear to play well with some other plugins I use (looks to be Olivia's OTB/Battle Effects plugins as her 'Weak' and 'Break' popups cease appearing with the SRD plugin turned on).
I'd appreciate a plugin that allows me to put that text pop-up. I have some base knowledge of JavaScript, so it doesn't need to be a 'plug and play' script. I was thinking of using a variable to store the state ID and comparing that to the target's state rate. There I must add I only have a base knowledge of JavaScript, so if someone has a more efficient or easier idea, I'm all for it!
These are the battle-related plugins I'm currently using - for compatibility request: YEP (no surprise there), Mog's Battle HUD, and Olivia's OTB + Battle Effects + Weakness Display + Victory UI(not sure if this one's relevant, but to be safe, here it is!)
 

Animebryan

Need more resources!
Veteran
Joined
Jul 31, 2012
Messages
347
Reaction score
162
First Language
English
Primarily Uses
RMMV
Which Yanfly Plugins are you using? Because if you're using his Battle Engine Core plugin, it should show state immunities by default.
 

Cythera

Veteran
Veteran
Joined
Jul 31, 2019
Messages
38
Reaction score
26
First Language
English
Primarily Uses
RMMV
I am using the battle engine core. I don't see any option for an immunity popup - if you mean the battle log option, I don't actually use the battle log in my combat for a number of reasons.
Perhaps I should clarify what I mean by popup: I'd like the text to appear with the damage numbers on the enemy. I realize I may not have been precise enough in my original post.
 

Animebryan

Need more resources!
Veteran
Joined
Jul 31, 2012
Messages
347
Reaction score
162
First Language
English
Primarily Uses
RMMV
I've been trying to track down which plugin it is but I distinctively remembering one that showed pop-ups along with damage such as elemental weaknesses, resistance & immunities as well as state resistances & immunity. Trying to find an example is like looking for a needle in a 192 plugin haystack.
 

Cythera

Veteran
Veteran
Joined
Jul 31, 2019
Messages
38
Reaction score
26
First Language
English
Primarily Uses
RMMV
Thanks for the suggestion, @Johnboy .
I'm trying to get the plugin to do what I want and am hitting a snag. I'm using two variables, 59 to store the linked state ID, and 60 to get the index of the enemy. 59 is defined in the skill action sequence; 60 is set as b.index in the damage formula.
This is what I put in the custom pop-up box:
if(!$gameVariables.value(59) == 0) {

var state = $gameVariables.value(59);

var target = $gameTroop.members()[$gameVariables.value(60)];

if(target.stateResistSet().contains(state)) {

target.customPopup("",8);

}

}
However, it keeps showing the error "Cannot read property 'stateResistSet' of undefined".
I've never used the stateResistSet call before, so I doubt I'm using it correctly. If someone could help me correct it, that would be great! :)

EDIT: I went a different way to get the desired effect. If anyone wants something similar, I did it like so: Repurposed the "Break" pop-up in the OTB Battle Effects plugin since I wasn't using it and it saved making a new pop-up. It shows when target.isStateResist to a state ID, which I change in every skill that has a state linked to it.
 
Last edited:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
12,500
Reaction score
12,782
First Language
English
Primarily Uses
RMVXA

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I have a specialized class on intellectual property this semester (on Patent and Trademarks, Copyrights is next semester). Only had a quick overview of that in previous business law classes. I'll be able to help more people here when it comes to knowing what to do and your rights for intellectual property!
When you wanna write another pedantic post of your views on game dev... but your cousin and aunt have invited you to bowling
"Hey there! Hope you're having a nice day, you are awesome!"

(Of course the hand is awful :kaoswt: )
I need a new option on YouTube that goes "Dont recommend videos/channels in this language because I do not speak it"
I've reconsidered having a subclass system for my first two games since there will already be plenty of variation in playable actors and usable items in the games. The third game will need it because of the basis for the story but I want the actors in the first two to be more focused in their roles.

Forum statistics

Threads
93,375
Messages
911,786
Members
122,874
Latest member
Meektot
Top