Hit Chance Claculation

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
So I have a rough concept for my game coming up in MV and one of them is this new concept of hit chance %. What do yuo guys think of the following "implementation concept"

Dex would increase hit percentage, which is calculated: If Player level is greater then enemy level give a 10% bonus, if enemy level is greater then player subtract a 10% penalty. If Dex is higher then Enemy Agility give 10% bonus

Dex > Enemy Agi = +10%
P Lv > Enemy lv  = +10%

Base Hit is enemy hit chance.

Enemy hit chance can be configured.

If Enemy Hit Chance == 45%and you have a 10% that means you have a 55% chance to hit. which means you have a 55% chance to miss. Random number between 0 and 100 with added penalty or bonus compared to hit chance means that if your hit is higher then 55 you hit else you miss.
A good example is:

- Enemy Level is 5, player is 2 (-10%). Enemy Agi is 4, player DEX is 6 (+10%)
- Enemy Hit Chance is (configurable) so: 47%

Random Number between 0 - 100 is generated: 25.

Bonus and penalty is added: 0

Total: 25 < 45 - miss.

Now this depends on RNG. But with better weapons you increase this. Now according to what I have read you can have multiple types of equip slots in MV, so I was thinking of special trinkets adding to your stats or what have you, like maybe a shield blocks. counting as a miss. or a trinket adds DEX increasing chance to hit.

Keeping it simple though does this concept work? What issues does it raise?
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,520
Reaction score
1,655
First Language
English
Primarily Uses
RMMV
Does it apply to only auto-attacks or also to skills? In my opinion:

If only to auto-attacks, I would get annoyed by missing hits if the chances are too low (75% or below) and stick to using skills. Between 75% and 85% is still pretty low, but could be okay. 85%+ is fine.

If it applies to auto-attacks and skills - and has below 90% hit chances for the average skill, then I don't know what you're doing with your combat system. I'd probably not put up with that. Losing a turn + losing MP for a skill to miss is way too big of a loss.

Issues I see with missing: first, it's a huge swing in variance. Missing a few crucial attacks in a row could potentially mean the death of the party. Although this would also depend on the difficulty of your battles.

Second, missing simply isn't fun. Once in a while could be okay, like with low chance to miss (10-15% or less), especially when attacking is a decent choice of action. Missing frequently quickly sucks the fun out of a game, though.

If only auto-attacks can miss, then I guess it would heavily depend on how dependant the player is going to be on their auto-attack and how frequently they can rely on using skills to land hits on the enemies.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
I have walked away from games with hit chances of that order.  It quickly ceases to be fun and becomes deeply frustrating.  Having a system which uses the RNG in that way means that it is almost impossible to balance the encounters properly due to the huge variance swings.

I personally think it is a terrible idea.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,528
Reaction score
14,261
First Language
English
Primarily Uses
RMVXA
I think the 10% bonus or loss is not a poor idea, but the initial to hit chance is too low, and even with a 10% boost, it is pretty much a 50/50 crapshoot. However, this could be balanced out by:

1: Raising the initial to hit rate to say 75 - 85%? Then the bonus gets you in the default 95% area.

2: Making it so that each point of DEX increases (or decreases) your to hit chance by a small %. This way if you cannot hit an enemy at all, the difference in your DEX is too high and it is a sign that you are underleveled. I recall Age of Wonders 2 did to hit this way (using ATK and DEF instead), and as a result you only saw a lot of misses if you were trying to attack a dragon with a peasant, or something silly like that.
 

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
You guys have some good ideas but an intial hit rate of 75% is to high IMO. Imagine this:

Player Dex is higher then Enemy Agil = +10%
Player Level is Higher then Enemy = +10%

Now you have a 95% chance to hit and the enemy chance to 45% you auto hit. 95 is greator then 45.

with my solution the initial hit % is a random number between 0 and 100 that must be higher then the enemy hit % which is configured per enemy (and is static across all enemy levels)

So if the chance to hit a goblin is 45%, you have +20% bonus and the RNG comes up 60 + 20% is well you already hit. In my world this would be 80% and you would auto hit. because 80% is higher  then 45%.

If we use a actual base line hit number then I could say:

Base Hit  = 50%

Bonuses = +20%

Your hit chance is 75%

Enemy To hit chance is 45%

so 75 > 45 means you hit?

Maybe I am way off?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,528
Reaction score
14,261
First Language
English
Primarily Uses
RMVXA
I see one logic problem with this. Why would an enemies to hit determine how well I hit them? That makes no sense logically. Otherwise though, it sounds like you are going with if to hit + bonus + RNG > enemies, then it might work.

