Stellaris

Stellaris

157 ratings
Optimized Trade (Less Trade Lag)
2
3
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
1.155 MB
29 Jun, 2024 @ 8:23pm
13 Jul, 2024 @ 8:15am
11 Change Notes ( view )

Subscribe to download
Optimized Trade (Less Trade Lag)

Description
Built and Tested on 3.12

This simple mod, powered by a single monthly event and one sleek and sexy megastructure, optimizes the entire trade system in Stellaris. No more complicated trade routes using spaghetti noodle path-finding that gets picked on by pirates, which all causes serious lag. Now it's just one central trading market hub automatically collecting all trade generated across your empire. This is your Empire's Trade Nexus, a megastructure that can be built at the start of the game around any planet or star of your choosing. Once built, it will begin producing resources that would be equivalent to the trade your empire generates depending on your trade policies. Simple, clean, elegant.

You also have the option to dismantle the Trade Nexus and use the standard trade system as a player, restoring piracy and trade routes, while the AI will use the optimized trade system, which should still help with reducing trade lag.

So why is it necessary?

Trade Lag. It's a thing. The primary driver of making this mod came after recognizing (through research and snooping in the depths of Reddit to confirm my suspicions) that trade routes, rather than pops, are now one of the primary drivers of mid to late game lag, depending on how big your galaxy is and how many AI empires you've got. I and others suspect it has to do with path finding, going from one trading hub to another, then having to calculate daily pirate upticks, trade protection data, etc., and then it's only further compounded when new bypasses (gateways, wormholes, etc.) get introduced, which really bogs everything down.

This mod removes the path finding piece, daily calculations, and piracy all without touching much else, by centralizing all of the trade being collected to one megastructure per empire. There are other mods out there that are far more comprehensive and, in my opinion, take a massive sledge hammer to the otherwise delicate trade system and remake it entirely with something simpler. Effective, but hard to balance. It also makes compatibility a nightmare for other mods. While those sledgehammer mods will have better results in terms of lag, this mod has been cutting my trade lag down significantly in the mid to late game without causing a massive headache with compatibility. Furthermore, since this mod uses the vanilla trade value generation system, all traits, civics, buildings, (including modded ones) etc. that modify trade value continue to function seamlessly without a need for patches.

To be clear, this won't eliminate mid to late game lag entirely, but it should help, particularly on larger galaxies with a lot of AI empires. Fleet lag is still a serious issue, which is far more difficult to solve. Despite all the work Paradox has done on them, thousands of pops will also still slow you down, though they aren't as big of a culprit as many seem to still think they are. But, I'd still suggest throwing in a few fanatic purifiers in the galactic mix with you, and letting them help cull those otherwise rabbit breeding pops.

So how does it work?

Start the game and bask in the glory of your newly built Trade Nexus just above your homeworld! It is a megastructure which uses your country's major habitat as a visual and is available from the start of the game. Want it somewhere else? Dismantle it and rebuild it wherever you want. It costs 50 alloys and takes 90 days.

Once finished, the game fires a hidden event for every standard empire (yours + any default AI). This event tallies up how much trade each system your empire is generating (but not collecting via the vanilla methods), assigns it to a variable, and your Trade Nexus then adjusts the resources its producing to match that variable. The UI then updates the following month, which will show your Trade Nexus production as a "Trade" category in the tooltip, as shown in the screenshots. So when there is a major change in your empire's trade value, the megastructure will reflect the new amounts almost immediately, but the UI may take another month or two to update.

If you have trade policies other than the default (which converts 1 trade value into 1 energy), such as Holy Covenant which converts your trade value into 0.5 energy and 0.5 unity, those changes will be reflected in your megastructure's resource production. This only works for vanilla trade policies. Any mod that adds trade policies will need a patch. I won't be making a patch unless I use the mod myself, but patches should be relatively straightforward to make.

Any other mentionables?

