Page 7 of 8

Re: Combat skills formulas

Posted: Tue Feb 12, 2019 12:58 am
by Puddles
stark wrote:Stab Chance

1) start with a 50% probability
2) add 2x level difference to the probability
3) multiply probability by stab skill / 99
4) If weapon skill is less than 80% the probability gets multiplied by weapon_skill / 99
5) If encumbrance is over 50%, the probability is reduced by 10 * ((carrying + equipped) * 10 / (can carry + can equip) - 5)
6) If the victim has notice on, the probability is reduced by notice / 5
7) If the victim is sleeping, the probability gets doubled
8) If the attacker is not hidden, the probability is set to 0.
9) If the attacker has sneak on (whether or not the sneak was successful in hiding the attacker's entrance), the probability gets increased by: (sneak_skill - 1d101) / 10. This is where no-hide stabs come from. If a stabber doesn't prac sneak, they will never land a no-hide stab.
if this is how stab chance to land gets calculated why does the stab trainer have hide practice % as a factor? According to this list its either your hidden or not and % practiced doesn't affect chance.

If that is true then this makes me think its more important to level sneak to 99 rather than hide.

The other problem I have with the trainer is line 4
according to that it only divides wep skill/99 if % practiced is less than 80% so practicing weapon skill past 80% should not affect stab chance. On the trainer it does affect stab chance past 80%. (EDIT I was wrong the 80% and 99% wep skill are the same on the trainer.)

Re: Combat skills formulas

Posted: Tue Feb 12, 2019 3:33 am
by Aishana
How do you know if your hide fails?

Re: Combat skills formulas

Posted: Tue Feb 12, 2019 4:42 am
by Puddles
Aishana wrote:How do you know if your hide fails?
I don't

I also don't know how hide is calculated. I don't think that has been released.
I thought it was dependent on the type of room I was in.

I am just questioning the accuracy of the trainer. How is the trainer deciding the chance of successfully hiding?

I have the a similar question for sneak. Is sneak calculated against a player or against the room? Or even a combination of both.

If sneak is calculated against the room only then that would make rolling stabs in an empty room would have same chance to land as entering a occupied room.

The opposite would be true if sneak is only calculated against the player. Then if a player entered your room and you rolled a stab on them you would automatically not receive the sneak bonus.

If it was a combination of both it would depend on whether or not the empty room increases your chance to sneak successfully or decreases your chance to sneak successfully.

Re: Combat skills formulas

Posted: Tue Feb 12, 2019 6:02 am
by Aishana
Sneak's a flag, if it's on then you get the bonus. Doesn't matter if your sneak was successful or not. You can land stabs in rooms that are both no-hide and no-sneak, tv square for example, so it doesnt matter if your sneak succeeds. Same as notice, if it's on you get the bonus.

Haven't seen confirmation about hide success rate but I would say it's a safe bet that hide skill/99 is your success rate aside from road rooms where you get the actual fail message (but if not, your hide always works). This based on much time stabbing mobs that don't have notice, and never being seen/agro'd if I have 99% hide, vs occasionally at lower %.

So yes there is some assumption going on there but it's a pretty reasonable one: if you arent hidden then your land rate is only based on the sneak bonus, otherwise the rest of the formula goes through. So if you have 90% hide, then you've got a ~10% fail rate by default.

Re: Combat skills formulas

Posted: Tue Feb 12, 2019 7:27 am
by Puddles
Your assumptions match up to the trainer from what I see.
9) If the attacker has sneak on (whether or not the sneak was successful in hiding the attacker's entrance), the probability gets increased by: (sneak_skill - 1d101) / 10. This is where no-hide stabs come from. If a stabber doesn't prac sneak, they will never land a no-hide stab.
Although I am having trouble understanding the bold here. Does this mean there is a dice roll to the sneak bonus?
also the parenthesis mentions whether or not the sneak was successful should this be removed?

Re: Combat skills formulas

Posted: Tue Feb 12, 2019 7:49 am
by Adael
The parentheses are correct. As Aishana said, sneak is a flag, so it performs that calculation whether or not you actually snuck into the room (I use the word snuck here to mean not be seen entering the room) so long as sneak is toggled on.

Then yes, it performs a 1d101 dice roll that could increase or decrease your chance based on your sneak % pracced.

Of course if sneak is off, then it won’t perform the dice roll. You could stab with no sneak and not have to worry about the dice roll so long as you never toggle sneak on. You’d just never land in a nohide.

Re: Combat skills formulas

Posted: Tue Feb 12, 2019 11:43 am
by stark
Adael wrote:Then yes, it performs a 1d101 dice roll that could increase or decrease your chance based on your sneak % pracced.
Actually sneak won't decrease your chance because it takes the floor of 0 or 1d101/10. So if the adjustment amount is negative it will just set it to 0 instead.

I don't have the code for hide so I can't 100% confirm but my belief is the same as Aishana's, that it's a straight up skill / 99 chance, though some rooms (roads for example) do seem to decrease that chance substantially. The corollary if that's correct is that hide is more important than stab for landing chance because 1% stab affects a chance that was already as low as 50% (or 35% with notice) so really it's only "worth" 0.5% (or 0.35%) while 1% hide takes a chunk out of a 100% chance. If you fail your hide, none of the rest matters.

Also I did want to mention from doing a bunch of testing I believe all mobs have 20% built-in notice, it's not 0.

Re: Combat skills formulas

Posted: Tue Feb 12, 2019 1:19 pm
by Adael
stark wrote:Actually sneak won't decrease your chance because it takes the floor of 0 or 1d101/10. So if the adjustment amount is negative it will just set it to 0 instead.
Ah, that it takes the floor of the max between 0 and (sneak-1d101)/10 wasn't apparent in the 9 steps. Was assuming that (as an example, if for some dumb reason) you only had 50 sneak, and the dice rolled a 101, it would subtract 5% from your chance.

Re: Combat skills formulas

Posted: Tue Feb 12, 2019 4:17 pm
by stark
Yeah, I was not clear, and also the term 'floor' is not definitely right, I should have said max of 0 or 1d101/10. I changed step 9 to say:
the probability gets increased by the max of 0 or (sneak_skill - 1d101) / 10.
Hopefully makes it clear

Re: Combat skills formulas

Posted: Tue Feb 12, 2019 4:36 pm
by Puddles
Nice it is more clear thanks.