How do I replace capital buildings for a civic?

How do I replace capital buildings for a civic?

  • Hello Everyone, Today we've upgraded to the latest version of our forum software, bringing more features and better performance to the community. As always, we appreciate your bug reports and feedback, and you can post all of that here, as well as view the list of new features
  • Crusader Kings III Available Now!

    The realm rejoices as Paradox Interactive announces the launch of Crusader Kings III, the latest entry in the publisher’s grand strategy role-playing game franchise. Advisors may now jockey for positions of influence and adversaries should save their schemes for another day, because on this day Crusader Kings III can be purchased on Steam, the Paradox Store, and other major online retailers.


    Real Strategy Requires Cunning

eldomtom2

Private
13 Badges
Feb 9, 2013
16
0
  • Cities in Motion
  • Crusader Kings II
  • Europa Universalis III Complete
  • Divine Wind
  • Heir to the Throne
  • Victoria 2: A House Divided
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: Pre-order
I've made a new civic and want to give it a new set of capital buildings replacing the old ones. In my replacement 00_capital_buildings I've added NOT = {has_valid__civic = new_civic} to the potential section of the planetary adminstration code, and for the planetary adminstration replacement I've copied the planetary adminsration code over, renamed it, and added has_valid__civic = new_civic to the potential section. Yet when I start a new game with the civic it still has the vanilla planetary adminstration building. What am I doing wrong?
 

neptunehs

Second Lieutenant
1 Badges
May 28, 2018
192
1
  • Stellaris
I don't think change capital_building is a good idea,maybe some planet_modifiers or planetary_deposits do better...
If you insist,you need add your building names to convert_to = {} on all Capital buildings,and add "owner = { NOT = { has_valid_civic = new_civic} }"(yes,you need owner = {},or I will not work) to potential = {} (And allow = {},which is not strictly needed) on all Capital buildings.
 

eldomtom2

Private
13 Badges
Feb 9, 2013
16
0
  • Cities in Motion
  • Crusader Kings II
  • Europa Universalis III Complete
  • Divine Wind
  • Heir to the Throne
  • Victoria 2: A House Divided
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: Pre-order
That didn't work. I think something may be wrong with my attempts to overwrite the original building files - how do you do that, again?
 

Ryika

Captain
46 Badges
Apr 16, 2018
428
8
  • Crusader Kings III
Has been a while since I've played around with buildings, but I'm fairly certain that capital buildings are spawned by an event, and probably ignore the validity check.

If you really want to replace it, you will need to instead add a destroy trigger to the capital and add your building as a convert_to option.

However, as neptunehs said, it's probably not a good idea. Capital buildings are integrated in all sorts of events, effects, and conditions. They're expected to exist by the game, and replacing them with a custom building that the game does not know will cause all sorts of problems and inconsistencies.
 

eldomtom2

Private
13 Badges
Feb 9, 2013
16
0
  • Cities in Motion
  • Crusader Kings II
  • Europa Universalis III Complete
  • Divine Wind
  • Heir to the Throne
  • Victoria 2: A House Divided
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: Pre-order
I managed to fix the problem by adding an event that checks if a planet has a vanilla capital and replacing it if so. The problem is that some checks for the presence of a capital work differently from other building checks...