(rand(0.0, 1.0) < min(item_weight * 0.33, 2.0) * min((raw_damage - 20.0) * 0.5, 10.0) * 0.015)
expression true -> knockdown
expression false -> no knockdown
raw_damage is the potential damage dealt BEFORE the armor calc done. it includes the weapon base damage as well as the numberous modifiers like speed bonus, powerstrike bonus, wpf bonus etc.
example 1:
winged mace (2 weight)
weak attack -> 28 raw_damage
(rand(0.0, 1.0) < min( 2 * 0.33, 2.0) * min((28 - 20.0) * 0.5, 10.0) * 0.015)
(rand(0.0, 1.0) < min( 0.66, 2.0) * min(4, 10.0) * 0.015)
(rand(0.0, 1.0) < 0.66 * 4 * 0.015)
(rand(0.0, 1.0) < 0,0396)
Knockdown chance just below 4%.
example 2:
great maul (8 weight)
strong attack -> 70 raw_damage
(rand(0.0, 1.0) < min( 8 * 0.33, 2.0) * min((70 - 20.0) * 0.5, 10.0) * 0.015)
(rand(0.0, 1.0) < min( 2.67, 2.0) * min(25, 10.0) * 0.015)
(rand(0.0, 1.0) < 2.0 * 10.0) * 0.015)
(rand(0.0, 1.0) < 0.3)
Knockdown chance(kd) is 30%. It is the maximum kd possible chance because weight is capped at 6 and raw_damage at 40 within this calculation.
example 3:
wooden stick (1 weight)
puny peasant attack -> 15 raw_damage
(rand(0.0, 1.0) < min( 1 * 0.33, 2.0) * min((15 - 20.0) * 0.5, 10.0) * 0.015)
(rand(0.0, 1.0) < min( 0.66, 2.0) * min(-5, 10.0) * 0.015)
(rand(0.0, 1.0) < 0.66 * -5 * 0.015)
(rand(0.0, 1.0) < -0.0495
Knockdown chance is 0% because the random left side can't go below 0 and thus the expression is always false.