Reduce TP to 0 when actor has certain state inflicted

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
154
Reaction score
10
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,326
Reaction score
482
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
154
Reaction score
10
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
21,987
Reaction score
11,289
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,326
Reaction score
482
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
154
Reaction score
10
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
21,987
Reaction score
11,289
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
154
Reaction score
10
First Language
Portuguese
Primarily Uses
RMVXA
my apologies

 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,326
Reaction score
482
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
633
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 count on someone one time, I let them promise something to me, and one week later it's complete silence as I'm completely let down. I hate everything.
Everytime I need to write dialogues I find myself writing new music pieces... what kind of trick is this?!
Me Being Dumb spending hrs trying to figure out Irenas Visual Novel busts plugin..lol. I'm probably missing something stupid and obvious xDD

let the journey begin >w>
X.X ok... I guess I'll just have to think about 48x48 a little differently. Its not "room for more work"..."its room for more detail!...yay"
Alexa, play Buck-Tick - Dress

Forum statistics

Threads
99,218
Messages
963,160
Members
130,806
Latest member
Niickpv90
Top