Help with a promotion showing up without prerequisites

RogerBacon

King
Joined
Nov 16, 2003
Messages
649
I have a promotion that takes another as a prerequisite but it shows up as available for selection even without the prerequisites. In this case the FEAR promotion shows up as selectable even if the unit has no other promotions. I've tried every combination of <PromotionPrereq>, <PromotionPrereqOr1>, and <PromotionPrereqOr2> but it always shows up no matter what.
This file and all the otehr files for the mod are in civ4\Beyond the Sword\Mods\Shogun\assets\Modules\Shogun. My promotions file is named Shogun_CIV4PromotionInfos.xml and it uses the XML schema Shogun_CIV4UnitSchema.xml. I've added in my new promotion and Combat1-6 because before I added Combat1-6 they did not show up as available. Any help would be appreciated. It's been 3 years since I did Civ modding and I didn't think it would be this difficult getting back into it. XML is supposed to be the easy part. :(

Code:
<PromotionInfo>
			<Type>PROMOTION_FEAR</Type>
			<Description>TXT_KEY_PROMOTION_FEAR</Description>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<LayerAnimationPath>NONE</LayerAnimationPath>
			<PromotionPrereq>PROMOTION_BUSHIDO3</PromotionPrereq>
			<PromotionPrereqOr1>PROMOTION_BUSHIDO3</PromotionPrereqOr1>
			<PromotionPrereqOr2>PROMOTION_BUSHIDO3</PromotionPrereqOr2>
			<TechPrereq>NONE</TechPrereq>
			<StateReligionPrereq>NONE</StateReligionPrereq>
			<bLeader>0</bLeader>
			<bBlitz>0</bBlitz>
			<bAmphib>0</bAmphib>
			<bRiver>0</bRiver>
			<bEnemyRoute>1</bEnemyRoute>
			<bAlwaysHeal>0</bAlwaysHeal>
			<bHillsDoubleMove>0</bHillsDoubleMove>
			<bImmuneToFirstStrikes>0</bImmuneToFirstStrikes>
			<iVisibilityChange>0</iVisibilityChange>
			<iMovesChange>0</iMovesChange>
			<iMoveDiscountChange>0</iMoveDiscountChange>
			<iAirRangeChange>0</iAirRangeChange>
			<iInterceptChange>0</iInterceptChange>
			<iEvasionChange>0</iEvasionChange>
			<iWithdrawalChange>0</iWithdrawalChange>
			<iCargoChange>0</iCargoChange>
			<iCollateralDamageChange>0</iCollateralDamageChange>
			<iBombardRateChange>0</iBombardRateChange>
			<iFirstStrikesChange>0</iFirstStrikesChange>
			<iChanceFirstStrikesChange>0</iChanceFirstStrikesChange>
			<iEnemyHealChange>0</iEnemyHealChange>
			<iNeutralHealChange>0</iNeutralHealChange>
			<iFriendlyHealChange>0</iFriendlyHealChange>
			<iSameTileHealChange>0</iSameTileHealChange>
			<iAdjacentTileHealChange>0</iAdjacentTileHealChange>
			<iCombatPercent>0</iCombatPercent>
			<iCityAttack>0</iCityAttack>
			<iCityDefense>0</iCityDefense>
			<iHillsAttack>0</iHillsAttack>
			<iHillsDefense>0</iHillsDefense>
			<iKamikazePercent>0</iKamikazePercent>
			<iRevoltProtection>0</iRevoltProtection>
			<iCollateralDamageProtection>0</iCollateralDamageProtection>
			<iPillageChange>0</iPillageChange>
			<iUpgradeDiscount>0</iUpgradeDiscount>
			<iExperiencePercent>0</iExperiencePercent>
			<TerrainAttacks/>
			<TerrainDefenses/>
			<FeatureAttacks/>
			<FeatureDefenses/>
			<UnitCombatMods/>
			<DomainMods/>
			<TerrainDoubleMoves/>
			<FeatureDoubleMoves/>
			<UnitCombats>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_MOUNTED</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_GUN</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_ARMOR</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
			</UnitCombats>
			<HotKey/>
			<bAltDown>0</bAltDown>
			<bShiftDown>0</bShiftDown>
			<bCtrlDown>0</bCtrlDown>
			<iHotKeyPriority>0</iHotKeyPriority>
			<Button>Modules/Shogun/Fear.dds</Button>
		</PromotionInfo>
 
