Wormhole Drive Tests. 2.8.1. Proof Of concept.

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Original Post

Pancakelord

Lord of Pancakes
43 Badges
Apr 7, 2018
3.374
12.267
  • Cities: Skylines - Green Cities
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Ancient Relics
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Imperator: Rome
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Cities: Skylines Industries
  • Imperator: Rome Deluxe Edition
  • Cities: Skylines - After Dark
  • Stellaris: Nemesis
  • Europa Universalis IV
  • Stellaris: Necroids
  • Crusader Kings III
  • War of the Roses
  • Cities: Skylines
  • Stellaris: Federations
  • Magicka: Wizard Wars Founder Wizard
  • Cities: Skylines - Snowfall
  • Stellaris: Lithoids
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Stellaris - Path to Destruction bundle
  • Stellaris: Megacorp
  • Stellaris: Synthetic Dawn
  • Crusader Kings II
  • Stellaris
  • Cities: Skylines Deluxe Edition
  • Sword of the Stars II
  • March of the Eagles
  • Darkest Hour
I've been screwing around seeing if its possible to mod back in the Wormhole drive of years past, based on the methodology I came up with here:
A really stupid idea for remaking wormhole stations... must be a reason why someone's not tried this already?

Been slowly scoping-in an ideal range for wormholes. below is an euclid of 65
1613958106263.png
range = 50
1613957277998.png
range =65

And here we see the ship will travel to its destination, then back to Deneb, then out to destination 2, repeat. This is basically just a repainted L cluster.
1613958348172.png


I handle wormhole construction with decisions rather than constructors 1) for UI reasons (I hate touching UI elements) 2) AIs can use decisions well [well, as well as you can script them to] and 3) Constructors have the intelligence of a concussed rodent.
1613959426655.png


Where things get interesting is when you start getting into multiple bypass networks (via macro) - in the thread I linked earlier I demonstrate how you can construct enumerated/repeating script-blocks in excel using simple macros and the row() function. This allows me to build 2 thousand (or as many as I like really) Wormhole networks for the game to use.

Essentially every time a WH network station is placed, a new network is added to the game - like a new L-Gate network. This forces ships to move between multiple intermediate systems to get from point A to B, "slinging" between wormhole stations as they go. This is more or less exactly how the game worked on the old FTL system.


Here we see the star ship transitioning between gate networks 1 and 2
1613959738888.png
1613959782290.png


The problem is - graphically - it looks like shit.

I can hide the megastructure icons (i think) for the wormhole end-points I think and just keep the stations on the map, but despite all my tests I've not found a way to project a yellow dashed ring like the game used to use. Only the jump drive still seems to do this in 2.8.1. and it appears to be a hardcoded function.

Specifically I want to find a way to make the wormhole stations project this yellow ring, to show you which stars will be within range, without having to resort to Icons or guesswork.
1613959903507.png

If anyone knows a way to add that dashed ring back - or if anyone at PDX feels charitable enough to add an effect to megastructures to render a sensor ring - even if it doesnt actually do anything. (the Spy orb does not seem to do this anymore, only jumpdrive ships??) I'd be the happiest pancake in all the universe.

