3
\$\begingroup\$

I am a university student and I have been tinkering with some RPG game ideas recently. One problem I am having is developing a proper mechanics or system of HIT or MISS chance in a monster-slashing game.

First of all, I want my stats to be simple and easy to interpret. So when the player opens his offensive and defensive stat menu he will see something like this:

Accuracy: 90%

Dodge chance (or Evasion rate): 10%

One solution I come up with was this system:

Hit chance = (Accuracy - Dodge Chance)

For example, my character has a base Accuracy of 80%, the monster he is slaying has a Dodge Chance of 10%. Therefore, when I hit the monster I have a 70% chance to make the hit.

Notice that in this system, I allow the Accuracy and Dodge Chance to exceed 100% by means of gearing and buffing. So there can be scenarios like: My character has a base Accuracy of 80%. He has a weapon with a stat line +20% accuracy and a ring with a stat line +10% accuracy equipped. He also has a skill that says "+30% accuracy for 10 seconds". So when my character equips those items and activates the buff skill, he should see an effective Accuracy of 140% in his stat.

So when this character slays a monster with only 20% Dodge chance he will always guarantee a hit. This makes sense because he should be rewarded for choosing this item and this skill (or this build basically).

Of course, there will be types of monster where there Dodge Chance is high, or incredibly high (maybe 200%) for a super rare creature which could drop lots of legendaries when slain which would encourage players to equip specific builds in order to hunt them.

My question is that, is there a better and more intuitive system than this? I saw some post suggest that we calculate hit chance by:

Hit chance = ((Accuracy - Dodge Chance)/Accuracy)*100 (%)

How is this different than my formula? and which one is more consistent in an RPG? and which would make players feel better playing and building their character? because I have seen some players get frustrated when they miss a crucial hit/skill.

Of course, what are other popular systems regarding HIT and MISS in RPGs which do not rely significantly on RNG but, ultimately, on the players' decisions of choosing their gear, skills and build?

\$\endgroup\$
  • 1
    \$\begingroup\$ The concept here isn't complete, if your character has 50% hit chance, and the enemy has 50% dodge chance, these formulas will both make hit chance 0%. But in actuality the hit chance is 25%. You're only doing half of the probability steps. If the character has % hit chance, then you must first determine whether the character has managed a hit before it actually lands a hit. I have to flip one coin to see if my character has overcome their own accuracy, then I have to flip another coin to see if my character has overcome the enemies evasion. \$\endgroup\$ – RenaissanceProgrammer Jan 30 '17 at 23:22
  • 2
    \$\begingroup\$ I'm not sure if we can determine a "simplest" "most effective" or "most intuitive" system here - and in particular, the one that you might consider "best" in one of these three qualifications might not be the one you'd consider best in the other two. Together with the comment above, we already have 3 proposed formulae, each of which can be argued to be "simple" "effective" and "intuitive" in different ways. To help focus this question toward constructive answers, consider listing some particular scenarios/outcomes you want, like "increasing my accuracy by +1 always improves my hit chance" etc. \$\endgroup\$ – DMGregory Jan 30 '17 at 23:41
3
\$\begingroup\$

In your system there will be situations where either all attacks of combatant A on combatant B will fail or situations where all attacks will succeed. If that is your design goal, then go for it.

The formula ((Accuracy - Dodge Chance)/Accuracy)*100 (%) is far less intuitive than your formula, but will always give a small chance to miss, even if the accuracy stat is far larger than the dodge stat. But you can still be "safe" if the defenders dodge is more or equal the attackers accuracy. Whether that's good or bad depends on your design goals.

Another formula is to just roll a random number between 0 and the attacker's accuracy and a second random number between 0 and the defender's dodge and see who rolls higher. That way there is always a small chance to dodge or miss no matter how different the stats are. In this case you shouldn't add a percent-sign after your accuracy and dodge stats, because they have nothing to do with percentage anymore.

Regarding the question "What do the players want": During some playtests with a Strategy-RPG I developed a while ago I found that the players usually prefer if their own characters hit almost all the time, even if their characters do less damage and their damage output is less reliable. Most players felt frustrated whenever they saw one of their characters miss. This was especially frustrating when a player lost a battle due to a random miss in a very important situation. They felt like they lost because they were betrayed by the RNG, not because they played bad. I guess that's mostly because the players don't have a way to directly influence whether or not their characters hit, so seeing a miss is a punishment even though they didn't do anything wrong.

In the end I got rid of the accuracy stat and made all attacks hit all the time. To still have some randomness I added more random spread to the damage calculation. Players found it far less frustrating to see their characters do very little damage than no damage at all.

But every game is different. Your game might be more enjoyable with random misses than mine. The only way to find out is to test play, analyze, tweak and test play again and again.

\$\endgroup\$
-1
\$\begingroup\$

There are a bunch of ways to implement systems like this, but one thing really stands out to me after reading your post: hit chance and dodge chance are not a single calculation and shouldn't be treated as such.

What I mean is this: if I were attempting to shoot a target with a bow & arrow what are the factors involved in figuring out whether I might hit it?

  • What is my skill with a bow & arrow
  • What is the quality/accuracy of the bow & arrow
  • How far away am I from the target
  • Is the target moving
  • Is the target actively trying to avoid being hit


So if you were applying those concepts to an RPG what you'd probably do is give the player a base accuracy determined by their level and skills. Then you'd modify that based on their equipment (weapon, stats, etc) and that would determine their overall accuracy in a "perfect" environment. Then you'd create a target and they would have a base chance to dodge determined by their level/skills and modified by their equipment/stats.

When you actually calculate the hit you would FIRST determine if the player would hit the target if it was completely stationary and not dodging. Keep in mind that when calculating this you need to take into account any relevant factors such as distance and environment (weather).

If the player misses then it doesn't really matter whether the target dodges or not (unless you include "critical mishaps" where the target jumps into the way of a missed shot, I don't advise doing that for complexity reasons).

If the player would hit the target then you need to calculate whether or not the target dodges, which would be determined by the dodge chance relative to any modifiers (the relative accuracy of the player, distance, etc).

So if a player has a 100% chance to hit and is at short range shooting at a stationary target then you might apply a penalty to the dodge chance of the target (if I'm shooting an arrow at someone from 10 feet away using a compound bow it's highly unlikely they would have the time to react, let alone dodge).

That could mean an effective dodge chance of 0%, but it remains a separate calculation AFTER you figure out whether the player would hit initially. Also, you could use the "quality" of the shot to influence the dodge chance as well. For example, if you had a 50% chance to hit and rolled a 100 sided dice you might treat a 100 as a perfect shot and a 51 as barely on target and have that relative value impact the dodge chance.

Just some food for thought...

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.