TP Rework

Mr_K

Villager
Member
Joined
Jul 8, 2019
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
I’ve attempted to search for similar requests and I can’t find anything. Hopefully this hasn’t already been requested since I don’t see anything similar in the master plugin list. Before I start, I have no scripting knowledge and am only going on my current understanding and the idea for what I want to achieve.

I am attempting to use two resources, one for spells and one for skills, individually. I want to use MP for spells and SP(Stamina Points) for skills(since they are physically based). Is there any way to change TP so that it is no longer generated during combat and would instead start as a level/class(job) based minimum/maximum which could be altered with a growth formula? I realize that this is may be difficult to do seeing as it functions in a very different way than what I am wanting to use it for, based on the “hardcoded” combat system.

P.S. - Would there be an option of removing TP and adding a second MP bar that could be renamed?

Thanks in advance,
Mr_K
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,305
Reaction score
7,642
First Language
German
Primarily Uses
RMMV
some effects like that can be done by traits and parameter changes, but to change the fixed maximum of 100 for TP you'll need a plugin.

if I remember correctly there are several plugins that do this, but I don't have any links.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,069
Reaction score
1,488
First Language
EN
Primarily Uses
RMMZ
Yanfly's Enhanced TP plugin can do this with some configuration: http://yanfly.moe/2016/01/08/yep-55-enhanced-tp/

Basically, to turn TP into another simple MP-like gauge, you can disable the TP Mode changing options, pick a mode to give to your actors, set all the "gain on hit" kind of parameters to 0, and put a suitable formula for the maximum TP, e.g.
Code:
45 + user.level * 5
^ This should give actors 50 max TP at level 1, 55 at level 2, etc. If you're using the same TP Mode for actors and enemies, best to include an "isActor" check in there too, e.g.
Code:
user.isActor() ? 45 + user.level * 5 : user.mmp
^ This says "for actors, return 50 at level 1, 55 at level 2, etc; otherwise return the battler's max MP". You can customise this stuff, naturally~ :kaothx:

Assuming TP works the same for all actors, you can simply change the name in the database (System tab). Otherwise you may be interested in this plugin by NeMV: https://forums.rpgmakerweb.com/index.php?threads/nemv-class-tp-rename.60266/
 

Mr_K

Villager
Member
Joined
Jul 8, 2019
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
So I’d be able to achieve something similar to MP this way? I’ve messed around with Yanfly’s enhanced TP but I guess I haven’t exhausted all options and should take another look. I was hoping to achieve 9999/9999 maximum for HP/MP/SP along with stat bonuses from gear and have MP/SP increase based on class/sub class and level. That would be possible?

Edit: Thank you for the quick and detailed replies! :)
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,610
Reaction score
5,080
First Language
English
Primarily Uses
RMVXA
So I’d be able to achieve something similar to MP this way?
Yeah, you can basically do this. Yanfly's Enhanced TP is a good start - set Preserve TP to ON (or true), and change most of the parameters (like take damage, deal damage, regen TP, etc.) to 0.

From there, you will need to modify the user's Max TP through a tiny bit of code. You can find this code inside rpg_objects.js:
Code:
Game_BattlerBase.prototype.maxTp = function() {
    return 100;
};
You can make this into a formula such as return (100 + (5 * this._level)) to have the battler's Max TP increase by 5 per level. If you have multiple classes that are all supposed to have different Max TP values from each other, you will need to set up a conditional branch inside this method and return the value obtained from one of the formulae within that branch. You can ask how to do this in the "Learning JS" subforum once you've got the rest of your system working correctly - it's not hard to do, but it's beyond the scope of this thread. (One more important note: it's best to copy this method into a new .js file that you create in your project's "plugins" folder, and then modify it there, rather than modifying it directly in the code. This will allow you to reverse mistakes more easily, and also will prevent your changes from being overwritten when you download a new version of RPG Maker.) EDIT: Per @caethyril's info below, you can actually just input the formula into the Max TP Parameter for each mode in Yanfly's plugin. That's a much easier way to handle this part than changing the code.

