TP Manager

Last Updated: 2012.01.30
Download Link
Github Link

The TP system in RPG Maker VX Ace is actually rather limiting. A lot of the system is hardcoded in giving Ace users very little control over how much TP gain a battler can receive from particular actions and situations. This script gives you the ability to adjust how much TP actors will acquire from various actions, different TP modes, and letting players select and pick what TP mode they want for each actor (akin to Final Fantasy X).

Bind the TP Mode menu item to a switch. When that switch is on, the TP Mode menu appears. This switch number can be changed in the module.

Players can change whatever TP Mode they want to use for that particular actor as long as that actor has access to it (and therefore, has that TP Mode unlocked). The currently activated TP Mode for the actor will be highlighted.

Players can unlock TP Modes for actors through using items or skills. Insert the following notetags into the notebox of an item or skill.

<unlock tp: x>
<unlock tp: x, x>

When the player uses that item or skill on an actor, that actor will learn the specific TP Modes.

Actors can also unlock TP Modes as they learn new skills. Use the following notetags inside of a skill notebox:

<learn unlock tp: x>
<learn unlock tp: x, x>

When an actor learns a skill with this notetag, that actor will learn TP Mode(s) x making it available to change in the TP Menu.

Through script calls, you can manually unlock TP Modes for actors.

change_tp_mode(x, y)
unlock_tp_mode(x, y)
remove_tp_mode(x, y)

Replace x with an actor’s ID. Replace y with the desired TP Mode to be altered.

Set which TP Mode each actor starts with and which modes actors have unlocked from the beginning through notetags.

<tp mode: x>

This sets the actor’s default TP mode to x. If this tag isn’t used, the default TP mode will be set to whatever the module uses as default.

<unlock tp: x>
<unlock tp: x, x>

This unlocks what TP modes the actor can use by default. If this tag isn’t used, the default unlocked TP modes will be whatever the module uses.

Enemies can use different TP modes, too! In fact, set up different TP modes specific for only enemies to have interesting battles.

<tp mode: x>

This sets the enemy’s default TP mode to x. If this tag isn’t used, the default TP mode will be set to whatever the module uses as default.

Set different formulas for each TP Mode. There’s a number of options available in the module. I highly recommend that you go through each of the options to configure the TP system for your game to your liking.

Added in version 1.02 is the new <tp cost: x> notetag. The script allows you to raise Max TP past 100, so it’s only natural that there should be a notetag that lets TP Costs exceed 100.

<tp cost: x>

When this notetag appears in a skill’s notebox, the TP cost for that skill becomes x. This notetag allows TP costs to surpass 100 TP, which is the max TP cost in the RPG Maker VX Ace database editor.

And that’s all, folks!

