ScorchedGround

Blizzards most disappointed fan (More than ever)
Veteran
Joined
Apr 12, 2020
Messages
572
Reaction score
788
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,707
Reaction score
2,807
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
572
Reaction score
788
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

Who here knows of the hidden laws of this multiverse? Such as the law of attraction
Exploding Fruits and Rasaks Pixelfarm Assets | RPG Maker News #108

So ghosts can go through walls and stuff, and depending their type (according to fantasy media) they can or can't interact with objects to a certain degree...

So why they don't always fall through floors? Do they always float and sometimes simulate walking? If things go through them how can they hear/see? And why sometimes they have clothing? Do clothes die as well?
my birthday was yesterday...
i feel closer 2 being able 2 get a discount on the kids menu than i do being able to buy booze1627428008986.png
Getting to play your RM game on Steam Deck? How cool is that?

Forum statistics

Threads
113,704
Messages
1,076,775
Members
147,727
Latest member
mewoox
Top