Reduce TP to 0 when actor has certain state inflicted

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
241
Reaction score
15
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,668
Reaction score
566
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
241
Reaction score
15
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,299
Reaction score
11,713
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,668
Reaction score
566
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
241
Reaction score
15
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,299
Reaction score
11,713
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
241
Reaction score
15
First Language
Portuguese
Primarily Uses
RMVXA
my apologies

 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,668
Reaction score
566
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
681
Reaction score
446
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 Profile Posts

Frostorm wrote on Featherbrain's profile.
Hey, so what species are your raptors? Any of these?
... so here's my main characters running around inside "Headspace", a place people use as a safe place away from anxious/panic related thinking.
Stream will be live shortly! I will be doing some music tonight! Feel free to drop by!
Made transition effects for going inside or outside using zoom, pixi filter, and a shutter effect
I have gathered enough feedback from a few selected people. But it is still available if you want to sign up https://forums.rpgmakerweb.com/index.php?threads/looking-for-testers-a-closed-tech-demo.130774/

Forum statistics

Threads
105,992
Messages
1,018,190
Members
137,772
Latest member
Kirakirna
Top