Exactly what the title says. How can I go about creating a state where it gives the user unlimited TP for a few turns? I can't seem to find an option to make TP unlimited so if there's a script or something that'd be much appreciated. Thank you in advance :)
Unlimited TP state?
● ARCHIVED · READ-ONLY
-
-
Why not just use TRG increase when the state is applied?
-
Because TGR only increases whether you get hit or not. I need to make something that keeps restoring TP or keeps it unlimited.
-
Fair enough ^_^
#===============================================================================# Snippet to give battler unlimited TP while state TP_Gain_State is applied.#===============================================================================class Game_BattlerBase#=============================================================================== #----------------------------------------------------------------------------- # #----------------------------------------------------------------------------- TP_Gain_State = 12 #----------------------------------------------------------------------------- # #----------------------------------------------------------------------------- alias :refresh_tp_gain :refresh #----------------------------------------------------------------------------- # #----------------------------------------------------------------------------- def refresh(*args,&block) refresh_tp_gain(*args,&block) refresh_tpgain end #----------------------------------------------------------------------------- # #----------------------------------------------------------------------------- def refresh_tpgain return unless state?(TP_Gain_State) @tp = max_tp endendEdit:
this one should work fine now... -
Thank you, but one more question. Which feature in the state gives more TP? Or should I edit it in the skills section to make it gain TP and leave it at that?
-
Simply change TP_Gain_State to the id of the state you want to use for unlimited TP.
Then, when you a battler is under the influence of the aforementioned state, it will always have max tp :) -
-
Thats strange... I cant figure why thats happening. Must be due to the refresh method being called at initiailize or something..
Anyway, use this instead.
#===============================================================================# Snippet to give battler unlimited TP while state TP_Gain_State is applied.#===============================================================================class Game_Battler#=============================================================================== #----------------------------------------------------------------------------- # #----------------------------------------------------------------------------- TP_Gain_State = 12 #----------------------------------------------------------------------------- # #----------------------------------------------------------------------------- def refresh super refresh_tpgain end #----------------------------------------------------------------------------- # #----------------------------------------------------------------------------- def refresh_tpgain return unless state?(TP_Gain_State) @tp = max_tp endendI actually tested that one. It works fine, but you may encounter issues with other scripters code. Probably only if it modifies the Refresh method within Game_Battler - which isnt really common, but if it was, it would be overwritten and therefore, wouldnt work. -
For some reason the TP won't restore.. What am I be doing wrong? The only values I've changed are TP_Gain_State (to the state's name) and the value of 12 which may be the problem.
-
Yea that is probably whats causing it. Simply make TP_Gain_State = The Database ID of the State.
If the Database id of the state you wish to use was already id 12, then you dont have to change anything.
By the end, it will look like this...
#----------------------------------------------------------------------------- # #----------------------------------------------------------------------------- TP_Gain_State = 22And again,simply replace the value shown, '22', with the id of the state you wish to use for your tp state. -
Thanks :) Works perfect now.
-
This will work for me as well. Thanks you!Thats strange... I cant figure why thats happening. Must be due to the refresh method being called at initiailize or something..
Anyway, use this instead.
#===============================================================================# Snippet to give battler unlimited TP while state TP_Gain_State is applied.#===============================================================================class Game_Battler#=============================================================================== #----------------------------------------------------------------------------- # #----------------------------------------------------------------------------- TP_Gain_State = 12 #----------------------------------------------------------------------------- # #----------------------------------------------------------------------------- def refresh super refresh_tpgain end #----------------------------------------------------------------------------- # #----------------------------------------------------------------------------- def refresh_tpgain return unless state?(TP_Gain_State) @tp = max_tp endendI actually tested that one. It works fine, but you may encounter issues with other scripters code. Probably only if it modifies the Refresh method within Game_Battler - which isnt really common, but if it was, it would be overwritten and therefore, wouldnt work. -
No Problem :)This will work for me as well. Thanks you!
