Stellaris

Stellaris

353 ratings
AI Spymaster
4
2
2
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
467.923 KB
Mar 11, 2022 @ 10:05pm
May 22, 2022 @ 10:41am
14 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
AI Spymaster

Description
Updated to Stellaris 3.4.3 - Overlord
  • Subject-Overlord relations are now taken into consideration
  • AI will more frequently spy on their Ovelord/Subject when loyalty is negative
  • AI will not spy on their Overlord/Subject when loyalty is high (it may take a while for already assigned spies to be reassigned elsewhere)
  • Diplomatic Incident Operation now has the same restrictions as Smear Campaign: only performed when opinion is negative or worse, no longer performed when opinion is neutral

Main Idea

It is not widely known, but vanilla AI is not able to manage envoys properly.
Most of the time it will shuffle all the envoys through the same spy network task, which would result in many envoys staying unassigned and on cooldown, while doing nothing.

This mod corrects this behaviour, making AI properly distribute envoys between prioritised spy networks.
This also has a positive effect on other AI envoys activities: as AI stops messing up its envoys, they can now spend more time improving/harming relations, boosting diplomatic weight in galactic community or working in federation.

Important Note

While this mod prevents AI from breaking the envoy logic, it may take a while for the AI to correct itself if vanilla logic has already messed up envoys. Hence the new game is recommended instead of loading an older save. But both should work.

Key Features
  • AI will not assign the envoy to the spy network that already has an envoy
  • AI will prioritise spy networks on rivals, crisis and neighbours
  • AI won't spy on empires that are inferior or pathetic relative to them, if there are other priorities (galactic community, federation, relations)
  • As a consequence the homicidal empires (like fanatic purifiers) will always spy on everyone they can (with respect to priorities) as they have no other uses for envoys (except first contacts)
  • AI won't deploy spy networks on empires if no useful progress is possible (maximum infiltration level is too low)


Operations

Vanilla AI is only capable of performing 3 operations: Gather Information, Acquire Asset, Steal Technology
This logic is expanded and AI is now able to perform most of them depending on the circumstances

  • Gather Information: only when the infiltration level is very low - low priority;
  • Spark Diplomatic Incident: against rivals, enemies and neutrals (except crisis and homicidal empires) - medium priority;
  • Prepare Sleeper Cells: used when possible (as effect has a duration);
  • Acquire Assets: until maximum infiltration level reaches 100 - high priority;
  • Extort Favors: against anyone (except crisis and homicidal empires) - low priority;
  • Smear Campaign: against rivals and enemies (except crisis and homicidal empires) - medium priority;
  • Steal Technology: against empire whose technological level is equivalent or better than ours - medium priority;
  • Sabotage Starbase: against enemies and rivals - very high priority;
  • Arm Privateers: against enemies and rivals - very high priority;

Crisis Beacon and Imperium operations are also enabled for AI.

Please, let me know in the comments if AI overuses or underuses some operations.


Compatiblity

Should be compatible with any mod, unless it also modifies the AI logic for espionage.
Files modified:
ai_espionage/operations/00_base_policies.txt
ai_espionage/spynetworks/00_base_strategies.txt
ai_espionage/spynetworks/00_federation_members.txt



[discord.gg]
98 Comments
66% trustworthy Feb 10 @ 7:29am 
@Failsafe does it still work + can it be used in an already started game ?
FailSafe Feb 2 @ 6:46am 
From what I can see in the files the only 'out of date' bit is the modded version not having the code to allow AI to do pre-FTL espionage, which....who cares?

in theory should work otherwise, I'll be testing myself soon enough
JediMindTrix May 14, 2024 @ 2:13am 
RIP
Sjru 🐲 May 18, 2023 @ 9:02pm 
Update?
Figaround Mar 29, 2023 @ 7:23pm 
Planning to update?
Marcus Arabela Mar 22, 2023 @ 8:59am 
Oh, and thank you for your thoughts, Maty83 . It helps make sure I'm not overlooking something! I try to temper my thoughts with the advice and knowledge of others, especially who share an interest in Stellaris!
Marcus Arabela Mar 22, 2023 @ 8:55am 
You can't spy on Pre-FTLs and the heart of this mod is how the AI empires react and use their envoys for espionage efforts. Once a Pre-FTL becomes a full empire in the campaign, whether they've gained FTL technologies or not, their at that point a full campaign AI empire and can be interacted with via envoys for diplomacy and espionage.

I haven't seen any changes that would warrant a change to the weights used in the AI espionage logic, but I could be wrong/underinformed. I'm still not seeing any adverse behavior by the AI empires, but I'm continuing to monitor this.

I recently learned how to access the game's save files internal data, but have not extensively watched it. I'm still learning what is stored there and what it means as far as in game effects.
Maty83 Mar 21, 2023 @ 2:49am 
@Marcus Arabela The mod does overwrite weights for the AI and since there are now Pre-FTL spy possibilities, I would wager a guess this mod shouldn't be used currently.
Marcus Arabela Mar 20, 2023 @ 8:45pm 
As far as the mod author, I've not seen any recent modding activity since last year, so I am not expecting an update for the mod in the near future. I may abandon it's use in the near future if I encounter issues or the Stellaris Custodian Team decides to update the Espionage AI and Envoys.

I'm open to the ideas of others on this. Am I just being too stubborn and not seeing some problems?
Marcus Arabela Mar 20, 2023 @ 8:42pm 
I used it with Orion and am currently using this mod with Canis Minor. I've not been seeing any problems. This mod extensively rewrites a lot of the AI espionage code for Stellaris, which hasn't changed much since the Overlord expansion release.

Orion rewrote a lot of Stellaris combat AI and Canis Minor rewrote the Pre-FTL AI, along with adding new origins and the new cloaking technology.

Both Orion and Canis Minor I'm fairly certain didn't touch the AI espionage mechanics. I could be off on this some and defer to the mod author's judgement on this.

If anyone doesn't feel comfortable using this mod with the mod author verifying compatibility, then I would advice caution and avoid this mod for now. Personally, I've looked through the mod's code and compared to the new files of Stellaris Canis Minor and don't see any conflicts, so am continuing it's use for now.