If you want Items or Skills to restore TP, this can usually be done by simply adding the amount into "TP Gain" in the database. If you need a number higher than 100, or want to use a percentage, then you can do it in the damage formula using b.tp or b.maxTp() to represent the target's current or maximum TP (use a instead of b to get the user's instead).

At this point you will have a system that is very similar to MP for your TP! The only differences are that you will not restore any current TP upon leveling up (this would need to be done with a script change), and (if you are using damage popups) TP gains achieved through the damage formula will not create a popup like MP gains achieved through the Features Box normally would. Besides that, it should be perfect!
 
Last edited:

Mr_K

Villager
Member
Joined
Jul 8, 2019
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
Thank you very much! :)
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,069
Reaction score
1,488
First Language
EN
Primarily Uses
RMMZ
From there, you will need to modify the user's Max TP through a tiny bit of code. You can find this code inside rpg_objects.js:
As I mentioned, Yanfly's Enhanced TP has a max TP parameter for each mode, no need for a separate override~

Good call on the "TP won't restore to max on level up", though. :)
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,610
Reaction score
5,080
First Language
English
Primarily Uses
RMVXA
As I mentioned, Yanfly's Enhanced TP has a max TP parameter for each mode, no need for a separate override~

Good call on the "TP won't restore to max on level up", though. :)
I didn't think so since this is completely omitted from the documentation - but yeah, I can see from a fleeting moment in the video that each Mode does indeed have a Max TP parameter. Does it allow a formula (which is necessary to allow Max TP to grow with class/actor level), or is it limited to accepting direct numeric values?
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,069
Reaction score
1,488
First Language
EN
Primarily Uses
RMMZ
I didn't think so since this is completely omitted from the documentation - but yeah, I can see from a fleeting moment in the video that each Mode does indeed have a Max TP parameter. Does it allow a formula (which is necessary to allow Max TP to grow with class/actor level), or is it limited to accepting direct numeric values?
Yes, max TP accepts a formula. :) Not sure why it's glossed over in the video/documentation. :kaoswt:
 

Mr_K

Villager
Member
Joined
Jul 8, 2019
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
Alright, so I think I’m following along so far. Yanfly’s Enhanced TP is the way to go? What about the issue with restoring TP on level up?

Thanks again!
 

Mr_K

Villager
Member
Joined
Jul 8, 2019
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
Why am I getting this error?Error.png
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,069
Reaction score
1,488
First Language
EN
Primarily Uses
RMMZ
Looks like something to do with Yanfly's Grid-Free Doodads plugin. I'm not familiar with that plugin personally, but if you're using it then check that you followed the setup instructions ("Instructions - Requirements") listed on its page and that you haven't left any resources still packed in archives; extract them from .rar if needed (.rar extraction advice here).

Also check your Yanfly plugins are in the recommended order, listed here. :)

If you're still having trouble, I'd suggest starting a new thread, since this is unrelated to "TP Rework". :kaoswt:

Edit: whoops, nearly missed this post
Alright, so I think I’m following along so far. Yanfly’s Enhanced TP is the way to go? What about the issue with restoring TP on level up?

Thanks again!
Not sure what the best approach there might be... :kaoslp:
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Haired slime? Trying some different styles of art. Maybe I can make some resources with this new kind of painting.......
i love my game very much
Uh, I'm probably overthinking this, but I think that some of my music sounds kinda...bad?
The melodies are just sort of awkward, and don't flow.
I'm really not sure what to do. Why am I even worrying about this? I don't even have a battle system yet!
And the Lord said, let there be lighting effects! And there were lighting effects! And it was good...ish? Might tweak this some more.
Today was a day of good things! Thank you fate! I pray to the darkness that those that read this will enjoy a good day as well! Power to the gam mak.

Forum statistics

Threads
105,724
Messages
1,015,913
Members
137,402
Latest member
Lopilon
Top