Stellaris

Stellaris

Modify the Galaxy
Modify your Stellaris experience by checking out the many mods created and shared by the community, including tweaks to almost any aspect of the game.
Learn More
Duxatious 8 16 Aug, 2024 @ 8:43am
Wasted Time Coding Something Already Present Because It Was So Obscure
I was trying to code in a scripted effect to add a random valid planetary deposit that could be food, energy, mineral, strategic, or rare...
The devs already added it in! What's worse is that it only appears in the game's code once, and it's commented out! It doesn't even appear on the wiki, nor does it have any search results on the web.

effect add_deposit_category_effect = "category" does everything I wanted it to do.

The deposit categories are:
deposit_cat_food
deposit_cat_energy
deposit_cat_minerals
deposit_cat_blockers
deposit_cat_blockers_natural
deposit_cat_rare
deposit_cat_rare_resource
deposit_cat_rare_blocker

To any inexperienced modder, I hope you see this before you try to code your own version.
< >
Showing 1-4 of 4 comments
FirePrince 46 23 Aug, 2024 @ 1:08am 
Are you sure with the blocker? The effect docu says:
add_deposit_category_effect - Adds random non-blocker resource deposit to the scoped planet of a certain category
Duxatious 8 23 Aug, 2024 @ 11:25am 
Originally posted by FirePrince:
Are you sure with the blocker? The effect docu says:
add_deposit_category_effect - Adds random non-blocker resource deposit to the scoped planet of a certain category
The effect can add blockers, but the blockers have to be valid for the planet or it fails.
deposit_cat_blockers works on tombworlds.
deposit_cat_blockers_natural works on most planets.
deposit_cat_rare_blocker works on gaia worlds.
There are also many deposits and blockers with a drop_weight of 0 so they'll never be picked.

P.s. What effect docu?
Last edited by Duxatious; 23 Aug, 2024 @ 11:29am
FirePrince 46 23 Aug, 2024 @ 12:17pm 
Hm* indeed not very highlighted but the very base for modding: The game creates doc file (effects.log - triggers.log ...) in the
logs\script_documentation\
folder. https://stellaris.paradoxwikis.com/Effects#Dump_Export
Last edited by FirePrince; 23 Aug, 2024 @ 12:17pm
Duxatious 8 23 Aug, 2024 @ 12:26pm 
Originally posted by FirePrince:
Hm* indeed not very highlighted but the very base for modding: The game creates doc file (effects.log - triggers.log ...) in the
logs\script_documentation\
folder. https://stellaris.paradoxwikis.com/Effects#Dump_Export
Wish I'd known that sooner, thanks for the tip. I had been relying on what was present in the game's code and on the wiki.
< >
Showing 1-4 of 4 comments
Per page: 1530 50