Jump to content
  • Advertisement
Sign in to follow this  
mcquany

The simplest but most effective and intuitive way to implement Accuracy and Dodge chance in an RPG?

This topic is 632 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement

If you show Accuracy and Dodge stats as percentages, they MUST be probabilities or something close enough to reason about them as if they were probabilities.

 

One way to extend probabilities beyond 100% is turning them into the expected number of "hits" or "dodges" per attack, each worth a certain fixed or random expected damage.

 

To "roll dice" you could determine the number of hits and dodges in different ways: for example counting multiples of 100% and fractions (e.g. Accuracy 280 = 20% chance 2 hits, 80% chance 3 hits) or starting from a minimum and maximum result (e.g. Accuracy 280 with 2 hits minimum and 4 hits maximum = 2 sure hits worth 200 accuracy and 2 uncertain sub-attacks at 40% each = 36% 2 hits, 48% 3 hits, 16% 4 hits). The minimum and maximum number of hits and dodges could be determined by tactical choices of the characters, special rules about weapons and attack types, a constantly changing "animosity" stat or other rules about combat pacing, etc.

 

After determining hits and dodges for a particular attack this way, subtract dodges from hits to obtain the damage done..For example, suppose the damage of a club against a well-armored opponent is one round of stunning and staggering.  Mr Caveman (club accuracy 140) tries to hit a knight (club dodging 60). They roll 2 hits and 0 dodges, the knight is dazed for two rounds (during which he'll be pushed into a campfire).

Share this post


Link to post
Share on other sites

Most simple and easy to understand (with 80 % accuracy and hitting a mob with dudge 15%):

 

first roll to see if hit. (80%). If miss, dont continue.

IF it hits, roll to see if monster dodged (15%).

 

Easiest!

 

Note: accuracy could be derived from "weapon skill vs monster level" or whatever, but if you give the user that statistic (accuracy) it should be easy to understand what it does.

 

I really dislike all games where you have "armour: +14" but have no idea what it does / how much that helps compared to "dps: +1.2" (which is easy to understand by comparing it to current dps. "Armour rating" is also typically not linear in such games to make things more comlicated.

Share this post


Link to post
Share on other sites

Most simple and easy to understand (with 80 % accuracy and hitting a mob with dudge 15%):

 

first roll to see if hit. (80%). If miss, dont continue.

IF it hits, roll to see if monster dodged (15%).

 

Easiest!

I'm afraid this is flawed as it falls exactly under the Irresistible force paradox. Under your logic, someone with 100% accuracy will never hit a monster with 100% dodge, which is contradictory (unless you put an upper limit to max dodge) as 100% accuracy implies you never miss.

Share this post


Link to post
Share on other sites
I'm afraid this is flawed as it falls exactly under the Irresistible force paradox. Under your logic, someone with 100% accuracy will never hit a monster with 100% dodge, which is contradictory (unless you put an upper limit to max dodge) as 100% accuracy implies you never miss.

 

While technically true, these values will never be 100 %, at least not both (that would be bad game design) so I dont see it as a problem, and the OP asked for a simple and clear solution.

 

Even with buffs, accuracy could be capped at 95 % (or whatever makes sense for the game).

Dodge should probably never be above 30-50 %, or fights will be alot of frustrating (and boring) nothingness and waiting.

 

In this context, accuracy is chance to hit WITHOUT any monster skill to try to avoid/dodge. You cannot show "accuracy" to the player that depends on monster stats as monsters are different (and if they are all the same, dealing with dodging seems redundant to say the least).

 

Diablo makes stuff like "chance to hit against a monster of same level..." but this an be achieved by just scaling hp and damage instead (it's more clear to the player). Never fond of that system (similar to non-linear armour rating that also sometimes scales behind the scenes depending on levels/ranks etc). Makes it hard for the player without adding much actual gameplay/strategy.

Edited by suliman

Share this post


Link to post
Share on other sites

The problem I see stems from the OP's post about having monsters with Dodge at 200%.  Basically it means only super accurate characters could hit them, and everyone else has a 0% chance.  It's a very linear treadmill.  It means that underleveled characters become useless quick, and if the player's characters aren't just the right level, fights will either be impossible, as everything misses, or cake, as they will always hit.  (Note:  if the game is designed without hit probabilities, then it won't be too easy)

 

I suggest going with something more akin to League of Legends, if you're going with hit percentage/dodge, and going multiplicative: http://leagueoflegends.wikia.com/wiki/Dodge

 

They sum it up well:

 

The dodge formula was a multiplicatively cumulative formula. By default, each champion has a dodge modifier of 100, meaning they will be hit by every physical attack directed at them. Sources that modify the dodge stat are multiplied in sequence, reducing the previous dodge modifier by the given percentage.

This means that each increase in the dodge chance has less of an impact on the total dodge modifier. If a champion wears an item that increases dodge chance by 10%, their dodge modifier will be 90% of 100, or 90 (10% of physical attacks are dodged). If the champion buys a second such item, their dodge modifier will be 90% of 90, or 81 (19% of attacks are dodged), not 80% of 100.

Share this post


Link to post
Share on other sites

 

I'm afraid this is flawed as it falls exactly under the Irresistible force paradox. Under your logic, someone with 100% accuracy will never hit a monster with 100% dodge, which is contradictory (unless you put an upper limit to max dodge) as 100% accuracy implies you never miss.

 

While technically true, these values will never be 100 %, at least not both (that would be bad game design) so I dont see it as a problem, and the OP asked for a simple and clear solution.

 

Even with buffs, accuracy could be capped at 95 % (or whatever makes sense for the game).

Dodge should probably never be above 30-50 %, or fights will be alot of frustrating (and boring) nothingness and waiting.

 

The problem is that it's really hard to balance, because:

  1. Accuracy below 80% is useless, as you will miss very often (<80 is only valid if you're affected by a status effect). This means even low level characters can't start with accuracy < 80 otherwise it becomes really boring (attack -> miss, attack -> miss, attack -> miss).
  2. Accuracy can't be 100% for the reasons given. With a valid range of [80; 99]; that means accuracy can only increase 19 times. You have to carefully plan at which level ups accuracy should increase (also it sucks for status modifying items. i.e. items that raise accuracy either raise it very slightly, or raise it a lot and then accuracy becomes irrelevant because you quickly reach 99)
  3. What really matters is dodge. An enemy with >50% dodge will have you miss a lot of your attacks, regardless of your stats.
  4. That means dodge should be likely <=50%. Again this gives very little room for growth; and you can't give 50% dodge at level 100 (including modifiers) because the game becomes extremely boring & easy. If the player manages to get >=50% dodge early in the game for some reason, he could take on almost any enemy given enough time and level up very quickly by defeating monsters you're not supposed to.

While it's not impossible to use it; this system is anything but simple. Yes, the formula/logic/code is simple, but its implications are really complex and hard to come by.

Share this post


Link to post
Share on other sites

the two stage approach as descibed by suliman makes more sense to me:

 

1. does the attack's impact point land where desired (and when desired)?

 

2. is the target still there?

 

best not to get hung up on the specific numbers. 

 

obviously, in such as system, a 100% chance to dodge means you can't be hit (like The Flash - he's just too fast!).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!