Free building upon civic completion

sclera

Chieftain
Joined
Nov 13, 2013
Messages
25
I'm making a custom civ whose bonus requires a unique building (the bonus is related to city proximity to the capital). However, the building cannot be constructable by the player, and I need it to be built instantly in the capital as soon as the player has finished researching a civic (say political philosophy now, although that is subject to change).

Does anyone know if this is possible? I've tried a few things, including using the modifiers that certain great people have, creating my own modifier, looking at Persia's code for reference (they get a free trade route at PolPhil so all that Requirement stuff was useful to read).
 
Welp, I did it. For anyone trying to achieve a similar thing, there's a table called CivicModifiers. You can create a modifier, then add it to the CivicModifiers table and link it with the civic you want like this:

Code:
<CivicModifiers>
        <Row>
            <CivicType>CIVIC_CODE_OF_LAWS</CivicType>
            <ModifierId>MODIFIER_RL_GRANT_MAYAPALACE_AT_POL</ModifierId>
        </Row>
</CivicModifiers>

As long as the modifier itself grants a building that is linked to your civilization's trait, then it won't automatically get built by other civs.

If anyone has any questions about how I did this just ask and I'll try to answer, although I should say that I'm still very much in the learning process.
 
Top Bottom