Loading a Savegame with a mod

XerbSys

Chieftain
Joined
Oct 5, 2010
Messages
19
Hello and sorry for presenting my next problem,

after finishing my mod I started a game and everything worked fine as I intended (The mod compiled without any error, loaded without any errors an it did within the game what it should). But when I try so load a saved game (saving worked fine), then the game just freezes. Uncle google told me, that there were problems like this shortly after the game was released, but that these problems were fixed.

Loading save games without my mod works fine.

I'm grateful for any ideas

Although it’s a bit long, that's the code I'm talking about.

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 7/12/2012 9:44:58 PM -->
<GameData>
	<Technologies>
		<!-- Technologische Entwicklung endet nach Atomzeitalter, FlaRa und Hubschrauber werden zusätzlich deaktiviert -->
		<Update>
			<Where Type="TECH_COMPUTERS"/>
			<Set Disable="true"/>
		</Update>
		<Update>
			<Where Type="TECH_ROCKETRY"/>
			<Set Disable="true"/>
		</Update>
		<Update>
			<Set Disable="1" />
			<Where Era="ERA_FUTURE" />
		</Update>
		<Update>
			<Set Disable="0" />
			<Where Type="TECH_FUTURE_TECH" />
		</Update>
	</Technologies>
	<Defines>
		<!-- Schnelleres leveln & mehr Erfahrung durch Barbaren -->
		<Update>
			<Where Name="BARBARIAN_MAX_XP_VALUE"/>
			<Set Value="100"/>
		</Update>
		<Update>
			<Where Name="EXPERIENCE_PER_LEVEL"/>
			<Set Value="4"/>
		</Update>
		<!-- Keine Unzufriedenheit durch Anzahl der Städte -->
		<Update>
			<Where Name="UNHAPPINESS_PER_CITY"/>
			<Set Value="0"/>
		</Update>
	</Defines>
	<Technology_PrereqTechs>
		<!-- Saubere Einbindung der Zukunftstechnologien -->
		<Delete TechType="TECH_FUTURE_TECH"/>
		<Row>
			<TechType>TECH_FUTURE_TECH</TechType>
			<PrereqTech>TECH_COMBINED_ARMS</PrereqTech>
		</Row>
	</Technology_PrereqTechs>
	<HandicapInfos>
		<!-- Weniger Unzufriedenheit durch hohe Bevölkerungszahlen -->
		<Update>
			<Where Type="HANDICAP_EMPEROR"/>
			<Set PopulationUnhappinessMod="75"/>
		</Update>
		<!-- Die AI kann leichter Einheiten bauen -->
		<Update>
			<Where Type="HANDICAP_EMPEROR"/>
			<Set AIBuildingCostPercent="75"/>
		</Update>
		<Update>
			<Where Type="HANDICAP_EMPEROR"/>
			<Set AIUnitCostPercent="75"/>
		</Update>
	</HandicapInfos>
<!-- PaK wird als Upgrade des Maschinengewehrs zur Stadtverteidigungseinheit gemacht -->
	<Units>	
		<Update>
			<Where Type="UNIT_MACHINE_GUN"/>
			<Set GoodyHutUpgradeUnitClass="UNITCLASS_ANTI_TANK_GUN"/>
		</Update>
		<Update>
			<Where Type="UNIT_MACHINE_GUN"/>
			<Set ObsoleteTech="TECH_COMBINED_ARMS"/>
		</Update>
		<Update>
			<Where Type="UNIT_ANTI_TANK_GUN"/>
			<Set RangedCombat="40"/>
		</Update>
		<Update>
			<Where Type="UNIT_ANTI_TANK_GUN"/>
			<Set Range="1"/>
		</Update>
		<Update>
			<Where Type="UNIT_ANTI_TANK_GUN"/>
			<Set CombatClass="UNITCOMBAT_ARCHER"/> 
		</Update>
	</Units>
<!-- Keine Reicheitenerhöhung mehr -->
	<UnitPromotions>
		<Delete Type="PROMOTION_RANGE"/>
	</UnitPromotions>	
