iirc from the chat:
Melee works exactly like "firing" mechanics. (
https://www.ufopaedia.org/index.php?title=Firing_Accuracy)
Base Chance To Hit = Firing Accuracy × Weapon Firing Mode Accuracy
Thus
Base Chance To Hit = Melee × Weapon Firing Mode Accuracy
Soldiers start with 20-40 melee skill (which is a hit percentage) and it is primary skill, so it only goes up through use. By tweaking as I have (150 knife accuracy)
the average soldier ends up with a 45% chance to hit with the knife.
The damage should then be applied as normal, except with the knife, we have strength applied.
Impacting Damage = (Base Weapon Damage + Strength Applied ) × Random Weapon Range × Damage Modifier
= (30 + Strength (Avg 30)) X ( random between 0-200 or 50-150) X Damage modifier (From target's resistance or susceptibility)
= (30 + 30) X (100%) X 100%
= 60
Penetrating Damage = Impacting Damage - Armour
So against a Floater's front armor ( 8 ), 52 damage would be applied on average.
The one caveat to all of this is the StunRod's hard-coded ability to ALWAYS hit.
Cheers, Ivan