Yanfly Enhanced TP - Max TP different per actor?

coolperez8

Veteran
Veteran
Joined
Mar 23, 2016
Messages
159
Reaction score
12
First Language
English
Primarily Uses
So, I use the Yanfly enhanced TP plugin, and I was wondering if there's a way to make it so that each actor has a different amount of max TP. The reason for this is that I have some actors that are supposed to be more powerful then others in terms of TP, and can use specific attacks more often then the other actors. Not only this, but I want the TP to be dynamic and have each actor's maximum amount of TP dependent on in-game variables so if the player triggers certain events it could impact the strength of an actor. Each actor's TP should be dependent on different in-game variables. Since I'm on the subject of TP, I want to know if it's possible to make an attack drain all the user's TP and deal damage based on how much TP was drained.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,635
Reaction score
5,116
First Language
English
Primarily Uses
RMVXA
My understanding of that script is that it does not allow control over maximum TP.  You would need to request a plugin or do it yourself.  I'll give you the basics for doing it yourself...


The current Max TP function can be found in the RPG Objects file:


Game_BattlerBase.prototype.maxTp = function() {
return 100;
};


You can modify, alias, or overwrite this function to return a different number based on the actor ID.  For example:

Code:
Game_BattlerBase.prototype.maxTp = function() {
  var tp_value = 100;
  switch (this._actorId) {
    case 1:
      tp_value = 55;
      break;
    case 6:
      tp_value = 255;
      break;
    case 8:
    case 23:
      tp_value = 132;
      break;
    default:
      tp_value = 100;
      break;
  }
  return tp_value;
}
The number after "case" is the Actor ID that you want to change the Max TP for.  The ensuing "tp_value" is what you want their Max TP to be.  Notice the lines reading case 8: and then case 23: these are grouped together so that the TP Value for Actors 8 and 23 will both be 132.


I have not tested this code so please respond directly to my post if you try it out and it doesn't work.


As far as making a skill that spends all your TP to increase damage, you can do this with your damage formula.  It's something I haven't worked with at all in MV yet, so it's possible that this formula will need correction, but I believe it would be something like:


c = a.tp; a.tp = 0; a.mat * 4 + c * 5 - b.mdf * 2


That formula notes the value of the user's (MV lets you call the user a and the target b) TP in a new variable called "c", then sets the user's TP to 0 after we've recorded its value in c.  Then we just write out the normal damage formula with an addition of "c * 5" to the damage, which in this case would deal 5 extra damage for each TP lost.
 

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
245
Reaction score
82
First Language
German
With said plugin you could give every actor his own tp mode as you can set the max tp of every tp mode.


For this example, I gave the four standard actors the modes 1 through 4.


Mode one -> 100TP


Mode two -> 150TP


Mode three -> 50TP


Mode four -> 75 TP


I set "Enable Command" and "Show Command" to false so you can't change the tp modes through the menu.


Next, I set actor one's default mode via notetag to mode one, actor two to mode two, and so on.


Now it looks like this ingame:





But you can't make them dynamic this way.


You can change the maxTp through events with a script call, but when you close the game and continue later on, you get the default max tp of that mode again.


You could make copies of the tp modes for your actors where only the max tp value differs and change the tp mode through Plugin Commands inside your events.


About your question with the damage.


You can do that with Yanflys DamageCore plugin.


Let's say you have a skill that looks like this:





This skill needs at least 10 TP to use it. It has a base damage of 100.


For every TP you have left after the cost, this skill increases the damage by 1 per TP and completely drains your actors TP.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,470
Members
137,821
Latest member
Capterson
Top