• 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
Hi :)

I need some modding advice, I’d like to make a civic that would add merchant and clerk jobs to my ecumenopolis city districts, as a megacorp.

I like to roleplay a 1-planet (ecu) megacorp that is the center of galactic trade, and produces exclusively trade value, and buys everything off the market.

I was hoping that the devs will add commercial districts to the ecumenopolis, as it rightfully should be the center of galactic population and commerce and just a factory, but it’s not happening.

May I ask how to achieve this? I’d be infinitely grateful, roleplaying stuff like this is the only enjoyment left for me in Stellaris :)

Edit: it can also be a planetary modifier, perhaps this is easier to mod, and easier to ensure the AI doesn’t get it.

So, perhaps a modifier that gives these jobs, so it fills out the “extra” empty housing that the district provides? Perhaps an experienced modder can write such a thing up and provide instruction where to paste it?
 
Last edited:
Perhaps this can be achieved by making a modifier/deposit similar to the dimensional portal, and then just uding the console to apply it to the planet?

But I don’t know how to formulate it so it ads jobs *per arcology district*
 
Modifying the arcology district is probably the best way to do so. You can add triggered modifiers to districts, which is how the clerk/maintenance drone swap is done. You could add a new triggered modifier for your civic that adds however many jobs you want. (common/districts/01_arcology_districts.txt is the file, district_arcology_housing the internal name of the city district)
 
Modifying the arcology district is probably the best way to do so. You can add triggered modifiers to districts, which is how the clerk/maintenance drone swap is done. You could add a new triggered modifier for your civic that adds however many jobs you want. (common/districts/01_arcology_districts.txt is the file, district_arcology_housing the internal name of the city district)
But this would modify it for the AI as well?
 
Last edited:
Thank you.

So I can approach modifying the arcology districts but the modification applies only to a megacorp civic? I guess it narrows it down a bit, and I don’t see many ecus in the galaxy anyway... if a competitor megacorp starts going that route I’ll just crack it
 
Or perhaps a condition can be added: empire capital only?

So then you’d need to be a megacorp and have your capital on an ecumenopolis for the changes to apply?

But this seems exceedingly complex to formulate, no wiki guide will teach me to do that :(
 
Check out the Leisure Arcology and how it replaces Entertainers with Duelists for empires with Warrior Culture. That'll demonstrate the principle of job replacement. You could then replace the 4 Culture Worker jobs with Merchant jobs in a similar way for megacorps.

You modify this section in common/districts/01_arcology_districts.txt under the entry district_arcology_leisure (last arcology in the file):

Code:
    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                NOT = { has_valid_civic = civic_warrior_culture }
            }
        }
        modifier = {
            job_entertainer_add = 4
            job_culture_worker_add = 4
        }
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                has_valid_civic = civic_warrior_culture
            }
        }
        modifier = {
            job_duelist_add = 4
            job_culture_worker_add = 4
        }
    }

And you make it look something like this:

Code:
    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                is_megacorp = no
                NOT = { has_valid_civic = civic_warrior_culture }
            }
        }
        modifier = {
            job_entertainer_add = 4
            job_culture_worker_add = 4
        }
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                is_megacorp = no
                has_valid_civic = civic_warrior_culture
            }
        }
        modifier = {
            job_duelist_add = 4
            job_culture_worker_add = 4
        }
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_megacorp = yes
            }
        }
        modifier = {
            job_entertainer_add = 4
            job_merchant_add = 4
        }
    }

You can play with the ratio of Entertainer and Merchant jobs. You're likely to get a huge excess of Amenities if you have multiple Leisure Arcologies and keep 4 Entertainers per arcology. If you want to add Clerks that's job_clerk_add = whatever number.

Don't overlook the is_megacorp = no lines in the triggers for normal empires.

Also be sure to read the general guidelines before you start modding: https://stellaris.paradoxwikis.com/Modding#Guidelines
 
  • 1Like
Reactions:
Wow, you’ve all been a great help, looks like it’s doable with several directions!

The building route is very interesting, as is the leisure district route.

It looks doable, I’m very happy :)
 
And you make it look something like this:

Code:
    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                is_megacorp = no
                NOT = { has_valid_civic = civic_warrior_culture }
           
[/QUOTE]
[QUOTE="Dragatus, post: 27468469, member: 1024754"]


    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                is_megacorp = no
                has_valid_civic = civic_warrior_culture
         
[/QUOTE]
I suppose all these “warrior culture” references should be addressed? Otherwise it will require me to have warrior culture at the same time as being a megacorp?
 