I believe there is some error with PromotionInfos.xml when used as a modular file, so that it overwrites promotions in the actual file.

Edit the actual file instead of using a module and it should work.
 
OK, thanks.

Another question. I've got a file with one new tech in it (also modular). When I include this file the game crashes as soon as the tech selection screen comes up. Anything look unusual with this file?

Code:
<?xml version="1.0"?>
<!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Soren Johnson (Firaxis Games) -->
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Jon Shafer (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- Tech Infos -->
<Civ4TechInfos xmlns="x-schema:Shogun_CIV4TechnologiesSchema.xml">
	<TechInfos>
		<TechInfo>
			<Type>TECH_BUSHIDO</Type>
			<Description>Bushido</Description>
			<Civilopedia>TXT_KEY_TECH_FEUDALISM_PEDIA</Civilopedia>
			<Help/>
			<Strategy>TXT_KEY_TECH_FEUDALISM_STRATEGY</Strategy>
			<Advisor>ADVISOR_ECONOMY</Advisor>
			<iAIWeight>0</iAIWeight>
			<iAITradeModifier>10</iAITradeModifier>
			<iCost>700</iCost>
			<iAdvancedStartCost>100</iAdvancedStartCost>
			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
			<Era>ERA_MEDIEVAL</Era>
			<FirstFreeUnitClass>NONE</FirstFreeUnitClass>
			<iFeatureProductionModifier>0</iFeatureProductionModifier>
			<iWorkerSpeedModifier>0</iWorkerSpeedModifier>
			<iTradeRoutes>0</iTradeRoutes>
			<iHealth>1</iHealth>
			<iHappiness>1</iHappiness>
			<iFirstFreeTechs>0</iFirstFreeTechs>
			<iAsset>24</iAsset>
			<iPower>0</iPower>
			<bRepeat>0</bRepeat>
			<bTrade>1</bTrade>
			<bDisable>0</bDisable>
			<bGoodyTech>0</bGoodyTech>
			<bExtraWaterSeeFrom>0</bExtraWaterSeeFrom>
			<bMapCentering>0</bMapCentering>
			<bMapVisible>0</bMapVisible>
			<bMapTrading>0</bMapTrading>
			<bTechTrading>0</bTechTrading>
			<bGoldTrading>0</bGoldTrading>
			<bOpenBordersTrading>0</bOpenBordersTrading>
			<bDefensivePactTrading>0</bDefensivePactTrading>
			<bPermanentAllianceTrading>0</bPermanentAllianceTrading>
			<bVassalTrading>1</bVassalTrading>
			<bBridgeBuilding>0</bBridgeBuilding>
			<bIrrigation>0</bIrrigation>
			<bIgnoreIrrigation>0</bIgnoreIrrigation>
			<bWaterWork>0</bWaterWork>
			<iGridX>7</iGridX>
			<iGridY>10</iGridY>
			<DomainExtraMoves/>
			<CommerceFlexible/>
			<TerrainTrades/>
			<bRiverTrade>0</bRiverTrade>
			<Flavors>
				<Flavor>
					<FlavorType>FLAVOR_MILITARY</FlavorType>
					<iFlavor>5</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_PRODUCTION</FlavorType>
					<iFlavor>6</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_CULTURE</FlavorType>
					<iFlavor>2</iFlavor>
				</Flavor>
			</Flavors>
			<OrPreReqs>
				<PrereqTech>TECH_MONARCHY</PrereqTech>
			</OrPreReqs>
			<AndPreReqs>
				<PrereqTech>TECH_WRITING</PrereqTech>
			</AndPreReqs>
			<Quote>TXT_KEY_TECH_FEUDALISM_QUOTE</Quote>
			<Sound>AS2D_TECH_FEUDALISM</Sound>
			<SoundMP>AS2D_TECH_MP_FEUDALISM</SoundMP>
			<Button>,Art/Interface/Buttons/TechTree/Feudalism.dds,Art/Interface/Buttons/TechTree_Atlas.dds,1,10</Button>
		</TechInfo>
	</TechInfos>
</Civ4TechInfos>
 
I found for some unfathomable reason that modular techs did not work as well when I tried it and got a similar error.
 
Back
Top Bottom