• Civilization 7 has been announced. For more info please check the forum here .

New Modder

Joined
Apr 17, 2007
Messages
399
Hello, I just finished reading sthurlow.com's Civilization IV Python tutorial (http://www.sthurlow.com/python/lesson01/) and I'd like to start modding my game! For instance...I want to remove Warriors' +25% City Defense bonus. I think it makes no sense.

Where is the program code? How do I do this? I looked at the Tutorial section, but only found the guide that says specifically that it does not address the technical challenges. Can anyone point me in the right direction please??
 
Hello, I just finished reading sthurlow.com's Civilization IV Python tutorial (http://www.sthurlow.com/python/lesson01/) and I'd like to start modding my game! For instance...I want to remove Warriors' +25% City Defense bonus. I think it makes no sense.

Where is the program code? How do I do this? I looked at the Tutorial section, but only found the guide that says specifically that it does not address the technical challenges. Can anyone point me in the right direction please??

Just change the BOLD area then in Civ4UnitInfos:;)

Spoiler :
<UnitInfo>
<Class>UNITCLASS_WARRIOR</Class>
<Type>UNIT_WARRIOR</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>NONE</Capture>
<Combat>UNITCOMBAT_MELEE</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
<Invisible>NONE</Invisible>
<SeeInvisible>NONE</SeeInvisible>
<Description>TXT_KEY_UNIT_WARRIOR</Description>
<Civilopedia>TXT_KEY_UNIT_WARRIOR_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_WARRIOR_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_AXEMAN</UnitClassUpgradeType>
<bUnitClassUpgrade>1</bUnitClassUpgrade>
</UnitClassUpgrade>
<UnitClassUpgrade>
<UnitClassUpgradeType>UNITCLASS_SPEARMAN</UnitClassUpgradeType>
<bUnitClassUpgrade>1</bUnitClassUpgrade>
</UnitClassUpgrade>
</UnitClassUpgrades>
<UnitClassTargets/>
<UnitCombatTargets/>
<UnitClassDefenders/>
<UnitCombatDefenders/>
<UnitAIs>
<UnitAI>
<UnitAIType>UNITAI_ATTACK</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</UnitAIs>
<NotUnitAIs>
<UnitAI>
<UnitAIType>UNITAI_CITY_DEFENSE</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</NotUnitAIs>
<Builds/>
<ReligionSpreads/>
<GreatPeoples/>
<Buildings/>
<ForceBuildings/>
<HolyCity>NONE</HolyCity>
<ReligionType>NONE</ReligionType>
<StateReligion>NONE</StateReligion>
<PrereqReligion>NONE</PrereqReligion>
<PrereqBuilding>NONE</PrereqBuilding>
<PrereqTech>NONE</PrereqTech>
<TechTypes/>
<BonusType>NONE</BonusType>
<PrereqBonuses/>
<ProductionTraits/>
<Flavors/>
<iAIWeight>0</iAIWeight>
<iCost>15</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iMinAreaSize>-1</iMinAreaSize>
<iMoves>1</iMoves>
<iAirRange>0</iAirRange>
<iNukeRange>-1</iNukeRange>
<iWorkRate>0</iWorkRate>
<iBaseDiscover>0</iBaseDiscover>
<iDiscoverMultiplier>0</iDiscoverMultiplier>
<iBaseHurry>0</iBaseHurry>
<iHurryMultiplier>0</iHurryMultiplier>
<iBaseTrade>0</iBaseTrade>
<iTradeMultiplier>0</iTradeMultiplier>
<iGreatWorkCulture>0</iGreatWorkCulture>
<TerrainImpassables/>
<FeatureImpassables/>
<iCombat>2</iCombat>
<iAirCombat>0</iAirCombat>
<iAirCombatLimit>0</iAirCombatLimit>
<iXPValueAttack>4</iXPValueAttack>
<iXPValueDefense>2</iXPValueDefense>
<iFirstStrikes>0</iFirstStrikes>
<iChanceFirstStrikes>0</iChanceFirstStrikes>
<iInterceptionProbability>0</iInterceptionProbability>
<iEvasionProbability>0</iEvasionProbability>
<iWithdrawalProb>0</iWithdrawalProb>
<iCollateralDamage>0</iCollateralDamage>
<iCollateralDamageLimit>0</iCollateralDamageLimit>
<iCollateralDamageMaxUnits>0</iCollateralDamageMaxUnits>
<iCityAttack>0</iCityAttack>
<iCityDefense>25</iCityDefense>
<iAnimalCombat>0</iAnimalCombat>
<iHillsAttack>0</iHillsAttack>
<iHillsDefense>0</iHillsDefense>
<TerrainNatives/>
<FeatureNatives/>
<TerrainDefenses/>
<FeatureDefenses/>
<UnitClassAttackMods/>
<UnitClassDefenseMods/>
<UnitCombatMods/>
<UnitCombatCollateralImmunes/>
<DomainMods/>
<BonusProductionModifiers/>
<iBombRate>0</iBombRate>
<iBombardRate>0</iBombardRate>
<SpecialCargo>NONE</SpecialCargo>
<DomainCargo>NONE</DomainCargo>
<iCargo>0</iCargo>
<iConscription>1</iConscription>
<iCultureGarrison>3</iCultureGarrison>
<iExtraCost>0</iExtraCost>
<iAsset>1</iAsset>
<iPower>1</iPower>
<UnitMeshGroups>
<iGroupSize>3</iGroupSize>
<fMaxSpeed>1.75</fMaxSpeed>
<iMeleeWaveSize>3</iMeleeWaveSize>
<iRangedWaveSize>0</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>8</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_WARRIOR</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<Button>,Art/Interface/Buttons/Units/Warrior.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,2,1</Button>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<FreePromotions/>
<LeaderPromotion>NONE</LeaderPromotion>
<iLeaderExperience>0</iLeaderExperience>
</UnitInfo>
 
