Posted October 29, 2020 by Dawdling Dog, ltd.
You ever just sit there, enjoying a nice Ephemeral Tale session when suddenly it's just MISS, MISS, MISS, MISS, MISS? Yeah, me too. After putting it off for quite some time, I was finally able to unravel the mess that is the hit calculations inside of the Ephemeral Tale engine. Let's go over what the issue was, why it could seem so pervasive, and how it's been addressed (after this week's changelog, of course).
The way that hits (really, combat formulae in general) are calculated inside of Ephemeral Tale has always been a bit of an odd duck. For the sake of making this easier to discuss (and the added bonus of transparency), here's the current equation for how hits work:
Math.min(Math.max(0.6,(base + ((user.level / 5)+(user.agility*0.125))*0.01)), 1.5)
Now here's what this means, in plain English. You have your base hit rate (which is 80%), this is added to your level divided by 5. So, for example, if you're level 10, you'd get a bonus of 2% hit rate, where as at level 50 you'd get a 10% bonus. Then, a secondary bonus is added based on your agility. The higher the agility, the higher the hit rate. Keep in mind, this is all added to that base rate of 80%-- so we can afford to have these be smaller, incremental increases.
Finally, this is multiplied by 0.01 to turn it into a decimal. At which point, we choose the larger number between your hit rate (which, if it was for example 200% would now read as 2) and 0.6 (i.e., a 60% hit rate floor). Finally, we choose the smaller number between your hit rate and 1.5 (which serves as a 150% hit rate ceiling). This is your final, displayed hit rate. Okay! Now we can hop into the complex stuff.
You see, hit rate is only one part of the equation: another piece is enemy evasion. That's right, enemies can evade your attacks! Since this is functionally the same thing as a miss, they aren't delineated or presented in any different kind of way. What does this mean for you, the player? If you're up against an enemy with a 10% evade rate, and you have an 80% hit rate, this means that your hit rate is closer to 70%. I can't really report that in the menu, however, as it varies from enemy to enemy.
So how can we approach this, then? Simple solution, complicated to implement. Hit protection! Whenever you attack, the engine now checks the result of that attack. If you've missed, we trigger an internal timer that will be checked on any subsequent attacks that miss. If you're still within your timer, we override that miss and force a hit instead. If not (i.e., a couple turns have passed and you've hit successfully within them), we allow you to miss once more.
The goal of this change is to stop you from rolling several, subsequent misses. Because of these changes, you can miss a maximum of one out of every three hits! This will help alleviate the feeling that players are constantly missing, without edging things too far in their favor.
Next week, I've got another round of balance changes scheduled that will address other issues I've come across in recent play, and maybe another surprise or two (depending on time).
Until next time, stay safe and have fun!
-- Ryan
Join our Discord: https://discord.gg/jpStbUf