From here you'd need to disable the hyperdrive for empires with this civic (the gates themselves are already locked off to anyone that lacks the wormhole_empire_civic) ... and that's about it from the player's perspective
A fair amount of AI logic is probably needed to tell it when to use decisions - basically whenever it has a system with a wormhole that is X distances away from an existing station / on the leading edge of its network.
And each gate network needs to be generated in script - quick to do with simple substitution in excel (Network_1 Network_2 {="Network_"&row()}
And then a very very very long IF check needs to be created [again via a macro - probably VBA if it's got an irregular structure] to
1 analyse the galaxy flags and say which of the next galaxy flags is free (starting at 1 counting to 2000 till it finds a free one)​
2 select the bypass/gateway of the corresponding unique number​
3 tell the game to spawn that specific network (as above you see it spawn gate networks 1 and 2)​

Treat this as a proof of concept, that at least 1 of the 2 (the other being Warp) old FTL types can indeed be brought back in to the modern game fairly similarly to how used to play.

Bonus:
and noticed that the game will actually render 2 different gateway icons - presumably it can render even more than that. Something to keep in mind for future projects.
1613955819828.png
1613955840722.png


What it looks like when you screw up your distance limiter and spawn wormhole connections everywhere in the galaxy:

1613956762346.png
 
Last edited:
  • 17
  • 8Love
  • 7Like
Reactions:
See I know the reason they removed the old FTL systems was to make it so players can use choke points and build up a star bases to defend those choke points. I agree it's a much better system. However I truly do believe that they (meaning warp and wormholes) can be added and that design problem could be solved. Just make it so star bases can pull pull a fleet in if they try to pass within a range. Of course you would need to think of how to show that info to both the players that are defending and attacking, but it could be done.
 
  • 10
  • 1Like
  • 1
Reactions:
However I truly do believe that they (meaning warp and wormholes) can be added and that design problem could be solved. Just make it so star bases can pull pull a fleet in if they try to pass within a range. Of course you would need to think of how to show that info to both the players that are defending and attacking, but it could be done.
Warp probably cant come back - at least not through modding. You'd need to form connections between every single star then dynamically flag fleets and stars by distance. It'd grind the game to a halt in minutes. Though PDX could bring it back if they wanted to, yeah.

But I see no reason why Wormholes could not be brought back. 2 hours hacking things together, with a fraction of the access they'll have, has shown me it's definitely viable. Literally the only thing I cant bring back from 1.91 is the yellow ring that wormhole stations used to project (and it's kind of necessary as a UI element, having a sea of icons looks bad).
I'm sure if I went file-diving I can find the old 1.91 wormhole station assets too (or use science stations as a sub for the newer shipsets) rather than gateway graphics which i'm just using for testing now.​

On your point about starbases ... well they don't actually stop fleets right now anyway, do they? after 2240 they're basically total crap. I would just accept them being placed in important systems or just being used as anchorages/shipyards (what I do personally, skip defences) rather than hoping they can magically pull fleets in.

1613961511806.png
currently running an advanced_galaxy mode after manually spawning in a bunch of gate networks, with 12k pops and I dont really notice any difference in performance (the COM is set to "human_ai" enabled. So the AI is playing, making decisions and pathing, whilst i'm controlling it, too.

You can appreciate the galaxy graphics more, without those nasty hospital blue-green hyperlane lines running all over it, too.
 
Last edited:
  • 3Like
  • 3
  • 2
Reactions:
Noice. I know the mod agressive crisis engine adds back wormhole drives for the contingency.
 
And how bad for performance is this? Having all those extra connections to check can't be good.
 
And how bad for performance is this? Having all those extra connections to check can't be good.
I didnt notice any slowdown in limited tests, but I do have a fairly fast CPU [i7 4790k @~4.5ghz] - and it wont be possible to know for sure until a full galaxy's worth of these things are up and running, say 50-100 for a 1k star galaxy.

Its worth noting that wormhole empires would be unable to use hyperlanes [because i'll have removed it as a valid tech and component for anyone with the wormhole civic], so they wont actually be able to path via HLs, and those hyperlane calculations wont run when routefinding.

Likewise, non-WH empires wont be able to path via wormhole networks as the wormhole_gateways are disabled to anyone who lacks the required civic (this is also probably far more efficient than checking each fleet's FTL component).

Unless paradox are using a really perverse pathing algorithm (why would they?) only valid connections will have paths computed for them. So, if a fleet can't use the network, computationally it'll be handled like vanilla... I think. Meaning the actual computational footprint of this should be far lower than most of us are expecting. The RAM usage on the other hand will probably be quite a bit higher than vanilla, as there is a much larger potential pathing network (depending on how the game does its pathing), but Stellaris is 64bit now and IMO nobody should be running on less than 16gb ram - in general - and playing with mods, so that isn't really an issue either.
 
Last edited:
  • 3Like
  • 1
Reactions:
See I know the reason they removed the old FTL systems was to make it so players can use choke points and build up a star bases to defend those choke points. I agree it's a much better system. However I truly do believe that they (meaning warp and wormholes) can be added and that design problem could be solved. Just make it so star bases can pull pull a fleet in if they try to pass within a range. Of course you would need to think of how to show that info to both the players that are defending and attacking, but it could be done.
Honestly, Jumpdrives just render that moot anyway. And the limitation on them doesn't really address it. All it does is keep the Ai from really using them. At this point they should just revert it to how they used to be.
 
  • 10
Reactions:
@Pancakelord mate, do you ever sleep?

I am at a point where I come to this forum thinking "I wonder what detailed, screenshot-laden, topic will Pancakelord have in store for me today"
Any idea of what tomorrow’s @Pancakelord diary is?
Also, amazing work!
 
  • 2Like
Reactions:
I didnt notice any slowdown in limited tests, but I do have a fairly fast CPU [i7 4790k @~4.5ghz] - and it wont be possible to know for sure until a full galaxy's worth of these things are up and running, say 50-100 for a 1k star galaxy.

Its worth noting that wormhole empires would be unable to use hyperlanes [because i'll have removed it as a valid tech and component for anyone with the wormhole civic], so they wont actually be able to path via HLs, and those hyperlane calculations wont run when routefinding.

Likewise, non-WH empires wont be able to path via wormhole networks as the wormhole_gateways are disabled to anyone who lacks the required civic (this is also probably far more efficient than checking each fleet's FTL component).

Unless paradox are using a really perverse pathing algorithm (why would they?) only valid connections will have paths computed for them. So, if a fleet can't use the network, computationally it'll be handled like vanilla... I think. Meaning the actual computational footprint of this should be far lower than most of us are expecting. The RAM usage on the other hand will probably be quite a bit higher than vanilla, as there is a much larger potential pathing network (depending on how the game does its pathing), but Stellaris is 64bit now and IMO nobody should be running on less than 16gb ram - in general - and playing with mods, so that isn't really an issue either.
I could try it for performace on low end hardware. Because my pc is absolutly trash.
 
I've been screwing around seeing if its possible to mod back in the Wormhole drive of years past, based on the methodology I came up with here:
A really stupid idea for remaking wormhole stations... must be a reason why someone's not tried this already?

Been slowly scoping-in an ideal range for wormholes. below is an euclid of 65
View attachment 684607range = 50 View attachment 684606 range =65

And here we see the ship will travel to its destination, then back to Deneb, then out to destination 2, repeat. This is basically just a repainted L cluster.
View attachment 684608

I handle wormhole construction with decisions rather than constructors 1) for UI reasons (I hate touching UI elements) 2) AIs can use decisions well [well, as well as you can script them to] and 3) Constructors have the intelligence of a concussed rodent.
View attachment 684617

Where things get interesting is when you start getting into multiple bypass networks (via macro) - in the thread I linked earlier I demonstrate how you can construct enumerated/repeating script-blocks in excel using simple macros and the row() function. This allows me to build 2 thousand (or as many as I like really) Wormhole networks for the game to use.

Essentially every time a WH network station is placed, a new network is added to the game - like a new L-Gate network. This forces ships to move between multiple intermediate systems to get from point A to B, "slinging" between wormhole stations as they go. This is more or less exactly how the game worked on the old FTL system.


Here we see the star ship transitioning between gate networks 1 and 2
View attachment 684618View attachment 684619

The problem is - graphically - it looks like shit.

I can hide the megastructure icons (i think) for the wormhole end-points I think and just keep the stations on the map, but despite all my tests I've not found a way to project a yellow dashed ring like the game used to use. Only the jump drive still seems to do this in 2.8.1. and it appears to be a hardcoded function.



If anyone knows a way to add that dashed ring back - or if anyone at PDX feels charitable enough to add an effect to megastructures to render a sensor ring - even if it doesnt actually do anything. (the Spy orb does not seem to do this anymore, only jumpdrive ships??) I'd be the happiest pancake in all the universe.

From here you'd need to disable the hyperdrive for empires with this civic (the gates themselves are already locked off to anyone that lacks the wormhole_empire_civic) ... and that's about it from the player's perspective
A fair amount of AI logic is probably needed to tell it when to use decisions - basically whenever it has a system with a wormhole that is X distances away from an existing station / on the leading edge of its network.
And each gate network needs to be generated in script - quick to do with simple substitution in excel (Network_1 Network_2 {="Network_"&row()}
And then a very very very long IF check needs to be created [again via a macro - probably VBA if it's got an irregular structure] to
1 analyse the galaxy flags and say which of the next galaxy flags is free (starting at 1 counting to 2000 till it finds a free one)​
2 select the bypass/gateway of the corresponding unique number​
3 tell the game to spawn that specific network (as above you see it spawn gate networks 1 and 2)​

Treat this as a proof of concept, that at least 1 of the 2 (the other being Warp) old FTL types can indeed be brought back in to the modern game fairly similarly to how used to play.

Bonus:
and noticed that the game will actually render 2 different gateway icons - presumably it can render even more than that. Something to keep in mind for future projects.
View attachment 684600View attachment 684601

What it looks like when you screw up your distance limiter and spawn wormhole connections everywhere in the galaxy:

View attachment 684603
@Pancakelord Wait tho what about 2 things. I played 1.9 and i remember some things about wormhole stations.
1. How would you make them in systems which you have access to but arent owned and dont have any habitable planets? I know gigastructures has a nycoll dyson beam targeting megastructure that you can build instantly in enemy territory. Perhapse make it work like that but not instant and you can build it around your own teritory? And perhapse make them a megastructure(built like a gateway) Rather then a decision.
2. Wormhole access from other empires. in 1.9 you could request wormhole station access from other empires. As in the ability to make wormhole stations in their empire. How would you do that here?

Also may i recomend you look into somthing besides origins and civics for this? Why not use a starting system initaliser(s)? It would be much more flexable then civics or origins. Perhaps you could have 1 for the sol system and 1 for denab aswell. And of course unique ones for shattered ring and void dwellers. Though this wouldn't be compatable with other mods that added origins that required unique starting systems. Or you could make the civic give you +1 civics slots in adition to wormhole drives. For flexability in making empires. And i know the mod "agressive crisis engine" Adds in wormhole stations for the contingency. Perhapse you could contact the mod maker and see how they did it?
 
Last edited:
w and IMO nobody should be running on less than 16gb ram - in general - and playing with mods, so that isn't really an issue either.
I play with 6gb of ram due to my crappy laptop and mods work pretty well(the game is a bit more laggy then usual). I mean they are a bit laggy but i usually quit the game not due to lag. But in the early game when i realise some mods have compatibility issues. But then again i only play with relatively light mods.
 
What is your steam workshop page?
 
I didnt notice any slowdown in limited tests, but I do have a fairly fast CPU [i7 4790k @~4.5ghz] - and it wont be possible to know for sure until a full galaxy's worth of these things are up and running, say 50-100 for a 1k star galaxy.

Its worth noting that wormhole empires would be unable to use hyperlanes [because i'll have removed it as a valid tech and component for anyone with the wormhole civic], so they wont actually be able to path via HLs, and those hyperlane calculations wont run when routefinding.

Likewise, non-WH empires wont be able to path via wormhole networks as the wormhole_gateways are disabled to anyone who lacks the required civic (this is also probably far more efficient than checking each fleet's FTL component).

Unless paradox are using a really perverse pathing algorithm (why would they?) only valid connections will have paths computed for them. So, if a fleet can't use the network, computationally it'll be handled like vanilla... I think. Meaning the actual computational footprint of this should be far lower than most of us are expecting. The RAM usage on the other hand will probably be quite a bit higher than vanilla, as there is a much larger potential pathing network (depending on how the game does its pathing), but Stellaris is 64bit now and IMO nobody should be running on less than 16gb ram - in general - and playing with mods, so that isn't really an issue either.
I was thinking more along the lines of trade calculations routing. We know gateways do a number on that.
 
I was thinking more along the lines of trade calculations routing. We know gateways do a number on that.
Because of how wormholes work, all owned planets would have to be within the same system as a gateway so calculating trade for a wormhole empire would be pointless I think. A simple check "is there a wormhole in this system = yes?" "then collect trade" would be sufficient [can probably be done with outposts and a scripted limit on trade routes]. Sure it leads to some odd edge cases but until piracy is overhauled I dont really see the point in worrying about those.
 
Hmmm... yeah, your probably right.

If this works out, I'll definitely try it.
 
Because of how wormholes work, all owned planets would have to be within the same system as a gateway so calculating trade for a wormhole empire would be pointless I think. A simple check "is there a wormhole in this system = yes?" "then collect trade" would be sufficient [can probably be done with outposts and a scripted limit on trade routes]. Sure it leads to some odd edge cases but until piracy is overhauled I dont really see the point in worrying about those.
From a RP perspective, it feels silly to be able to establish inter-system trade through wormholes a couple decades after our civilization has started to explore space beyond our starting system...

Maybe lock it behind a tech?
 
  • 5
Reactions:
From a RP perspective, it feels silly to be able to establish inter-system trade through wormholes a couple decades after our civilization has started to explore space beyond our starting system...

Maybe lock it behind a tech?
Nah. It feels even more silly to be sending people (ships) through wormholes before sending bulk goods (e.g. automated ships/freighters) - or electromagnetic signals, in the case of services. And if you've got a centralised government pushing its use, its going to get used whether you like it or not, anyway.

Also, if you read the text for the starter techs they somewhat explain this away - like interplanetary commerce (unlocks commercial hubs) & new worlds protocols letting you colonise alien worlds, there's an implicit there that you have figured out the FTL logistics necessary to sustain a colony around another star.
 
Last edited:
  • 6Like
Reactions: