Advertisement

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

Started by January 30, 2017 10:55 PM
13 comments, last by nullbear 7 years, 8 months ago

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?

Not going to do a math-heavy answer here, though I think there's a type of game and a type of player who will love the stats math approach. Rather let me ask: Why having missing at all? Is it even fun to miss?

This is why in Dungeons of Dredmor I said "heroes never miss". The calculation assumes you hit. Unless you don't -- but what must have happened is an enemy dodged your attack, the scoundrel. This, I think, feels more heroic and gives a sense that the enemy made an active move to foil your attack rather than you simply being inept. Instead of accuracy, naturally, in Dredmor you got a stat called "enemy dodge reduction" used to reduce the chance that enemies will successfully dodge.

Looking back, if I were redesigning that system I'd just take out the accuracy/EDR stat entirely, remove "dodge" as a derived stat, and give certain dodgeful enemies some kind of dodge ability that was expressed clearly* and caps out at a max chance in some way that's definitely below 100%. Then I'd give the player certain sorts of special attacks that cannot ever be dodged, and then have the game show when anti-dodge attacks did damage even though the enemy tried to dodge. This way you get to have enemies that are sneaky buggers, you get to have the player feel awesome about foiling them (if they prepare appropriately), and you avoid a case where the player has to learn statistics to understand and optimize their effectiveness. ... Which, to bring it back around, is what you want to make a game that is "simple and easy to interpret".

(* Ideas: 1. enemy gets to auto-dodge every N rounds like a WoW cooldown ability. Show this to the player. 2. Enemy has a dodge counter with fixed capacity that regenerates fairly quickly; show this to the player. Then they realize that they need to burn through the dodge counter before they can do real damage and it gives a clear tactical approach for how to ensure you get hits in.)

Advertisement

Many games (that implement both dodge and accuracy) get away with this by not having the stats being percentages. Don't call them "chance". It's just a stat.

100% dodge vs 100% accuracy is the good old paradox what happens when the immovable object meets the unstoppable one?

Just have them be arbitrary numbers: 120 dodge vs 101 accuracy? Most likely it will dodge. 320 accuracy vs 178 accuracy? Most likely it will hit.

No reason 100% means it's the maximum or that it's an absolute.

Not going to do a math-heavy answer here, though I think there's a type of game and a type of player who will love the stats math approach. Rather let me ask: Why having missing at all? Is it even fun to miss?

Dodging can have lots of interesting mechanics. An enemy could be very weak but have really high dodge (and a good reward that makes it worth fighting it). This requires the player to invest in moves and characters that perform a lot of hits (quantity over quality) in hopes one of the attacks will land.

High evasion can also be used to force the player into using attacks that won't miss (i.e. magic vs physical attacks)

It can also be used to indicate an enemy is much stronger than you or increase the "WOW" factor. GodCat from the EBF series makes a good use of high dodge to indicate their God-tier status. While GodCat is in its "raw" form, you have to focus on defense and survival, because most of your attacks will miss.

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).

Omae Wa Mou Shindeiru

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.

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.

Advertisement
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.

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.

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.

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!).

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

This topic is closed to new replies.

Advertisement