Help with TP

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
341
Reaction score
294
First Language
English
Primarily Uses
RMVXA
So, I was following the instructions on this topic http://forums.rpgmakerweb.com/index.php?/topic/10216-what-influences-tp-ingame/

and wanted to change the TP into something that works like mana, where it will not increase with damage taken, and only has a max of 50.

When I try it in game, my TP is zero. What could I be doing wrong? Here is the code.

Game_BattlerBase

#--------------------------------------------------------------------------
# * Get Percentage of TP
#--------------------------------------------------------------------------
def tp_rate
@tp.to_f / 50
end
Game_Battler

#--------------------------------------------------------------------------
# * Initialize TP
#--------------------------------------------------------------------------
def init_tp
self.tp = 50
end
#--------------------------------------------------------------------------
# * Clear TP
#--------------------------------------------------------------------------
def clear_tp
self.tp = 0
end
#--------------------------------------------------------------------------
# * Charge TP by Damage Suffered
#--------------------------------------------------------------------------
def charge_tp_by_damage(damage_rate)
self.tp += 0 * damage_rate * tcr
end
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
Do your actors have the "Preserve TP" feature?

Without that feature the TP will be set to zero between battles, you have to add it either for the classes or for the actors (depending on who should have TP and who not).
 

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
341
Reaction score
294
First Language
English
Primarily Uses
RMVXA
I already have it for the classes, but do I need it for the actors also?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
no, once should be enough.

Please test wether the actors can gain and hold TP by making a few skills that cause the actor to gain TP when used, make a skill that uses TP and then playtest a few battles. Do the actors gain TP when they're using that skill, and can they use the TP-Skill after that?

You need to find out where and why the TP doesn't function before we can help you solve the problem.
 

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
341
Reaction score
294
First Language
English
Primarily Uses
RMVXA
Ok, so items that give me TP work, but for some reason, my max TP at start is 70 instead of 50. TP using skills work fine, and so do TP gaining skills.
 

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
341
Reaction score
294
First Language
English
Primarily Uses
RMVXA
Bump. For some reason, my TP does not end at 50. I want it to have a max of 50, but the changes I did had no effect.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
Bump. For some reason, my TP does not end at 50. I want it to have a max of 50, but the changes I did had no effect.
Default max TP is fixed at 100, and the script snippets in the first post do not show any change to max TP.

Can you post the script part where you changed max TP?
 

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
Game_Battler starting from line 728

#-------------------------------------------------------------------------- # * Initialize TP #-------------------------------------------------------------------------- def init_tp self.tp = rand * 25 end #-------------------------------------------------------------------------- # * Clear TP This only happens if Preserve_TP isn't used #-------------------------------------------------------------------------- def clear_tp self.tp = 0 end #-------------------------------------------------------------------------- # * Charge TP by Damage Suffered #-------------------------------------------------------------------------- def charge_tp_by_damage(damage_rate) self.tp += 50 * damage_rate * tcr endGame_battlerbase Line 491

Code:
  #--------------------------------------------------------------------------  # * Get Maximum Value of TP  #--------------------------------------------------------------------------  def max_tp    return 100  end
 
Last edited by a moderator:

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
341
Reaction score
294
First Language
English
Primarily Uses
RMVXA
So I was play testing, and came across a problem. Apparently my character has 100 tp at the start of the game, and seems to regain all of it immediately after he uses a skill. This might be caused by sleeping in a bed (has the inn function). The max tp still isn't 50, and I have no idea what I need to change to make it that way. Changing the part "Initialize TP" had no effect. >:(

EDIT: Apparently this works for my party members, but not my main character. Weird.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
To change the maximum TP, you have to change the function max_tp which is listed one post before your post about it (Game_Battlerbase line 491). No other change will affect the maximum TP, initialize TP is only for the starting values.
 

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
341
Reaction score
294
First Language
English
Primarily Uses
RMVXA
That would be under "Get Maximum Value of TP", right?

EDIT: I changed the part, and the max TP is now 50. Thanks for the help!
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top