TP Gauge draw question.

I have had a personal breakthrough today on my Ruby knowledge and RPG Maker API (if I can call it that, lol) and finally have hit the ground running on my project.  Here is the backstory.  Basically, I have set my TP max to 1 under def max_tp (from class Game_BattlerBase).  I have also set initialize amounts for my MP and TP and set my regenerate_tp to self.tp += 1 * trg (from class Game_Actor < Game_Battler).

What I am trying to do is to get my TP gauge during a battle to fill up in color.  This can be found under def draw_actor_tp in class Window_Base < Window.  What I am noticing is that when my max TP is set to 100 it will fill as it climbs to 100.  However, when I set the max TP to 1 it will fill up to 1 and stop as it is supposed to, but the gauge does not fill in with color.  My thought process is that 1/1 TP is 100% TP, so the gauge should fill 100%. 

So basically, I am missing the link that tells the gauge that "Hey, 1 TP is 100% of the possible TP for an actor, color in the gauge completely".  I think that actor.tp_rate is my variable in need of some attention, but I can't find any clues as to how to alter the "rate" so that 1 TP out of 1 TP is 100%, or 1.0 according to the comments above def draw_gauge.

Any tips from you vets?
in quite a lot of places, the original engine programmers used the fact that TPMax is always 100 in default to use the TP as a scale instead of making it a percentage scale. I don't know how the TP-Gauge is scripted, but from what you described I think that is one of the places, and the TP-Gauge is not scaled to 100% but to 100TP...


Check Yanfly's TP script - it allows for so many different TP formulas that it has to have solved this problem.
I think it colors based on tp rate, and tp rate might still be hardcoded to use TP/100


so go find the tp_rate method on I think Battler or BattlerBase
Bingo, that was it.  Found the TP rate  in BattleBase.  I'm going to look at Yanfly's script as well, but this is exactly what I needed.  Thank you both!

Original thread: https://forums.rpgmakerweb.com/threads/tp-gauge-draw-question.24108/