Learning about Damage and Using Them

I came across this script on the default scripts:

#-------------------------------------------------------------------------- # * Determine Floor Effect #-------------------------------------------------------------------------- def check_floor_effect execute_floor_damage if $game_player.on_damage_floor? end #-------------------------------------------------------------------------- # * Floor Damage Processing #-------------------------------------------------------------------------- def execute_floor_damage damage = (basic_floor_damage * fdr).to_i self.hp -= [damage, max_floor_damage].min perform_map_damage_effect if damage > 0 end #-------------------------------------------------------------------------- # * Get Base Value for Floor Damage #-------------------------------------------------------------------------- def basic_floor_damage return 10 end #-------------------------------------------------------------------------- # * Get Maximum Value for Floor Damage #-------------------------------------------------------------------------- def max_floor_damage $data_system.opt_floor_death ? hp : [hp - 1, 0].max endI just want to know, what does floor damage actually do? its my first take on this so I am still clueless...

also, can someone clear me up about how would I use them or call them on my own method? say I started making a class...

i wanted to access the floor damage like...maybe adding a floor damage...or decreasing... maybe add a critical hit of one actor...

and the like.

I really hope someone can clear me up on this.
Module Alter_Stuff My_Script_Is_Altering_Floor_Damage = true Alter_by = 5endclass Game_Actor < Game_Battler if Alter_Stuff::My_Script_Is_Altering_Floor_Damage def execute_floor_damage damage = (basic_floor_damage * fdr).to_i + Alter_Stuff::Alter_by self.hp -= [damage, max_floor_damage].min perform_map_damage_effect if damage > 0 end endendclass Game_Interpreter def change_alteration(altered_number = nil) Alter_Stuff::Alter_by = altered_number unless altered_number.nil? endendThis is one way to add stuffs. You can change it by script calll also (game_interpreter).
Ohhh, I see, that's cool. I have another question, i am making a class to access a battle right on...

here's my code:

BattleManager.setup(10, true, true) BattleManager.event_proc = Proc.new {|n| @branch[@indent] = n } $game_player.make_encounter_count SceneManager.call(Scene_Battle)its giving me an error about a BGM when I killed the enemy...

at what point should I correct?
Most likely you tweaked the troop data.

Try creating a new project and try again.

class Game_Interpreter def hi BattleManager.setup(1, true, true) BattleManager.event_proc = Proc.new {|n| @branch[@indent] = n } $game_player.make_encounter_count SceneManager.call(Scene_Battle) endendI tested it and it worked fine.
I see. I was planning to make it in a new class instead, so I can call it via SceneManager later...but that bgm stuck me.
Sorry for the late reply. I just finished my afternoon class.

How and where do you call the class method?
here's my full code for it:

class NewBattle def main start_battle end def start_battle BattleManager.setup(1, true, true) BattleManager.event_proc = Proc.new {|n| @branch[@indent] = n } $game_player.make_encounter_count SceneManager.call(Scene_Battle) end end I'm getting an error on the replay sound or something... what do you think did I missed out?
class NewBattle < Scene_BaseIf you want to play it as a Scene, make sure you get the inheritance...

Edit: I'll look into that replay thingy.

Edit:

Try this. : x

Code:
class NewBattle < Scene_Map    def start    super    SceneManager.call(Scene_Map)    start_battle  end    def start_battle    BattleManager.setup(1, true, true)    $game_player.make_encounter_count    SceneManager.call(Scene_Battle)  end    end

Original thread: https://forums.rpgmakerweb.com/threads/learning-about-damage-and-using-them.23184/