Ok, after deciding to settle for some qualitative results, I decided to test what determines the cost on a successful bribery attempt. I found out it only depends on the bribee's loyalty attribute and all the modifiers don't seem to affect the cost, only the chance. I did my tests with a single spearmen unit (stat-wise very similar to the levy spearmen from vanilla) with 0 and with 6 xp
However, there's a problem: The function isn't monotonous!
Not bad enough that the cost shows a sudden severe drop at a loyalty of 4, the cost doesn't even seem to scale uniformly with army quality so it could well be there's some hidden inversions there, too.
This is so seriously screwed and insane that I believe there must have been some kind of oversight at work. At first I presumed it was some integer number overflow (i.e. the game wrapping the number around after reaching 2^15 or 2^16) but that doesn't fit either.
Some number crunching using gnuplot to fit:
f(x) = b*x + c (values -2 to 0)
g(x) = g1*x^2 + g2*x + g3 (values 0 to 3)
h(x) = h1*x^2 + h2*x + h3 (values 4 to 7)
i(x) = i1*x + i2 (values 8 to 10)
Spoiler Alert, click show to read:
*******************************************************************************
Fri Oct 12 23:55:07 2007
FIT: data read from "bribery.txt"
x range restricted to [-2.00000 : 0.000000]
#datapoints = 3
residuals are weighted equally (unit weight)
function used for fitting: f(x)
fitted parameters initialized with current variable values
At -3 this seems to be capped so I didn't include that point.
What's interesting is that h(x) actually gives a very good fit for all except the last three values (it hits the three values it was fit to perfectly and seems to do the same for the -2 and 0 values; -3 is hit almost exactly, too). However the whole thing remains a mystery and I wonder what CA did to generate those values. It's simply totally insane (I think they just included it to see if somebody actually notices - or they smoked some really bad **** that evening)
For the 0xp test things change slightly. The first 4 points follow the same proportionality, but now the second differentiation has a negative value at loyalty 3 and also differs at 4 and 5, while the rest is similar again.
I spawn the unit using the spawn_army command.
And no, I didn't change anything in the campaign db in between. I tested these separately with the same character/unit combination and they didn't seem to have an effect on the cost at any rate.