Skill that temporarily reduces TP Cost for one/all allies

Sorry if this sounds really simple, but most of my actors use TP for their skills, so I thought it would be good to make a skill that gives one or all allies a state that reduces their TP costs or completely negate it for a few turns. How do I go about implementing this?
Yanfly Skill Core

<Custom TP Cost>
if (user.isStateAffected(X))
cost *= 0.5;
</Custom TP Cost>
Yanfly Skill Core

<Custom TP Cost>
if (user.isStateAffected(X))
cost *= 0.5;
</Custom TP Cost>
I've downloaded the necessary plugins, but I'm a bit confused on where I should put this code
Skill notes
I've done that, but it's not working at all. I've put the state's id number on the "(user.isStateAffected(X))" part, still nothing.
Skill notes
Hmmm, seems to work for me. Screenshot?
This is the skill itself
Hmmm, seems to work for me. Screenshot?
1741108056319.png
Put it in the notes of the skills that you want to have TP cost lowered with state.
It'll take a while to do that for every skill, but it works! Thank you!
Put it in the notes of the skills that you want to have TP cost lowered with state.

Original thread: https://forums.rpgmakerweb.com/threads/skill-that-temporarily-reduces-tp-cost-for-one-all-allies.175994/