JS for returned data of specific actors only?

I don't really know how to word that title in a way that makes sense what I'm asking lol.

In my game I have a few custom parameters. Everything is functioning fine in that regard. I'm also using VisuStella's Victory Aftermath plugin, which upon level up, displays specified parameters and how they are affected. I have my custom parameters showing here fine, too. The problem is that one of my parameters, SP, is not used by every actor (or class rather, since that's how it's assigned but no one can change classes in my game). In order to display SP growth in Victory Aftermath properly for actors that do make use of it (that I've been able to figure out) is to enter the formula I'm using for it elsewhere in the plugin, like here:

sp1.png


The formula at the bottom (Math.round etc.) returns the value seen here:

sp2.png


So the problem is getting it to at least just display a 0 for characters that don't make use of SP. Is there JS I could enter before the formula perhaps that makes a conditional check for actor ID that displays 0 on a match and outputs the formula result otherwise?

Hope my question makes sense lol

EDIT: Alternatively, if there's a way I can just hide that stat from showing up at all for certain actors/classes that'd be ideal, but I'm guessing since it's a VS plugin that might not be feasible so I'm willing to just have it display as a 0 if that's what it has to be.
cant help you with hiding it, but if you want it to return 0 and you have multiple actors that dont use SP, what you can try is instead of checking for ID, put a <noSP> notetag in your actors' noteboxes and then change that formula line to
Code:
return $dataActors[user._actorId].meta.noSP ? 0 : your formula here
Wow, thank you so much! It seems to work perfectly from my quick test and on top of that I've learned something too. Had no idea you could refer to notetags like that.

Original thread: https://forums.rpgmakerweb.com/threads/js-for-returned-data-of-specific-actors-only.167928/