Hey guys so you know when you are far in a game and your party is all beefed up with super high defense and armor and such and you decide to wonder off to an earlier stage of the game. These foes are far weaker than you and every attack they land does absolutely no damage. How do I set it up so that weak attacks will do at least 1 damage? Thank you 🙂 .
-JAD
Just add "+ 1" to the end of your damage formula. 🙂
Adding 1 to your damage formula won't work since the total result could still be negative. You could add a "max" function to each damage skill in the game, and that would get closer, but things like Guarding could still reduce the damage to zero. So we'll need to do some super-basic scripting.
Go to the make_damage_value method in Game_Battler.
Right before this line:
@result.make_damage(value.to_i, item)Add this:
if value > 0.0value = [value, 1.0].maxendAnd that should do it.
@wavelength
I'm getting a syntax error:
unexpected tIDENTIFIER, expecting key_word then or ';' or '\n'
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
That code shouldn't cause that error, so maybe you've keyed it in wrong.
Can you copy/paste that method so we can see what you've done?
No problem. All the best in your gamemaking.