<!-- Kleiner Nerf für das U-Boot, Buff für das Schlachtschiff -->
	<Units>
		<Update>
			<Where Type="UNIT_SUBMARINE"/>
			<Set Moves="4"/>
		</Update>
		<Update>
			<Where Type="UNIT_SUBMARINE"/>
			<Set Range="1"/>
		</Update>
	</Units>
	<UnitPromotions>
		<Row>
			<Type>PROMOTION_KING_OF_THE_SEA</Type>
			<Description>TXT_KEY_PROMOTION_KING_OF_THE_SEA</Description>
			<Help>TXT_KEY_PROMOTION_KING_OF_THE_SEA_HELP</Help>
			<LostWithUpgrade>true</LostWithUpgrade>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<PortraitIndex>59</PortraitIndex>
			<IconAtlas>ABILITY_ATLAS</IconAtlas>
			<PediaType>PEDIA_ATTRIBUTES</PediaType>
			<PediaEntry>TXT_KEY_PROMOTION_KING_OF_THE_SEA</PediaEntry>
		</Row>
	</UnitPromotions>
	<UnitPromotions_UnitCombatMods>
		<Row>
			<PromotionType>PROMOTION_KING_OF_THE_SEA</PromotionType>
			<UnitCombatType>UNITCOMBAT_NAVALMELEE</UnitCombatType>
			<Modifier>50</Modifier>
		</Row>
	</UnitPromotions_UnitCombatMods>
	<Unit_FreePromotions>
		<Row>
			<UnitType>UNIT_SUBMARINE</UnitType>
			<PromotionType>PROMOTION_CAN_MOVE_AFTER_ATTACKING</PromotionType>
		</Row>
		<Row>
			<UnitType>UNIT_BATTLESHIP</UnitType>
			<PromotionType>PROMOTION_KING_OF_THE_SEA</PromotionType>
		</Row>
	</Unit_FreePromotions>
<!-- Zusätzliche Beförderungen für Boden-Luft-Einheiten (FlaK, Zerstörer) -->
	<UnitPromotions>
		<Row>
			<Type>PROMOTION_INTERCEPTION_V</Type>
			<Description>TXT_KEY_PROMOTION_INTERCEPTION_V</Description>
			<Help>TXT_KEY_PROMOTION_INTERCEPTION_V</Help>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<InterceptChanceChange>75</InterceptChanceChange>
			<PortraitIndex>58</PortraitIndex>
			<IconAtlas>ABILITY_ATLAS</IconAtlas>
			<PediaType>PEDIA_ATTRIBUTES</PediaType>
			<PediaEntry>TXT_KEY_PROMOTION_INTERCEPTION_V</PediaEntry>
		</Row>
		<Update>
			<Where Type="PROMOTION_INTERCEPTION_1"/>
			<Set PromotionPrereqOr1="PROMOTION_INTERCEPTION_IV"/>
		</Update>
		<Update>
			<Where Type="PROMOTION_INTERCEPTION_1"/>
			<Set PromotionPrereqOr2="PROMOTION_INTERCEPTION_V"/>
		</Update>
	</UnitPromotions>
	<UnitPromotions_UnitCombats>
		<Row>
			<PromotionType>PROMOTION_INTERCEPTION_1</PromotionType>
			<UnitCombatType>UNITCOMBAT_GUN</UnitCombatType>
		</Row>
		<Row>
			<PromotionType>PROMOTION_INTERCEPTION_2</PromotionType>
			<UnitCombatType>UNITCOMBAT_GUN</UnitCombatType>
		</Row>
		<Row>
			<PromotionType>PROMOTION_INTERCEPTION_3</PromotionType>
			<UnitCombatType>UNITCOMBAT_GUN</UnitCombatType>
		</Row>
		<Row>
			<PromotionType>PROMOTION_INTERCEPTION_1</PromotionType>
			<UnitCombatType>UNITCOMBAT_NAVALMELEE</UnitCombatType>
		</Row>
		<Row>
			<PromotionType>PROMOTION_INTERCEPTION_2</PromotionType>
			<UnitCombatType>UNITCOMBAT_NAVALMELEE</UnitCombatType>
		</Row>
		<Row>
			<PromotionType>PROMOTION_INTERCEPTION_3</PromotionType>
			<UnitCombatType>UNITCOMBAT_NAVALMELEE</UnitCombatType>
		</Row>
		<Row>
			<PromotionType>PROMOTION_SORTIE</PromotionType>
			<UnitCombatType>UNITCOMBAT_GUN</UnitCombatType>
		</Row>
		<Row>
			<PromotionType>PROMOTION_SORTIE</PromotionType>
			<UnitCombatType>UNITCOMBAT_NAVALMELEE</UnitCombatType>
		</Row>
	</UnitPromotions_UnitCombats>
	<Unit_FreePromotions>
		<Update>
			<Where UnitType="UNIT_ANTI_AIRCRAFT_GUN" PromotionType="PROMOTION_INTERCEPTION_IV"/>
			<Set PromotionType="PROMOTION_INTERCEPTION_V"/>
		</Update>
		<Update>
			<Where UnitType="UNIT_DESTROYER" PromotionType="PROMOTION_INTERCEPTION_II"/>
			<Set PromotionType="PROMOTION_INTERCEPTION_V"/>
		</Update>
	</Unit_FreePromotions>
