Anyone knows how to remove wonders for certain civilization?

godlywolf

Chieftain
Joined
Oct 21, 2016
Messages
6
Hi friends,

I'm trying to write a mod to remove wonders for certain civilization. My mod works perfectly fine in both Civ 5 and Civ BE.

<GameData>
<Civilization_BuildingClassOverrides>
<Row>
<CivilizationType>CIVILIZATION_AMERICA</CivilizationType>
<BuildingClassType>BUILDINGCLASS_STONEHENGE</BuildingClassType>
<BuildingType/>
</Row>
<Row>
<CivilizationType>CIVILIZATION_AMERICA</CivilizationType>
<BuildingClassType>BUILDINGCLASS_HANGING_GARDENS</BuildingClassType>
<BuildingType/>
</Row>

... ...
</Civilization_BuildingClassOverrides>
</GameData>

However, it doesn't work in Civ 6. Has the syntax changed?
 
Civ6 uses quite different structure of data in XML. So it's not just so simple as copying code from Civ5 to Civ6. And if you do want to create something for Civ6, reading its code helps. Code used by the vanilla game and mods however follow the same rule. Since the DLL file of Civ6 has not been released yet, it may be a must to read XML from the Civ6 game files and guess what we can do at current moment.
 
Civ6 uses quite different structure of data in XML. So it's not just so simple as copying code from Civ5 to Civ6. And if you do want to create something for Civ6, reading its code helps. Code used by the vanilla game and mods however follow the same rule. Since the DLL file of Civ6 has not been released yet, it may be a must to read XML from the Civ6 game files and guess what we can do at current moment.


Thank you so much for your reply. I'll try to read the XML. But please tell me if you have a easy way to accomplish my aim. ^_^
 
Thank you so much for your reply. I'll try to read the XML. But please tell me if you have a easy way to accomplish my aim. ^_^
Wonders are banned for barbarians and citystates in Civ5. I haven't paid any attention to this in Civ6, but I guess reading their codes (in Civilizations.xml, if following the rules from Civ5) may help. Sorry but I'm not at home now so I cannot search it for you.
 
If all else fails, look into the Unique Buildings that some civs have which override other default buildings (for some reason I'm blanking and the only example I have in mind is Japan's Electronics Factory). The replace/override function there might be usable to "replace" the Wonder for certain civs with a dummy wonder with unattainable requirements. Not an ideal solution, but it would have the right gameplay effect.
 
Wonders are banned for barbarians and citystates in Civ5. I haven't paid any attention to this in Civ6, but I guess reading their codes (in Civilizations.xml, if following the rules from Civ5) may help. Sorry but I'm not at home now so I cannot search it for you.

I searched all XML files but didn't find relative codes which ban wonders for barbs and citystates. Maybe it's not in XML files?
BTW, you are in USTC? Could you please add me (66718889)?
 
If all else fails, look into the Unique Buildings that some civs have which override other default buildings (for some reason I'm blanking and the only example I have in mind is Japan's Electronics Factory). The replace/override function there might be usable to "replace" the Wonder for certain civs with a dummy wonder with unattainable requirements. Not an ideal solution, but it would have the right gameplay effect.

Thank you very much. That is an ingenious idea! Hopefully, I can replace wonders with nothing, which is equivalent to banning them
 
