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

Bezborg

Grumpy Old Man
Nov 12, 2008
2.168
5.138
Hey yall.

i’ve bern dabbing in modding, making new districts, disabling existing ines, and defining their availability according to whether the planet is the empire capital or not.

Now, I’ve found in the code the designations for colony types, such as col_research for planets with the Research designation…

What I can’t figure out is how to incorporate this thing into the code, so that I have certain district types appearing and disappearing in relation to the planet designation.

It’s driving me crazy.

It’s easy with the empire capital designation, in the appropriate sections of the code you just put:
planet = ( is_capital = yes )
Or “no”, where appropriate.

So, with this, I have different sets of districts for normal planets, and different for empire capitals, and some for both types.

But it doesn’t work for col_research!

I tried everything, has_designation =, planet =, … everything I can think of, nothing works.

I feel like I’m close but missing something. If anyone has any insight, please share.

Thank you.
 
Code:
planet = ( has_designation = col_research)

/edit:
I think the confusion comes from the fact that these checks work slightly differently.

The "trigger = yes" type of check is only used in triggers that specifically ask a "yes or no" question - "Is this the capital?" in this example.

Most triggers use "trigger = condition" type formatting, where the left side forms the question "Does this colony have X specialization?", and the right side gives the condition (the X) that you're looking for, in this case the col_research specialization.

Both return true if the condition is met.
 
Last edited:
  • 1Like
Reactions:
I'd add that swapping districts is a little clunky, you usually need to close and re-open the planet view for it to refresh what districts are available (i.e. if adding and removing them).

Normally/in vanilla not an issue, as this only really changes when the planet itself is changed (e.g. with an ecumenopolis conversion), but it did leave me scratching my head when I did something similar a while back with edicts [forcing certain designations that way, rather than letting you set them on-the-fly, as there isn't an on action listening for designation updates ... for some reason). Everything would work fine, but no change, until I closed and re-opened the planet screen.
 
  • 1Like
Reactions:
Code:
planet = ( has_designation = col_research)

/edit:
I think the confusion comes from the fact that these checks work slightly differently.

The "trigger = yes" type of check is only used in triggers that specifically ask a "yes or no" question - "Is this the capital?" in this example.

Most triggers use "trigger = condition" type formatting, where the left side forms the question "Does this colony have X specialization?", and the right side gives the condition (the X) that you're looking for, in this case the col_research specialization.

Both return true if the condition is met.
Let me try it
 
I'd add that swapping districts is a little clunky, you usually need to close and re-open the planet view for it to refresh what districts are available (i.e. if adding and removing them).

Normally/in vanilla not an issue, as this only really changes when the planet itself is changed (e.g. with an ecumenopolis conversion), but it did leave me scratching my head when I did something similar a while back with edicts [forcing certain designations that way, rather than letting you set them on-the-fly, as there isn't an on action listening for designation updates ... for some reason). Everything would work fine, but no change, until I closed and re-opened the planet screen.
This is true. Destroy triggers are also clunky