It acts as though its not been implemented. The game plays normally but the code just doesn't go into effect. Here are the screen shots.

Where did you put this note tag?
Let's make a test: Create another entry on the formulas, and just put a flat value like
return 10
Then use that formula and see if when you hit someone on battle, you will raise tp by 10. if it raises, then the problem it's not the plugin, but the formula. Can you copy and paste the entire formula for me here? Beause on your screenshot I cannot see the entire formula.
Or send me a sample project replicating the issue on discord so I can try to see what is the problem.
My discord: hakuenstudio
For some reason, Discord won't let me long in. I made it available via Itch. I put a password behind it so you can download and see the issue. the password is just password (all lower case.) I made an entirely new sample project with only the neccessary plugins for it to make sure it wasn't a compatibility issue.
Hi there!
Well, I just tested with your project and everything seems to work just fine. But I think I know what the problem is. I think we both are misunderstood each other. On your answer here, your question was suppose to be set on the Charge Tp By Action, because what you want is:
When an actor inflicts damage on the enemies, the actor gains a custom amount of TP, right? I got that on the first time:

But on your recent reply you told me that:

I totally miss you saying about the Charge Tp By Action Formula note tag, And I'm trying to guide you the wrong way since then. Also, just checked the help file and indeed the note tag for the Charge Tp by Action is missing there.
So: I'm so sorry. Sorry to waste your time =/ It was my mistake :(
And then put the formula on this plugin parameter:

Its alright. Thanks for all the help with this. I used the new note tag and it works but the code you given me has 1 issue. The right value is given when it inflicts a critical hit and exploit a weakness (they don't stack and it appears what takes priority is what's first in the code, but after testing that, I don't think its true) That being said when an attack misses it still gives tp when targeting a weakness instead of subtracting it. I tried making a 2nd formula using that part of the code alone, and while it works. It negates the 1st formula.

I attempted to just write in the part of the code that subtracts TP and that works just fine but it doesn't take the right value. It just subtracts 5.

Oh, if do you want to stack, then we need to change the formula:
const result = target.result()
const isTargetWeakToElement = BattleManager._action.calcElementRate(target) > 1
let tpValue = 0
if(result.critical){
tpValue += 30
}
if(result.missed){
tpValue += -15
}
if(isTargetWeakToElement){
tpValue += 45
}
return tpValue
The way it was before, it has an order to check. So the first condition that matches, it would run. But now, it will run all conditions and store the amount of tp that each condition provides, and then return the sum at the end.
If you want to combine conditions, you can use something:
(This means: if missed and targe is weak, add XX value)
if(result.missed && isTargetWeakToElement){
tpValue += XX
}If you want to negate something, like if the target not missed, just add an "!" before the statement:
if(!result.missed)
Now the reason for it to subtract only 5, I don't know... maybe is default behavior of the engine? Or your skill is using 5 tp? Well, give it a shot on the new formula I put, and let me know the results.
Sorry for the late reply but its working fine. Had an issue with the code stacking but I just put the if (result.critical) and the if (isTargetWeakToElement) in one code with an or (||) statement and that fixed it. One last question. is coding in a resistance and/or immunity worded like if(isTargetResistantToElement) or if(isTargetImmuneToElement)? I tried it and got an error saying its undefined.
Hi there!
There is no specific script for you to check that. But you can check all of this with the calcElementRate we used before. With something like that:
const elementRate = BattleManager._action.calcElementRate(target) const isTargetWeakToElement = elementRate > 1 const isTargetResistantToElement = elementRate > 0 && elementRate < 1 const isTargetImmuneToElement = elementRate === 0 const isTargetNormalToElement = elementRate === 1