Walls for other districts

Lukasdb

Chieftain
Joined
Feb 13, 2021
Messages
25
Hello everybody,

Continuing my adjustment to my civ i figured it would be a cool idea to have a religious district, that builds wall just like encampment. I want it to be civ specific and am not sure if I need to create a new DistrictType or if I can apply some modifier on holy site as a civ trait(not sure if possible). Am not sure on how to bite it honestly so any suggestions are welcome. Thanks in advance!
 
I did the exact same thing earlier with the Lavra. In the code to make a district defensible what I did was insert Hitpoints= "50". I also set PlunderType=No_Plunder.

Here's an example of the Encampment. The City center is Hitpoints="200". I made the Lavra 50, so it was easier to take than the Encampment.
Code:
<Row DistrictType="DISTRICT_ENCAMPMENT" Name="LOC_DISTRICT_ENCAMPMENT_NAME" Description="LOC_DISTRICT_ENCAMPMENT_DESCRIPTION" PrereqTech="TECH_BRONZE_WORKING" PlunderType="NO_PLUNDER" AdvisorType="ADVISOR_CONQUEST" Cost="54" CostProgressionModel="COST_PROGRESSION_NUM_UNDER_AVG_PLUS_TECH" CostProgressionParam1="40" Maintenance="1" RequiresPlacement="true" RequiresPopulation="true" Aqueduct="false" NoAdjacentCity="true" InternalOnly="false" ZOC="true" HitPoints="100" CaptureRemovesBuildings="true" CaptureRemovesCityDefenses="false" MilitaryDomain="DOMAIN_LAND" Appeal="-1" CityStrengthModifier="2"/>
 
Great! That resolves half of my challenge, it didn't cross my mind, that Hitpoints might add a wall honestly. Now question is how to make holy site have walls in just one civ :/
 
Now I understand. I was under the impression that it would be a unique Holy Site district. I'm not sure how to apply it to a regular Holy Site for one particular civ.
 
Ok, I thought of a little workaround. I can put Lavra in my civ, and remove it from Peter. It will make him weaker, but i don't care. Am trying to update Lavra data but it doesn't work for some reason. Any idea why? Here's the code

<Districts>
<Update>
<Where TraitType="TRAIT_CIVILIZATION_DISTRICT_LAVRA" DistrictType="DISTRICT_LAVRA" MilitaryDomain="NO_DOMAIN" CaptureRemovesCityDefenses="false" CaptureRemovesBuildings="false" ZOC="false" InternalOnly="false" NoAdjacentCity="false" Aqueduct="false" RequiresPopulation="true" RequiresPlacement="true" Cost="27" AdvisorType="ADVISOR_RELIGIOUS" PlunderType="PLUNDER_FAITH" Description="LOC_DISTRICT_LAVRA_DESCRIPTION" Name="LOC_DISTRICT_LAVRA_NAME" CityStrengthModifier="2" Appeal="1" AllowsHolyCity="true" Maintenance="1" CostProgressionParam1="40" CostProgressionModel="COST_PROGRESSION_NUM_UNDER_AVG_PLUS_TECH" PlunderAmount="25" PrereqTech="TECH_ASTROLOGY"/>
<Set TraitType="TRAIT_CIVILIZATION_DISTRICT_LAVRA" DistrictType="DISTRICT_LAVRA" MilitaryDomain="NO_DOMAIN" CaptureRemovesCityDefenses="false" CaptureRemovesBuildings="false" ZOC="false" InternalOnly="false" NoAdjacentCity="true" Aqueduct="false" RequiresPopulation="true" RequiresPlacement="true" Cost="54" AdvisorType="ADVISOR_CONQUEST" PlunderType="NO_PLUNDER" Description="LOC_DISTRICT_LAVRA_DESCRIPTION" Name="LOC_DISTRICT_LAVRA_NAME" CityStrengthModifier="2" Appeal="1" AllowsHolyCity="true" Maintenance="1" CostProgressionParam1="40" CostProgressionModel="COST_PROGRESSION_NUM_UNDER_AVG_PLUS_TECH" PrereqTech="TECH_ASTROLOGY" HitPoints="100"/>
</Update>
</Districts>
 
Don't make complicated Where clauses like that.
Code:
<Districts>
	<Update>
		<Where DistrictType="DISTRICT_LAVRA" />
		<Set Cost="54" AdvisorType="ADVISOR_CONQUEST" PlunderType="NO_PLUNDER" HitPoints="100"/>
	</Update>
</Districts>
The problem with such a complicated where clause is that if any other mod (or one of the expansions or dlc) alters any one bit of data before your update is attempted, the where clause will never be satisfied.

Also, for table "Districts", column DistrictType is the PrimaryKey for that table, so don't "Update" the value in that column under any circumstances. Only one row in the table can ever have
Code:
DistrictType="DISTRICT_LAVRA"
so there is no real need for the rest of the complicated matching in a where clause.
 
Noted, now it works and lavra has walls. It doesn't have the ability to defend like encampment or city center however. I wonder what makes it possible for a district to shoot.
 
Last edited:
Don't make complicated Where clauses like that.
Code:
<Districts>
    <Update>
        <Where DistrictType="DISTRICT_LAVRA" />
        <Set Cost="54" AdvisorType="ADVISOR_CONQUEST" PlunderType="NO_PLUNDER" HitPoints="100"/>
    </Update>
</Districts>
The problem with such a complicated where clause is that if any other mod (or one of the expansions or dlc) alters any one bit of data before your update is attempted, the where clause will never be satisfied.

Also, for table "Districts", column DistrictType is the PrimaryKey for that table, so don't "Update" the value in that column under any circumstances. Only one row in the table can ever have
Code:
DistrictType="DISTRICT_LAVRA"
so there is no real need for the rest of the complicated matching in a where clause.
Sory, am still a toddler when it comes to coding. I will keep that in mind for the future!
 
Back
Top Bottom