- Joined
- Jun 28, 2015
- Messages
- 219
- Reaction score
- 95
- First Language
- English
- Primarily Uses
- RMMV
Pretty much the title. I want floors to do roughly the same amount of damage, regardless of level.
How would I do this?
How would I do this?
Is there no way to make it do damage based on a percentage?That's what it does already. By default, the floor does 10 HP damage, regardless of your level, DEF, MDF, etc. The only way it is affected is by the FDR stat.
Okay, thank you. That's all I needed to know.Not without a script. I don't know of any right now that do this, though I doubt it would be too hard to implement.
Beautiful.NP. If you are curious, this script snippet should do it for you (untested, but should work as far as I can tell). Note this will overwrite anything else that computes the floor damage, so put it at the bottom of all of your scripts (but still about Main)
Game_Actor < Game_Battler
def execute_floor_damage
damage = (self.mhp * 0.01 * fdr).to_i
self.hp -= [damage, max_floor_damage].min
perform_map_damage_effect if damage > 0
end
end
Change 0.01 to whatever percentage of max HP you want floor damage to do.
class Game_Actor < Game_Battler
def execute_floor_damage
damage = (self.mhp * 0.01 * fdr).to_i
self.hp -= [damage, max_floor_damage].min
perform_map_damage_effect if damage > 0
end
end
It also works with this:That's because I made the dumbest mistake ever and left out one word. Try this one (which is also tested, and worked in a blank project for me):
class Game_Actor < Game_Battler
def execute_floor_damage
damage = (self.mhp * 0.01 * fdr).to_i
self.hp -= [damage, max_floor_damage].min
perform_map_damage_effect if damage > 0
end
end
Okay, I'll use yours just to be safe, then.I'm kind a novice, but I think if you do it with the $end it might not work as we except? I'd use the original with the word class so that it is associated with the Actor like it should be, and therefore it should work with other scripts you might wish to use.