I will say it will need some testing to see. And remember, the RNG can be really evil in RPGMaker. I once had a character with a 75% to hit miss 7 attacks in a row on an enemy with 0 EVA, which should only occur with probability (0.25)^7.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
Why does a 75%hit rate suddenly become an auto hit? You make it sound like it was certain, in which case it's not 75% but 100%
 

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
So I think I figured it out - with out RNG unless I wanted too, see below ... 

Lets assume you have an enemy and a base hit %

Your base hit is 50% which means that you will always hit 50% of the time.

Now if you have an enemy whos chance to hit is 45% that means (if we were using 100 sided die) you would need (with out a base hit) to roll higher then a 55 in order to hit. With a base hit of 50% you would need to roll higher then a 5 (Am I correct?).

My logic comes from the  concept of Dice, 10% chance to hit means you need to roll higher then a 90.

So if we take into consideration Base Hit + Bonus for Dex being higher then Agillity + Bonus for Level being higher then enemies  you would get 70% which is higher then the 55 on the 100 sided die to roll which means you hit.

In simple math that 50 + 10 +10 > 55 == hit.

Now a little trickier is all these bonuses on a 5% chance to hit. well you miss:

50 + 10 +10 < 95 == miss.

Now There will be other factors that can add to to your chance to hit, for example: maybe you have a necklace of ,sdhfgsdjhf 30% to hit. so if I get this math right:

50 + 10 + 10 + 30 == 100 > 95 == hit.

Some one asked about spells and skills: all spells will have a 75% chance to hit. skills will have a 65% chance to hit, if your mind stat (a new stat im adding) + intelligence is 0 - 10 (-10%), 10 - 20 (0%), 20+ (+10%)

So if the chance to hit is 25% and you cast ice and are a wizard with a mind of 16 and a intelligence of 19:

75 + 10 = 85 > 75 == hit.

Does this make sense in the context of calculating to hit?

If I wanted variance I could say: Enemy to hit == (Enemy level - Characte level X varaible ), so that 1 - 1 = 0 *2 = 0, chance to hit is defaulted to 75%

Now lets try: 20 - 5 * 2 = 30, RNG between 30 and 100, lets assume 65. Now you might think I have a 65% to hit that? lets reverse  it, the chance to hit is now 35% you must get higher then a 65 to hit.

Ok with the math above we can do: base + mod = (50% + 0%) = 50% is night higher then 65 we miss. Lets cast a spell, 75 + 0 > 65 we hit.

Now you might think thats too easy, well I didnt take into account that the enemy might have resistance, or amor or what ever - you might hit but the damage might be like 10 to his 130 hp.

I was thinking about DND and how you might have a 5% chance to pick a lock and you have a +10 on lock pick, ok roll the 100 sided dice and a 10 sided dice  = 25 + 10 = 35 < 95 you fail.
 
Last edited by a moderator:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,528
Reaction score
14,261
First Language
English
Primarily Uses
RMVXA
That's pretty close to how the default system already works. The only difference is it adds the bonuses to your to hit first, then rolls the die. So if you have a default to hit of 75%, and a bonus of 10%, then it rolls the die and if it rolls over an 85, you miss. That will happen 15% of the time, and will also mean that on average you will have about 1 miss per 4.5 swings of the weapon.

I suppose you could simulate the same thing though by adding the die roll to your to hit, then if it is over 100, you always hit. Then you would need 15% or more in my example to hit, which also means you will miss 15% of the time.

The problem lies in the fact that if you are not careful, many of your combat rounds are going to be miss, miss, miss, miss. Players will get frustrated really fast with that. D and D with their lower hit rates works more because you can use tactics and move around the battlefield to gain bonuses, and it has skills to boost that to hit by +5/+10/+15% to hit, and so on. So if you do keep that to hit really low, you are going to need to provide in game ways to raise it, else the most common feedback you will get is "You're too hit rate is too low! I always miss!".

Take it from someone who had a 66% default to hit rate in his IGMC entry :)
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,635
Reaction score
5,116
First Language
English
Primarily Uses
RMVXA
This is such a bad idea - which sounds rude, but I really can't overstate how much you need to avoid mechanics like this.  Not only are the above concerns about high miss rates understated (there's no benefit in having less than a 100% hit chance unless you can point to a specific reason it makes combat more interesting or strategic), but the random factor you've introduced is overwhelming (it can be forgiven in a P&P RPG where you can roleplay the actions, but watching character miss in a video game is just sad).  Even worse, the formulae are extremely confusing - you're using several different stats in addition to an arbitrary "base hit chance" and the enemy stats being used are different than the player stats being used.  No one's ever going to be able to remember or exploit such a formula.
 

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
That's pretty close to how the default system already works. The only difference is it adds the bonuses to your to hit first, then rolls the die. So if you have a default to hit of 75%, and a bonus of 10%, then it rolls the die and if it rolls over an 85, you miss. That will happen 15% of the time, and will also mean that on average you will have about 1 miss per 4.5 swings of the weapon.

