1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Free building upon civic completion

Discussion in 'Civ6 - Creation & Customization' started by sclera, Nov 8, 2017.

  1. sclera

    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).
     
  2. sclera

    sclera Chieftain

    Joined:
    Nov 13, 2013
    Messages:
    25
    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.
     
    racha likes this.

Share This Page