<!-- Buff für die "normale" Artillerie, da keine Rak-Ari zur Verfügung steht -->
	<Units>
		<Update>
			<Where Type="UNIT_ARTILLERY"/>
			<Set RangedCombat="50"/>
		</Update>
	</Units>
	<Unit_ClassUpgrades>
		<Update>
			<Where Unittype="UNIT_MACHINE_GUN"/>
			<Set UnitClassType="UNITCLASS_ANTI_TANK_GUN"/>
		</Update>
	</Unit_ClassUpgrades>
	<Buildings>
		<!-- Keine komischen Mauern -->
		<Update>
			<Where Type="BUILDING_WALLS"/>
			<Set CityWall="false"/>
		</Update>
		<Update>
			<Where Type="BUILDING_GREAT_WALL"/>
			<Set BorderObstacle="false"/>
		</Update>
	</Buildings>
<!-- Effektivität erfahrener Einheiten ist deutlich höher (zwei neue Beförderungen: "Veteran" für Landeinheiten, "Seebär" für Seeeinheiten -->
	<UnitPromotions>
		<Row>
			<Type>PROMOTION_VETERAN</Type>
			<Description>TXT_KEY_PROMOTION_VETERAN</Description>
			<Help>TXT_KEY_PROMOTION_VETERAN_HELP</Help>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<PromotionPrereqOr1>PROMOTION_DRILL_3</PromotionPrereqOr1>
			<PromotionPrereqOr2>PROMOTION_SHOCK_3</PromotionPrereqOr2>
			<OrderPriority>3</OrderPriority>
			<RoughAttack>45</RoughAttack>
			<RoughDefense>45</RoughDefense>
			<OpenAttack>45</OpenAttack>
			<OpenDefense>45</OpenDefense>
			<PortraitIndex>15</PortraitIndex>
			<IconAtlas>PROMOTION_ATLAS</IconAtlas>
			<PediaType>PEDIA_SHARED</PediaType>
			<PediaEntry>TXT_KEY_PROMOTION_VETERAN</PediaEntry>
		</Row>	
	</UnitPromotions>
	<UnitPromotions_UnitCombats>
		<Row>
			<PromotionType>PROMOTION_VETERAN</PromotionType>
			<UnitCombatType>UNITCOMBAT_MOUNTED</UnitCombatType>
		</Row>
		<Row>
			<PromotionType>PROMOTION_VETERAN</PromotionType>
			<UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType>
		</Row>
		<Row>
			<PromotionType>PROMOTION_VETERAN</PromotionType>
			<UnitCombatType>UNITCOMBAT_GUN</UnitCombatType>
		</Row>
		<Row>
			<PromotionType>PROMOTION_VETERAN</PromotionType>
			<UnitCombatType>UNITCOMBAT_ARMOR</UnitCombatType>
		</Row>
	</UnitPromotions_UnitCombats>
	<UnitPromotions>
		<Row>
			<Type>PROMOTION_SEA_DOG</Type>
			<Description>TXT_KEY_PROMOTION_SEA_DOG</Description>
			<Help>TXT_KEY_PROMOTION_SEA_DOG_HELP</Help>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<IconAtlas>PROMOTION_ATLAS</IconAtlas>
			<PortraitIndex>15</PortraitIndex>
			<PromotionPrereqOr1>PROMOTION_BOARDING_PARTY_3</PromotionPrereqOr1>
			<PromotionPrereqOr2>PROMOTION_COASTAL_RAIDER_3</PromotionPrereqOr2>
			<CityAttack>45</CityAttack>
			<CityAttackPlunderModifier>45</CityAttackPlunderModifier>
			<PediaType>PEDIA_NAVAL</PediaType>
			<PediaEntry>TXT_KEY_PROMOTION_SEA_DOG</PediaEntry>
		</Row>
	</UnitPromotions>
		<UnitPromotions_Domains>
		<Row>
			<PromotionType>PROMOTION_SEA_DOG</PromotionType>
			<DomainType>DOMAIN_SEA</DomainType>
			<Modifier>45</Modifier>
		</Row>
	</UnitPromotions_Domains>
	<UnitPromotions_UnitCombats>
		<Row>
			<PromotionType>PROMOTION_SEA_DOG</PromotionType>
			<UnitCombatType>UNITCOMBAT_NAVALMELEE</UnitCombatType>
		</Row>
	</UnitPromotions_UnitCombats>
	<!-- Abschwächung von Bombern gegen Seeeinheiten / Verbesserung der Jäger gegen Seeeinheiten -->
	<UnitPromotions_UnitCombatMods>
		<Row>
			<PromotionType>PROMOTION_NAVAL_PENALTY</PromotionType>
			<UnitCombatType>UNITCOMBAT_BOMBER</UnitCombatType>
			<Modifier>-50</Modifier>
		</Row>
	</UnitPromotions_UnitCombatMods>
	<Unit_FreePromotions>
		<Row>
			<UnitType>UNIT_BOMBER</UnitType>
			<PromotionType>PROMOTION_NAVAL_PENALTY</PromotionType>
		</Row>
		<Row>
			<UnitType>UNIT_AMERICAN_B17</UnitType>
			<PromotionType>PROMOTION_NAVAL_PENALTY</PromotionType>
		</Row>
		<Row>
			<UnitType>UNIT_STEALTH_BOMBER</UnitType>
			<PromotionType>PROMOTION_NAVAL_PENALTY</PromotionType>
		</Row>
	</Unit_FreePromotions>
	<UnitPromotions>
		<Delete Type="PROMOTION_AIR_TARGETING_1"/>
		<Row>
			<Type>PROMOTION_AIR_TARGETING_1</Type>
			<Description>TXT_KEY_PROMOTION_AIR_TARGETING_1</Description>
			<Help>TXT_KEY_PROMOTION_AIR_TARGETING_1_HELP</Help>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<PromotionPrereqOr1>PROMOTION_INTERCEPTION_1</PromotionPrereqOr1>
			<PromotionPrereqOr2>PROMOTION_DOGFIGHTING_1</PromotionPrereqOr2>
			<OrderPriority>3</OrderPriority>
			<PortraitIndex>52</PortraitIndex>
			<IconAtlas>PROMOTION_ATLAS</IconAtlas>
			<PediaType>PEDIA_AIR</PediaType>
			<PediaEntry>TXT_KEY_PROMOTION_AIR_TARGETING_1</PediaEntry>
		</Row>
	</UnitPromotions>
	<UnitPromotions_Domains>
		<Update>
			<Where PromotionType="PROMOTION_AIR_TARGETING_1"/>
			<Set Modifier="50"/>
		</Update>
		<Update>
			<Where PromotionType="PROMOTION_AIR_TARGETING_2"/>
			<Set Modifier="50"/>
		</Update>
	</UnitPromotions_Domains>
	<!-- Auch Jäger können Ausweichen -->
	<UnitPromotions>
		<Update>
			<Where Type="PROMOTION_EVASION"/>
			<Set PromotionPrereqOr1="PROMOTION_AIR_TARGETING_2"/>
		</Update>
	</UnitPromotions>
	<UnitPromotions_UnitCombats>	
		<Row>
			<PromotionType>PROMOTION_EVASION</PromotionType>
			<UnitCombatType>UNITCOMBAT_FIGHTER</UnitCombatType>
		</Row>
	</UnitPromotions_UnitCombats>
	<!-- Anpassung der modifizierten Beförderungen in der Civilopedia -->
	<Language_DE_DE>
		<Row Tag="TXT_KEY_PROMOTION_VETERAN">
			<Text>Veteran</Text>
		</Row>
		<Row Tag="TXT_KEY_PROMOTION_VETERAN_HELP">
			<Text>+45% Kampfstärke</Text>
		</Row>
		<Row Tag="TXT_KEY_PROMOTION_SEA_DOG">
			<Text>Seebär</Text>
		</Row>
		<Row Tag="TXT_KEY_PROMOTION_SEA_DOG_HELP">
			<Text>+45% Kampfstärke</Text>
		</Row>
		<Update>
			<Where Tag="TXT_KEY_PROMOTION_AIR_TARGETING_1_HELP"/>
			<Set Text="+50% [ICON_STRENGTH] Kampfstärke gegen [COLOR_POSITIVE_TEXT]Marineeinheiten[ENDCOLOR]."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_PROMOTION_AIR_TARGETING_2_HELP"/>
			<Set Text="+50% (insgesamt 100%) [ICON_STRENGTH] Kampfstärke gegen [COLOR_POSITIVE_TEXT]Marineeinheiten[ENDCOLOR]."/>
		</Update>
		<Row Tag="TXT_KEY_PROMOTION_WITHDRAW_BEFORE_MELEE_HELP">
			<Text>Wird die Einheit im Nahkampf angegriffen, so hat sie eine Chance vorher zurückzuweichen.</Text>
		</Row>
		<Row Tag="TXT_KEY_PROMOTION_WITHDRAW_BEFORE_MELEE">
			<Text>Rückzugsmöglichkeit vor Nahkampf</Text>
		</Row>
		<Row Tag="TXT_KEY_PROMOTION_KING_OF_THE_SEA">
			<Text>König der Weltmeere</Text>
		</Row>
		<Row Tag="TXT_KEY_PROMOTION_KING_OF_THE_SEA_HELP">
			<Text>Mit ihrer überlegenen Bordartillerie und ihrer mächtigen Panzerung sind Schlachtschiffe allen anderen Seeeinheiten in direkten Feuergefechten überlegen.</Text>
		</Row>
		<Row Tag="TXT_KEY_PROMOTION_INTERCEPTION_V">
			<Text>Abfangen (75)</Text>
		</Row>
	</Language_DE_DE>
</GameData>
 
Thanks a lot, that was the problem!

This leads me to my next question;

How to use "Delete" in the right way?

Lets say I going to edit the AIR_TARGETING_1 Promotion:

Code:
<Row>
			<Type>PROMOTION_AIR_TARGETING_1</Type>
			<Description>TXT_KEY_PROMOTION_AIR_TARGETING_1</Description>
			<Help>TXT_KEY_PROMOTION_AIR_TARGETING_1_HELP</Help>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<PromotionPrereqOr1>PROMOTION_INTERCEPTION_1</PromotionPrereqOr1>
			<PromotionPrereqOr2>PROMOTION_DOGFIGHTING_1</PromotionPrereqOr2>
			<PromotionPrereqOr3>PROMOTION_AIR_SIEGE_1</PromotionPrereqOr3>
			<PromotionPrereqOr4>PROMOTION_BOMBARDMENT_1</PromotionPrereqOr4>
			<OrderPriority>3</OrderPriority>
			<PortraitIndex>52</PortraitIndex>
			<IconAtlas>PROMOTION_ATLAS</IconAtlas>
			<PediaType>PEDIA_AIR</PediaType>
			<PediaEntry>TXT_KEY_PROMOTION_AIR_TARGETING_1</PediaEntry>
</Row>

And I want to get rid the the two lines
<PromotionPrereqOr3>PROMOTION_AIR_SIEGE_1</PromotionPrereqOr3>
<PromotionPrereqOr4>PROMOTION_BOMBARDMENT_1</PromotionPrereqOr4>

What I've tried is this:
Code:
<UnitPromotions>
		<Update>
			<Where PromotionType="PROMOTION_AIR_TARGETING_1"/>
			<Delete PromotionPrereqOr3="PROMOTION_AIR_SIEGE_1"/>
		</Update>
		<Update>
			<Where PromotionType="PROMOTION_AIR_TARGETING_1"/>
			<Delete PromotionPrereqOr4="PROMOTION_BOMBARDMENT_1"/>
		</Update>
</UnitPromotions>

which doesen't work at all.

Thanks again!
 
The game will also crash if you or the AI tries to create an English Longbowman, as they receive the Range promotion for free (and you've deleted it without also deleting any and all references to it).
 
Back
Top Bottom