Reduce TP to 0 when actor has certain state inflicted

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
158
Reaction score
11
First Language
Portuguese
Primarily Uses
RMVXA
Good Morning / Day / Afternoon / Evening everyone.

I have a request for a certain kind of snippet

So I would like the following:

1. when reviving an actor (removing death state), force reduce their TP to 0, so the player will have to charge it again.
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,334
Reaction score
483
First Language
English
Primarily Uses
RMVXA
You could do a custom damage formula and just tell it to set tp to 0.
Ruby:
    #a.survive(a, b)
    #remove death and sets tp to 0
    def survive(a, b)
      b.tp = 0
      b.remove_state(1)
    end
 

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
158
Reaction score
11
First Language
Portuguese
Primarily Uses
RMVXA
Do I put that as a formula or in the script index?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,003
Reaction score
11,327
First Language
English
Primarily Uses
RMVXA
That would be a snippet that you put in scripts. In your skill or item (whatever it is you are using to revive) you would put
Code:
survive(a, b)
Note, though, that if your Inn events work in the normal way, the actor would be revived without that TP reduction happening. You would have to use a customised Inn event if you want the reduction to happen there as well.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,334
Reaction score
483
First Language
English
Primarily Uses
RMVXA
Do I put that as a formula or in the script index?
If you don't use custom formulas, then sorry, it would be a script addition. You can add it to every other damage formula snippet you have (they should be all together in one script).
Ruby:
class Game_Battler < Game_BattlerBase

    #a.survive(a, b)
    #remove death and sets tp to 0
    def survive(a, b)
      b.tp = 0
      b.remove_state(1)
    end

end
And like kes said the formula box just has survive(a, b)
 

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
158
Reaction score
11
First Language
Portuguese
Primarily Uses
RMVXA
Thank you for all your effort, but it doesn't seem to be working, maybe because i'm using Selchar's limit break script that changes the way the TP bar works...?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,003
Reaction score
11,327
First Language
English
Primarily Uses
RMVXA
I think you should have said that at the beginning. Please give a link to the web page where it can be found, because people might not necessarily have a copy of it, and it would save them having to hunt for it if they need to look at it.
 

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
158
Reaction score
11
First Language
Portuguese
Primarily Uses
RMVXA
my apologies

 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,334
Reaction score
483
First Language
English
Primarily Uses
RMVXA
but it doesn't seem to be working
Does it revive the actor? if not then try a.survive(a, b) in the formula box.

I don't see how that script would cause problems with tp. The script still makes reference to @tp
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
638
Reaction score
416
First Language
English
Primarily Uses
RMVXA
Untested, but you could try this:
Ruby:
class Game_Battler < Game_BattlerBase
  alias tp_revive revive
  def revive
    tp_revive
    @tp = 0
  end
end
Every time a battler is revived, it sets their tp to 0.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I made a giant tree + treehouse for the next country woods pack \o\
Calculated my tax refund - CHEERS
Looked at my student debt - cries
Still, might be just enough left over to pay for my new computer, which would be awesome!
And my student debt will be fully paid, which is also pretty nice.
They say nice guys finish last. But mean guys don't finish at all!
I keep forgetting how much I hate how VX-MV implements fences and autotile tables.
Big 10:40 composition of mine! I'll be using this for a big city in my current project! This track is huge, and took me one entire month of full time work to complete. If you want more info, like on the lyrics, check out this thread.

Forum statistics

Threads
99,413
Messages
965,031
Members
131,034
Latest member
ToxicAlien68
Top