Building to Increase Population Ceiling?

I’m trying to create a capturable building which will increase both the population cap and population ceiling. Essentially like a house which can push you past the 200 pop limit. All the methods I’ve looked into seem to have dead ended, so I’m not sure how feasible this is, but I’m hoping someone more knowledgeable may have a workaround.

My intention was to put this as a capturable structure on random maps and whoever controlled them would have a population advantage. So whatever method to achieve this would need to be compatible with all civs.

Option 1

Use a method similar to the Earth Mother ceremony. Essentially, put an action like this in the building’s tactics file:

  <action>
    <name stringid="69171">IncreasePopCap</name>
    <type>DanceBonus</type>
    <active>1</active>
    <persistent>1</persistent>
    <dancebonustype>PopCap</dancebonustype>
    <modifymultiplier>1.0</modifymultiplier>
    <modifyexponent>1.0</modifyexponent>
    <modifybase>0.0</modifybase>
  </action>

This initially seemed like the most promising way since other buildings like Dojos, he Summer Palace, and the Confucian Academy function by using a DanceBonus action.

Unfortunately this system has more than a few obstacles. It seems like the buildings that work like this are very civ specific and require a hardcoded “phantom” dancer to make them run. I’m not quite sure how to alter this phantom dancer or if that’s even doable. If it is changeable it would still need to account for cases like natives having auto working plazas if they had a phantom dancer. The only way around this would be if the phantom dancer could be at a very low rate so the bonus to native civs would be almost negligible and to have a large gain for buildings that function with a phantom dancer.

Option 2

Use triggers (and maybe techs) to alter the population ceiling. This seems more promising, but my main issue is how to make this toggle based on ownership of the building. It is easy enough to make a trigger with the condition of unit ownership that modifies player data to increase the population ceiling. However making it drop the population ceiling again once ownership is lost seems a lot more tricky. Is there a way to create a togglable trigger or repeatedly enable/disable a tech? There are some edge cases that would need to be dealt with for China, Russia, and maybe Lakota, but I think that’s doable if I can get the basic concept working.

It would also be really helpful if someone could explain what all the modify player data fields actually do. Population Cap Bonus, Population Cap Extra, and Population Extra Limit all sound like the exact same thing. Also what is the “parameter” field, and what happens if the value is not -1?

Option 3

Set the attribute for the unit in protoy. It would be super convenient to have this directly linked to the building and not have to worry about phantom dancers or modifying player data.

<populationcapaddition>10</populationcapaddition>

Houses use the above to increase the pop cap, so maybe there’s an equivalent that can boost the population limit as well. Unfortunately I can’t think of anything that uses something like this so I’m not confident that anything like it exists. I’d love to be corrected though.

3 Likes

Pretty amazing
Nice work dude!

Option 1 couldn’t have worked , because the dances are hardcoded to native cis. ^^

Option 2 , you can create your own trigger , maybe try to give it a shot ! ( Remember to also create a tech, that removes pop cap! )

Option 3… hmm… I only know of a tech that adds pop cap…

Option 1

It looks like they’re enabled as techs, so adding a specific custom dance is not the issue.

  <effect type="Data" amount="1.00" tactic="EarthMotherDance" subtype="TacticEnable" relativity="Absolute">
    <target type="ProtoUnit">CommunityPlaza</target>
  </effect>

The problem is getting the phantom dancer to power the building and how to make that jive with all civs.

Option 2

My problem isn’t necessarily creating the trigger or tech as existing ones work to modify the necessary parameters.

This seems to work for techs:

  <tech name="mzPopLimitIncrease" type="Normal">
    <dbid>4281</dbid>
    <displaynameid>62991</displaynameid>
    <status>UNOBTAINABLE</status>
    <effects>
      <effect type="Data" amount="10.00" subtype="PopulationCapExtra" relativity="Absolute">
        <target type="Player">
        </target>
      </effect>	  
    </effects>
  </tech>  
  <tech name="mzPopLimitDecrease" type="Normal">
    <dbid>4282</dbid>
    <displaynameid>62991</displaynameid>
    <status>UNOBTAINABLE</status>
    <effects>
      <effect type="Data" amount="-10.00" subtype="PopulationCapExtra" relativity="Absolute">
        <target type="Player">
        </target>
      </effect>	  
    </effects>
  </tech>

And this seems to work for triggers (although “Population Limit Delta” is the only field that seems to do anything):

Disabling and re-enabling techs/triggers over and over is the real problem. As far as I’m aware techs and triggers are one and done. That isn’t suitable for a capturable structure which might change hands a dozen times. I’m hoping I’m wrong about that and someone can explain how to make them toggle on and off.

Best I could do with only one off triggers is to make everyone start out with a higher pop ceiling and make losing the building trigger a tech that reduces the pop limit back to normal.

Option 4

I’m thinking there might also be an option 4 which uses the popdiscount of Kallankas.

<contain popdiscount="1">LogicalTypeLandEconomy</contain>

Either have it so you can put some vills in to temporary remove their pop and later overpop, or make some kind of special unit that’s always garrisoned inside and has a popdiscount higher than its actual population (if that’s even possible).

Hmmm…
In old scenarios , when you wanted to boost your units you just applied the same tech over and over again, so this shouldn’t be an issue ^^

Funny side note , there is a way in legacy to change the civ mid game , doing this removes all techs that the new civ doesn’t have lmao

I think you can work around the “one off” aspect of a tech either by making it infinite (there’s a flag for that but I don’t remember it), or by making it unobtainable before making it active again.

But then, there’s another problem: techs can’t be specific to a specific object, so if you have like 30 of these objects on the map, you would have to have like 30 techs. Which might be a problem. Or not.

2 Likes

Using infinite techs sounds like it might work for what I’m trying to accomplish as long as I can get trigger to activate it repeatedly. I wasn’t having any success trying to toggle them to be unobtainable but I could just be making a mistake in how to execute it.

Do you just mean I’d need to have different techs so they’d stack with more buildings? My intention is to have only 2 or 3 buildings so if I have to make 3 unique sets of techs or even 3 unique buildings that’s not too much of a problem.