So what factors influence the odds of success for agents/saboteurs/rebellions?
Agent/saboteur success is a simple RNG roll: succeed/fail, then another roll for detected/undetected. Success is further modified by the market's "alert level" which goes up after agent/saboteur use, so subsequent uses in a short period of time have lower success rate. Chances are configured in Nexerelin/data/config/exerelin/agentConfig.json.
For rebellions: The government and rebel sides each have a semi-hidden strength value (can be revealed by using agent's 'gather intel' option). Every day, the values are compared to each other (with a random modifier, and stability modifier for govt) and the weaker side loses points, while the stronger side can gain them or at least be weakened more slowly. Trading with either side and the rebel suppression fleet reaching its destination or being destroyed will modify the strength values.
Code is
hereAlso my followers always immediately end any rebellions I start up when I have mild good rep with the target and I'm wondering if the only way to deal with that would be to turn off followers diplomacy. But I'm not sure if there are things my followers can do via diplomacy that I cant.
As long as the relationship doesn't get above inhospitable the rebellion won't end, so if you keep rep low it won't be a problem. But there's a issue where you can start a rebellion, relationship remains high, and it ends instantly. Oops!
Next version, I'll make it do the relationship check only if someone captures the market, so this won't happen.