I bow to the engine in my mathematical shame! Now that I've tested it out systematically, my conclusion is that everything works as it should. My lack of mathematical comprehension has led me to think that protection wasn't working. Actually it is! It's just that the basic hitchances in my mod have been so high that a modification of 0,9^9 (9 points of protection) still leaves a quite nice hitchance. Where I was expecting a very low hitchance, the hard reality of mathematics teached me better!
Examples:
An element fires at an element of Freicorps Infantry, which has a unit-protection of 9.
*** Start of action # 44 1000503 Grenadiers vs 1001569 Freikorps Infantry ***
16:17:59 (Reporting) Attacker belong to a attacking group SubType: Regular Defender belong to a attacking group SubType: Regular
16:17:59 (Reporting) Leader Battle Bonus (attacker): OffFire(%): 100 DefFire(%): 100 Assault(%): 100 TQ Bonus(pts): 0 Prot Bonus(pts): 0
16:17:59 (Reporting) Terrain: Clear Weather: Snow Complete list of values from TEC:
16:17:59 (Reporting) Grenadiers (Fire: 100 TQ: 0 )
16:17:59 (Reporting) Freikorps Infantry (Prot: 0 TQ: 0 )
16:17:59 (Reporting) Firer base fire: 8.00
16:17:59 (Reporting) Firer value with terrain: 8.00
16:17:59 (Reporting) Grenadiers - Commander: Friedrich II von Preussen Cmd Coeff. %: 115
16:17:59 (Reporting) Grenadiers - Unit Commander: Johann von Wedell Cmd Coeff. %: 106
16:17:59 (Reporting) Battle effectiveness with leader rating: 121.00%
16:17:59 (Reporting) Firer value with leader tactical rating: 9.68
16:17:59 (Reporting) Firer value with TQ correction: 11.13
16:17:59 (Reporting) Firer value with cohesion: 11.13
16:17:59 (Reporting) Firer value with Supply Unit presence: 12.24
16:17:59 (Reporting) Firer value with penalty from losses: 12.24
16:17:59 (Reporting) Firer final fire value: 12.24
16:17:59 (Reporting) Receiver base protection: 9.00
16:17:59 (Reporting) Receiver protection with terrain: 9.00
16:17:59 (Reporting) Receiver protection with entrenchment: 9.00
16:17:59 (Reporting) Receiver final Prot value: 9.00
16:17:59 (Reporting) ToHitCoeff %: 180* ATK ROE %: 100 DEF ROE %: 100
16:17:59 (Reporting) Attacker final To Hit (%): 9.00
16:17:59 (Reporting) Attacker rolled a 19 and failed to hit
16:17:59 (Reporting) *** End of action ***
So, the firer value before the calculation of protection was 12,24.
What would the hitchance have been if protection was not working? As I've set cbtHitCoef (in Gamelogics) to 180, each point of "final fire value" translates into 1,8% hitchance. So: 12,24 * 1,8 = 22,032 (in % final hitchance). Without protection, a hitchance of 22% was to be expected!
Instead, if we take into account protection, we get the correct result: every point of protection reduces the final firer value by a consecutive 10%, since I've set cbtProtCoef (Game Logics) to 90. So, protection 9 means that the firer final value has to be multiplied 9 times by 0.9:
12.24*0.9^9 = 4.742
To get the final result, we need to multiply this with 1,8 (cbtHitCoef in Gamelogics) again, which gives us 8,53. Round that up and you get the 9% that we see in the game.
Let's check another example from the battle log:
16:17:59 (Reporting) Firer final fire value: 11.42
16:17:59 (Reporting) Receiver base protection: 9.00
16:17:59 (Reporting) Receiver protection with terrain: 9.00
16:17:59 (Reporting) Receiver protection with entrenchment: 9.00
16:17:59 (Reporting) Receiver final Prot value: 9.00
16:17:59 (Reporting) ToHitCoeff %: 180 ATK ROE %: 100 DEF ROE %: 100
16:17:59 (Reporting) Attacker final To Hit (%): 8.00
11,42*0,9^9 = 4,424
4,424*1,8 = 7,96 --> rounded up to 8%
Now a test what happens when I set the cbtProtCoef (Gamelogics) from 90 to 40, so that each point of protection should multiply the firers final value not by 0,9 but by 0,4?
16:39:50 (Reporting) Firer final fire value: 8.80
16:39:50 (Reporting) Receiver base protection: 9.00
16:39:50 (Reporting) Receiver protection with terrain: 9.00
16:39:50 (Reporting) Receiver protection with entrenchment: 9.00
16:39:50 (Reporting) Receiver final Prot value: 9.00
16:39:50 (Reporting) ToHitCoeff %: 180 ATK ROE %: 100 DEF ROE %: 100
16:39:50 (Reporting) Attacker final To Hit (%): 1.00
8,8*0,4^9 = 0.0023
0,0023*1,8 = 0,00414 --> however, since the hitchance is capped at a certain minimum (cbtMinToHit in Gamelogics; in my case 1), the element has a chance of 1% to hit, as we can see in the game.
Everything works fine, shame on me! I hope that this was the last placebo-issue caused by my own mistakes/lack of comprehension.
Now I still need to find a way to protect light troops a bit more from assaults.
PS: And as a modding remark: I think it's a better to idea to give light troops protection via terrain (for "irregulars"), and not via unit-stats, because the latter actually increases their combat-power.