FIZZAMUN'S PROFILE
Fizzamun
0
Search
Filter
Lowest Damage instead of 0, make it 1.
author=Travio
Please read the whole post, you don't need to make both changes - either will work, but I personally recommend the second one.For VX Ace, it's a change in the scripting for it...
From what I can see, as I haven't had a lot of experience playing around with VX Ace's scripting engine yet, it should be the make_damage_value function in Game_Battler (starts at line 351 in my copy). This should work...
def make_damage_value(user, item)
value = item.damage.eval(user, self, $game_variables)
value *= item_element_rate(user, item)
value *= pdr if item.physical?
value *= mdr if item.magical?
value *= rec if item.damage.recover?
value = apply_critical(value) if @result.critical
value = apply_variance(value, item.damage.variance)
value = apply_guard(value)
value = 1 if value == 0
@result.make_damage(value.to_i, item)
end
This change should make it so that the damage value passed to "make_damage" will never be smaller than 1. Again, this should work, but the commenting on VX Ace is pretty terrible, so it's a little difficult to tell what particular segments of code are actually used for on first glance. This should be the right changes, based on the my search in the scripts.
The reason for the need of the change in the script, and not the formula, is due to how the formula evaluates. As the script shows, it alters the amount of damage in value after the formula has already been evaluated, so it can set it to 0 damage after that point - if it gets set to zero (or lower), it needs to be set to 1 before being passed forward.
Actually, the better place MIGHT be in Game_ActionResult, in make_damage on line 65.
def make_damage(value, item)
@critical = false if value == 0
value = 1 if value == 0
@hp_damage = value if item.damage.to_hp?
@mp_damage = value if item.damage.to_mp?
@mp_damage = [@battler.mp, @mp_damage].min
@hp_drain = @hp_damage if item.damage.drain?
@mp_drain = @mp_damage if item.damage.drain?
@hp_drain = [@battler.hp, @hp_drain].min
@success = true if item.damage.to_hp? || @mp_damage != 0
end
Either way works. Be aware that this also sets MP drain's lowest value to 1 as well; if you use the second method, changing
value = 1 if value == 0
tovalue = 1 if value == 0 and item.damage.is_hp?
will make it apply only to HP damage.
Thank you very much Travio, the first suggestion you gave, works perfectly!
(The "Game_Battler" one.)
Lowest Damage instead of 0, make it 1.
Lowest Damage instead of 0, make it 1.
Hey guys. Sorry in advance if I've put this topic in the wrong place.
I was just wondering, is there a way to make it so the lowest damage you can deal
in battle is 1, instead of "Dealt No Damage"?
e.g. Dragon Quest, with their Metal Slime, they have 999 DEF and MDF. However,
instead of the characters dealing 0 damage, it's either 1 damage or, the Metal Slime "Smoothly Dodged" the attack.
If I'm wrong, sorry. But I hope you know what I mean.
Thanks in advance, Fizzamun.
I was just wondering, is there a way to make it so the lowest damage you can deal
in battle is 1, instead of "Dealt No Damage"?
e.g. Dragon Quest, with their Metal Slime, they have 999 DEF and MDF. However,
instead of the characters dealing 0 damage, it's either 1 damage or, the Metal Slime "Smoothly Dodged" the attack.
If I'm wrong, sorry. But I hope you know what I mean.
Thanks in advance, Fizzamun.
Restore all stats on level up V1
This script is absolutely amazing!
It's just what I needed in my game, saves have to go back and forth between where you're fighting, and the healing place(s).
I've already gave you all the credit in my game after you finish the demo, which you can choose whether to read the Credits part or not.
Thank you for doing such a great job with the script!
It's just what I needed in my game, saves have to go back and forth between where you're fighting, and the healing place(s).
I've already gave you all the credit in my game after you finish the demo, which you can choose whether to read the Credits part or not.
Thank you for doing such a great job with the script!
Pages:
1













