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

That's actually exactly right, I just want to make it available to Megacorps and more specifically - only to me :D As I want to RP as a single-planet Ecumenopolis Megacorp that is the centre of Galactic Trade, and produces nothing except trade, completely reliant on the galactic market for resources.

I managed to insert it into the game, but there's a description problem. Also, i reformed out of a Megacorp and into a normal empire, but I modded it before I saw your reply, so I'll correct that one.

Not sure about the description issue though.

Also, I see there's no adding jobs in the description (only after I reformed into a normal empire, it gave jobs normally when I was a Megacorp), so I guess the place I added "is megacorp = yes" affects whether it gives jobs or not, but not the existence of the arcology. Interesting.
 

Attachments

  • Screenshot 2021-08-28 131628.jpg
    Screenshot 2021-08-28 131628.jpg
    94,4 KB · Views: 0
Looks like a localization error to me. Where exactly did you put the localization file, what did you name it, and what is its content?
 
Try renaming the file into commerce_l_english.yml and if that doesn't work try replacing it with the file I attached to my post.
 

Attachments

  • commerce_arcology_l_english.yml
    269 bytes · Views: 0
You don't need to overwrite anything... Simply create new district and tie it to
Code:
potential = {
    uses_district_set = city_world
}
See: https://github.com/OldEnt/stellaris.../districts/!amaryllian_arcology_districts.txt

Code:
amaryllian_district_arcology_trade_industry = {
    base_buildtime = 360
    is_capped_by_modifier = no
    show_on_uncolonized = {
        has_planet_flag = amaryllian_trade_arcology
    }
    potential = {
        has_planet_flag = amaryllian_trade_arcology
        exists = owner
        owner = {
            is_gestalt = no
        }
    }
    conversion_ratio = 1
    convert_to = {
        district_hab_housing
    }
    resources = {
        category = planet_districts
        cost = {
            minerals = 1000
            rare_crystals = 50
        }
        upkeep = {
            trigger = {
                owner = {
                    has_ascension_perk = ap_amaryllian_voidchildren
                }
            }
            energy = 5
            rare_crystals = 2
        }
        upkeep = {
            trigger = {
                owner = {
                    NOT = {
                        has_ascension_perk = ap_amaryllian_voidchildren
                    }
                }
            }
            energy = 5
            rare_crystals = 1
        }
    }
    planet_modifier = {
        planet_housing_add = 10
    }
    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                has_ascension_perk = ap_amaryllian_voidchildren
                is_regular_empire = yes
                is_fallen_empire_spiritualist = no
            }
        }
        modifier = {
            job_merchant_add = 1
            job_clerk_add = 10
            trade_value_mult = 0.1
        }
    }
    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                NOT = {
                    has_ascension_perk = ap_amaryllian_voidchildren
                }
                is_regular_empire = yes
                is_fallen_empire_spiritualist = no
            }
        }
        modifier = {
            job_clerk_add = 5
            trade_value_mult = 0.05
        }
    }
    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                has_ascension_perk = ap_amaryllian_voidchildren
                is_fallen_empire_spiritualist = yes
            }
        }
        modifier = {
            job_manager_add = 10
            trade_value_mult = 0.1
        }
    }
    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                NOT = {
                    has_ascension_perk = ap_amaryllian_voidchildren
                }
                is_fallen_empire_spiritualist = yes
            }
        }
        modifier = {
            job_manager_add = 5
            trade_value_mult = 0.05
        }
    }
    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                has_non_swapped_tradition = tr_prosperity_interstellar_franchising
            }
        }
        modifier = {
            job_clerk_add = 1
        }
    }
    triggered_desc = {
        text = job_clerk_effect_desc
    }
    triggered_desc = {
        trigger = {
            owner = {
                has_ascension_perk = ap_amaryllian_voidchildren
            }
        }
        text = job_merchant_effect_desc
    }
    ai_weight = {
        weight = 0
        modifier = {
            weight = 250
            buildings_has_crystals = yes
            OR = {
                has_district = district_hab_commercial
                owner = {
                    has_monthly_income = {
                        resource = consumer_goods
                        value < 30
                    }
                }
            }
        }
    }
}

