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,335
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,006
Reaction score
11,339
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,335
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,006
Reaction score
11,339
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,335
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 Profile Posts

This time around I don't have early access to the new maker, so I have to wait like everyone else to look under the hood. I really hope we get to soon though, I'm pretty excited :D
Chaos17 wrote on Poryg's profile.
Hi, I am following your videos tutorials serie about coding on MV and I am at the third video. Thank you for making it but's a bit hard to follow since you don't show the whole plugin at the end. I had to screenshot the lines between 110-159 because you scrolled so fast on them.
:rtear:
I'm not sure if I should be happy for MZ, or sad for MV.
Not going to lie.... The update's cool and all, but I immediately ran to Mog's site and was like, "Update! Update! Update!" while breathing on the page of his Star Ocean Battle System plugin. :kaoswt:
Ho boi. I can already see the storm of ugly actor faces RTP customizable facesets from MZ are gonna flood. XD

Forum statistics

Threads
99,463
Messages
965,686
Members
131,073
Latest member
James1998
Top