• 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.

onlyplaystellaris

Private
55 Badges
Apr 22, 2021
16
1
  • Stellaris: Distant Stars
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Dharma
  • Cities: Skylines Industries
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Campus
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Battle for Bosporus
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Cities: Skylines - After Dark
  • Europa Universalis IV
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
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:
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.
 
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).
 
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?
 
Oh forgot to tell you, value comparing with distance_to_core_percent should be within the range of 0 to 1.
This might help other guys that have the same problem I used to have.
Should they? The 3.1 documentation has them as 1-100:

Code:
distance_to_core_percent - Checks the ship/fleet/planet/leader/pop/system's distance to the galactic core in percent, where center = 0 and galactic rim = 100
distance_to_core_percent < 60
Supported Scopes: all
 
Yeah, seems like you're right. Needs to be 0-1.

Code:
effect every_system = { limit = { distance_to_core_percent < 50 } set_name = "Near Center" }
...renames every planet, whereas...
Code:
effect every_system = { limit = { distance_to_core_percent < 0.5 } set_name = "Near Center" }
...reanames approximately the systems one would assume.
 
  • 1
Reactions: