• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Crit Chance

Polarbear72

Member
Joined
Mar 3, 2013
Messages
63
Solutions
1
Reaction score
5
Location
USA
criticalHitChance in config is it design to be a % or 1-10? Is lower or higher: better or worse?
Also is there any way to change the multiplier, so the crit doesnt hit so much, on my server it sometimes tripples and 500 dmg becomes 1500.

- - - Updated - - -

Bump

- - - Updated - - -

bump

- - - Updated - - -

bump

- - - Updated - - -

Does anybody know???
 
If you look at the source code that deals with critical hits:
Code:
if(g_config.getNumber(ConfigManager::CRITICAL_HIT_CHANCE) >= random_range(1, 100))
        {
                maxDamage = std::pow(maxDamage, g_config.getDouble(ConfigManager::CRITICAL_HIT_MUL));
                player->sendCritical();
        }

What it is saying is that if the critical hit chance is higher than a number in a random range between 1 and 100, then it will do a critical hit.
For example, if the critical hit chance is 7 and the random number is 3, then it passes this check and does critical hit.
However, if the critical hit chance is 7 and the random number is 88, then it fails and moves on.

Now, for the multiplier, I don't know why they did it this way, but apparently it is being calculated by exponents (power).
So, if your maxDamage is 250 and the critical hit chance passes, then you will deal 250^(multiplier). That is why you're dealing a big number of damage.
Note: it is a double, so you can use decimals. If I were you, I'd do something smaller, like between 1 and 2 (1.5 for example).
Again, I don't know why they did it as a power, someone from the development team may have to look into it and change it to an actual plain multiplier.

I hope this helps you
 
Back
Top