Enemies and TP for skills

I know it should have occurred to me before, but it didn't.

When I allocate a skill to an enemy which uses TP do they start with any?  If so is it random like with party members, or is it more than that?  It seems pretty pointless to give them a skill which requires a lot of TP, as it means that for the first few turns all they'll be able to do is spam normal attack, which is boring and pointless from the player's perspective.

Does anyone know how enemy TP works?
Enemies start at full TP, and reaquire TP like player/actors.

Scripts can force them to initialize at 0, if needed.
Enemies start at full TP, and reaquire TP like player/actors.

Scripts can force them to initialize at 0, if needed.
Wrong, enemy TP is randomized at the battle start, as actor TP is, unless they have the trait preserve TP, wich will make it start at 0, wich make scripts totally unnecessary for this.

Enemies skills consume TP, and they gain TP in the exactly same fashion as actors: by using actions that gives TP and receiving damage.
Right, two totally opposed opinions.  Anyone like to weigh in on this?
Victor is correct.
Thanks, I'll take that as the decider.

But it does mean back to the drawing board on how I construct some of my enemy skills if they don't have much TP at the start of the battle.  Oh well, better to learn that now rather than later.

Thanks for clearing this up.
If you don't want to go back to the drawing board you can just force enemy TP to max at the beginning of battle.
How would I do that?

EDIT

Would a script call something like this work?

$game_party.battle_battlers.each do |act|

batt.tp = 100

end

I am totally unsure how to refer to battlers in that second line.  I have a similar script call for actors' TP for battle tests, and there actor becomes act so I am assuming battler gets abbreviated the same way.  However, because I can't see what TP enemies have, I have no way (as far as I am aware) to check if the script call works.

EDIT AGAIN

that script call doesn't work at all, it brings up an error message.

Does anyone have any other ideas?
Bump

I really would be grateful if someone could help me out with this one.
Open Game_Enemy in the script editor, and paste this in after the initialize method (after the "end" word):

#--------------------------------------------------------------------------# * OVERWRITE Inherited Initialize TP#--------------------------------------------------------------------------def init_tp self.tp = 100endThis will make all enemies start with 100 tp. You can adjust the value, of course 🙂 Also, you can set a minimum value of 100 + a random value by doing this:

self.tp = 100 + (rand * 25)That would make enemies start out with at least 100 TP plus a random value between 0 and 25.

Hope this helps.
Thank you very much.  So helpful.

Original thread: https://forums.rpgmakerweb.com/threads/enemies-and-tp-for-skills.20595/