Since I'm currently testing bribery which I want to use in a feature for Italia Invicta (bribable condottieri stacks as mercenary armies), I'll log my test results and conclusions here so everyone has some use out of it (settings means settings changed from vanilla test unless specified).
First of all, the vanilla settings:
Code:
<base_character_chance float="0.4"/>
<religion_modifier float="0.66"/>
<combined_attribute_modifier float="0.2"/>
<briber_attribute_divisor float="3.0"/>
<bribee_attribute_divisor float="3.0"/>
<army_size_modifier float="0.035"/>
<base_settlement_chance float="0.8"/>
<settlement_loyalty_modifier float="0.01"/>
<settlement_population_modifier float="0.0001"/>
<faction_standing_divisor float="10.0"/>
<max_bribe_chance float="100.0"/>
<min_bribe_chance float="1.0"/>
<bribe_chance_modifier float="1.0"/>
Faction standing is 0 as it will be in my final use case so that won't have an effect.
The test setup is using a neutral faction character and one of my diplomats who I can kill and respawn by pressing buttons. This allows me to test things without restarting the campaign and therefore I have a much smaller statistical error.
Test 1:
Briber: 0, Bribee: 0
Settings: Vanilla
Units: as above
Approximate success chance: 0.3
Cost: 10228
Description: Not sure yet, we can probably discount the attribute effects so we'd have 0.4, possibly modified by religion and army size.
Theory: Chance to succeed is roughly 26.4% - testing for this tester
Results: 15/50 successes -> 0.3 relative frequency. This doesn't quite fit the 0.264 I calculated (expectation would be 13) but it's well within the error margin.
Test 2:
Briber: 0, Bribee: -1
Settings: Vanilla
Units: as above
Approximate success chance: 0.52
Cost: 7978
Description: I'll continue with above working assumption because nothing better turned up. However I have no idea how the bribee_attribute_divisor works so let's have a look
Results: 26/50 success -> 0.52 relative frequency. Need more tests to get a theory for the formula
Side result: The game's RNG seems to be somewhat prone to produce streaks of bad luck/good luck. Most of the times I had more than 3 times the same result here and with a chance of about 0.5 that's not very likely
Test 3:
Briber: 0, Bribee: -2
Settings: Vanilla
Units: as above
Approximate success chance: 0.88
Cost: 4603
Description: Continuing #2 to try to figure out a sensible function.
Results: 44/50 success -> 0.88 relative frequency
Still no sensible idea yet. Side result: Any lower loyalty doesn't decrease the cost, didn't test often enough to say anything about the probability but I assume it's capped, too.
Test 4:
Briber: 1, Bribee: 0
Settings: Vanilla
Units: as above
Approximate success chance: 0.52
Cost: 10228
Description: Continuing #3 to try to figure out a sensible function. I'm assuming the briber and bribee attributes modify things by either one being subtracted from or one being divided by the other, so I'm doing this test to see if it yields the same result as #2 which would speak for a subtraction
Results: The price is the same, so for now I'll assume that the probability is the same, too. Subtraction it is.
Test 5:
Briber: 1, Bribee: 0
Settings: religion_modifier=1.0
Units: as above
Approximate success chance: 0.36
Cost: 10228
Description: Something I should have done before is eliminating the religion_modifier. It's quite possible that it only applies to foreign religions so I'll test it now.
Results: 18/50 or 0.36 - this is somewhat higher than the vanilla test, but not necessarily significant. The cost was the same so I'll just try to bribe a character of a different religion and see if that has a different cost to be sure.
Test 6:
Briber: 1, Bribee: 0
Settings: vanilla
Units: as above
Approximate success chance: 0.2
Cost: 10228
Description: This test serves to figure out how the religion modifier works. Using an islamic bribee instead of a catholic one
Results: 10/50 -> 0.2; this fits quite well with 0.2/0.66 = 0.3 which was the chance for the catholic test with the same religion but if that formula was true then #5 should have shown 0.2 and not 0.36 so it's very unlikely that it's so easy. I'll test with some ridiculously high religious modifier now.
Test 7:
Briber: 1, Bribee: 0
Settings: religion_modifier=100.0
Units: as above
Approximate success chance: 1
Cost: 10228
Description: This test serves to figure out how the religion modifier works. Still an islamic character
Results: 10/10 -> 1; to speed up testing I cancelled after 10 tries. Obviously the chance got ridiculously high.
Test 7:
Briber: 1, Bribee: 0
Settings: religion_modifier=100.0
Units: as above
Approximate success chance: 0.50
Cost: 10228
Description: Still trying to understand the religion_modifier, so now a catholic target again.
Results: Just figured out that I probably did the last few tests with a briber attribute of 1 without noticing. The results of this one were 25/50 = 0.5 which is very close to the 0.52 of #2
What bugs me a bit now is the discrepancy between test 5 and test 2 so I'll have to properly run #4 now.
--------------------------------------------------------------
After leaving this for the evening, I decided to change my test philosophy. I'll now first disable any modifiers I don't want to test, then look at what the others change.
First of all, I'll try disable everything except for the base chance.
My current settings are:
Code:
<bribe_to_family_tree bool="false"/>
<base_character_chance float="0.4"/>
<religion_modifier float="0.0"/>
<combined_attribute_modifier float="0.0"/>
<briber_attribute_divisor float="1.0"/>
<bribee_attribute_divisor float="1.0"/>
<army_size_modifier float="0.00"/>
<base_settlement_chance float="0.8"/>
<settlement_loyalty_modifier float="0.01"/>
<settlement_population_modifier float="0.0001"/>
<faction_standing_divisor float="1.0"/>
<max_bribe_chance float="100.0"/>
<min_bribe_chance float="1.0"/>
<bribe_chance_modifier float="1.0"/>
I will now conclude the next test on a catholic faction with briber and bribee at 0
Test 8:
Briber: 0, Bribee: 0
Settings: see above
Units: as above
Approximate success chance: 0.48
Cost: 10228
Description: I hope that this time, I will get the 0.4 as a result which should only be the base chance.
Results: 24/50, 48%. For a test sample of 50 it's still possible but I think there's something else.
Test 9:
Briber: 0, Bribee: 0
Settings: faction_standing_divisor=1000.0
Units: as above
Approximate success chance: 0.35
Cost: 10228
Description: This test will serve to see whether there is some influence of the faction standing on my test results.
Results: I ran this test two times to test whether the streaking problem is serious and to see how large the variance is (a characteristic of independent results is that in a sufficiently large subset of random results, you should observe the same relative frequency). The first test revealed 17/50 which is 0.34, the second 18/50 which is 0.36; total the relative frequency is 0.35 and it's pretty likely that this is fairly close to the actual probability for this. So what did I learn? The faction_standing modifier definitely has a large effect (0.48 is pretty far away from 0.35 and since both of my last tests yielded almost the same result it's unlikely that the 0.48 is a realization of the same distribution).
Test 10:
Briber: 0, Bribee: 0
Settings:faction_standing_divisor=0.001
Units: as above
Approximate success chance:
Cost: 10228
Description: This is pretty much the counter-test for Test 9. I should observe a higher probability or the same as in Test 8
Results: 19/50 or 0.38 - this is weird, it's almost exactly what I got in test 9 and would fit with the 0.4 I initially expected. However it doesn't fit test 8 at all. I'll re-run test 8.
Decided to try this one again to make sure the db was properly reloaded, it yielded 18/50 which is probably the same result as in Test 9 and in this test before. Now to test the divisor of 1 again.
Test 8, take 2:
Briber: 0, Bribee: 0
Settings: see above
Units: as above
Approximate success chance: 0.46
Cost: 10228
Description: Rerunning to test.
Results: 23/50, 46% - a very good reproduction of test 8. So what's happening here? The only feasible assumption I have right now is that CA maybe included a fall-back default for too high or too low settings (which could be tests 9 and 10 respectively). So I'll try with the vanilla value of 10.
Test 11:
Briber: 0, Bribee: 0
Settings: faction_standing_divisor=10.0
Units: as above
Approximate success chance:
Cost: 10228
Description: This one goes to further test the faction_standing_divisor
Results: I ran this test twice and the results were very dissatisfying. The first test gave a result of 13/50 (26%) while the second arrived at 25/50 (50%) - taken together it's 38%. I observed two huge streaks of successes (one with length 8 and one with length 7). I had mentioned this earlier and noticed it today, too. It could well be that the random number generator is somewhat broken in regards to this as the variance in my other tests didn't seem to be that large (i.e. I felt like it mostly came from the streaking). This is of course a huge problem for me as it means I can't properly test things with the current sample size.
I'll take a break and I guess I'll stop to try figuring out the exact formula for the bribery chance because I'd need a much larger sample size to figure it out which is just not worth it. I'm just going to run some qualitative tests (i.e. try which settings affect the chance in which way) instead of striving for probably impossible to reach quantitative results.
Bookmarks