I suppose you could simulate the same thing though by adding the die roll to your to hit, then if it is over 100, you always hit. Then you would need 15% or more in my example to hit, which also means you will miss 15% of the time.

The problem lies in the fact that if you are not careful, many of your combat rounds are going to be miss, miss, miss, miss. Players will get frustrated really fast with that. D and D with their lower hit rates works more because you can use tactics and move around the battlefield to gain bonuses, and it has skills to boost that to hit by +5/+10/+15% to hit, and so on. So if you do keep that to hit really low, you are going to need to provide in game ways to raise it, else the most common feedback you will get is "You're too hit rate is too low! I always miss!".

Take it from someone who had a 66% default to hit rate in his IGMC entry :)
I was planning to do the concept of if you have an 85% chance top hit you need to needed to roll over a 15. on a 100 sided dice. Instead of the way you desrcribed. There would be trinkets and spells and skills that help raise this hit percentage so that if you 5% chance to hit yet your bonuses add up to 100+% you auto hit, of course you would some where in the high end game levels.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
I could be wrong (I often am) but the way this is coming across is that you want to make a mathematically sophisticated system rather than make a system which serves your game and ultimately your player. It is very difficult to judge your idea as anything other than bad unless you tell us why you want to do this, how do you think this enhances the game experience for the player
 
Last edited by a moderator:

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
... tell us why you want to do this, how do you think this enhances the game experience for the player  ... 
Its borrowed from the concept of tactical games where you have a specific chance of hitting.  How it impacts the player is that they will always hit like they do now, how ever some enemies will be harder to hit for various reason and others wont be as hard to hit due to your equipment, skills, spells or other bonuses.

its an addition to the system I plan to use in my game to give a bit of edge. Goblins are easy to hit you'd had a 75% to hit. Ghosts 5% to hit due to the fact that they are ghosts, they are weak to holy so you have a 85% chance to hit. It makes the player think about their enemy instead of equipping the best weapon and armour and hitting A
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,635
Reaction score
5,116
First Language
English
Primarily Uses
RMVXA
Remember that different mechanics work better in different systems.  A turn-based JRPG system is not a tactics system.
 

TheHonorableRyu

Veteran
Veteran
Joined
Aug 15, 2012
Messages
53
Reaction score
59
First Language
English
Primarily Uses
The problem lies in the fact that if you are not careful, many of your combat rounds are going to be miss, miss, miss, miss. Players will get frustrated really fast with that. D and D with their lower hit rates works more because you can use tactics and move around the battlefield to gain bonuses, and it has skills to boost that to hit by +5/+10/+15% to hit, and so on.
Not only so, but in D&D part of the fun is is that you're telling collaborative stories around bad dice rolls, or weaker characters. That element is missing if ported over to a single player RPG, often leaving a cold confrontation with the RNG, unless the player's imagination is so large that they don't even need to be playing a game to spin entertaining stories around daily, mundane mishaps.

Honestly, I think just importing D&D-style levels of randomness over into the routine actions of a single player RPG is cruddy design, unless your game somehow has an extraordinary level of strategy built around it. Most of the time it amounts to forcing players to repeat the same actions over and over and hope the RNG gives better results (attack missed, now I attack again, ad nauseum) or forcing players to choose other actions out of frustration (the player's warrior character only has enough MP to use special skills in a few random battles, but he's forced to use them because the hit rate is always so low and with just a couple misses a battle can go south through no fault of the player).

While true, I believe I can implement a set of variableness and tactical thinking to turn based "JRPG's"
How do you plan to do it, if your turned-based jRPG doesn't have a spatial/tactical element?
 
Last edited by a moderator:

MagicMagor

Veteran
Veteran
Joined
Apr 7, 2012
Messages
201
Reaction score
38
First Language
German
One important element in tactics-battle system is the ability to influence the chance to hit. By positioning your characters you can take cover to reduce the chance to be hit, you can be out of range of the enemy so they can't hit you. You can go nearer to the opponent to increase your chance to hit, etc..

There is a lot the player can do in a tactics-system to increase his chance to hit and decrease the chance to be hit. Such control is vital for the randomness to enhance the gameplay instead of feeling like the game is screwing the player over.

Also note this has an influence on damage and HP-calculation, if you hit less often you should need less hits to kill an enemy, but then the same is true for the player characters.

Is it possible to pull it off in a simple JRPG-battle system? Probably, but it's a lot harder to balance correctly than the normal system.
 

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
There is a whole other concept that I haven't discussed here. How ever with the communities help I have managed to flush out exactly how to do the concept of hit chance. Other concepts that help to influence this is class switching in battle, weapon switching in battle, enemy calculations and various states along with battle field states.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,469
Members
137,821
Latest member
Capterson
Top