Adjusting max TP

I went to line 495-6 in the Game_Battlerbase to check the TP where it says

define max TP

Return 100

I figured that this would be what changes the TP max so I put 40, since that is what I need for a little quick side game I got going.

Anyway, I do this and that all works good but why does the bar only fill halfway when the max is 40?  I'm curious on if it is possible to update the bar to match the max tp change. Can it scale?
If it's yanfly's battle engine his calculations do not scale (and if you set it 500, it'll just be a really long bar).
No, I am using the default engine.
In Game_BattlerBase there is this method

Code:
  def tp_rate    @tp.to_f / 100  end
Change it to
Code:
  def tp_rate    @tp.to_f / max_tp  end
Yes, thanks. That was it. The bar scales properly now.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/adjusting-max-tp.20287/