Help - Search - Members - Calendar
Full Version: Modifying Critical strike and hit rates of an actor/weapon
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
Omnizohar
So yeah, I need some help on editing the script on the critical and hit rates of an actor or the weapon he's wielding. I don't want the modify to be global and affect the whole game. Like I want an actor in my game who should have a natural ability to have a higher critical hit than the rest of the party. Anyway if anyone could help me create this lil system in my game, I'll besure to give full credit.
Night_Runner
In the script editor, the snippet to determine if a hit is a critical is:
CODE
        # Critical correction
        if rand(100) < 4 * attacker.dex / self.agi
          self.damage *= 2
          self.critical = true
        end


If you want to have a character that has a high change of hitting a critical, make them have high dexterity smile.gif

If that's not an option, You can go into the script editor, Game_Battler 3, about line 57 has that snippet I pasted above, I've edited mine so it reads:

CODE
        # Critical correction
        if attacker.is_a?(Game_Actor) && attacker.id == 1
          extra_chance_critical = 30
        else
          extra_chance_critical = 0
        end
        if rand(100) < 4 * attacker.dex / self.agi + extra_chance_critical
          self.damage *= 2
          self.critical = true
        end

Giving actor #1 (Aluxes) a bonus chance of hitting a critical smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.