Recover TP as you walk

I need my character to slowly recover TP as he moves outside of battle. This can technically be done without scripts, but I don't like how the TP regain works naturally in MV. If I set my character to regain TP, he'll gain TP every 20 steps. But I want him to regain a small amount (1%) of TP EVERY step.
Spoiler
(function() {_Game_Actor_onPlayerWalk = Game_Actor.prototype.onPlayerWalk;Game_Actor.prototype.onPlayerWalk = function() { _Game_Actor_onPlayerWalk.call(this); $gameParty.allMembers().forEach(function(actor) { actor.gainTp(1); }); };})();
Keep in mind the above is for all party members. If it's not necessarily for all party members, you're going to have to tell me how you're deciding whether they regain TP on step.

Original thread: https://forums.rpgmakerweb.com/threads/recover-tp-as-you-walk.54722/