The code above adds trade district to a habitat as long as potential is fulfilled (in this case it's planet flag, but might as well be owner civic or something else). In 2.8 you needed UI mod to display more than 4 district types on a planet. In 3.0 game will display up to 5 district types without UI mod. For more questions you can visit Stellaris Modding Den Discord.

1630226593060.png
 
  • 1Like
Reactions:
Try renaming the file into commerce_l_english.yml and if that doesn't work try replacing it with the file I attached to my post.


A little update...

Renaming the localization file into district_commerce_l_english worked, in-game it;s now correctly called "Commerce Arcologies"


However, if I try to modifiy the leisure district to provide +10 researchers for megacorps only... all hell breaks loose.


Now I really made a mess and I didn't save any backup... Can I trouble you to quote me the normal code for the leisure arcologies here again?

And if you feel particularly merciful: perhaps add a line where the leisure arcology gives 10 researcher jobs if you're a megacorp only.

I can't imagine what I'm doing wrong, I really got the hang of adding a 5th district type, but somehow it doesn't want to work with what I'm trying to add to leisure
 
Now I really made a mess and I didn't save any backup... Can I trouble you to quote me the normal code for the leisure arcologies here again?

Just go to the previous page of the thread, it's still there. ;)


I do hope though that this doesn't imply you were messing with the vanilla files instead of making a mini mod.
 
Just go to the previous page of the thread, it's still there. ;)


I do hope though that this doesn't imply you were messing with the vanilla files instead of making a mini mod.
No, the original post doesn’t have the full leisure arcology coding, only the planet triggers section.

But it doesn’t matter, I actually completely removed leisure and put a research arcology in its place :) I never liked the leisure arcology anyway.

Thank you again
 
Hi again... I have a new question, no doubt of interest to all the beginner modders out there...

So, How do I keep the forge arcology intact as it is, but add a condition that in the case of Megacorps, it gives researcher jobs?

I tried just adding these jobs and adding is_megacorp=yes, but it doesn't seem to work properly.

I guess my question is, where do I need to add is_megacorp=no, in order for it to work?

So once more for clarity, fot the enrite file concerning Ecumenopolis districts:
1) City arcology - intact
2) Factory Arcology - intact
3) Forge Arcology - normal, but for Megacorps it gives researcher jobs -OR- it disappears for Megacorps and gets replaced by a research district
4) leisure arcology - intact
5) I will add a commercial arcology just for Megacorps


Thank you in advance, again
 
If you want to disable Metallurgist/Catalytic Technician jobs you'll need to add the condition to these potential blocks:

Code:
    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                is_catalytic_empire = no
            }
        }
        modifier = {
            job_foundry_add = 6
        }
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                is_catalytic_empire = yes
            }
        }
        modifier = {
            job_catalytic_technician_add = 6
        }
    }

    triggered_desc = {
        trigger = {
            exists = owner
            owner = {
                is_regular_empire = yes
                is_catalytic_empire = no
            }
        }
        text = job_foundry_effect_desc
    }

    triggered_desc = {
        trigger = {
            exists = owner
            owner = {
                is_regular_empire = yes
                is_catalytic_empire = yes
            }
        }
        text = job_catalytic_technician_effect_desc
    }

If you want to disable it entirely and replace it with a research arcology you'll instead need to add the condition to the potential and show_on_uncolonized blocks at the start of the arcology data:

Code:
    show_on_uncolonized = {
        uses_district_set = city_world
    }

    potential = {
        uses_district_set = city_world
    }

It would probably be cleaner to swap entire districts rather than just jobs. Though if you're doing that I would recommend replacing the fairly useless Residential Arcology (all arcologies give more housing than jobs) with a Research Arcology for everyone rather than replacing the Foundry Arcology with it just for megacorps.

Edit: After giving it a bit more thought I think it would be ideal to turn the Residential Arcology into a Commercial Arcology instead, for better compatibility. The game namely will turn City Districts into Habitation Arcologies so there would be a continuation of Clerk jobs when a planet is upgraded. And then the Research Arcology would be added as the 5th district type.

I'm actually starting to like the idea so much I'll probably make such a mod myself. :D

Edit 2: I just realized an issue with my plan, Ecumenopolises are now available to Rogue Servitors who don't produce any trade so there would be a conversion issue there.
 
Last edited:
  • 1Love
Reactions:
If you want to disable Metallurgist/Catalytic Technician jobs you'll need to add the condition to these potential blocks:

Code:
    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                is_catalytic_empire = no
            }
        }
        modifier = {
            job_foundry_add = 6
        }
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                is_regular_empire = yes
                is_catalytic_empire = yes
            }
        }
        modifier = {
            job_catalytic_technician_add = 6
        }
    }

    triggered_desc = {
        trigger = {
            exists = owner
            owner = {
                is_regular_empire = yes
                is_catalytic_empire = no
            }
        }
        text = job_foundry_effect_desc
    }

    triggered_desc = {
        trigger = {
            exists = owner
            owner = {
                is_regular_empire = yes
                is_catalytic_empire = yes
            }
        }
        text = job_catalytic_technician_effect_desc
    }

If you want to disable it entirely and replace it with a research arcology you'll instead need to add the condition to the potential and show_on_uncolonized blocks at the start of the arcology data:

Code:
    show_on_uncolonized = {
        uses_district_set = city_world
    }

    potential = {
        uses_district_set = city_world
    }

It would probably be cleaner to swap entire districts rather than just jobs. Though if you're doing that I would recommend replacing the fairly useless Residential Arcology (all arcologies give more housing than jobs) with a Research Arcology for everyone rather than replacing the Foundry Arcology with it just for megacorps.