Keeping Barbarians and Minor Civs from building wonders is now done through this table. But the effect applies for all "civs" of the given level.
Code:
<CivilizationLevels>
	<Row CivilizationLevelType="CIVILIZATION_LEVEL_TRIBE" CanFoundCities="false"
		CanAnnexTilesWithCulture="false" CanAnnexTilesWithGold="false"
		CanAnnexTilesWithReceivedInfluence="false" CanEarnGreatPeople="false"
		CanGiveInfluence="false" CanReceiveInfluence="false"
		CanBuildWonders="false" StartingTilesForCity="0"
		IgnoresUnitStrategicResourceRequirements="true"/>

	<Row CivilizationLevelType="CIVILIZATION_LEVEL_CITY_STATE" CanFoundCities="false"
		CanAnnexTilesWithCulture="false" CanAnnexTilesWithGold="false"
		CanAnnexTilesWithReceivedInfluence="true" CanEarnGreatPeople="false"
		CanGiveInfluence="false" CanReceiveInfluence="true"
		CanBuildWonders="false" StartingTilesForCity="5"
		IgnoresUnitStrategicResourceRequirements="true"/>

	<Row CivilizationLevelType="CIVILIZATION_LEVEL_FULL_CIV" CanFoundCities="true"
		CanAnnexTilesWithCulture="true" CanAnnexTilesWithGold="true"
		CanAnnexTilesWithReceivedInfluence="false" CanEarnGreatPeople="true"
		CanGiveInfluence="true" CanReceiveInfluence="false"
		CanBuildWonders="true" StartingTilesForCity="6"
		IgnoresUnitStrategicResourceRequirements="false"/>
</CivilizationLevels>
Barbarians are the "CIVILIZATION_LEVEL_TRIBE" and all city-states are the "CIVILIZATION_LEVEL_CITY_STATE". They are all locked from building wonders by
Code:
CanBuildWonders="false"
But you cannot use this for "CIVILIZATION_LEVEL_FULL_CIV" because it would apply to all major civilizations, human and AI.

Creating a Unique and Unbuildable version of a wonder for Civ_X is probably possible using the <BuildingReplaces> table, but this requires quite a bit of work for each such unbuildable wonder because you must create a Civilization-Trait for the custom version of the building, and attach that custom civilization-trait both to the building and the civilization.

Quite frankly in my opinion this is a case where Firaxis had the system done correctly for Civ5 via BuildingClasses and UnitClasses and then they proceeded to discard this fundamentally-simpler system in favor of the new and rather kludgey system, both for Buildings/Wonders and for Units.
 
Posting from phone so sorry for lack of details. Look at how religions unlock buildings using a Modifier. Set all the Wonders so they are unbuildable, using those same mechanics. Then assign that Modifier to the Major Civ level using a subjectrequirementset of that only allows it to apply to whatever civs.
 
Any luck? I was attempting the same thing...

Many thanks to @Tokata_RuNeLess. Based on her suggestion, I created a trait which replaces each wonder with a corresponding unique and unbuildable dummy. So any civilization with this trait cannot build wonders any more.

Please feel free to modify my code. Hope it helps. ^_^
 

Attachments

  • Trait_No_Wonderes_GameplayData.xml
    13.8 KB · Views: 208
And if you want to work without dummies, you could just make every wonder available exclusively to civs with a certain trait, and give that trait to every civilization except those that you don't want to allow to build those wonders.
 
And if you want to work without dummies, you could just make every wonder available exclusively to civs with a certain trait, and give that trait to every civilization except those that you don't want to allow to build those wonders.

That's actually the smartest way to go about it. Forget my advice above, this one would would be the way I'd go. :)
 
Unzip the attached mod and copy the unzipped version into your game's MODS folder.

The mod is a template mod for the inexperienced mod-maker. You just drop your changes into the pre-provided files. There is a pre-provided example building in the xml files.

this is a thing William Howard did for Civ5. It is not my original idea.

apparently the game does not like something I did. I'll have to figure out what it is and re-post the mod.

game did not like either my file names or my instructions on what to do with the files.
 

Attachments

  • MyCiv6Changes.zip
    2 KB · Views: 195
Last edited:
And if you want to work without dummies, you could just make every wonder available exclusively to civs with a certain trait, and give that trait to every civilization except those that you don't want to allow to build those wonders.

That sounds like a good idea. Could you please tell me how to make a wonder available exclusively?
I tried
<Buildings>
<Row BuildingType="BUILDING_STONEHENGE" TraitType="TRAIT_TEST"/>
</Buildings>
But it doesn't work.

BTW, I updated to Update.4 (v1.0.0.129) but cannot start a new game with my mode (in #12 of this thread) on. It worked perfectly for the last three updates. Do you have any clue?

Thank you
 
Last edited:
Top Bottom