MV Drawing Gauge JS error

WhatsApp Image 2026-04-23 at 07.02.09.jpeg


As the picture shows, I am using the Yanfly plugins.
The class notes are the same as for the class #1, which include <Swap Gauge 3: Null> and <Swap Gauge 2: Null>.
The error happens when HP is deduced from the character (only on character #2), since the game runs normally if no damage is taken (0 damage) or a miss happens.
The game runs smoothly if I am testing troops (which could be also because some plugins don't run there? Not sure if all plugins run on troop testing).
When only the first character is in the party, everything runs perfectly.
All the characters have 0MP and no skills reduce MP.
I understand that the error happens because something is most likely undefined (since that also shows 250+ entries in the dev tools when I open them).

Character #2 has an issue where the face picture doesn't show at all, not in the database or in the battle. The face picture was created in the same way as the face picture for character #1. Tho, I did test with setting the picture as none, no dice.

I tried debugging by adding thedebugger; part in different parts of the JS scripts, but no luck.
Either I always miss it or the enemy casts an ability that no file can be found and destroys the whole debugging flow (becomes a huge pain).

Last ditch effort is to delete the character and class and create them again.
Did anyone encounter this kind of issue?

Thank you in advance !
The class notes are the same as for the class #1, which include <Swap Gauge 3: Null>and <Swap Gauge 2: Null>.
The error message shows that Skill Core is invoking drawActorTp where the MP gauge would usually be. That suggests the actual tag here may be <Swap Gauge 2: TP>? Are you certain it's not something to do with TP gain, perhaps on a different actor? E.g. I know YEP_EnhancedTP offers various custom TP gain modes, maybe you have a bad custom eval in there somewhere.

It may help to share screenshot(s) of your Plugin Manager, showing all plugins you are using and their load order. Yanfly's plugins have a recommended load order to minimise problems:
You could also make sure you're using updated versions of all plugins. (My old copy of Battle Engine Core has processStatusRefresh on line 5309, not 5318...maybe the difference is just because you're just using an up-to-date version).

The game runs smoothly if I am testing troops (which could be also because some plugins don't run there? Not sure if all plugins run on troop testing).
I just checked, and it looks like Yanfly's Skill Core, at least, hooks into isDatabaseLoaded, meaning it should apply equally in all test modes (boot scene doesn't start until the database is loaded).

Have you saved your project recently? If not, then battle test may not be using the same plugins you think it is: Plugin Manager settings, unlike database/map changes, require you to save your project before they will actually apply in-game.

Also: to be safe, always choose New Game when testing. An older save might contain incompatible data, causing problems like you describe. You can e.g. create temporary events to give you needed items, move the start point to shorten test runs, etc.

I understand that the error happens because something is most likely undefined
Technically, it means the gauge fill rate (i.e. current divided by maximum) is either:
  • Infinity, usually because of a division by zero; or
  • Non-numeric, including the number value NaN and values like undefined, null, or "pie".
By default the damage formula returns 0 if the final value is non-numeric, but some plugins (e.g. YEP_DamageCore) can change this. If you are using YEP_DamageCore, you could try turning that off, saving your project to apply Plugin Manager changes, and testing.
I will check all of your suggestions when I can access my PC and project.

The <Swap Gauge 2: TP> is being added by the equipped weapon (in the case of character #2, that's a Wooden Dagger).
Character #1 has the same setup, except that it has a Wooden Sword (also has the same note tag), but also has a shield (which has no note tag).
Automatic states are being declared with each weapon type, which effects which TP Mode is being assigned to which character (Common Event on the map since at the start of battle, it just doesn't work properly).

I'll share my plugins as well as maybe weapons and states pages.
Currently there's an idea that the dagger is not set as a dual wield and that might be the issue (didn't try the same combination of equipment as character #1).
Also, the testing is always done with New Game (there are no saves currently and no save points) and the map is a simple testing map with NPCs that each have their own battle process to test out the combat, skill learning and playstyle by weapon choice.

Thank you very much for your reply !
Went into debugger again and noticed that this part here:
1776961656533.png

returns fillW as NaN because rate enters as a NaN.
Checked the Common events for TP mode changes, they properly change to the desired TP Mode.
Also, all the values are populated under all used TP Modes.

Here is the Plugin Manager screen as requested:
Spoiler: Plugin Manager
1776961798673.png
Here are further pages that I believe might be of interest:
Spoiler: Other pages
1776962026142.png

1776962055434.png

Tried also changing TP Modes, for the 2nd character, to the same mode that the 1st character uses, same issue.


EDIT:
It seems that going into the YEP_EnhancedTP plugin, changing the regen value of character #2 TP Mode to 1, fixed the issue.
I returned that value now to 0, still works.

Thank you for trying, seems like something was cached or what not.
Or wrongly initialized (and yes, I save every few seconds because I have developed muscle memory to press CTRL + S whenever I'm on the map and close any menu).
This thread can be closed.
EDIT:
It seems that going into the YEP_EnhancedTP plugin, changing the regen value of character #2 TP Mode to 1, fixed the issue.
I returned that value now to 0, still works.
Oh nice! Good to know you found a fix.

This thread can be closed.
I'm here now so I can close it, but in future if you'd like your thread closed you can ⚠ Report your post to notify the moderators directly. 👋

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/drawing-gauge-js-error.183360/