Edit: After giving it a bit more thought I think it would be ideal to turn the Residential Arcology into a Commercial Arcology instead, for better compatibility. The game namely will turn City Districts into Habitation Arcologies so there would be a continuation of Clerk jobs when a planet is upgraded. And then the Research Arcology would be added as the 5th district type.

I'm actually starting to like the idea so much I'll probably make such a mod myself. :D

Edit 2: I just realized an issue with my plan, Ecumenopolises are now available to Rogue Servitors who don't produce any trade so there would be a conversion issue there.


Right on man! That's a very elegant idea, thank you!


My reason why I want to add special conditions for Megacorps is because I'd like to add clerks, managers and merchants to it. Not everyone has managers, and I'm too much of a modding noob to ad special conditions with different jobs within a vanilla district.


To be honest, I like your idea well enough that I may eliminate the managers and just make it available to all.

Rogue servitors is not really an issue for me, as I pre-make all the species in the galaxy and none of them are rogue servitors (to be honest, nobody has a restored ecumenopolis except me)... But I see how it might be an issue for a "generalist" mod
 
Small update/note:

I encountered an interesting thing while modding the Arcology districts for myself...

It appears that Megacorps are considered a sub-category of normal empires, at least coding wise.

SO, if you add specific conditions to Megacorps, the regular empire one will still count, and actually ADD to whatever you have defined for Megacorps.

Unless you use the NOT = (is_megacorp = yes) at the regular_empire code section.


This is probably pretty basic stuff for experienced modders, but it as new for me, or rather - I didn't quite get previous references and explanations of it.

So there it is, if it helps any noob like me
 
  • 1Like
Reactions:
Unless you use the NOT = (is_megacorp = yes) at the regular_empire code section.
Please don't use that ever. Just use "is_megacorp = no", it"s the same and less confusing.

That trigger just checks for Corporate Authority by the way.
"\common\scripted_triggers\00_scripted_triggers.txt":
Code:
is_megacorp = {
    has_authority = auth_corporate
}

"is_regular_empire" basically excludes gestalt for players:
Code:
is_regular_empire = {
    OR = {
        is_country_type = default
        is_country_type = fallen_empire
        is_country_type = awakened_fallen_empire #for checks in buildings
    }
    NOT = { has_ethic = ethic_gestalt_consciousness    }
}
 
  • 1Like
Reactions:
Please don't use that ever. Just use "is_megacorp = no", it"s the same and less confusing.

That trigger just checks for Corporate Authority by the way.
"\common\scripted_triggers\00_scripted_triggers.txt":
Code:
is_megacorp = {
    has_authority = auth_corporate
}

"is_regular_empire" basically excludes gestalt for players:
Code:
is_regular_empire = {
    OR = {
        is_country_type = default
        is_country_type = fallen_empire
        is_country_type = awakened_fallen_empire #for checks in buildings
    }
    NOT = { has_ethic = ethic_gestalt_consciousness    }
}
Thank you, but it works :D
 
  • 1Haha
Reactions:
Please don't use that ever. Just use "is_megacorp = no", it"s the same and less confusing.

That trigger just checks for Corporate Authority by the way.
"\common\scripted_triggers\00_scripted_triggers.txt":
Code:
is_megacorp = {
    has_authority = auth_corporate
}

"is_regular_empire" basically excludes gestalt for players:
Code:
is_regular_empire = {
    OR = {
        is_country_type = default
        is_country_type = fallen_empire
        is_country_type = awakened_fallen_empire #for checks in buildings
    }
    NOT = { has_ethic = ethic_gestalt_consciousness    }
}
I do want to learn the lesson you’re trying to impart here, though.

Can you shape it into a consumable form for a noob please? I must admit I don’t fully understand
 
  • 1Like
Reactions:
Every trigger that takes the form blahblahblah = yes can be inverted by making it blahblahblah = no, which is simpler than NOT = { blahblahblah = yes } and ahs the exact same effect.

is_megacorp checks if the empire has Megacorp authority.

is_regular_empire checks if the empire has normal ethics. It's used to rule out Gestalt empires (both hives and machines) when using = yes and to make something apply only to Gestalt empires when using = no.
 
  • 1Like
Reactions:
Every trigger that takes the form blahblahblah = yes can be inverted by making it blahblahblah = no, which is simpler than NOT = { blahblahblah = yes } and ahs the exact same effect.

"is_megacorp" checks if the empire has Megacorp authority.

"is_regular_empire" checks if the empire has normal ethics. It's used to rule out Gestalt empire (both hives and machines).
That’s clear. And I distinctly remember tgat I went with the is_megacorp = no, first.

I do not distinctly remember why it didn’t work, only that it didn’t. The regular enpire effects added to my modded megacorp effects.

Then I tried the prinitive and uncivilized NOT = (is= yes) form, and it worked precisely as I intended.

I don’t remember my logic process at all, I can only attest to the effects... the crappy approach worked