MZ Anti Damage Barrier Visustella (How to find functions?)

Back in RMMV I used this code for my skills to remove flat barrier points to a target.


Spoiler: note tag rmmv
<Pre-Damage Eval>

if (target.isStateAffected(2)) {

target.loseBarrier(300);

} else if (!target.isStateAffected(2)) {

target.loseBarrier(100);

}

</Pre-Damage Eval>


Now I use this for RMMZ but it doesn't do anything.



Spoiler: Rmmz note tag
Spoiler: Rmmz note tag
<JS Pre-Damage>

if (target.isStateAffected(2)) {

target.loseBarrier(300);

} else if (!target.isStateAffected(2)) {

target.loseBarrier(100);

}

</JS Pre-Damage>

Is there a way to find functions related to barrier points? I tried looking in the plugin but it's all text and one big weird line of code.
by default there are no barrierpoints.

that means that even in MV, you added a plugin to create those barriers.

you need to find out which of your MV plugins created the barriers, and then check if that specific plugin has already been ported to MZ and if yes, add it to MZ.

If the barrier-plugin hasn't been ported to MZ then there is absolutely no way to get the sme functions, you can only look around to what other plugins might add similar functions.
Please link to the relevant plugin(s) in future! I looked it up for you this time:
VisuStella's library is obfuscated, so you'll need to contact them for help for anything involving undisclosed details of their plugins' code.

That said:
  • Double-check the plugin help to see if there's any mention of script calls.
  • You can try the Yanfly functions (if you haven't already) to see if those work.

Original thread: https://forums.rpgmakerweb.com/threads/anti-damage-barrier-visustella-how-to-find-functions.131409/