Also, it's certainly possible to code an AI only/not AI into the trigger, basically in the owner scope (for a building or district) add "is_ai = yes/no" for whichever direction you want it to go.
 
Bezbog said:
I suppose all these “warrior culture” references should be addressed? Otherwise it will require me to have warrior culture at the same time as being a megacorp?

No, you want to keep those. That's for normal empires.

The first triggered modifier checks if you're a normal empire ( is_regular_empire = yes ), then if you are not a megacorp ( is_megacorp = no ), and finally if you don't have Warrior Culture ( NOT = { has_valid_civic = civic_warrior_culture } ). If you pass all three conditions the arcology will give you 4 Entertainers and 4 Culture Workers.

The second triggered modifier checks if you are a normal empires, are not a megacorp and if you do have Warrior Culture. Then you get Duelists instead of Entertainers.

The third modifier will check if you are a megacorp and if yes then you get Merchants instead of Culture Workers.

The three triggered modifiers are designed to have such conditions that only one can ever be true and the other two will be false. The one that is true will provide jobs and the other two won't. If you are a megacorp the conditions of the first two will evaluate to "false" and so they will not give you any jobs, but the third one will evaluate to "true" so it will give you the jobs.

If you aren't a megacorp it's the opposite and the third one will be false and will have no effect. And of the first two one will evaulate as false and the other as true, depending on whether or not you have Warrior Culture.
 
  • 1Like
Reactions:
No, you want to keep those. That's for normal empires.

The first triggered modifier checks if you're a normal empire ( is_regular_empire = yes ), then if you are not a megacorp ( is_megacorp = no ), and finally if you don't have Warrior Culture ( NOT = { has_valid_civic = civic_warrior_culture } ). If you pass all three conditions the arcology will give you 4 Entertainers and 4 Culture Workers.

The second triggered modifier checks if you are a normal empires, are not a megacorp and if you do have Warrior Culture. Then you get Duelists instead of Entertainers.

The third modifier will check if you are a megacorp and if yes then you get Merchants instead of Culture Workers.

The three triggered modifiers are designed to have such conditions that only one can ever be true and the other two will be false. The one that is true will provide jobs and the other two won't. If you are a megacorp the conditions of the first two will evaluate to "false" and so they will not give you any jobs, but the third one will evaluate to "true" so it will give you the jobs.

If you aren't a megacorp it's the opposite and the third one will be false and will have no effect. And of the first two one will evaulate as false and the other as true, depending on whether or not you have Warrior Culture.
Hi man, I just want to thank you again for teaching me how to do this :)

may I ask one more question: what do I need to add in the lines, so the leisure arcology gets renamed to a commercial arcology in the case of the last trigger? If possible
 
I don't know how to do that, if it's even possible. What you could do instead is have Commercial Arcology as a new 5th district type on Ecumenopolises.

Here's code to revert leisure arcologies to their original form and add the new commercial one:

Code:
district_arcology_leisure = {
    base_buildtime = 600
    is_capped_by_modifier = no

    show_on_uncolonized = {
        uses_district_set = city_world
        from = {
            is_regular_empire = yes
        }
    }

    potential = {
        uses_district_set = city_world
        owner = {
            exists = owner
            is_regular_empire = yes
        }
    }

    conversion_ratio = 1
    convert_to = {
        district_city
        district_nexus
        district_hive
        district_arcology_housing
    }

    resources = {
        category = planet_districts
        cost = {
            minerals = 1000
            exotic_gases = 50
        }
        upkeep = {
            energy = 5
            exotic_gases = 1
        }
    }

    planet_modifier = {
        planet_housing_add = 10
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                NOT = { has_valid_civic = civic_warrior_culture }
            }
        }
        modifier = {
            job_entertainer_add = 4
            job_culture_worker_add = 4
        }
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                has_valid_civic = civic_warrior_culture
            }
        }
        modifier = {
            job_duelist_add = 4
            job_culture_worker_add = 4
        }
    }

    triggered_desc = {
        trigger = {
            exists = owner
            owner = { has_valid_civic = civic_warrior_culture }
        }
        text = job_duelist_effect_desc
    }

    triggered_desc = {
        trigger = {
            exists = owner
            owner = { NOT = { has_valid_civic = civic_warrior_culture } }
        }
        text = job_entertainer_effect_desc
    }
}

