Editing an existing civ

LividCynic

Chieftain
Joined
Jun 24, 2016
Messages
4
Hi guys, I've been trying to create/edit the existing Ottomans so they have:

  • Longbowmen
  • Ship of the Line
  • Siam's City State bonus(upped to 100%)

I tried doing stuff as on http://forums.civfanatics.com/showthread.php?t=490901, however it doesn't work.

The mod itself appears again but the changes I've made don't seem to appear, could someone please help me by editing or pointing out my mistakes?

http://www.filedropper.com/civ5mod1

Please help, I just want to play an OP ottoman civ :p
 
  1. We want a link to the mod itself as it is in the Game's MODS folder, not the Modbuddy Project Folder as you've linked to. See whoward69's zip your mods and attach tutorial.
  2. Your mistake is that you are not using the files from William's thread as templates to be adjusted when creating a new civilization but rather you are essentially direct-copying them with a few changes to settings here and there. This will not work because
    • You are attempting to redefine CIVILIZATION_OTTOMAN, LEADER_SULEIMAN, TRAIT_CITY_STATE_BONUSES, etc. This fails because the game already has definitions of these, and so rejects the entire contents of all your files.
    • You are not attempting to use <Updates> to change the existing civilization, leader, etc., you are attempting to re-state the defintiion of pre-existing information using <Row> structure. (see 'a' directly above)
    • Changing LEADER_SULEIMAN to use TRAIT_CITY_STATE_BONUSES would be all fine and good, but you are then attempting to change the definition of TRAIT_CITY_STATE_BONUSES. This will result in the changes made being applied to both LEADER_RAMKHAMHAENG and LEADER_SULEIMAN because both would then be using TRAIT_CITY_STATE_BONUSES. You would be better off just making changes via <Update> structure to TRAIT_CONVERTS_SEA_BARBARIANS.
  3. To add the Ship of the Line and the Longbowmen to the Ottomans, all that is needed is
    Code:
    <GameData>
    	<Civilization_UnitClassOverrides>
    		<Row>
    			<CivilizationType>CIVILIZATION_OTTOMAN</CivilizationType>
    			<UnitClassType>UNITCLASS_CROSSBOWMAN</UnitClassType>
    			<UnitType>UNIT_ENGLISH_LONGBOWMAN</UnitType>
    		</Row>
    		<Row>
    			<CivilizationType>CIVILIZATION_OTTOMAN</CivilizationType>
    			<UnitClassType>UNITCLASS_FRIGATE</UnitClassType>
    			<UnitType>UNIT_ENGLISH_SHIPOFTHELINE</UnitType>
    		</Row>
    	</Civilization_UnitClassOverrides>
    </GameData>
    <Row> rather than <Update> structure works for these two changes to the base-game data because CIVILIZATION_OTTOMAN does not already have any unique units from within the Crossbowman or Frigate Unit-Classes. If they did, then <Update> structure would have been required to apply the change(s) to that pre-existing data.
  4. To apply the city-state thing of LEADER_RAMKHAMHAENG to LEADER_SULEIMAN what is wanted is to apply the effects of TRAIT_CITY_STATE_BONUSES to TRAIT_CONVERTS_SEA_BARBARIANS.
    Code:
    <GameData>
    	<Traits>
    		<Update>
    			<Where Type="TRAIT_CONVERTS_SEA_BARBARIANS"/>
    			<Set>
    				<CityStateBonusModifier>100</CityStateBonusModifier>
    			</Set>
    		</Update>
    	</Traits>
    </GameData>
    Note this will not affect the in-game text related to Sulieman's Trait.
  5. Nothing else is really required when altering the existing Ottoman Civilization to make it have the additional effects mentioned in the OP
 
Hey, I read up on what you said and watched a few more videos on how to do this.

