Unlimited TP state?

Supersilver204

Veteran
Veteran
Joined
Sep 6, 2013
Messages
36
Reaction score
1
First Language
English
Primarily Uses
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 :)
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
Why not just use TRG increase when the state is applied?
 

Supersilver204

Veteran
Veteran
Joined
Sep 6, 2013
Messages
36
Reaction score
1
First Language
English
Primarily Uses
Because TGR only increases whether you get hit or not. I need to make something that keeps restoring TP or keeps it unlimited.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
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...
 
Last edited by a moderator:

Supersilver204

Veteran
Veteran
Joined
Sep 6, 2013
Messages
36
Reaction score
1
First Language
English
Primarily Uses
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?
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
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 :)
 

Supersilver204

Veteran
Veteran
Joined
Sep 6, 2013
Messages
36
Reaction score
1
First Language
English
Primarily Uses
Well I tried doing all of that and this happened..

Problem.png
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
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.
 
Last edited by a moderator:

Supersilver204

Veteran
Veteran
Joined
Sep 6, 2013
Messages
36
Reaction score
1
First Language
English
Primarily Uses
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.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
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.
 
Last edited by a moderator:

Faye Valentine

The Mapgician
Veteran
Joined
May 2, 2014
Messages
471
Reaction score
427
First Language
Spanish
Primarily Uses
RMVXA
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.
This will work for me as well. Thanks you!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top