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.