TSR_Popups by The Northern Frog

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
235
Reaction score
198
First Language
French
Primarily Uses
RMMV
Hello!
Thank you both @Moon_Haven and @Ronove for using my Plugin and for your comments. And most of all, for reporting issues.

- Merci d'avoir partagé! Salut Montréal!
Merci, c'est un plaisir! (thanks, it's my pleasure!) ;)

Is there a way to select the font for the damage popup? I'd like to use a different font than the one I'm using for the text of my game.
Yeah sure, no prob. I'll add a parameter for string popups font in the next version.


I will adress those bugs you 2 have reported right now. (The updated file will probably be ready before the 72h bump restriction, so I'll just edit this post when new version is ready on my itchio)

Thanks again,
regards.
TSR
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
124
Reaction score
46
First Language
Français
Primarily Uses
RMMV
1- Just found another small bug: when using String Damage Popup, the text showing for restoration of mana shows a negative value. For instance, a character drinking a +20 MP potion will popup a damage message -20 MP. This only happens when using string, not if using the TSR_Damage.png

mp.png


2- Would it be possible to add color selection for the HP damage and recovery like you already have for mana and TP?
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
235
Reaction score
198
First Language
French
Primarily Uses
RMMV
Hello!
New version available: TSR_Popups v1.16

- Just found another small bug: when using String Damage Popup, the text showing for restoration of mana shows a negative value. For instance, a character drinking a +20 MP potion will popup a damage message -20 MP. This only happens when using string, not if using the TSR_Damage.png
Thanks for reporting that one :thumbsup-right: (I don't use MP in my current project)
Took me a while to find out what happened. This is fixed in the new version.

A missed attack in the game will still show "miss" from the damage image file, and not the string BLAH.

When I switch the Enable Damage Sheet = True, then this bug disappears.
This one I couldn't reproduce it, sorry. Be sure you save the project after changing plugin parameters before running a Battle test; If it still happen, let me know.

ALSO occurs when you don't have critical/overkill popups enabled and you happen to crit/overkill the mob.
Now if you turn OFF the show critical/overkill parameters, the state/elements popups will show even when action result is critical/overkill

The second bug is so I gave the mob a poison state so it takes tick damage at the end of the turn. Now, if I hit it with something it's weak against, the tick damage afterward will also say WEAK if the attack was at the end of the turn. Obviously, it's not weak to the poison tick.
This was effectively annoying. It shouldn't happen anymore with the changes I made. Let me know if you find more inconsistancies


*EDIT: there's also anew parameter to change the fontface of string popups...

Thanks again for reporting those issues! :D :rock-right:
 

Ronove

♫꒰・‿・๑꒱
Veteran
Joined
Mar 12, 2012
Messages
1,055
Reaction score
360
First Language
English
Primarily Uses
RMMV
As far as I can tell, the fix works on the second bug!

My WEAK is still not showing up when the attack crits/overkill and both parameters are set to false.
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
235
Reaction score
198
First Language
French
Primarily Uses
RMMV
My WEAK is still not showing up when the attack crits/overkill and both parameters are set to false.
Yes, sorry. Seems some changes didn't upload in the last version. Anyway, I just post another version on my itchio (and tested it, just to be sure :p)
Should work now. Thanks!
 

Ronove

♫꒰・‿・๑꒱
Veteran
Joined
Mar 12, 2012
Messages
1,055
Reaction score
360
First Language
English
Primarily Uses
RMMV
There we go! :kaojoy: Thank you so much! Definitely solved the bugs I had!
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
124
Reaction score
46
First Language
Français
Primarily Uses
RMMV
Couple of questions:

1- What does the parameter Popups Anchor supposed to do? Per the description, I thought it would adjust the distance between the consecutive popups, but whatever the value I use here, the distance between the popups stays the same. Image below is with anchor at either 0.1 or 25. (I'm using string text).

2- In the damage string, is there a way not to have an extra space before and after "value"? My parameter is "-valueHP" which I would expect to show "-2HP" and not "- 2 HP".

anchor.png
 
  • Like
Reactions: TSR

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
235
Reaction score
198
First Language
French
Primarily Uses
RMMV
Hello again!

I update the plugin: TSR_Popups v1.1.7

1- What does the parameter Popups Anchor supposed to do? Per the description, I thought it would adjust the distance between the consecutive popups, but whatever the value I use here, the distance between the popups stays the same. Image below is with anchor at either 0.1 or 25. (I'm using string text).
This paramater had only effect when not using YEP_BattleEngineCore, otherwise the anchor is set to the YEP_BEC params... This wasn't really clear, so now I made it so that my anchor parameter will overwrite the one from yanfly.

2- In the damage string, is there a way not to have an extra space before and after "value"? My parameter is "-valueHP" which I would expect to show "-2HP" and not "- 2 HP".
Here's how you can change that. Open the Plugin file and find that function:
Code:
Sprite_Damage.prototype.createPrefix = function(string, row, info) {
    if (TSR.Popups.string_enable) {
      let prefix = (row === 0 || row === 2 || row === 5)?
                                  TSR.Popups.digitInfo[info].damage.prefix || '' :
                                  TSR.Popups.digitInfo[info].recovery.prefix || '';
      let sprite = this.createStringChildSprite(prefix, row, info);
      let w = sprite.bitmap.measureTextWidth(string[0]);
      let wo = sprite.bitmap.measureTextWidth(prefix);
      sprite.x -= ((string.length - (string.length - 1) / 2) * w) + w / 2;
      sprite.dy = 0;
    }
  };
And change this line:
Code:
sprite.x -= ((string.length - (string.length - 1) / 2) * w) + w / 2;
Like this (the last part is gone):
Code:
sprite.x -= ((string.length - (string.length - 1) / 2) * w);
This will remove the space between '-' and value.

Do the same with the createSuffix function to remove the space between value and 'HP':

Thanks again!
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
124
Reaction score
46
First Language
Français
Primarily Uses
RMMV
Bug report: I've just figured out that this plugin interferes with Yanfly Buff & State Core (YEP_BuffsStatesCore.js)

Any custom react (code below) will be ignored if TSR_Popups plugin is enabled.

JavaScript:
<Custom React Effect>
    if (value > 0) {
        value = 1;
        if (user.isDead()) {
            user.performCollapse();
        }
    }
</Custom React Effect>
 
  • Like
Reactions: TSR

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
235
Reaction score
198
First Language
French
Primarily Uses
RMMV
Hello!
Thanks again for reporting issues!

I have been able to reproduce the bug you reported by putting YEP_BuffsStatesCore.js above my Plugin in the Plugin Manager.

TSR_Popups should be placed just bellow YEP_BattlerEngineCore, with all other Yanfly battle-related Plugins bellow TSR_Popups.

*I just uploaded a new version on my itchio with better explanation on this matter in the instructions.

Regards!
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
124
Reaction score
46
First Language
Français
Primarily Uses
RMMV
That worked, thank you!
 
  • Like
Reactions: TSR

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
124
Reaction score
46
First Language
Français
Primarily Uses
RMMV
Got a weird FPS drop when multiple CRITICAL, WEAK or RESIST show on the screen at once. Tried switching between string and image, but didn't get any smoother either way. Doesn't happen on HP or MP damage.

Is it because there are too many (5) at once?

 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
235
Reaction score
198
First Language
French
Primarily Uses
RMMV
Hello!
My guess is the problem comes from the FlashColor effect... It doesn't do well with multiple string popups.

Disable it and see if it change the fps. It's in the last function in the file:
Code:
Sprite_Damage.prototype.prepareElementalEffect = function(result) {
     let info = '';
     if (result.ElementImmune) {
        info = 'immune';
        this.setupImmuneEffect();
     } else if (result.ElementResist) {
        info = 'resist';
        //this._flashColor = [0, 255, 150, 160];
        //this._flashDuration = 60;
     } else if (result.ElementWeak) {
        info = 'weak';
        //this._flashColor = [180, 180, 0, 160];
        //this._flashDuration = 60;
     }
     if (info) this.createEffects(info);
  };
If it does resolve the problem, I'll make a new version with optional flash color...

Thanks!
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
124
Reaction score
46
First Language
Français
Primarily Uses
RMMV
Yep, that was it!
 
  • Like
Reactions: TSR

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
235
Reaction score
198
First Language
French
Primarily Uses
RMMV
Here's a new update:

  • Disable de FlashColor Effect for Elemental Effect popups when using string popups.
  • Add an <HP Regenerate Element: x> Notetag to add x elemental effect to your HP depleting/regenerating States.
* State Notetag
* =========================
*
* <HP REGENERATE ELEMENT: x>
* Modify the State X-Param 'HP regenerate rate'
* by the affected Battler elementRate(x).
*
* This mean you can create HP depleting (or regenerating) States
* that will be modified by the targeted Battler element rate.
*
* Example:
* You make a State called 'Burn'. It has the X-Param 'HP Regenerate
* Rate' set to -10%. Like any basic 'poison' state, it will deplete
* the target HP by 10% each turn/action. Now we add the following
* notetag in the State Notebox:
*
* <HP REGENERATE ELEMENT: 4>
*
* Let's say Element Id 4 is 'Fire'. If the State 'Burn' affect a
* Battler that is resistant to 'Fire', let's say it have an
* element rate 50% for 'Fire' (Element Id 4), it will deplete the
* Battler HP by 5% each turn\action, instead of 10%.
*
* Of course, the according Elemental Effect popup (resist or weak) will
* pop along the damage. In the case above, it would be 'resist', cause
* the resulting 5% damage rate is less than the expected 10%.
*
* You can put multiple Notetags in the same State Notebox to affect
* more elements. A Battler can also be affected by many states that
* have elemental effect.
*
* No matter what, the final resulting damage compared to the initial
* damage (the value expected without elemental effect) will dictate
* the resulting 'weak' or 'resist' popup.
*
* Example:
* Let's say the battler from the previous example is also affected
* by a State called 'Freeze', which also deplete 10% HP and bear
* the Element 'ice'. If the battler have an element rate of 300%
* for 'ice', the resulting damage rate would be 35% of his max HP,
* and a 'weak' popup would show (0.1 / 2 + 0.1 * 3 = 0.35).
*
* The HP Regeneration Rate (HRG) of a battler is the sums of all of the
* HRG rates it have. It means that an element rate of 0% (immunity)
* can't bring down the damage to zero by itself; unless there is only
* one HRG trait nullified by the element rate.
*
* Exemple:
* In the previous example, the damage came from 2 HRG traits of
* 2 different States. Both trait rates are added, so even if the
* battler was 'immune' to 'ice', only the -10% HRG from the 'Freeze'
* State would be ignored, and damage would still be 5% from the
* 'Burn' State (10% HRG halved by the 50% fire element rate).
*
* *Of course, if the battler was only affected by 'Freeze',
* it would completely nullify the HP Regeneration rate and
* no HP damage nor Elemental Effect popups would show.
*
*
* You can put multiple copy of this Notetag in a single State Notebox to
* give the State multiple elemental effects. In this case, the HRG rate
* of the State would be multiplied by each element rate of the elements
* it bear. This means that if the battler have an element rate of 0% for
* one the State elements, it would effectively nullify the whole trait.
*
* Example:
* Now we make a State called 'Burn & Freeze' with an HRG of -10%.
* We put the 2 following Notetags in the State Notebox:
*
* <HP REGENERATE ELEMENT: 4> ('fire')
* <HP REGENERATE ELEMENT: 5> ('ice')
*
* Now if the same battler from previous example (50% to 'fire' and
* 0% to 'ice') is affected by that State, no damage will result
* since both battler's element rates would be multiplied by the
* State HRG (0.1 * 0.5 * 0 = 0).
*
*
* Zero values
* ===========
* If by any means, the HRG rate is bring down to zero, neither HP damage
* nor Elemental Effect popups will show.
*
*
* Positive values
* ===============
* If by any means, the final HRG rate is positive (HP regeneration), no
* Elemental Effect popups will show.
*
* Example:
* The battler have an HRG of +50% given by his armor, and is affected
* by the 'fire' elemental State 'Burn', for which it have a weakness
* of 200%. The final value will be an HRG of +30%, meaning that the
* battler will regenerate 30% of its max HP each turn/action. Even
* though the final value is less than expected, no Elemental Effect
* popup will show because it's still positive regeneration.
*
* 0.5 (armor HRG) + ( -0.1 (Burn State) * 2 (weakness) ) = 0.3
*
*
* YEP ElementCore.js
* ==================
* If a battler have the <Absorb Element: x> Notetag from Yanfly Element
* Core Plugin, and is affected by a State that have an x elemental based
* HRG rate, the value will be modified by element x as follow:
*
* If the State have an HP depleting effect (negative HRG), the battler
* will regenerate HP by the HRG rate each turn/action instead of deple-
* ting HP.
*
* Example:
* The 'Burn' State from above examples (-10% HRG) is affecting
* a battler that have the <Element absorb: 4 (fire)> Notetag
* from YEP_ElementCore. It will regen 10% of his max HP each
* turn/action.
*
* If the State have an HP regenerate effect (positive HRG), the battler
* will also regenerate HP by the HRG rate each turn/action, but with
* a bonus corresponding to the ratio of the HRG rate by itself.
*
* Example:
* You have made a State that have an HP regeneration effect, and
* added the <HP Regenerate Element: 4 (fire)> to give it a 'fire'
* elemental effect. Let's say the HRG is +20%. If a battler that
* have the <Element absorb: 4 (fire)> Notetag is affected by the
* State, it will regenerate 24% of max HP each turn/action.
*
* 0.2 (state HRG) + ( 0.2 * 0.2 ) = 0.24
*
*
*
* YEP X_TickBaseRegen.js
* ======================
* This extension Plugin from Yanfly's engine separate each of the
* battler's HRG traits, and pop damages separately for each of the
* traits in a tick-based manner.
*
* It is NOT compatible with THIS FEATURE.
*
* Hence, if you have YEP_X_TickBaseRegen.js installed and toggled
* ON, it will disable the <HP REGENERATE ELEMENT: x> Notetag, and
* damage will be calculated normally without taking account of
* elemental rates. In this case, Elemental effects (weak or resist)
* popups will be disabled during the regeneration battle phase.
*
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
124
Reaction score
46
First Language
Français
Primarily Uses
RMMV
Is the new HP Regenerate notetag compatible with YEP_X_ExtDOT?

For instance, would this work?

<DoT Formula: 3>
<HP Regenerate Element: 3>
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
235
Reaction score
198
First Language
French
Primarily Uses
RMMV
Hello!
They're not incompatible, but works with separated mechanics. YEP_ExtDot make specific damage formula for the State, while my Plugin use the default HRG rate. The example Notetag you provide above would work, but the elementRate(3) and Elemental popup would occurs only if the State have a HRG trait. and if so, 2 popups would show: the one from Yanfly with damage set by the notetag formula (not modified by element unless you place also an ExtDot element Notetag) and the one from the HRG trait, modified by element 3 and with the according elemental popup...

My guess is you want to use the custom formula of YEP_ExtDot, but would like to show the Elemental effect (weak, resist) from my Plugin. If that's what you want, here's a simple edit to make that happen:

1) Edit to YEP_ExtDot:

Find that function:
Code:
Game_Battler.prototype.applyDamageOverTimeElement = function(damage, element) {
  if (element === 0) return damage;
  return damage * this.elementRate(element);
};
And add that line in the middle (it call a function from my Plugin):
Code:
Game_Battler.prototype.applyDamageOverTimeElement = function(damage, element) {
  if (element === 0) return damage;
  this.checkElementalPopup(damage, damage * this.elementRate(element)) //added this line
  return damage * this.elementRate(element);
};
2) Edit to TSR_Popups:

Find that function:
Code:
Game_Battler.prototype.regenerateHp = function() {
    if (Imported.YEP_X_TickBasedRegen) {
      var value = Math.floor(this.mhp * this.hrg);
      value = Math.max(value, -this.maxSlipDamage());
      if (value !== 0) {
        this.gainHp(value);
      }
      TSR.Popups._HaveElementEffect = false
    } else {
      let preValue = Math.floor(this.mhp * this.hrg);
      preValue = Math.max(preValue, -this.maxSlipDamage());
      var value = Math.floor(this.mhp * this.getTickElementRate());
      value = Math.max(value, -this.maxSlipDamage());
      this.checkElementalPopup(preValue, value);
      if (value !== 0) {
        this.gainHp(value);
      }
    }
    TSR.Popups._StateResistRequest = false
  };
And add a conditional before the checkElementalPopup function:
Code:
Game_Battler.prototype.regenerateHp = function() {
    if (Imported.YEP_X_TickBasedRegen) {
      var value = Math.floor(this.mhp * this.hrg);
      value = Math.max(value, -this.maxSlipDamage());
      if (value !== 0) {
        this.gainHp(value);
      }
      TSR.Popups._HaveElementEffect = false
    } else {
      let preValue = Math.floor(this.mhp * this.hrg);
      preValue = Math.max(preValue, -this.maxSlipDamage());
      var value = Math.floor(this.mhp * this.getTickElementRate());
      value = Math.max(value, -this.maxSlipDamage());
      if (!Imported.YEP_X_ExtDoT) this.checkElementalPopup(preValue, value); //HERE
      if (value !== 0) {
        this.gainHp(value);
      }
    }
    TSR.Popups._StateResistRequest = false
  };
Now if you put these Notetags in the State:

<DoT Formula: 3>
<DoT Element: 3>

The damage and elemental calculation will be made according to Yanfly Plugin settings and Notetags, but Elemental Effect will pop along the way ;)

Hope that'll help!
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
124
Reaction score
46
First Language
Français
Primarily Uses
RMMV
Hello! For the States Popup, is there a way to show the State String ONLY when it would be applied?

My swords have a 5% chance to apply a bleeding state on hit. But for enemies that are immune to bleeding, let's say a skeleton, the NO EFFECT pops up on every attack. I would like that NO EFFECT popup to show only if the state hits that 1% and would be applied.

Doable?
 
Last edited:

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
235
Reaction score
198
First Language
French
Primarily Uses
RMMV
Hello!
Doable and done: TSR_Popups v1.2

The 'no effect' popup will now show only if the state condition pass.

Thanks! :rock-right:
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
124
Reaction score
46
First Language
Français
Primarily Uses
RMMV
Hello!
Doable and done: TSR_Popups v1.2

The 'no effect' popup will now show only if the state condition pass.

Thanks! :rock-right:
Hello! I'm wondering if there's something on my end that I need to do other than just replace the plugin with new version? I've tried this new version and now, the NO EFFECT doesn't appear at all.

PS: To test, I've put that bleed state at 100% apply chance on attack. It works as intended. I think it's just the plugin no showing the popup.
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

@wrigty12 hi! thanks for showing interest in my work. Sadly the tablet I'm using broke, so I wasn't able to create anything for weeks. Got a new one with display, I'm still not used to it though, so I'm still practicing, doing basic drawings again. Also I'm in my last year of college. Thesis, projects and other activities takes most of my time ;_;.
I'll get back to it whenever I get a free time.
Any artists here planning on participating in the Inktober art prompts this October?
It's right around the corner.
It's rpg maker related so I'll post it here, I worked on a little free rpg maker zine and this was my piece. Play Grimm's Hollow if you haven't already, I liked it a lot. (i don't remember if posting a link to a product even if free is allowed via profile posts, so if anyone knows lemme know)

Suddenly arrived to work and got the pink slip on a contract O_O wait, did i forget something??? (sobbing in corner rn)

Forum statistics

Threads
103,023
Messages
996,745
Members
134,494
Latest member
Mordei
Top