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
Gaining TP in damage formula?
RPG Maker VXAce SupportTake 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.
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.
I tried this and it wouldn't add to the TP. Not sure why. Might be something on my end.
On the only usable in battle... just change to HP recovery and you should be able to use it from the menu.
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.
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.
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"
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?
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
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
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.
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.
Yea, this is the way to go. I hate that vx ace damage formula only has about a 100 character limit <_<
Thanks @Engr. Adiktuzmiko i'll do that. This thread can be closed
Thread closed IgnoreMe
Original thread: https://forums.rpgmakerweb.com/threads/gaining-tp-in-damage-formula.114328/