A couple. First, vanilla pirates will no longer spawn randomly. I consider this a win, personally. I found them tedious to deal with and found they didn't add much in the way of gameplay. If you still want pirates, check out Realistic Pirates, as that spawn system works based on unclaimed systems rather than trade routes.

Second, I had to change the trade hub starbase module because the AI will still build it. It now gives a base 3 Trade Value (which will get added to the star the station is orbiting). It also gives a 5% collection bonus to any station gatherers (mining, energy, etc.) in the system.

Third, because trade value is not being collected via the vanilla method, your trade value on the galaxy map never goes from white to green, which means it never disappears from the galaxy map view. But you'll get used to seeing it and start to use it as an opportunity to remind yourself just how fabulous you are. I've also changed random orbital trade deposits to give mineral and energy instead, so you should only be seeing trade value generated from colonies, which should help with cleaning up the map.

What if...?
  • You end conquering an AI and have two trade nexus megastructures? You can manually dismantle the extra one or wait until the end of the month, where it will automatically dismantle. Same applies for the AI.

  • The AI loses their trade nexus? They will either rebuild it immediately or, as a guard rail, an event will fire at the start of the year to make sure they have one. If not, a new one is built for them. They will revert to the vanilla trade system until the new trade nexus is built.

  • I already have a game going? Cool! This mod is save game compatible.

What about mod compatibility?

This mod will be compatible with the vast majority of mods. But there are a couple of key areas where issues may crop up.

First, I needed to overwrite per_relation in 00_diplomacy_economy in order to get the changes to reflect in Commercial Pacts and Federations. If any other mods touch this file, a patch will be needed.

Second, I had to change the Trading Hub starbase module, as the AI still builds it and I didn't want to touch AI starbase designs for compatibility reasons. So any other mod that alters the Trading Hub module will get overwritten by mine.

Third, will be any other mods that add more trade policies other than what's available in vanilla (or edit the vanilla trade policies). If you select a non-vanilla trade policy from another mod, you will default to the 1 trade value converts to 1 energy. So it's not like it'll crash the game or anything. But you just won't get the correct conversion. I'd recommend making yourself a personal patch. Alternatively, dismantle the Trade Nexus and use the standard trading system, while having the AI use the optimized trading system, which will still help reduce lag.
Popular Discussions View All (1)
2
1
10 Jul, 2024 @ 12:44pm
PINNED: Quick Guide for Patching
Olympia
103 Comments
UncreativeName 22 Jun @ 6:50pm 
predicted the future o7
FirePrince 18 Jun @ 8:41pm 
F o7
alankraskow 8 Feb @ 2:05pm 
Awesome mod, but I have a question.
Why does it appear as Starbase not as megastructure? Is there like a reason for it?
mehanik-lsd 21 Jan @ 3:21am 
Not all standard trading policies work.
Innovative trade, which provides science, as well as the policies of a Planned Economy are also useless.
youtubitz 16 Jan @ 2:40pm 
Looks as if paradox are going to turn trade into a proper resource and may rename it, possibly into logistics.
shadowwarrior132 10 Jan @ 1:04am 
There's another mod called 'Cross Border Trade' I'm trying to find a mod that is compatible and lag reducer.
shadowwarrior132 10 Jan @ 1:00am 
(I copy and pasted my comment from another Optimized Trade) Is there a way to make a building that consumes trade? Maybe an starbase and/or planet also spending resources on it (Named: Tourist Center [level one] let's say spend 500 Energy Credits 200 minerals 3 jobs: | tourists [consuming] -10 trade, in exchange for Empire wide Amenities: +1 depending on your Trade Policy . Trade won't become too laggy in late game.
Geki 23 Dec, 2024 @ 5:14am 
Yeah, this bugs the galactic market resolution and thus the galactic community is bricked into voting it every few years instead of actually voting on anything else.
Geki 23 Dec, 2024 @ 4:52am 
Can we please get an update for this?
supercid87 30 Nov, 2024 @ 1:29pm 
Please update