Weapons have Critical %
#1
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


In RM2K/3, weapons have both a hit% and a critical%. But RMXP took both of them out and had both accuracy and critical chance be dependent on Dexterity. I didn't like too much how you have Dexterity raise so you won't miss as much, but at the same time raise chance of criticals, running the risk of making the game easy. Or making the game harder, because the enemies would do criticals more, too.

So to fix this, I bring back Critical% for weapons, heroes, and enemies, but does not affect accuracy. First, make sure you start a new project, or make a copy of the Game_Battler 3 script page, in case things go wrong.

Now, scroll down in Game_Battler 3 until you see this part under attack_effect.

Code:
# ダメージの符号が正の場合
      if self.damage > 0
        # クリティカル修正
        if rand(100) < 4 * attacker.dex / self.agi
          self.damage *= 2
          self.critical = true
        end


Change that to:

Code:
# ダメージの符号が正の場合
      if self.damage > 0
        # クリティカル修正
        attacker.dex - 1
        if attacker.dex > 101
          attacker.dex = 100
        end
        if rand(100) < attacker.dex
          self.damage *= 2
          self.critical = true
        end


As you can see, dexterity will equal critical hit chance. But you may wonder what the other stuff is about. Well, I'll explain. See how I took the attacker's dex and subtracted by 1? That's so if the character/enemy/weapon has 1 Dexterity, it will become 0 Dexterity, which means they cannot critical at all. This way, criticals are mostly dependent on weapons unless you change the attacker's natural dexterity. If you want them to have 1 Dex, their natural Dexterity has to be 2. This isn't totally necessary, though.

The next part makes dexterity equal 100 if the character's dex is more than 101. The reason it's 101 is because of the subtract by 1 thing; if it were 100, it would have equaled 99% instead.

I think the advantage of this is so that you can have weapons or accessories that increases the chance of criticals. It can also be used to have certain characters or classes who usually do not wield weapons (e.g. Fighters/Monks) and/or who naturally can do criticals a lot, by giving them better base dexterity or increasing it by levels.

Of course, the drawback to this is that since we don't want Dexterity to affect hit% anymore, we have to change the hit formula. Just go to the eva(sion) formula and change attacker.dex to attacker.agi, if you want Agility to determine both accuracy and evasion. Unfortunately, I know no way to give a weapon hit%, because Dexterity has already been taken and using the other stats of the weapon would raise the character's normal stats as well.

Yeah, I know this is a really minor edit, but I thought it was cool anyway.
}




Users browsing this thread: 1 Guest(s)