Is there a way to change districts so I could build them instantly with use of gold?

Narvana

Chieftain
Joined
Nov 20, 2016
Messages
62
Districts.xml doesn't give any clear parameters, so I wonder if I can add something here?

Code:
<Row DistrictType="DISTRICT_CAMPUS" Name="LOC_DISTRICT_CAMPUS_NAME" Description="LOC_DISTRICT_CAMPUS_DESCRIPTION" PrereqTech="TECH_WRITING" PlunderType="PLUNDER_SCIENCE" PlunderAmount="25" AdvisorType="ADVISOR_TECHNOLOGY" Cost="60" CostProgressionModel="COST_PROGRESSION_NUM_UNDER_AVG_PLUS_TECH" CostProgressionParam1="25" Maintenance="1" RequiresPlacement="true" RequiresPopulation="true" Aqueduct="false" NoAdjacentCity="false" InternalOnly="false" ZOC="false" CaptureRemovesBuildings="false" CaptureRemovesCityDefenses="false" MilitaryDomain="NO_DOMAIN" CityStrengthModifier="2"/>
 
The districts table doesn't have a PurchaseYield column - which looks like an oversight to me.
 
There is a way, not a direct one though. Azteks can build districts with builders, you could use that.

Create a new unit, give it 1 build charge, MustPurchase for YIELD_GOLD. Create a new modifier with the ModifierType from the Aztek unique ability (MODIFIER_PLAYER_ADJUST_UNIT_DISTRICT_PERCENT) , attach that modifier to that unit for every player, and in ModifierArguments set the amount to 100. Then you have a unit that can only be bought with gold and can instant-build any district. Though I'm pretty sure the AI can't really use it, as always.
 
There is a way, not a direct one though. Azteks can build districts with builders, you could use that.

Create a new unit, give it 1 build charge, MustPurchase for YIELD_GOLD. Create a new modifier with the ModifierType from the Aztek unique ability (MODIFIER_PLAYER_ADJUST_UNIT_DISTRICT_PERCENT) , attach that modifier to that unit for every player, and in ModifierArguments set the amount to 100. Then you have a unit that can only be bought with gold and can instant-build any district. Though I'm pretty sure the AI can't really use it, as always.

Oh god, I'm sorry, but I have no idea how to do that... Whatever I try it ends up with game crash >.<
All the things you've mentioned I have to do in Units.xml?
 
No, that's not just Units.xml

Creating a new builder unit based on the existing builder, that has been done before, see Better Builders Mod. Copying what was done there should be easy.
The modifier part, not so sure. I said attach to the units, that was wrong, you just have to attach that modifier to the player.
This is how it's done in the Aztec DLC:
Code:
    <Types>
        <Row Type="CIVILIZATION_AZTEC" Kind="KIND_CIVILIZATION"/>
        <Row Type="TRAIT_CIVILIZATION_LEGEND_FIVE_SUNS" Kind="KIND_TRAIT" />
    </Types>
    <Traits>
        <Row TraitType="TRAIT_CIVILIZATION_LEGEND_FIVE_SUNS" Name="LOC_TRAIT_CIVILIZATION_LEGEND_FIVE_SUNS_NAME" Description="LOC_TRAIT_CIVILIZATION_LEGEND_FIVE_SUNS_DESCRIPTION"/>
    </Traits>
    <TraitModifiers>
        <Row>
            <TraitType>TRAIT_CIVILIZATION_LEGEND_FIVE_SUNS</TraitType>
            <ModifierId>TRAIT_BUILDER_DISTRICT_PERCENT</ModifierId>
        </Row>
    </TraitModifiers>
    <Modifiers>
        <Row>
            <ModifierId>TRAIT_BUILDER_DISTRICT_PERCENT</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_UNIT_DISTRICT_PERCENT</ModifierType>
        </Row>
    </Modifiers>
    <ModifierArguments>
        <Row>
            <ModifierId>TRAIT_BUILDER_DISTRICT_PERCENT</ModifierId>
            <Name>Amount</Name>
            <Value>20</Value>
        </Row>
    </ModifierArguments>

(...)

    <CivilizationTraits>
        <Row CivilizationType="CIVILIZATION_AZTEC" TraitType="TRAIT_CIVILIZATION_LEGEND_FIVE_SUNS"/>
    </CivilizationTraits>

What you need are the entries for the Modifiers, TraitModifiers and ModifierArguments tables. If you use TRAIT_LEADER_MAJOR_CIV as trait it should apply to any civ (if not you have to create a new civilization trait and give it to every civ), for ModifierId you just choose a new name like TRAIT_BUILDER_DISTRICT_COMPLETE, Amount set to 100 - and you should be done. If it's not that easy, then I can't help either.
 
Back
Top Bottom