Is there a way I can put it in a mod instead of changing the core game?

Also - where is that file that I should change?
 
To use a mod, create a folder in C:\Program Files\Firaxis Games\Civilization IV\Mods. The file you need to edit is in C:\Program Files\Firaxis Games\Civilization IV\Assets\XML\Units. Just copy the file to C:\Program Files\Firaxis Games\Civilization IV\Mods\YourModFolder\Assets\XML\Units, then edit it.
 
A little off-topic, but my take in the city defense bonus is this:

In The Civilopedia they say the warrior is basically a militia, and militia would definitely fight harder if there homes were in danger..

Ah well, hope you are very successful in your endeavors!
 
That's why there's a Cultural Bonus no?

I definitely would like to discuss realistic unit stats. Is this the right place for that?
 
To use a mod, create a folder in C:\Program Files\Firaxis Games\Civilization IV\Mods. The file you need to edit is in C:\Program Files\Firaxis Games\Civilization IV\Assets\XML\Units. Just copy the file to C:\Program Files\Firaxis Games\Civilization IV\Mods\YourModFolder\Assets\XML\Units, then edit it.

I don't understand. I didn't have a C:\Program Files\Firaxis Games. I went to the Start Menu and copied it to Program Files. In Firaxis Games is Firaxis Games\Sid Meier's Civilization IV. There is no Assets in it; only shortcuts to the game, the Readme and the website.

EDIT - I think I found it. It's in My Documents\My Games...There is still no Assets but there is a CustomAssets so I assume that's it.

There's nothing under Units. It's blank.
 
Open My Computer, double-click on Local Disk, then Program Files, then Firaxis Games, then Sid Meier's Civilization 4, then Assets, etc.

CustomAssets is a place you can store modified XML and stuff so that it will load into the game by default, not through a mod.
 
Finally found the files. They were in different folders than I was told here AND the master folder was Hidden! Bizaare.
 
Top Bottom