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 I disable TP gain from damage in specific fights?
RGSS3 Script RequestsI think you will need a script. In order for someone to write one, if you can't do it yourself, you will need to provide more information. How will you identify which battles will allow TP gain and which ones won't?
Are you using random battles or evented battles (via the Battle Processing event command) or a combination of the two?
Are you using random battles or evented battles (via the Battle Processing event command) or a combination of the two?
It generally just make TP charge rate zero from the damage which is fairly easy. But Shaz said the problem. In which fight you want the TP not getting charged
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.
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 anything
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
Code:
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
You could use a switch and it could be turned on prior to the call to battle, and turned off again after. So your line would simply be:
if you wanted to use switch 15 for this on/off setting.
Doesn't item use still call charge_tp_by_damage though? I made the assumption the OP just didn't want any TP gain during those specific battles.
Code:
return if $game_switches[15]
Doesn't item use still call charge_tp_by_damage though? I made the assumption the OP just didn't want any TP gain during those specific battles.
I don't know what to do with this code...
@8ManStudio You copy it, then open your Script Editor, either by clicking on the icon on the Menu bar at the top of the Editor or by using F11. Scroll down the list of scripts until you come to 'Materials'. Insert a new line, above 'Main' name it clearly so that you know what it is (e.g. TP Gain control) and paste it in the panel on the right. All scripts go below Materials but above Main.
However, I'd wait until the discussion between Shaz and TheoAllen is finished because the snippet might get modified as a result, e.g. if it is going to use a switch or not.
Moved to: RGSS3 Script Requests
However, I'd wait until the discussion between Shaz and TheoAllen is finished because the snippet might get modified as a result, e.g. if it is going to use a switch or not.
Moved to: RGSS3 Script Requests
Yeah, this works better for public use because ppl understand switch better than editing script
charge_tp_by_damage only being called in target where the item/skill applied.
you might confused with the TP gain where it's being called in the item/skill user
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?
I only want to disable TP gain from damage.
Then insert this script
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
Do I enable this switch before or during battle?
Edit: I just tested it, you activate the switch before battle and it works perfectly.
yep, turn it on before the battle, and off again after, otherwise it will affect future battles as well.
Thanks Shaz this will probably prevent me from becoming really confused in the future.
Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-disable-tp-gain-from-damage-in-specific-fights.89006/