Modifying Resource limits on Unit Building

pastyboyz

Chieftain
Joined
Dec 27, 2005
Messages
9
Location
earth
Has anybody found out how to remove the required resource limit on buidling units ? Example Phlanix needs copper or iron to build.

In Civ 3, you modify the BIC file to remove the restriction. Is this Mod or is this available in the standard editor you get with the game ?

I am trying to evaluate this before buying Civ 4.
 
pastyboyz said:
Has anybody found out how to remove the required resource limit on buidling units ? Example Phlanix needs copper or iron to build.

In Civ 3, you modify the BIC file to remove the restriction. Is this Mod or is this available in the standard editor you get with the game ?

I am trying to evaluate this before buying Civ 4.

Wrong forum, and yes, this is easy to do.
 
It would be nice if you explained how. Anyway, thread moved.

Go to C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Assets\XML\Units (or where ever your Civ4 game is), and look for this piece of code in the CIV4UnitInfos.xml file:

Code:
			<PrereqBonuses>
				<BonusType>BONUS_COPPER</BonusType>
				<BonusType>BONUS_IRON</BonusType>
				<BonusType>NONE</BonusType>
				<BonusType>NONE</BonusType>
			</PrereqBonuses>


It'll be right below the unit you want to change. i.e.

Code:
		<UnitInfo>
			<Class>UNITCLASS_AXEMAN</Class>
			<Type>UNIT_AXEMAN</Type>
			<UniqueNames/>
			<Special>NONE</Special>
			<Capture>NONE</Capture>
			<Combat>UNITCOMBAT_MELEE</Combat>
			<Domain>DOMAIN_LAND</Domain>
			<DefaultUnitAI>UNITAI_COUNTER</DefaultUnitAI>
			<Invisible>NONE</Invisible>
			<SeeInvisible>NONE</SeeInvisible>
			<Description>TXT_KEY_UNIT_AXEMAN</Description>
			<Civilopedia>TXT_KEY_UNIT_AXEMAN_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_UNIT_AXEMAN_STRATEGY</Strategy>
			<Advisor>ADVISOR_MILITARY</Advisor>
			<bAnimal>0</bAnimal>
			<bFood>0</bFood>
			<bNoBadGoodies>0</bNoBadGoodies>
			<bOnlyDefensive>0</bOnlyDefensive>
			<bNoCapture>0</bNoCapture>
			<bRivalTerritory>0</bRivalTerritory>
			<bMilitaryHappiness>1</bMilitaryHappiness>
			<bMilitarySupport>1</bMilitarySupport>
			<bMilitaryProduction>1</bMilitaryProduction>
			<bPillage>1</bPillage>
			<bSabotage>0</bSabotage>
			<bDestroy>0</bDestroy>
			<bStealPlans>0</bStealPlans>
			<bInvestigate>0</bInvestigate>
			<bCounterSpy>0</bCounterSpy>
			<bFound>0</bFound>
			<bGoldenAge>0</bGoldenAge>
			<bInvisible>0</bInvisible>
			<bFirstStrikeImmune>0</bFirstStrikeImmune>
			<bNoDefensiveBonus>0</bNoDefensiveBonus>
			<bIgnoreBuildingDefense>0</bIgnoreBuildingDefense>
			<bCanMoveImpassable>0</bCanMoveImpassable>
			<bFlatMovementCost>0</bFlatMovementCost>
			<bIgnoreTerrainCost>0</bIgnoreTerrainCost>
			<bNukeImmune>0</bNukeImmune>
			<bPrereqBonuses>0</bPrereqBonuses>
			<bPrereqReligion>0</bPrereqReligion>
			<bMechanized>0</bMechanized>
			<UnitClassUpgrades>
				<UnitClassUpgrade>
					<UnitClassUpgradeType>UNITCLASS_MACEMAN</UnitClassUpgradeType>
					<bUnitClassUpgrade>1</bUnitClassUpgrade>
				</UnitClassUpgrade>
			</UnitClassUpgrades>
			<UnitAIs>
				<UnitAI>
					<UnitAIType>UNITAI_ATTACK</UnitAIType>
					<bUnitAI>1</bUnitAI>
				</UnitAI>
				<UnitAI>
					<UnitAIType>UNITAI_RESERVE</UnitAIType>
					<bUnitAI>1</bUnitAI>
				</UnitAI>
				<UnitAI>
					<UnitAIType>UNITAI_COUNTER</UnitAIType>
					<bUnitAI>1</bUnitAI>
				</UnitAI>
				<UnitAI>
					<UnitAIType>UNITAI_CITY_COUNTER</UnitAIType>
					<bUnitAI>1</bUnitAI>
				</UnitAI>
			</UnitAIs>
			<NotUnitAIs/>
			<Builds/>
			<ReligionSpreads/>
			<GreatPeoples/>
			<Buildings/>
			<ForceBuildings/>
			<HolyCity>NONE</HolyCity>
			<ReligionType>NONE</ReligionType>
			<StateReligion>NONE</StateReligion>
			<PrereqReligion>NONE</PrereqReligion>
			<PrereqBuilding>NONE</PrereqBuilding>
			<PrereqTech>TECH_BRONZE_WORKING</PrereqTech>
			<TechTypes/>
			<BonusType>NONE</BonusType>
			<PrereqBonuses>
				<BonusType>BONUS_COPPER</BonusType>
				<BonusType>BONUS_IRON</BonusType>
				<BonusType>NONE</BonusType>
				<BonusType>NONE</BonusType>
			</PrereqBonuses>

You'd simply remove BONUS_COPPER with NONE.

Note that there's 4 slots. There may or may not be an area that tells the game how many slots to look for. (could be in GlobalDefines.xml, or the CIV4UnitInfos xml schema)

Dynamic coding is fun, isn't it? ;)
 
Thanks, for the example and the explaination.
Looks easy but tedious.
 
Back
Top Bottom