ScorchedGround

Blizzards most disappointed fan
Veteran
Joined
Apr 12, 2020
Messages
563
Reaction score
781
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
Veteran
Joined
Apr 12, 2020
Messages
563
Reaction score
781
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 Posts

Latest Profile Posts

Feel free to check out our "Touch the Stars" gamejam submission, "Starlight, Starbright!"
just finished playing one shot. im kinda disappointed with return the sun ending ngl. i was hoping there would be some after credits scene that would play with my emotions
So apparently the surprise Google Search page browser game saves your progress when you close the browser.

This really makes me miss the golden age of Flash gaming.
ohh man im ending oneshot now (im doing the last stepping puzzle rn) and the music is so...sad...like...ive been thinking recently about how fast moments pass and...my anxious thoughts combined with that music and nostalgia...like...im comfortably sad...and want to cry internally
We're playing one of the Touch the Stars game jam entries, come join us!

Forum statistics

Threads
113,555
Messages
1,075,808
Members
147,551
Latest member
ananansy
Top