Is there anyway to control the dense of habitable planets in different location?

onlyplaystellaris

Recruit
32 Badges
Apr 22, 2021
4
0
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Battle for Bosporus
  • Stellaris: Federations
  • Hearts of Iron IV: La Resistance
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Cities: Skylines - Campus
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Cities: Skylines
  • Cities: Skylines - Green Cities
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
Sorry, I'm quite new to modding, I wanna make a mod about galaxy generation. In my thoughts, the galaxy core should be much more denser than the outer, but there should also be less amount of habitable planets than the outer galaxy. In this way, the inner ring empires can control more systems, but they will eventually own the same amount of habitable planets as the outer ring countries.

屏幕截图 2021-07-13 105236.png


Is there anyway to do this? Thanks.
 
Last edited:

onlyplaystellaris

Recruit
32 Badges
Apr 22, 2021
4
0
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Battle for Bosporus
  • Stellaris: Federations
  • Hearts of Iron IV: La Resistance
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Cities: Skylines - Campus
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Cities: Skylines
  • Cities: Skylines - Green Cities
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
Okay, I successfully make the core denser than outer galaxy.

屏幕截图 2021-07-13 131940.png


by editing these codes:
core_radius_perc = 0.4 # Core radius is 30% of the galaxy radius
num_stars_core_perc = 0.25 # Number of stars in core

under map\galaxy\spiral_4.txt

Next step is to find out how to control the habitable planets generation.
 

Pancakelord

General
43 Badges
Apr 7, 2018
2.118
6.893
  • 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
  • Pillars of Eternity
  • 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 - After Dark
  • Cities: Skylines - Snowfall
  • Stellaris: Lithoids
  • 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 wanna make a mod about galaxy generation. In my thoughts, the galaxy core should be much more denser than the outer, but there should also be less amount of habitable planets than the outer galaxy.
You could write a script that runs on game start and looks at all stars within 0 - 0.25 (to use your variable) distance from the core, for each star system, if it has a habitable planet, that is not a capital/owned, roll a value (random list 1 / 2 / 3 ) and if it lands on, say, 1, convert that planet (from any of the habitable types) to a barren one. Do nothing if its not rolling a #1. This would lower the number of habitable worlds around the core by some fraction (e.g. 33%).

You can also run a second script to do the opposite on star-systems that are 0.6-0.8 distance from the core [if I remember right a distance of "1" from the 0-1 % scale, is equivalent to "500", which is the max stellaris distance unit that galaxies can go to), and add extra habitable worlds to them, randomly. (though this is slightly more complex with randomly picking habitable world types, but not much more complex).
 

onlyplaystellaris

Recruit
32 Badges
Apr 22, 2021
4
0
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Battle for Bosporus
  • Stellaris: Federations
  • Hearts of Iron IV: La Resistance
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Cities: Skylines - Campus
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Cities: Skylines
  • Cities: Skylines - Green Cities
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
You could write a script that runs on game start and looks at all stars within 0 - 0.25 (to use your variable) distance from the core, for each star system, if it has a habitable planet, that is not a capital/owned, roll a value (random list 1 / 2 / 3 ) and if it lands on, say, 1, convert that planet (from any of the habitable types) to a barren one. Do nothing if its not rolling a #1. This would lower the number of habitable worlds around the core by some fraction (e.g. 33%).

You can also run a second script to do the opposite on star-systems that are 0.6-0.8 distance from the core [if I remember right a distance of "1" from the 0-1 % scale, is equivalent to "500", which is the max stellaris distance unit that galaxies can go to), and add extra habitable worlds to them, randomly. (though this is slightly more complex with randomly picking habitable world types, but not much more complex).
Thank you, but how to define the distance between solar system and the galactic core?