coucassi

Veteran
Veteran
Joined
Sep 23, 2019
Messages
193
Reaction score
309
First Language
German
Primarily Uses
RMMV
Heyho!
I am using SRD Battle Popup Customizer and I'd like to add Custom Popups, that appear if a magic attack is reflected/ a physical attack is countered. I can't figure out how to set the condition, though. Here is a screenshot of how the plugin parameters of a correct Custom Popup should look like:

ScreenShot_BattlePopUp.png

I wasn't able to find the code for reflection / counter yet.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
3,193
Reaction score
1,887
First Language
English
Primarily Uses
RMMV
I'm not sure you'll be able to achieve this. It looks like the plugin you're using colors the pop ups based on conditions it can check during the code that deals damage.

At that point, there is nothing in the code that distinguishes whether the damage is coming from reflection or countering. The engine executes those as a regular skill performed by the target out of combat order, so there's no way for you to ask "did this damage come from a counter?"

If you use Yanfly's Counter Control, it introduces some way that it internally tracks how many counterattacks have gone back and forth, so you should be able to check for that variable to be greater than 0. I don't have any thoughts regarding reflection.
 
Last edited:

coucassi

Veteran
Veteran
Joined
Sep 23, 2019
Messages
193
Reaction score
309
First Language
German
Primarily Uses
RMMV
I'm using Counter Control actually and I think it treats Reflection the same as Counter Attacks, does it? Maybe it's possible do have the same notification for both of them, then? I don't understand enough of js to figure out how to tackle this, though.

I just want some visual information besides the battle log to tell players what's going on, when an animation plays first on an enemy and then immediately on their characters.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
3,193
Reaction score
1,887
First Language
English
Primarily Uses
RMMV
No, Counter Control doesn't interact with reflect at all.

From a quick poke at Counter Control, I think you could use the condition
Code:
BattleManager._counterSequence>0
to color the pop up on a counter attack.

You would have to write a plugin that adds a game variable to track when reflection is being activated, so you could reference that in the popup manager.
 

coucassi

Veteran
Veteran
Joined
Sep 23, 2019
Messages
193
Reaction score
309
First Language
German
Primarily Uses
RMMV
Worked! Thank you!

What I meant was that Counter Control lets you set Magic Hit as a condition for a counter attack, so it can be used for both, physical and magical hits. If I don't miss anything here, I won't even need reflection as a parameter, since by default it works just the same as counter, only for magical hits. Using Yanflys & SRDs Plugins with the code you provided I should be able to set up magical & physical counters and just need to name the popup in way that covers both.

Anyway, I have lost count on how many times your posts helped me out already! Thank you once again :D
 

Latest Threads

Latest Profile Posts

Do you think horror RM games are still a thing today? :|
Now counting one week of skies alternating between cloud, rain, and heavy winds, in the middle of summer. Sure puts a new meaning to the phrase "strange weather around here"
Vacation from work coming up, hope I can smash out a bunch of progress on my game
We gather here on this divine day of Saturday, to proceed with the game make! Praise be.
No way, these madlads actually did it, they made Sans in real life

Forum statistics

Threads
118,606
Messages
1,117,264
Members
155,677
Latest member
LazIsConcerned
Top