Although I'm not particularly good at Ruby, this was not so hard to accomplish, but here's what you'll want to do:
Step 1: Every TP Mode you're using needs a new accessor to represent the skill you want to add to the actor while they're in that TP Mode. I called mine :bonusskill. The value for it will be the skill id we want to learn
Step 2: Add the following lines after @tp_mode = actor.tp_mode in the method "setup"
if (tp_setting(:bonusskill)).to_i > 0 self.learn_skill((tp_setting(:bonusskill)).to_i) end
The setup method is what occurs when a new game created. The actor is given a default TP mode, and with that needs to be given the skill that goes with that TP Mode. Not putting this here would mean if your actors already start the game assigned to a TP Mode, they will not know the skill until you later switched off then back onto that mode.
Step 3: Replace "@tp_mode = mode" at the method "change_tp_mode" with the following lines:
if (tp_setting(:bonusskill)).to_i > 0 self.forget_skill((tp_setting(:bonusskill)).to_i) end @tp_mode = mode
if (tp_setting(:bonusskill)).to_i > 0 self.learn_skill((tp_setting(:bonusskill)).to_i) end
What this does is when you are changing TP Modes in the menu, you will first forget the skill from the old mode, then change to the new mode and learn the skill from that mode.
I imagine the "forget_skill" function would forget skills learned through levels or other means, so its probably best that all your TP Mode skills be unique and not be skills that are normally learned by your classes.
After that, your skills gained through TP Mode should probably be ones that cost 100 TP to use since you wanted them to use it at 100 TP. You may need to put them all under a skill type all your actors can use, such as "TP Skill" or something, and assign the skill to that skill type, just like any other skill you would expect your actors to use.