district_arcology_commerce = {
    base_buildtime = 600
    is_capped_by_modifier = no
    icon = district_hab_commercial
    gridbox = district_hab_commercial

    show_on_uncolonized = {
        uses_district_set = city_world
        from = {
            is_regular_empire = yes
        }
    }

    potential = {
        uses_district_set = city_world
        owner = {
            exists = owner
            is_regular_empire = yes
        }
    }

    conversion_ratio = 1
    convert_to = {
        district_city
        district_nexus
        district_hive
        district_arcology_housing
    }

    resources = {
        category = planet_districts
        cost = {
            minerals = 1000
            rare_crystals = 50
        }
        upkeep = {
            energy = 5
            rare_crystals = 1
        }
    }

    planet_modifier = {
        planet_housing_add = 10
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
            }
        }
        modifier = {
            job_merchant_add = 2
            job_clerk_add = 6
        }
    }

    triggered_desc = {
        trigger = {
            exists = owner
        }
        text = job_merchant_effect_desc
    }

    triggered_desc = {
        trigger = {
            exists = owner
        }
        text = job_clerk_effect_desc
    }
}

Then add localization for the new district_arcology_commerce. Here's the wiki article: https://stellaris.paradoxwikis.com/Localisation_modding

Once you create the localization file (personally I like to copy an existing one and overwrite the contents - that ensures the encoding is correct) you'll want the contents of it to be something like this:

Code:
l_english:
 district_arcology_commerce:0 "Commerce Arcology"
 district_arcology_commerce:0 "Commerce Arcologies"
 district_arcology_commerce:0 "This district serves as a great center of interplanetary trade where goods from all over the galaxy can be obtained."
 
  • 1Love
Reactions:
I don't know how to do that, if it's even possible. What you could do instead is have Commercial Arcology as a new 5th district type on Ecumenopolises.

Here's code to revert leisure arcologies to their original form and add the new commercial one:

Code:
district_arcology_leisure = {
    base_buildtime = 600
    is_capped_by_modifier = no

    show_on_uncolonized = {
        uses_district_set = city_world
        from = {
            is_regular_empire = yes
        }
    }

    potential = {
        uses_district_set = city_world
        owner = {
            exists = owner
            is_regular_empire = yes
        }
    }

    conversion_ratio = 1
    convert_to = {
        district_city
        district_nexus
        district_hive
        district_arcology_housing
    }

    resources = {
        category = planet_districts
        cost = {
            minerals = 1000
            exotic_gases = 50
        }
        upkeep = {
            energy = 5
            exotic_gases = 1
        }
    }

    planet_modifier = {
        planet_housing_add = 10
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                NOT = { has_valid_civic = civic_warrior_culture }
            }
        }
        modifier = {
            job_entertainer_add = 4
            job_culture_worker_add = 4
        }
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                has_valid_civic = civic_warrior_culture
            }
        }
        modifier = {
            job_duelist_add = 4
            job_culture_worker_add = 4
        }
    }

    triggered_desc = {
        trigger = {
            exists = owner
            owner = { has_valid_civic = civic_warrior_culture }
        }
        text = job_duelist_effect_desc
    }

    triggered_desc = {
        trigger = {
            exists = owner
            owner = { NOT = { has_valid_civic = civic_warrior_culture } }
        }
        text = job_entertainer_effect_desc
    }
}

district_arcology_commerce = {
    base_buildtime = 600
    is_capped_by_modifier = no
    icon = district_hab_commercial
    gridbox = district_hab_commercial

    show_on_uncolonized = {
        uses_district_set = city_world
        from = {
            is_regular_empire = yes
        }
    }

    potential = {
        uses_district_set = city_world
        owner = {
            exists = owner
            is_regular_empire = yes
        }
    }

    conversion_ratio = 1
    convert_to = {
        district_city
        district_nexus
        district_hive
        district_arcology_housing
    }

    resources = {
        category = planet_districts
        cost = {
            minerals = 1000
            rare_crystals = 50
        }
        upkeep = {
            energy = 5
            rare_crystals = 1
        }
    }

    planet_modifier = {
        planet_housing_add = 10
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
            }
        }
        modifier = {
            job_merchant_add = 2
            job_clerk_add = 6
        }
    }

    triggered_desc = {
        trigger = {
            exists = owner
        }
        text = job_merchant_effect_desc
    }

    triggered_desc = {
        trigger = {
            exists = owner
        }
        text = job_clerk_effect_desc
    }
}

Then add localization for the new district_arcology_commerce. Here's the wiki article: https://stellaris.paradoxwikis.com/Localisation_modding

Once you create the localization file (personally I like to copy an existing one and overwrite the contents - that ensures the encoding is correct) you'll want the contents of it to be something like this:

Code:
l_english:
district_arcology_commerce:0 "Commerce Arcology"
district_arcology_commerce:0 "Commerce Arcologies"
district_arcology_commerce:0 "This district serves as a great center of interplanetary trade where goods from all over the galaxy can be obtained."
Wow man, you’re truly amazing. Thank you so very much.
 
I don't know how to do that, if it's even possible. What you could do instead is have Commercial Arcology as a new 5th district type on Ecumenopolises.

Here's code to revert leisure arcologies to their original form and add the new commercial one:

Code:
district_arcology_leisure = {
    base_buildtime = 600
    is_capped_by_modifier = no

    show_on_uncolonized = {
        uses_district_set = city_world
        from = {
            is_regular_empire = yes
        }
    }

    potential = {
        uses_district_set = city_world
        owner = {
            exists = owner
            is_regular_empire = yes
        }
    }

    conversion_ratio = 1
    convert_to = {
        district_city
        district_nexus
        district_hive
        district_arcology_housing
    }

    resources = {
        category = planet_districts
        cost = {
            minerals = 1000
            exotic_gases = 50
        }
        upkeep = {
            energy = 5
            exotic_gases = 1
        }
    }

    planet_modifier = {
        planet_housing_add = 10
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                NOT = { has_valid_civic = civic_warrior_culture }
            }
        }
        modifier = {
            job_entertainer_add = 4
            job_culture_worker_add = 4
        }
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                has_valid_civic = civic_warrior_culture
            }
        }
        modifier = {
            job_duelist_add = 4
            job_culture_worker_add = 4
        }
    }

    triggered_desc = {
        trigger = {
            exists = owner
            owner = { has_valid_civic = civic_warrior_culture }
        }
        text = job_duelist_effect_desc
    }

    triggered_desc = {
        trigger = {
            exists = owner
            owner = { NOT = { has_valid_civic = civic_warrior_culture } }
        }
        text = job_entertainer_effect_desc
    }
}

district_arcology_commerce = {
    base_buildtime = 600
    is_capped_by_modifier = no
    icon = district_hab_commercial
    gridbox = district_hab_commercial

    show_on_uncolonized = {
        uses_district_set = city_world
        from = {
            is_regular_empire = yes
        }
    }

    potential = {
        uses_district_set = city_world
        owner = {
            exists = owner
            is_regular_empire = yes
        }
    }

    conversion_ratio = 1
    convert_to = {
        district_city
        district_nexus
        district_hive
        district_arcology_housing
    }

    resources = {
        category = planet_districts
        cost = {
            minerals = 1000
            rare_crystals = 50
        }
        upkeep = {
            energy = 5
            rare_crystals = 1
        }
    }

    planet_modifier = {
        planet_housing_add = 10
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
            }
        }
        modifier = {
            job_merchant_add = 2
            job_clerk_add = 6
        }
    }

    triggered_desc = {
        trigger = {
            exists = owner
        }
        text = job_merchant_effect_desc
    }

    triggered_desc = {
        trigger = {
            exists = owner
        }
        text = job_clerk_effect_desc
    }
}

Then add localization for the new district_arcology_commerce. Here's the wiki article: https://stellaris.paradoxwikis.com/Localisation_modding

Once you create the localization file (personally I like to copy an existing one and overwrite the contents - that ensures the encoding is correct) you'll want the contents of it to be something like this:

Code:
l_english:
district_arcology_commerce:0 "Commerce Arcology"
district_arcology_commerce:0 "Commerce Arcologies"
district_arcology_commerce:0 "This district serves as a great center of interplanetary trade where goods from all over the galaxy can be obtained."
One more quick question, where do I insert "is_megacorp = yes" into your 5th district coding?
Do I add it here:


potential = {
uses_district_set = city_world
owner = {
exists = owner
is_regular_empire = yes
----->>>>> <<<<<------
}

Thank you in advance
 
You'd insert it into both show_on_uncolonized and potential. But that's only if you want to restrict normal empires from using it, which isn't strictly necessary. The UI has space for 5 district types, but in vanilla there are only 4 types available on an Ecumenopolis, so I set it up so the Commercial Arcology would be available to all non-gestalts.

The only reason to restrict it would be if you really want it to only be available to megacorps (though then you might also want to make it available to Merchant Guild empires with an OR clause) or if you already have another mod adding a different 5th district type. But in that case you'd need to make one of the other arcologies unavailable for megacorps by isnerting is_megacorp = no in the conditions or use a NOR clause if you want to do Merchant Guilds too).
 
  • 1Like
Reactions: