Stellaris

Stellaris

507 ratings
Smarter Hyper Relays: Improved AI (shrimpAI)
6
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
334.936 KB
1 Jun, 2022 @ 6:21pm
5 May @ 11:13am
20 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
Smarter Hyper Relays: Improved AI (shrimpAI)

In 1 collection by Oatmeal Problem
Oatmeal Mods
8 items
Description
Smarter AI for building hyper relays

Does the AI seem a little haphazard when building hyper relays? And then builds them more-or-less everywhere? This mod fixes that.

With this mod, AI empires build proper networks starting at capitals, branching to sector capitals, then to other colonies.

Details
Every year, this mod finds and marks the shortest path from capitals to sector capitals, and from sector capitals to sector colonies. Paths to wormholes/gateways/catapults and border fortresses are also found (from sector capital if in a sector, otherwise from empire capital). A path along an existing relay is considered twice as short, to encourage the AI to re-use existing relays. The AI then only builds relays in systems that border an existing relay they own and are on one of those paths, with the following exceptions:
  • The empire's capital (this let's them get their network started)
  • Sector capitals that are at least 10 years old and have no path to the capital (this let's them build a separate network if they have a non-contiguous empire, for example on the other side of a wormhole)

Overlords will build paths to the their subject capitals, and will build paths through subjects if they have an isolated sector on the other side.

In addition to normal building of hyper relays using construction ships, the AI gets to build up to 1 hyper relay each year without using a construction ship. They still pay the resources for it, and only do it if they have a large stockpile of resources (10x the required resources). This is to address 2 vanilla issues with the AI:
  • The AI isn't good at managing it's construction ships, sometimes sending one from the east side of it's empire all the way build something in the west, while at the same time sending a one from the west to build in the east, wasting months or even years. This "cheat" helps make up for lost time.
  • Sometimes, especially after unlocking other megastructures, the AI stops building hyper relays, even if their resource stockpiles are completely full. This "cheat" lets AIs with strong economies continue expanding their relay networks into the late game.

This has been tested for performance on a huge galaxy and has no noticeable impact.

Compatibility
  • For Stellaris 4.0.*
  • NOT achievement compatible
  • Can be added to an existing game, but works best if the AI has not started building hyper relays yet
  • Can be removed from an existing game
  • Compatible with Gigastructural Engineering and More (load order does not matter)
  • shrimpAI for Total Conversions is a separate version that provides compatibility for some total conversion mods
  • Compatible with Sparsity and Wild Space 3 (enables building hyper relays in unclaimable space for both player and AI; load order does not matter)
  • Should be compatible with all other mods, except other mods that override hyper relays
    • Note for patch makers: this only overrides the hyper_relay megastructure, and within that, only changes the ai_weight

Sharing
Feel free to update, pack, patch, translate, fork, or incorporate this mod, no prior permission required. Credit, linking to the original mod, and letting me know is appreciated!

[discord.gg]
Come chat in #oatmeal-mods
196 Comments
Oatmeal Problem  [author] 22 May @ 5:09pm 
@danst31 I don't think so, but that's a good idea!

@wairui glad you fixed it! I'll look into that mod but not sure why that'd happen. I only overwrite the hyper relay megastructure
danst31 21 May @ 10:15pm 
Is the mega shipyard also a priority destination for the AI?
Wairui 21 May @ 7:44pm 
CTD fixed.
Upon double-checking my mods, there is one mod called "Bypass Adjustments" It changes behaviours of wormholes, gateways, and L-gates. On a whim, I switched the two in the load order (Smarter Hyper Relays came after the above) and Stellaris loaded fine. Since the Bypass Adjustments mod appears not to do anything with Hyper-relays... would the other types of movement short-cuts interact with hyper-relays?
Wairui 21 May @ 6:42pm 
This mod caused Stellaris to CTD upon loading. Stellaris is updated to May 21st. AFAIK, no other mod touches on hyperlane code. I have no "Total Conversion" mods.
Oatmeal Problem  [author] 18 May @ 3:29pm 
@Rin Palora you can always remove them with a console command. See my comment on April 22, 2023
Rin Palora 18 May @ 1:03pm 
Yup the moment I saw that the AI had Hyper Relays I instantly remembered the mod existed, hopefully the galactic highway isn't already ruined in the save ^^.

Thanks for all the updates.
Oatmeal Problem  [author] 9 May @ 9:35pm 
Btw, the 4.0 vanilla AI has gotten worse at building hyper relays. They used to use trade routes to help them decide where to build (they could make something kinda sensible by building relays along routes), but now trade routes are gone... making this mod all the more relevant.
Martok 5 May @ 3:29pm 
Okay, thanks.
Oatmeal Problem  [author] 5 May @ 3:05pm 
@martok I haven't tested, but I think there would be some bugs with hyper relay build cost
You can grab the previous version on github here: https://github.com/oatmealproblem/michael-makes-stellaris-mods/tree/1796e8522edb0075a57aae0fca49042049b7c79e
Click the green "Code" button then "Download ZIP" (and google how to manually install Stellaris mods)
Martok 5 May @ 2:42pm 
Is this backwards-compatible with v3.14 at all?