90 comments on “TP Manager

  1. Wow this is a really awesomely flexible script ^_^ My only gripe is that there’s no option for setting a formula when the Actor dies. :/

    Also, I’m assuming drawing TP gauges will be possible in your Menu mod scripts? :O

    Elsewise, kudos to you for scripting this! And so quickly too…

  2. I don’t understand this very well. This TP modes are similar to the old subclass system? and you can control which special attacks they have under those modes?

    • I think you can simply decide what actions in battle raise the character’s TP bar with his/her TP mode. So, for a magician you would choose a TP mode that fills your TP bar when casting magic, with your tank (should there be an aggro system?) you choose a mode that fills your TP bar when getting hit, with your healer you choose a mode which fills your TP bar when healing comrades.

    • TCR is modified under Game_Battlerbase. You won’t formulas there. Instead, it’s a rate that’s 1.0 at default and modified by traits to go lower or higher.

  3. Nice system! Infact I’m using many of your scripts right now. Great job! I know everyone wants something, but gaining TP on crit strike would fit a light fighter role perfectly. Thanks!

  4. I can’t seem to get the healer TP mode to work either. Even if the character casts a healing spell and heals a lot of HP, she receives no TP for it.

    Another problem I ran into was that no matter what I put in the ‘unlock tp’ tag, actors never receive the first TP mode, ‘stoic’. It only shows up if I don’t enter an unlock tp tag in the actor’s notebox.

    tp mode: 2
    unlock tp: 0, 1, 2

    These are the tags I put in Erik’s notebox, but when I start the game, Stoic isn’t in his list of TP modes, but Comrade and Warrior are.

  5. To expand on my previous post, if I set Eric’s starting tp mode to 0, then Stoic does appear in his TP mode list in-game, but not if I set the starting mode to Warrior.

    It’s a small thing I can work around anyway, just thought you should know about it.

  6. My bad on the warrior and healer TP not working. Since I’ve updated Battle Engine Ace, forgot to apply some changes made there to here.

    v1.04 – Bug Fixed: Notetags didn’t unlock TP Mode 0.
    Compatibility Update: Ace Battle Engine v1.19.

  7. Request: Is it possible to set active TP modes via equipped items? Similar to the way it’s done for enemies? Also, can the menu option be turned off?

  8. Yanfly, I is it yet possible to set different TP limits for each actor, or modes? It doesn’t seem very difficult to implement that, but I could be wrong… Maybe a suggestion, or it’s already in there and I’m just an idiot.
    It seems to me like that could just be added in as a hash (or array even ._.), and referenced in an overwrite of the max_tp method, like:
    def max_tp; return YEA::TP_MANAGER::TP_LIMIT[]; end
    or something similar for TP modes.
    Ignore this if I’m being a massive stupid-head.

  9. Is there any way to customize a TP mode formula so that my actor gains TP equal to his Luck stat whenever he takes HP damage? I want the main function of the Luck stat in my project to be TP related, but I’m pretty much a novice with these formulas…

  10. When ever I change to a TP type that has preserve TP on, the actor is stuck with 100 TP, am I not doing something right? I didn’t alter the script.

  11. is there any way for your TP to not increase while performing an Overdive or Limit Break. I tested Warrior, and the Limit Break added TP when the damage was done. This seems unfair.

  12. Just thought I’d mention TCR isn’t calculated in the game. No matter what bonuses/penalties you apply, it will always give a value of 1. You can adjust your Extra Parameters script to say, 0, at it will give a value of 0, so it seems to be a problem with the traits being calculated.

  13. Does anyone know if there might be an easy way to move the “TP Mode” window to the “Class” menu instead of the “Skill” menu? To me personally, changing a character’s TP Mode is more like changing a character’s class or subclass rather than using a character’s ability.

  14. I changed the text TP to Ammo but now the text is all scrunched. How would I go about altering the text so that it isnt all bunched up?

  15. Is it posseble to add Class notetags? So when choosing that class with that notetag the TP mode will change to that?

  16. Yanfly, is there any possibility to change the maximum amount of TP ingame and per character? Via event?

  17. Whenever I change the global TP Limit in the script, It doesn’t work correctly in-game.
    i.e. I set it to 150, in-game is set to 105
    i set it to 200, in-game it’s 104.

  18. RMVXAce crashes after a battle if “Victor” is a selected option for one character in the TP Manager with this message:

    “Script ‘TP_Manager’ line 892: NameError occured.
    undefined local variable or method ‘tcr’ for BattleManager:Module”

  19. Not sure if this was a bug or not, but it seems that whenever you use the ‘Guard’ command you restore 4 TP. There aren’t any options to configure this in the script, so I’m wondering if anyone else has this issue or if it’s just in my game.

  20. ^Nevermind. The “fix” is so stupid. Surprised I spent so long trying to figure this out -_-”
    In case anyone is wondering, by default the “Attack” and “Guard” skills in the database has TP Gain set to 5 and 4 respectively.

  21. ok got a problem i cant get this to work properly i can get my chars set to the mode i want to start but if i try to open the menu and select the tp mode menu i get this message

    can someone help me fix this?

    • if there’s a noMethod error occuring that’s mostly due to the scripts being read in the wrong order (script A referring to a method from script C which is only initialized after script B in example).
      I’d say try rearranging your script-order. If it’s not working try saving your script via a texteditor. Then delete the script from the VX, save, re-add, save, try again.

  22. is there a way to make my characters gain TP when they use MP using a TP-MP ratio?
    examples: my character uses a skill that consumes 30 MP, he/she gains 15 TP (2:1 ratio)
    another character uses the same skill, but he/she gains 10 TP (3:1 ratio)

    is this possible to do?

  23. Hello Yanfly.
    Amazing script, it was exactly what I was looking for. I’m using this for a couple of games.
    Question, though. It seems whatever TP mode I use, TP increases by 5 in each hit. This may be done automatically by RMVXA’s engine. How do I NOT let it do that?

    • I had a similar problem. For me, I used a name tag meant for actors in a skill. Once I fixed that everything worked perfectly. So my guess is that you have a misplaced tag. Looking around the line of the error might give you some hint.

  24. Is there a way to bind a TP mode to a class while using your Class System scripts? There doesn’t seem to be a notetag for this.
    Could I go about calling on the TP mode script for an actor each time they change a class? if so how? Sorry to sound like a noob, I just can’t seem to find a way to do this.

    Could you add a Class notetag into a future update? As you can see the latter would be quite tedious.

    • *Edit, I just realized the other Script Call that allows actors to “learn” modes and switch via the skill menu. Though a Class notetag would still be useful this is a workaround, and gives the “Player” more strategy by manually switching modes.

  25. I am having a problem with your script as it crashes when used with XaiL System – Icon Skill. I would like to know if there is a way to make it compatible or even separate them in a way that the skills use that script and it does not affect this script.

  26. I was interested in using this script as a model for mp-regeneration modes. Essentially I want to use TP as a resource for some classes and have similar MP regeneration techniques for MP users (instead of relying on resting/potions). Any suggestions?

  27. I’ve got no scripting talent. This one seems to be what I need, I just need some tweaks. Is it possible to adjust the max TP allowed to be based on the class? I was planning on having some classes work a mix of skills and magic, so instead of allowing them the full 100 TP, I wanted to lower it, to 50 or so. But still have 100 TP for the purely skill-based classes.

    I was also hoping to alter the script so certain classes could automatically get their own TP mode, because of having multiple class options, and it would be a real nightmare if I had to script something so every actor could automatically change TP Mode and be locked to that mode, whenever they changed class.

  28. Is there a way to have skills run a conditional branch?

    This sounds odd, but I want certain skills, maybe even just “Attack” to run a conditional branch, and if TP is max, do something different/additional to what it normally does.

    Not wanting a skill that simply costs 100 TP, that’s not how I want it to flow.

    Can I make those skills somehow check if TP is full, then do other various things?

  29. Hmm… That is amazing script and idea. But, when I try to get in my actor’s inventory, i get error. It says “window_base line 549… undefined method “icon_index” etc…

  30. Is there a way to turn the max tp into a formula that includes variables?
    I want to make some kind of mastery system that could increase your max tp if you decide to put some points in that.

    • Nvm, found it. For those wanting to use it:
      you ctrl+F TP_LIMIT and go to the second (which is the last) time you find it in this script. Then you just change it to:

      But you replace ** with the variable that needs to be added.

      Works when I playtested it. I hope it doesn’t give errors since all I know of programming is some basic java :p

  31. RMVXAce crashes after a battle if “Victor” is a selected option for one character in the TP Manager with this message:

    “Script ‘TP_Manager’ line 892: NameError occured.
    undefined local variable or method ‘tcr’ for BattleManager:Module”

    I been trying all week to figure out whats making this happen? Any ideas??

  32. Hoping someone could help me out. I have no TP bar on my characters. I checked to make sure the display TP is checked under system. Toggled it off and on, no joy. Any ideas?

  33. An absolutely excellent script, as always. Do you think it would be possible to use this script in conjunction with an ATB system, where a player gains TP after a set amount of turns or time?

  34. I’m having a problem with TP Modes that includes hitting or killing an enemy (specifically the Slayer mode)…
    How do I prevent gaining TP when using an specific skill that has multiple hits like Limit Breaks (using Victor’s Animated Battle script)?
    Whenever I use my Limit Break skill, it will just refill the TP gauge to 100 again…

  35. Hi Yanfly; awesome script. One request: is there a way to add states to an actor who is using a specific TP Mode? Thanks so much. Or if anyone knows how to do this, much appreciated.

  36. Is there a way to make some skills not generate TP?
    With the TP manager, I want to make my actor generate TP by attacking,
    but he only relies on TP for his skills resources, and here’s the problem:

    I have a skill that attacks all foes with 10 random attacks. The skill costs 50 TP, but generates 80 because of the TP generation by dealing HP dmg (which is set to 8). And thats not really what I want it to do.

    Any kind of help is appreciated.

  37. i might be being a complete noob but cant get this to work i keep getting

    “Script ‘yanfly tp manager’ line 1171: NoMethodError occurred.
    undefined method `empty?’ for nil:NilClass”

    when ever i try use the tp mode menu

  38. This will definitely be useful for me but how can I set it up so that the players can’t change the TP modes? I want each of my players to have a specific TP mode. Also I want specific TP modes default for different classes too. Because Player 1 can change class.

    • try putting the lock and unlock tags in the classes tab, instead of the actor tag.

      So, Soldier unlocks 1, but locks 2-10. Mage, however, unlocks 5, and locks 1-4 & 6-10, that way they each have their own TP mode.

      Alternatively, you might be able to do it with a script call – set the class to a variable, and the TP mode to match said variable, so if you change to, say, Warrior, , it calls the class and TP mode stored within that variable (both 1, as per the previous example), and sets both – then remove the change TP option from the menu.

  39. So apparently if this TP Manager is above your Skill Restrictions script it will give an error at line 738 when you open “Skills” from the Main Menu. I fixed the problem by putting the TP Manager script below the Skill Restrictions script.

    Just in case anyone was having the same problem and for a heads-up to Yanfly.

  40. Everything I attack is getting insta-death’d. Only happens when I put on the TP Manager script. What am I doing wrong.

  41. Im using the script Falcao Pearl ABS Liquid V3 and only need the Stoic mode in my game and that works fine but my question is this¿Is there a way to reset the TP to zero every time i enter a new map?

  42. I found an error in this great script because im using the Stoic mode and when the enemies hits me i receive 1 TP. But the problem is this: when i hit any enemie i receive 5 TP.
    ¿Somebody can help me fix this error?

  43. To make only the attack command generate TP and not skills(unless specified otherwise): use the Weapon Attack Replace script and copy the attack(id:001) skill to
    another id, modify this new skill so it generates TP. Create a notetag on each weapon needed so they refer to the newly created attack skill.

    Then in your TP mode settings, remove the formula generating TP on HP damage dealt, replace it by 0 . Done.

    My actors have exclusive weapon types so TP management is still different with each one, though a script changing actors/classes attack commands could be helpful as well.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s