ScorchedGround

Blizzards most disappointed fan (More than ever)
Veteran
Joined
Apr 12, 2020
Messages
565
Reaction score
784
First Language
German
Primarily Uses
RMMV
This is for MV.
Link to the plugin

Hello everyone,

I am having trouble with VE_DamagePopup, specifically with the custom popup script-call it provides.
Here is what it looks like:

battler.callCustomPopup(text, motion, font, size, color, x, y);

This script-call works perfectly fine, unless you do two or more of them at "the same time".


You see, I was planning to use them on many of my notetags from YEP_SkillCore and YEP_BuffsStatesCore.

As an example, here is a "Thorns" State that deals some amount of damage back to the attacker:


JavaScript:
<Custom React Effect>
if (value > 0 && ((user.isActor() && target.isEnemy()) || (user.isEnemy() && target.isActor()))) {
  var recoil = Math.round(value * 0.5);
  user.gainHp(-recoil);
  if (user.isDead()) {user.performCollapse();}

  var text = "-" + recoil + " GP [\\I[3545]]";
  var motion = 'Pop High, Fall High, Pop Low, Fall Low, Wait, Wait, Wait, Wait';
  var font = "this.DamageFont";
  var size = 28;
  var color = '#ffa200';
  user.callCustomPopup(text, motion, font, size, color);
}
</Custom React Effect>

Now, as said before, this works fine by itself.

But, if I were to have two different Thorn states active (Or any Custom React Notetags for that matter), only one of these popups would be played, which is a huge problem for player clarity.

If I had to guess it's because both popups are essentially called at the same time and that somehow screws with their execution.

Does anyone have an idea how to fix or circumvent this problem?
 
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,699
Reaction score
2,800
First Language
English
Primarily Uses
RMMZ
It looks like this is due to the way the popup types are handled:

JavaScript:
VictorEngine.DamgePopup.processPopup = function() {
        this.popup = {};
        var list = ['HP Damage', 'MP Damage', 'TP Damage', 'HP Recover', 'MP Recover', 'TP Recover', 'Miss',
            'Critical', 'State Add', 'State Remove', 'Buff Add', 'Debuff Add', 'Buff Remove',
            'Counter', 'Reflect', 'Substitute', 'Weak', 'Resist', 'Immune', 'Absorb'
        ];
        for (var i = 0; i < list.length; i++) {
            this.popup[list[i]] = this.setupPopup(list[i]);
        }
    };

If you wanted to be able to have multiples of a given type, you would have to rewrite this to push a new element to this.popup with a unique identifier for the popup you're creating.
 

ScorchedGround

Blizzards most disappointed fan (More than ever)
Veteran
Joined
Apr 12, 2020
Messages
565
Reaction score
784
First Language
German
Primarily Uses
RMMV
I see... so it's not as easy as I thought.

Unfortunately, I don't think my JS knowledge is sufficient for this kind of endeavor.
Luckily this is not a pressing problem so I'll just put it on the backburner for now, I guess.
 

Latest Threads

Latest Profile Posts

PSA: please stop putting the word 'Eternal' in your game titles.
RMMZ: "Simple enough for a child!"
also RMMZ: "What, you're trying to make an RPG and you didn't know about Euler angles?"
I kinda spent the day having my own little gamejam and came up with this Catastrophe!

GZOq45s.png
Have Defeated Enemy Join Party as Actor, Show Passage Status, & MZ-Chan Art | RPG Maker News #107

My outfit at Metrocon. It was fun.

Forum statistics

Threads
113,625
Messages
1,076,286
Members
147,638
Latest member
Zachimera
Top