Gaining TP in damage formula?

Status
Not open for further replies.

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,923
Reaction score
535
First Language
English
Primarily Uses
N/A
Can you use a damage formula to have an ally gain TP? I'm trying to make a skill were the target gains TP equal to there MP. Then they're MP empties
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Take note though that such setup will only work on battle. If you're doing a menu skill, you wont be able to target an ally with an HP damage skill, the game wont allow it.

On a side note, you might want to change it to

b.tp += b.mp

If you want tp gain. The original formula makes the target's TP equal to their MP.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
If it doesnt work, then just do

b.tp = (b.tp + b.mp)

:)

PS: If you do HP recovery, you wont be able to use it on full HP actors... This engine has lots of checks for menu skills somehow... IIRC though, putting a sure effect on the effects box, like TP + 0 or running a blank common event allows you to use the skill.

Anyway as long as the skill is battle only, the menu limitations shouldnt matter.
 
Last edited:

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,923
Reaction score
535
First Language
English
Primarily Uses
N/A
Thanks everyone! In this game, TP boosts damage dealt and is called DPS. It's max is 10, and it goes down each turn. This skill will only be used in battle, i want it to add to TP equal to the targets MP then empty the TP. It's not corrupted magic in this game. It's a blacksmith skill called "Forge"
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
If thats the case, you might need to add a check to make sure the TP wont go above 10... Or what should happen if for example my current TP is 5 and the MP is 6? Does the TP become 10 and the MP still becomes 0? or should the MP only be reduced by 5?
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,923
Reaction score
535
First Language
English
Primarily Uses
N/A
for example my current TP is 5 and the MP is 6? Does the TP become 10 and the MP still becomes 0? or should the MP only be reduced by 5?
After you mention it, it's only fair MP should be reduced by 5 in this case. And possibly MP regeneration should be increased from 1 each turn, to 2 each turn for a few turns
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Then you need to add that on the damage formula, as for the enhanced regen, you could just do that as a state..

TBH, when formula's become a bit more complicated, I prefer writing them in the script editor as a method and just make the damage formula box call that method..

Like

Code:
module DAMAGE
  def self.mptotp(b)
    if (b.tp + b.mp) > 10
      value = 10 - b.tp
      b.tp = 10
      b.mp -= value
      #or b.mp = (b.mp - value)
      #if -= doesnt work
    else
      b.tp = (b.tp + b.mp)
      b.mp = 0
    end
  end
end
Then on the formula box, you just do DAMAGE.mptotp(b)

Ofc you can still do this on the damage formula itself, but the single line might be too confusing.
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

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.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,454
Members
137,821
Latest member
Capterson
Top