OK, well, this is literally my first coding thingy and what you gave above did indeed work, however, I tried working up on that by adding some more stuff:
Spoiler :
Code:
<GameData>
	<Civilization_UnitClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_OTTOMAN</CivilizationType>
			<UnitClassType>UNITCLASS_CROSSBOWMAN</UnitClassType>
			<UnitType>UNIT_ENGLISH_LONGBOWMAN</UnitType>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_OTTOMAN</CivilizationType>
			<UnitClassType>UNITCLASS_FRIGATE</UnitClassType>
			<UnitType>UNIT_ENGLISH_SHIPOFTHELINE</UnitType>
		</Row>
	</Civilization_UnitClassOverrides>
	<Traits>
		<Update>
			<Where Type="TRAIT_CONVERTS_SEA_BARBARIANS"/>
			<Set>
				<CityStateBonusModifier>100</CityStateBonusModifier>
			</Set>
			<Where Text="TXT_KEY_TRAIT_CONVERTS_SEA_BARBARIANS"/>
			<Set>
				<Text>City states befriend you out of fear! Increased [Icon Gold, [Icon Culture] and [Icon Food] gain by 100% and pay only half of your naval maintenance upkeep.</Text>
			</Set>
		</Update>
	</Traits>
	<Civilization_BuildingClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_OTTOMAN</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_MARKET</BuildingClassType>
			<BuildingType>BUILDING_BAZAAR</BuildingType>
		</Row>
	</Civilization_BuildingClassOverrides>
</GameData>


However, it doesn't work. Could you point out what's wrong with that? I'm going to continue on trying to find out the problem, but ^ above is the end goal at the moment.

EDIT: The reason it doesn't work is because of the text, do you know how to incorporate that? It's just aesthetics atm.
 
  1. This part fails because of multiple problems:
    Code:
    <GameData>
    	<Traits>
    		<Update>
    			<Where Type="TRAIT_CONVERTS_SEA_BARBARIANS"/>
    			<Set>
    				<CityStateBonusModifier>100</CityStateBonusModifier>
    			</Set>
    			[color="red"]<Where Text="TXT_KEY_TRAIT_CONVERTS_SEA_BARBARIANS"/>
    			<Set>
    				<Text>City states befriend you out of fear! Increased [Icon Gold, [Icon Culture] and [Icon Food] gain by 100% and pay only half of your naval maintenance upkeep.</Text>
    			</Set>[/color]
    		</Update>
    	</Traits>
    </GameData>
    • You can't have more than one "Where" or "Set" clause within one <Update>. The part Highlighted in red fails because of this.
    • There is no column called "Text" within game-table "Traits". The part highlighted in red will also fail because of this, even if it had not already failed because of the previous syntax error.
  2. You want the <Update> to the language tag to occur under table <Language_en_US>:
    Code:
    <GameData>
    	<Traits>
    		<Update>
    			<Where Type="TRAIT_CONVERTS_SEA_BARBARIANS"/>
    			<Set>
    				<CityStateBonusModifier>100</CityStateBonusModifier>
    			</Set>
    		</Update>
    	</Traits>
    	<Language_en_US>
    		<Update>
    			<Where [color="red"]Text[/color]="TXT_KEY_TRAIT_CONVERTS_SEA_BARBARIANS"/>
    			<Set>
    				<Text>City states befriend you out of fear! Increased [color="red"][Icon Gold, [Icon Culture] and [Icon Food][/color] gain by 100% and pay only half of your naval maintenance upkeep.</Text>
    			</Set>
    		</Update>
    	</Language_en_US>
    </GameData>
    However there are still two problems, highlighted again in red.
    • Nowhere within table <Language_en_US> are you going to find any row where the "Text" is equal to "TXT_KEY_TRAIT_CONVERTS_SEA_BARBARIANS". You need to be looking for 'Tag' being equal to that TXT_KEY string.
    • Your designations for inserting Icon Symbols into your text string are incorrect and won't show the Gold, Culture, or Food icons in-game: all that will show is the actual text as you have incorrectly entered it.
  3. The correct syntax for what you want to do is:
    Code:
    <GameData>
    	<Traits>
    		<Update>
    			<Where Type="TRAIT_CONVERTS_SEA_BARBARIANS"/>
    			<Set>
    				<CityStateBonusModifier>100</CityStateBonusModifier>
    			</Set>
    		</Update>
    	</Traits>
    	<Language_en_US>
    		<Update>
    			<Where Tag="TXT_KEY_TRAIT_CONVERTS_SEA_BARBARIANS"/>
    			<Set>
    				<Text>City states befriend you out of fear! Increased [ICON_GOLD] Gold, [ICON_CULTURE] Culture and [ICON_FOOD] Food gain by 100% and pay only half of your naval maintenance upkeep.</Text>
    			</Set>
    		</Update>
    	</Language_en_US>
    </GameData>
  4. The complete code thus becomes:
    Spoiler :
    Code:
    <GameData>
    	<Civilization_UnitClassOverrides>
    		<Row>
    			<CivilizationType>CIVILIZATION_OTTOMAN</CivilizationType>
    			<UnitClassType>UNITCLASS_CROSSBOWMAN</UnitClassType>
    			<UnitType>UNIT_ENGLISH_LONGBOWMAN</UnitType>
    		</Row>
    		<Row>
    			<CivilizationType>CIVILIZATION_OTTOMAN</CivilizationType>
    			<UnitClassType>UNITCLASS_FRIGATE</UnitClassType>
    			<UnitType>UNIT_ENGLISH_SHIPOFTHELINE</UnitType>
    		</Row>
    	</Civilization_UnitClassOverrides>
    	<Traits>
    		<Update>
    			<Where Type="TRAIT_CONVERTS_SEA_BARBARIANS"/>
    			<Set>
    				<CityStateBonusModifier>100</CityStateBonusModifier>
    			</Set>
    		</Update>
    	</Traits>
    	<Language_en_US>
    		<Update>
    			<Where Tag="TXT_KEY_TRAIT_CONVERTS_SEA_BARBARIANS"/>
    			<Set>
    				<Text>City states befriend you out of fear! Increased [ICON_GOLD] Gold, [ICON_CULTURE] Culture and [ICON_FOOD] Food gain by 100% and pay only half of your naval maintenance upkeep.</Text>
    			</Set>
    		</Update>
    	</Language_en_US>
    	<Civilization_BuildingClassOverrides>
    		<Row>
    			<CivilizationType>CIVILIZATION_OTTOMAN</CivilizationType>
    			<BuildingClassType>BUILDINGCLASS_MARKET</BuildingClassType>
    			<BuildingType>BUILDING_BAZAAR</BuildingType>
    		</Row>
    	</Civilization_BuildingClassOverrides>
    </GameData>
 
Hey! Thanks for the assistance, I managed to make everything but the text work until you posted. This is my 2nd attempt at trying just to solo-work on something I could enjoy!

Spoiler :
Code:
<GameData>
	<Civilization_UnitClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_INDONESIA</CivilizationType>
			<UnitClassType>UNITCLASS_CROSSBOWMAN</UnitClassType>
			<UnitType>UNIT_ENGLISH_LONGBOWMAN</UnitType>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_INDONESIA</CivilizationType>
			<UnitClassType>UNITCLASS_GALLEASS</UnitClassType>
			<UnitType>UNIT_VENETIAN_GALLEASS</UnitType>
		</Row>
	</Civilization_UnitClassOverrides>
	<Traits>
		<Update>
			<Where Type="TRAIT_SPICE"/>
			<Set>
				<CityStateBonusModifier>100</CityStateBonusModifier>
			</Set>
		</Update>
	</Traits>
	<Traits>
		<Update>
			<Where Type="TRAIT_SPICE"/>
			<Set>
				<UniqueLuxuryCities>8</UniqueLuxuryCities>
			</Set>
		</Update>
	</Traits>
	<Language_en_US>
		<Update>
			<Where Tag="TXT_KEY_TRAIT_SPICE"/>
			<Set>
				<Text>Your continous trading has made city state take a liking to you! Increased [ICON_GOLD] Gold, [ICON_CULTURE] Culture and [ICON_FOOD] Food gain by 100% and your first 8 cities will have 2 unique tradeable luxuries.</Text>
			</Set>
		</Update>
	</Language_en_US>
	<Civilization_BuildingClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_INDONESIA</CivilizationType>
			<BuildingClassType>BUILDING_BANK</BuildingClassType>
			<BuildingType>BUILDING_HANSE</BuildingType>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_INDONESIA</CivilizationType>
			<BuildingClassType>BUILDING_MONUMENT</BuildingClassType>
			<BuildingType>BUILDING_STELE</BuildingType>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_INDONESIA</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_MARKET</BuildingClassType>
			<BuildingType>BUILDING_BAZAAR</BuildingType>
		</Row>
	</Civilization_BuildingClassOverrides>
	
</GameData>

Everything above works, however one thing pops up - the Stele and the Hanse don't pop up inside the tech tree and Monument+ Bank still remain as normal. Any idea why?

Here's a picture btw that shows that it works ingame:
Spoiler :
 
Because this:
Code:
<Civilization_BuildingClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_INDONESIA</CivilizationType>
			<BuildingClassType>[B][COLOR="Red"]BUILDING_BANK[/COLOR][/B]</BuildingClassType>
			<BuildingType>BUILDING_HANSE</BuildingType>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_INDONESIA</CivilizationType>
			<BuildingClassType>[COLOR="Red"][B]BUILDING_MONUMENT[/B][/COLOR]</BuildingClassType>
			<BuildingType>BUILDING_STELE</BuildingType>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_INDONESIA</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_MARKET</BuildingClassType>
			<BuildingType>BUILDING_BAZAAR</BuildingType>
		</Row>
	</Civilization_BuildingClassOverrides>
There's no such buildingclass as either of these... but there is a BUILDINGCLASS_MONUMENT and BUILDINGCLASS_BANK!

EDIT: Haha! I have managed to evade ninjation by LeeS :D
 
Top Bottom