[GS] [RESOLVED] Diplomatiuc Quarter Issues

Social_Mech

Chieftain
Joined
Feb 8, 2021
Messages
28
Hello,
I'm trying to make a mod that makes the Diplomatic Quarter similar to other districts. Adjacency bonuses, citizen slots, can build more than one, all that good ol' horsehockey.
I got everything working as intended OTHER THAN the fact that, for some reason, the Consulate and Chancery become unattached to the district. They cannot be built via Production when you are choosing what you want your city to produce, but they can be built with gold, even if you do not have a Diplomatic Quarter in the city. When you buy the building, the game crashes.
I do not alter the Buildings table, so both the Consulate and Chancery still have:
(PrereqDistrict="DISTRICT_DIPLOMATIC_QUARTER")
I use the following syntax for the district.
Code:
<Delete DistrictType="DISTRICT_DIPLOMATIC_QUARTER"/>
        <Row DistrictType="DISTRICT_DIPLOMATIC_QUARTER" Name="LOC_DISTRICT_DIPLOMATIC_QUARTER_NAME" Description="LOC_DISTRICT_DIPLOMATIC_QUARTER_DESCRIPTION" PrereqTech="TECH_MATHEMATICS" PlunderType="PLUNDER_CULTURE" PlunderAmount="25" AdvisorType="ADVISOR_GENERIC" Cost="30" 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" CaptureRemovesDistrict="false" MilitaryDomain="NO_DOMAIN" CityStrengthModifier="2"/>
The only thing I change with the district is removing the (MaxPerPlayer="1") and changing the "CaptureRemovesDistrict" to false.
I change a few other things with the buildings but those are all on the Modifier tables.
I'm not sure why the game is crashing. Any ideas?

UPDATE:

It appears as though this issue happens if I simply reference the district at all. It occurs when I Delete or Replace. It occurs even if I keep "MaxPerPlayer" in (I tried changing it to "2"). It occurs even if I replace the line with the SAME EXACT line of syntax (literally no changes at all). It just doesn't like this line of code screwed with at all.

When I commented my line of syntax out, everything worked perfectly (other than not having more than one Diplo Quarter of course). I have no idea what the hell is happening...
 
Last edited:
Try
Code:
<GameData>
	<Districts>
		<Update>
			<Where DistrictType="DISTRICT_DIPLOMATIC_QUARTER" />
			<Set MaxPerPlayer="-1" CaptureRemovesDistrict="false" />
		</Update>
	</Districts>
</GameData>
This should keep the game from disconnecting the district from the buildings when the district is deleted. Deleting content from a primary table like Districts is not a good idea. You will also want to remove or alter the modifiers associated to the district that are intended to be one-time effects.
 
Try
Code:
<GameData>
    <Districts>
        <Update>
            <Where DistrictType="DISTRICT_DIPLOMATIC_QUARTER" />
            <Set MaxPerPlayer="-1" CaptureRemovesDistrict="false" />
        </Update>
    </Districts>
</GameData>
This should keep the game from disconnecting the district from the buildings when the district is deleted. Deleting content from a primary table like Districts is not a good idea. You will also want to remove or alter the modifiers associated to the district that are intended to be one-time effects.
OMG It worked!!! Thank you so much! =D
I really appreciate this. You're the best.
 
Back
Top Bottom