Yes, you'll need a script call to get the TP of an actor/enemy, e.g. one of these in Control Variables > Script~
Code:
$gameActors.actor(id).tp
$gameParty.members()[index].tp
$gameTroop.members()[index].tp
Replace
id with the actor's database ID, or
index with the battler's position in their unit (leader is position 0, followed by 1, 2, etc). That said, using events strikes me as kinda clunky in this case (unless it's going to be an ability confined to only a few actors/enemies) since you'll need to check each actor and troop position individually.
😅
I imagine there's a neater solution available with existing plugins, e.g. using a <Custom Turn End Effect> notetag from Yanfly's Buffs & States Core plugin...I found this Tips & Tricks article featuring a force action (requires Battle Engine Core due to the way it's written):
Jump (MV Tips & Tricks). So you could maybe try a (passive?) state with something like this in its notebox:
Spoiler: Suggested state notetag (example, needs adjustment)
Code:
<Custom Turn End Effect>
if (user.tp >= 0.8 * user.maxTp()) { // at or above 80% max TP
var skill = 200; // ID of skill to force
var target = -2; // target (-2 = previous target, -1 = random)
BattleManager.queueForceAction(user, skill, target);
}
</Custom Turn End Effect>
Some clarifications that may help you get responses:
- How is the TP threshold determined: does each trigger skill have its own value and/or is it impacted by other factor(s)?
- How is the trigger skill determined?
- Is it randomly selected from a pool of skills, and if so, how is the skill pool determined?
- Do you want the player to be able to select the trigger skill themselves, and if so, when/how?
caethyril. It's always you. Why? LMAO you're the best.
To answer your questions first:
1. Skills are executed once the TP is at 100 (maximum). They use up all the TP.
2.1. It would be selected from a predefined skill. No pools are used.
2.2 No, I don't. I want them to use them automatically, without intervention.
Also, some questions of my own:
1. If i were to use that <Custom Turn End Effect>, would I need all three Action Sequence Packs referenced in that Jump article?
2.
is there a way to select all targets? The skills I wanted to implement this to were already targeting all enemies.
In regards to the script call, would that need to be in a common event that i can have a troop reference when needed?
How would that work if i wanted the specific enemy to use a specific skill upon reaching max tp?
Side note: I am assuming that i will be going with the Custom Turn End Effects, but I want to explore all possible areas. Also, I will report this post due to it not needing a plugin so a moderator can move it to the correct location.
🙂
Thank you for the information. Although this was not what I was looking for, thank you for taking the time to look for it for me.
🙂