ScorchedGround

Blizzards most disappointed fan (More than ever)
Veteran
Joined
Apr 12, 2020
Messages
765
Reaction score
1,159
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
5,041
Reaction score
4,653
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
765
Reaction score
1,159
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

Not today... Not today...
I guess I should send my CV to Hasbro. I've made Monopoly cheaters edition more fun and challenging. I've developed custom cheats and chest/chance cards for it. And I've cleared many nightmares through my cards and rules.
I'm only missing 2 more bgms for my game but maaaaan, searching for these tracks is killing me. Can't find anything good to replace MZ's Theme 2 and Scene 5 I have as placeholders. Everything is too epic or too evil or too alarming. That 'scene 5' track in particular would fit nicely with my scene. Well, at least I finally figured what my last click-fest of a gameplay element will be like, so something positive :D
Finding new interesting stuff to make for the resource calendar becomes harder every year D:
ScreenShot_8_19_2022_2_3_18.png
FINALLY got the mood system in the game during battle. Since the game is called Panic Attack, I figured you should have certain moods present including Panic. so the main 3 or Hype, Depressed, and Anxious. Panic is only when stunned.

Forum statistics

Threads
124,700
Messages
1,165,349
Members
163,515
Latest member
Whirahe
Top