coucassi

Veteran
Veteran
Joined
Sep 23, 2019
Messages
260
Reaction score
380
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
7,629
Reaction score
5,398
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
260
Reaction score
380
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
7,629
Reaction score
5,398
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
260
Reaction score
380
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

Trailer is almost done for the game i can't wait to show it to everyone
I've got good news and bad news. The good news is, there aren't any bad news to report. The bad news is, there aren't any good news to report.

Or as others say, yesterday was uneventful.


I am curious that can you "understand/get the point" about what does this place do generally?
(ARPG game)
If anyone knows any C# programmers, please send them my way.
Chilling at night in a tavern.
ChillingAtTavern.png

After 'multiple breakdowns', it's finally over. 10/10 will do this again.

Forum statistics

Threads
129,854
Messages
1,205,735
Members
171,029
Latest member
kahox
Top