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,336
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,008
Reaction score
11,340
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,336
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,008
Reaction score
11,340
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,336
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

lunarrosecrow wrote on hiddenone's profile.
please don't lurk hiddenone I'm quarantining!!!
lunarrosecrow wrote on Edward.T's profile.
Hello Edward sorry to bother you and didn't start a conversation cause I thought i'd be a little weird or disrespectful but I was wondering do you still have your Generator resources you posted as the links on the page are dead?
Stream will be live shortly! It is my birthday, and thus I am doing an extended stream! I will be doing a variety of things. Among the activities I will be doing: Playing Oceanhorn: Monster of the Uncharted Seas, art, and some Text Adventure~ Feel free to drop by!
It would be cool if you could "copy as code" event commands :< .
Just managed to recover my Yahoo e-mail that i lost 3 months ago. Turns out an IP from U.S had hacked it and set the pass back to normal.. Like WTF ?

Forum statistics

Threads
99,484
Messages
965,911
Members
131,111
Latest member
HannyBee21
Top