Stellaris

Stellaris

View Stats:
Аурига Nov 21, 2024 @ 1:12pm
[modding] How to replace starting districts on a planet?
Who can, please help, what affects the number of districts on the planet? I assume that district_set affects this, but I don’t understand at all how it works. I’ve looked through a bunch of sources, but I haven’t found a solution to my problem. I want to set the maximum number of certain districts on the planet myself. And also the number of built ones. How can I do this?
Originally posted by Geoff:
Originally posted by Аурига:
Who can, please help, what affects the number of districts on the planet? I assume that district_set affects this, but I don’t understand at all how it works. I’ve looked through a bunch of sources, but I haven’t found a solution to my problem. I want to set the maximum number of certain districts on the planet myself. And also the number of built ones. How can I do this?
The number of districts available on a planet is determined by the planet's size, which itself is determined when the planet is first created in an initializer.

There are two types of districts - "uncapped" districts and "capped" districts. City and Industry districts are generally uncapped, and you can have as many such districts as there are size-points for your planet. Farming districts, mining districts, and generator districts, are generally capped, which means you need to put deposits on your planet that will increase the maximum number of districts available for that type. So like, "rushing waterfalls" add a number of generator districts.

Planet initializers are contained in "stellaris/common/solar_system_initializers"

Planet deposits are defined in "stellaris/common/deposits".

It sounds like your problem won't require you to mod existing deposits or districts. If you increase the size of your planets in the initializers and add more deposits on them using the init_effect function (see the existing initializiers for reference) that should get you where you're going.
< >
Showing 1-1 of 1 comments
The author of this thread has indicated that this post answers the original topic.
Geoff Nov 21, 2024 @ 1:42pm 
Originally posted by Аурига:
Who can, please help, what affects the number of districts on the planet? I assume that district_set affects this, but I don’t understand at all how it works. I’ve looked through a bunch of sources, but I haven’t found a solution to my problem. I want to set the maximum number of certain districts on the planet myself. And also the number of built ones. How can I do this?
The number of districts available on a planet is determined by the planet's size, which itself is determined when the planet is first created in an initializer.

There are two types of districts - "uncapped" districts and "capped" districts. City and Industry districts are generally uncapped, and you can have as many such districts as there are size-points for your planet. Farming districts, mining districts, and generator districts, are generally capped, which means you need to put deposits on your planet that will increase the maximum number of districts available for that type. So like, "rushing waterfalls" add a number of generator districts.

Planet initializers are contained in "stellaris/common/solar_system_initializers"

Planet deposits are defined in "stellaris/common/deposits".

It sounds like your problem won't require you to mod existing deposits or districts. If you increase the size of your planets in the initializers and add more deposits on them using the init_effect function (see the existing initializiers for reference) that should get you where you're going.
< >
Showing 1-1 of 1 comments
Per page: 1530 50

Date Posted: Nov 21, 2024 @ 1:12pm
Posts: 1