- Joined
- Jan 22, 2017
- Messages
- 7
- Reaction score
- 0
- First Language
- English
- Primarily Uses
- RMVXA
So what I want to do is make it so that you do not gain TP from being hit, but only during specific fights.
How do you do that? Can you control TP rate using a status? Maybe just apply that status to all actors prior to the battles where you don't want them to use/gain TP, and remove it afterwards (assumes those battles are called via events and are not random encounters). Although every battle gives them a random amount of TP to start with, so they wouldn't necessarily have NO TP during the battle - that would still require a script mod to change.just make TP charge rate zero from the damage
class Game_Battler
def charge_tp_by_damage(damage_rate)
return if a_specific_condition_is_true
self.tp += 50 * damage_rate * tcr
end
end
return if $game_switches[15]
I don't know what to do with this code...At first I was thinking of using states effect, but the OP specifically mention from the damage (not from item use). So modifying TCR aint gonna work here. Instead, a simple solution would be
Could be switch or anythingCode:class Game_Battler def charge_tp_by_damage(damage_rate) return if a_specific_condition_is_true self.tp += 50 * damage_rate * tcr end end
Edit: I'm thinking if the condition itself would be better if it's based on troop id because OP also mentioned a specific fight which I'm sure it's not a random encounter
Yeah, this works better for public use because ppl understand switch better than editing scriptYou could use a switch and it could be turned on prior to the call to battle, and turned off again after
charge_tp_by_damage only being called in target where the item/skill applied.Doesn't item use still call charge_tp_by_damage though?
Let's ask the OP for clarification thenI made the assumption the OP just didn't want any TP gain during those specific battles.
I only want to disable TP gain from damage.Let's ask the OP for clarification then
@8ManStudio do you only want the disable TP gain from damage only? or all the other sources as well like TP gain from item?
Then insert this scriptI only want to disable TP gain from damage.
class Game_Battler
def charge_tp_by_damage(damage_rate)
return if $game_switches[15] #<-- change switch ID here
self.tp += 50 * damage_rate * tcr
end
end
Do I enable this switch before or during battle?Then insert this script
To disable TP gain from damage, turn on the switch 15 (you can change it)Code:class Game_Battler def charge_tp_by_damage(damage_rate) return if $game_switches[15] #<-- change switch ID here self.tp += 50 * damage_rate * tcr end end
Thanks Shaz this will probably prevent me from becoming really confused in the future.yep, turn it on before the battle, and off again after, otherwise it will affect future battles as well.
