sergi said:Hi, I have been curious about how the diplomatic mission outcomes are determined,
and decide to examine the relative code. Here is what I find out.
1. the influence of diplomatic attitude value
The diplomatic attitude value of the target faction toward the diplomat’s faction would convert to a factor, named A here.
Attitude value(max=200, min= -200) converts to A(max=0.05, min=0)
(Note: right now there is a bug, resulting a wrong attitude value being used here. I have managed to fix it ,though.)
2. the influence of number of cities
“The number of cities of the diplomat’s faction” divided by “The number of cities of the target faction”,
converts to a factor, named B here.
Result of division(max=5.0, min=0.2) converts to B(max=0.05, min=0)
(Note: right now there is a bug, causing the result of division always being 1.0. This is also fixed)
3. the influence of diplomat
The diplomat’s (gravitas * ambition)(max=500) would convert to a factor C (max=0.05).
Let D =A + B + C, and there will be 3 partition point regarding D.
First (0.15 – D), second (0.8 – 3*D), and third (1.8 – 4*D).
Next the game will generate a random value between 0 and 1.0, named E here.
If E is lower than (0.15 – D), the outcome is critical failure. The diplomat will be executed.
If E is between (0.15 – D) and (0.8 – 3*D), the outcome is normal failure.
The diplomat would either be injured or betray you, bringing a factional debuff. The diplomat gets 5 gravitas.
If E is between (0.8 – 3*D) and (1.8 – 4*D), the outcome is normal success.
You get a factional buff or a tribute of 5000. The diplomat gets 10 gravitas.
If E is above (1.8 – 4*D), the outcome is critical success. You get one city from target faction. The diplomat gets 20 gravitas.
(If the target faction only has one city, the result becomes normal success.)
As you can see, even in the best case scenario, D can only be as high as 0.15,
meaning the three partition point being 0, 0.35, and 1.2.
Although execution can be completely ignored, the critical success can never be achieved.
What’s interesting is that, when I force the outcome to be critical success, I do actually get a city from the target faction, meaning the procedure is in game already.
The fact that it can be handled but never achievable, is a bit odd. I wonder what’s the reasoning behind this design choice.