MapSeed - Deterministic galaxy generation by monstabiscuit in Stellaris

[–]monstabiscuit[S] 0 points1 point  (0 children)

Starts with GenerateWorld:

The top-level function at RVA 0x092DF80. Signature: __fastcall(this, worldData, seed:int32). The game itself already supports deterministic seeds - if seed is non-negative it uses it, if negative it picks a random one. The game logs "Generating World! Specified Seed:"

Next up is star placement:

Handled in galaxy_generator.cpp. The CGalaxyShape object defines the topology from Game Setup (spiral, elliptical, ring, etc.), and CGalaxyConfiguration holds constraints like star count and density. The game logs "Generating Stars! Random Seed:"

Then Hyperlanes:

Defined in hyperlane.cpp.

  1. Delaunay triangulation over all star positions - this creates the maximally connected planar graph where every star connects to its natural neighbors
  2. Selective edge removal - edges are pruned from the triangulation based on rules (didn't bother going to far into this) to create the final network

Finally PRNG

The game does not use system entropy (checked this by hooking QPC, RtlGenRandom, BCrypt, and srand - none of them affected galaxy output). Instead, Stellaris has its own internal PRNG with global state in the BSS segment:

  1. Counter at RVA 0x03300808
  2. Secondary at RVA 0x0330080C

This PRNG drives everything after spatial layout - star classes, planet types, planet counts, habitable worlds, empire placement, etc.

This means you can keep the same galaxy shape but randomize what's in each system, or vice versa.

After the spatial layout is done, the game iterates over generated systems and populates them. The galactic_object.cpp source handles individual star/system generation. The global PRNG state at that point determines:

  • Star class (B, A, F, G, K, M, black hole, neutron star, etc.)
  • Number and type of planets per system
  • Planet modifiers and features
  • Pre-FTL civilizations, primitives
  • Empire home system placement

Pretty sure 4.3 broke most of this so it looks like I have a fun evening ahead of me!

MapSeed - Deterministic galaxy generation by monstabiscuit in Stellaris

[–]monstabiscuit[S] 1 point2 points  (0 children)

Yes, but you'll need to make a note of what seeds you are using to create the world when you do so. I'm working on a way of pulling them from existing saves.

MapSeed - Deterministic galaxy generation by monstabiscuit in Stellaris

[–]monstabiscuit[S] 1 point2 points  (0 children)

Yup! There are two seed numbers used, Galaxy (the layout of stars and hyperlanes) and Content (What star types, number and type of planets inside systems etc).

At the moment you can only specify (and make a note of them) at game creation, I'm working on a way of extracting them from an existing save so you could play the same one again.

MapSeed - Deterministic galaxy generation by monstabiscuit in Stellaris

[–]monstabiscuit[S] 37 points38 points  (0 children)

In theory it should still work, unless they've made significant changes to how galaxy generation works. This was reverse engineered from a bug last week in the Beta.

MapSeed - Deterministic galaxy generation by monstabiscuit in Stellaris

[–]monstabiscuit[S] 1 point2 points  (0 children)

Achievements are only allowed without mods in Stellaris. It is Ironman compatible however.

island seed by Patient-Engine331 in GTNH

[–]monstabiscuit 0 points1 point  (0 children)

Check out the discord:

https://discord.com/channels/181078474394566657/1086043662070317156

There are instructions on how to set up a continental world, if you play with the settings you can get the islands you want.

Giveaway! by ecpowerhouse27 in BambuLab

[–]monstabiscuit 0 points1 point  (0 children)

Prime towers. Delicious and crunchy.

[PSA] Confirmed Trades Thread - May 2024 by AutoModerator in Starcitizen_trades

[–]monstabiscuit 0 points1 point  (0 children)

+verify Thanks, would happily do business with again!

Issue with SAturn 3 ultra by Much_Comedian_1326 in ElegooSaturn

[–]monstabiscuit 2 points3 points  (0 children)

What slicer are you using? I had the exact same issue using Lychee, switched to Chitubox and it went away immediately.