ArbitraryGuy
Rusty Shackleford?
- Joined
- Jul 11, 2003
- Messages
- 1,076
Modding Civics: A Crash Course v. 1.1
Disclaimer: Never edit the origional files. Make a mod to experiment or back up the origionals!
The following will give you a brief, crash course in editing the civics options for Civ 4. It's written by me, ArbitraryGuy. It may assume that you know a little bit about modding already. First, the main file to edit:
/GameInfo/Civ4CivicInfos.xml
This is the main file for editing civics. You may edit the existing civics, or add on your own. Just make sure you put in "inside" a <CivicInfo> ... </CivicInfo>. The following is what goes on inside of it and a description of what each value does:
---------------------------
<CivicInfo>
To "open" a new civic.
<CivicOptionType>CIVICOPTION_GOVERNMENT</CivicOptionType>
The type of civic this option is. The types are listed in Civ4CivicOptionInfos.xml.
<Type>CIVIC_DESPOTISM</Type>
How the civic is tagged throughout the XML. You can change these if you wish, or add more... but you'll have to edit more files (see bottom). For ease, I'd just keep them the same, if possible.
<Description>TXT_KEY_CIVIC_DESPOTISM</Description>
replace "TXT...DESPOTISM" with the name of your civic
<Civilopedia>TXT_KEY_CIVIC_DESPOTISM_PEDIA</Civilopedia>
replace "TXT...DESPOTISM" with the desired civilopedia text (or none)
<Strategy>TXT_KEY_CIVIC_DESPOTISM_STRATEGY</Strategy>
replace "TXT...DESPOTISM" with the tool tip text in the civics menu (or none)
<Button>,Art/Interface/Buttons/Civics/testism.dds,Art/Interface/Buttons/Civics_Civilizations_Religions_Atlas.dds,5,1</Button>
I don't know what the first file does (it doesn't show up ever in the game, AFAIK), but the second file looks up the icons for the civic in the civics_civilizations_religions_atlas.dds file. Here, it returns the icon in the 5th column, 1st row Edit the file w/ a dds editor and change these coordinates if needed to change the picture.
<TechPrereq>NONE</TechPrereq>
Replace "NONE" with the key of the required tech. e.g. TECH_MONARCHY or TECH_CONSTITUTION.
<iAnarchyLength>1</iAnarchyLength>
How long anarchy lasts when switching to this civic
<Upkeep>UPKEEP_LOW</Upkeep>
UPKEEP_LOW, UPKEEP_MEDIUM, UPKEEP_HIGH... pretty self explanitory.
<iAIWeight>0</iAIWeight>
I don't know what this does.
<iGreatPeopleRateModifier>0</iGreatPeopleRateModifier>
% bonus to great people production in each city. Put in values like 50, 23, 18, etc...
<iStateReligionGreatPeopleRateModifier>0</iStateReligionGreatPeopleRateModifier>
% bonus to great people production in a city w/ the state religion. Put in whole numbers.
<iDistanceMaintenanceModifier>0</iDistanceMaintenanceModifier>
% increase/decrease in distance maintenance costs (positive or negavite values okay)
<iNumCitiesMaintenanceModifier>0</iNumCitiesMaintenanceModifier>
% increase/decrease in # of cities part of maintenenance costs (+/- values okay)
<iExtraHealth>0</iExtraHealth>
# of extra health per city
<iFreeExperience>0</iFreeExperience>
# of free XP new units receive
<iWorkerSpeedModifier>0</iWorkerSpeedModifier>
% worker speed. Put in whole numbers. I'm guessing negative is okay.
<iImprovementUpgradeRateModifier>0</iImprovementUpgradeRateModifier>
Is the modifier for cottage, hamlet, village, etc growth rates.
<iMilitaryProductionModifier>0</iMilitaryProductionModifier>
% bonus to military production spead (+/- probably okay)
<iBaseFreeUnits>0</iBaseFreeUnits>
# of base free units
<iBaseFreeMilitaryUnits>0</iBaseFreeMilitaryUnits>
# of base free military units
<iFreeUnitsPopulationPercent>0</iFreeUnitsPopulationPercent>
Free units based on population
<iFreeMilitaryUnitsPopulationPercent>0</iFreeMilitaryUnitsPopulationPercent>
Free military units based on population
<iGoldPerUnit>0</iGoldPerUnit>
Cost in gold per unit per turn (negative doesn't work... i.e. getting paid for units)
<iGoldPerMilitaryUnit>0</iGoldPerMilitaryUnit>
Cost in gold per military unit per turn (negative doesn't work... i.e. getting paid for units)
<iHappyPerMilitaryUnit>0</iHappyPerMilitaryUnit>
# of happy faces created in a city per stationed military unit (negative has wierd effects)
<bMilitaryFoodProduction>0</bMilitaryFoodProduction>
Food produces military units (like workers, settlers?)
<iMaxConscript>0</iMaxConscript>
# of units you may conscript per turn
<bNoUnhealthyPopulation>0</bNoUnhealthyPopulation>
1=yes, 0=no
<bBuildingOnlyHealthy>0</bBuildingOnlyHealthy>
?Eliminates unhealthiness from buildings? 1=yes, 0-no
<iLargestCityHappiness>0</iLargestCityHappiness>
# of happy faces created in your largest cities
<iWarWearinessModifier>0</iWarWearinessModifier>
% change in war weariness unhappiness. +/- values okay, use whole numbers
<iFreeSpecialist>0</iFreeSpecialist>
# of free specialists per city
<iTradeRoutes>0</iTradeRoutes>
# of extra trade routes per city
<bNoForeignTrade>0</bNoForeignTrade>
1=yes (no foreign trade), 0=no (foreign trade allowed)
<iCivicPercentAnger>0</iCivicPercentAnger>
Causes unhappiness in civs w/o this civic. Emancipation has this value set to 400. What the exact value means, I don't know.
<bStateReligion>0</bStateReligion>
? This has a value of 1 for all the religion choices... it may enable a state religion.
<bNoNonStateReligionSpread>0</bNoNonStateReligionSpread>
With a value 1, there will be no spread of state religions.
<iStateReligionHappiness>0</iStateReligionHappiness>
Happiness caused in a city with the state religion.
<iNonStateReligionHappiness>0</iNonStateReligionHappiness>
Happiness caused in a city with religion other than state. Negative values may or may not cause unhappiness... I tried it and on the civics screen it said -1 unhappiness... needs further testing of negative values.
<iStateReligionUnitProductionModifier>0</iStateReligionUnitProductionModifier>
% unit production bonus in cities with state religion. e.g. 50, 75, 1000.
<iStateReligionBuildingProductionModifier>0</iStateReligionBuildingProductionModifier>
% building production bonus in cities with state religion. e.g. 50, 75, 1000.
<iStateReligionFreeExperience>0</iStateReligionFreeExperience>
# of free experience new units get in a city with the state religion.
<YieldModifiers/>
Changes production bonuses for food, commerce, and shields in each city. Replace this with the following to get an effect (be sure to remove my comments):
<YieldModifiers>
<iYield>0</iYield> ;food % bonus
<iYield>0</iYield> ;hammers % bonus
<iYield>0</iYield> ;commerce % bonus
</YieldModifiers>
<CapitalYieldModifiers/>
Yield modifiers for the capital city. See above but add "Capital" on the opening and closing lines. (NOT ON THE iYield lines)
<TradeYieldModifiers/>
??? Don't know yet... haven't experimented with it.
<CommerceModifiers/>
Changes science, culture, and tax level bonuses in each city. Replace with the following to get an effect (be sure to remove my comments):
<CommerceModifiers>
<iCommerce>0</iCommerce> ;% bonus to taxes
<iCommerce>0</iCommerce> ;% bonus to science
<iCommerce>0</iCommerce> ;% bonus to culture
</CommerceModifiers>
<CapitalCommerceModifiers/>
Changes science, culture, and tax level bonuses for the capital. I'm pretty sure that it's similar as above, but add in "capital" on the opening and closing lines (NOT on the icommerce lines)
<SpecialistExtraCommerces/>
Adds extra commerce for specialists, e.g. each specialist produses. Implement as follows using integers rather than % (else each priest would have, like +50 culture).
<SpecialistExtraCommerces>
<iCommerce>0</iCommerce> ;# bonus to tax per specialist
<iCommerce>0</iCommerce> ;# bonus to science per specialist
<iCommerce>0</iCommerce> ;# bonus to culture per specialist
</SpecialistExtraCommerces>
<Hurrys/>
For hurrying.
For gold:
<Hurry>
<HurryType>HURRY_GOLD</HurryType>
<bHurry>1</bHurry>
</Hurry>
For pop rushing:
<Hurry>
<HurryType>HURRY_POPULATION</HurryType>
<bHurry>1</bHurry>
</Hurry>
<SpecialBuildingNotRequireds/>
Makes monestaries not required for missionaries. Haven't experimented with others. Here's what that looks like:
<SpecialBuildingNotRequireds>
<SpecialBuildingNotRequired> <SpecialBuildingType>SPECIALBUILDING_MONASTERY</SpecialBuildingType>
<bNotRequired>1</bNotRequired>
</SpecialBuildingNotRequired>
</SpecialBuildingNotRequireds>
<SpecialistValids/>
Enables unlimeted specialists of various types in cities (like Caste System). Put in as may as you'd like. Example:
<SpecialistValids>
<SpecialistValid>
<SpecialistType>SPECIALIST_ARTIST</SpecialistType>
<bValid>1</bValid>
</SpecialistValid>
</SpecialistValids>
Try it with ARTIST, MERCHANT, SCIENTIST, PRIEST, ENGINEER. I think those should all work.
<BuildingHappinessChanges/>
Buildings make more happiness. I haven't experimented with unhappiness, but I'm interested to know if it'd work.
Example (make the palace give 400 happiness):
<BuildingHappinessChanges>
<BuildingHappinessChange>
<BuildingType>BUILDING_PALACE</BuildingType>
<iHappinessChange>400</iHappinessChange>
</BuildingHappinessChange>
</BuildingHappinessChanges>
Just put in a valid building name and you're all set.
<FeatureHappinessChanges/>
Happiness from terrian. Yea! Example:
<FeatureHappinessChange>
<FeatureType>FEATURE_JUNGLE</FeatureType>
<iHappinessChange>1</iHappinessChange>
</FeatureHappinessChange>
Haven't experimented with other terrains (other than the ones for environmental economic civic) yet, but it should work.
<ImprovementYieldChanges/>
Makes worker improvements produce more stuff. Don't use comments, though.
<ImprovementYieldChanges>
<ImprovementYieldChange>
<ImprovementType>IMPROVEMENT_WORKSHOP</ImprovementType>
<ImprovementYields>
<iYield>1</iYield> ;# of extra food
<iYield>0</iYield> ; # of extra shields
<iYield>0</iYield> ; # of extra commerce??
</ImprovementYields>
</ImprovementYieldChange>
</ImprovementYieldChanges>
<WeLoveTheKing>TXT_KEY_CIVIC_WE_LOVE_DESPOT</WeLoveTheKing>
Replace "TXT...DESPOT" with new text the "We love the XXXXXX" day.
</CivicInfo>
To close the civic.
-----------------------------------
Important, other files you MAY HAVE TO EDIT the following
/GameInfo/Civ4CivicOptionInfos.xml
Changing the name of civics catagories. Just change the descriptions with normal text. I wouldn't mess around with the option types.
Note: If you change any <Type>'s or add new ones, make sure you do the proper adjustments to the following files. Or you may need to adjust them for your scenario anyway:
/GameInfo/Civ4VoteInfo.xml
To change civics appearing in UN resolutions.
/Civilizations/Civ4LeaderHeadInfos.xml
To change perfered (favorite) civics.
/Civilizations/Civ4CivilizationInfos.xml
To change default (beginning game) civics.
Well, that's it. Let me know if I left out anything, or if I'm totally wrong about something. If you know what one of the things does that I don't... please inform me. Thanks, and happy modding!
Disclaimer: Never edit the origional files. Make a mod to experiment or back up the origionals!
The following will give you a brief, crash course in editing the civics options for Civ 4. It's written by me, ArbitraryGuy. It may assume that you know a little bit about modding already. First, the main file to edit:
/GameInfo/Civ4CivicInfos.xml
This is the main file for editing civics. You may edit the existing civics, or add on your own. Just make sure you put in "inside" a <CivicInfo> ... </CivicInfo>. The following is what goes on inside of it and a description of what each value does:
---------------------------
<CivicInfo>
To "open" a new civic.
<CivicOptionType>CIVICOPTION_GOVERNMENT</CivicOptionType>
The type of civic this option is. The types are listed in Civ4CivicOptionInfos.xml.
<Type>CIVIC_DESPOTISM</Type>
How the civic is tagged throughout the XML. You can change these if you wish, or add more... but you'll have to edit more files (see bottom). For ease, I'd just keep them the same, if possible.
<Description>TXT_KEY_CIVIC_DESPOTISM</Description>
replace "TXT...DESPOTISM" with the name of your civic
<Civilopedia>TXT_KEY_CIVIC_DESPOTISM_PEDIA</Civilopedia>
replace "TXT...DESPOTISM" with the desired civilopedia text (or none)
<Strategy>TXT_KEY_CIVIC_DESPOTISM_STRATEGY</Strategy>
replace "TXT...DESPOTISM" with the tool tip text in the civics menu (or none)
<Button>,Art/Interface/Buttons/Civics/testism.dds,Art/Interface/Buttons/Civics_Civilizations_Religions_Atlas.dds,5,1</Button>
I don't know what the first file does (it doesn't show up ever in the game, AFAIK), but the second file looks up the icons for the civic in the civics_civilizations_religions_atlas.dds file. Here, it returns the icon in the 5th column, 1st row Edit the file w/ a dds editor and change these coordinates if needed to change the picture.
<TechPrereq>NONE</TechPrereq>
Replace "NONE" with the key of the required tech. e.g. TECH_MONARCHY or TECH_CONSTITUTION.
<iAnarchyLength>1</iAnarchyLength>
How long anarchy lasts when switching to this civic
<Upkeep>UPKEEP_LOW</Upkeep>
UPKEEP_LOW, UPKEEP_MEDIUM, UPKEEP_HIGH... pretty self explanitory.
<iAIWeight>0</iAIWeight>
I don't know what this does.
<iGreatPeopleRateModifier>0</iGreatPeopleRateModifier>
% bonus to great people production in each city. Put in values like 50, 23, 18, etc...
<iStateReligionGreatPeopleRateModifier>0</iStateReligionGreatPeopleRateModifier>
% bonus to great people production in a city w/ the state religion. Put in whole numbers.
<iDistanceMaintenanceModifier>0</iDistanceMaintenanceModifier>
% increase/decrease in distance maintenance costs (positive or negavite values okay)
<iNumCitiesMaintenanceModifier>0</iNumCitiesMaintenanceModifier>
% increase/decrease in # of cities part of maintenenance costs (+/- values okay)
<iExtraHealth>0</iExtraHealth>
# of extra health per city
<iFreeExperience>0</iFreeExperience>
# of free XP new units receive
<iWorkerSpeedModifier>0</iWorkerSpeedModifier>
% worker speed. Put in whole numbers. I'm guessing negative is okay.
<iImprovementUpgradeRateModifier>0</iImprovementUpgradeRateModifier>
Is the modifier for cottage, hamlet, village, etc growth rates.
<iMilitaryProductionModifier>0</iMilitaryProductionModifier>
% bonus to military production spead (+/- probably okay)
<iBaseFreeUnits>0</iBaseFreeUnits>
# of base free units
<iBaseFreeMilitaryUnits>0</iBaseFreeMilitaryUnits>
# of base free military units
<iFreeUnitsPopulationPercent>0</iFreeUnitsPopulationPercent>
Free units based on population
<iFreeMilitaryUnitsPopulationPercent>0</iFreeMilitaryUnitsPopulationPercent>
Free military units based on population
<iGoldPerUnit>0</iGoldPerUnit>
Cost in gold per unit per turn (negative doesn't work... i.e. getting paid for units)
<iGoldPerMilitaryUnit>0</iGoldPerMilitaryUnit>
Cost in gold per military unit per turn (negative doesn't work... i.e. getting paid for units)
<iHappyPerMilitaryUnit>0</iHappyPerMilitaryUnit>
# of happy faces created in a city per stationed military unit (negative has wierd effects)
<bMilitaryFoodProduction>0</bMilitaryFoodProduction>
Food produces military units (like workers, settlers?)
<iMaxConscript>0</iMaxConscript>
# of units you may conscript per turn
<bNoUnhealthyPopulation>0</bNoUnhealthyPopulation>
1=yes, 0=no
<bBuildingOnlyHealthy>0</bBuildingOnlyHealthy>
?Eliminates unhealthiness from buildings? 1=yes, 0-no
<iLargestCityHappiness>0</iLargestCityHappiness>
# of happy faces created in your largest cities
<iWarWearinessModifier>0</iWarWearinessModifier>
% change in war weariness unhappiness. +/- values okay, use whole numbers
<iFreeSpecialist>0</iFreeSpecialist>
# of free specialists per city
<iTradeRoutes>0</iTradeRoutes>
# of extra trade routes per city
<bNoForeignTrade>0</bNoForeignTrade>
1=yes (no foreign trade), 0=no (foreign trade allowed)
<iCivicPercentAnger>0</iCivicPercentAnger>
Causes unhappiness in civs w/o this civic. Emancipation has this value set to 400. What the exact value means, I don't know.
<bStateReligion>0</bStateReligion>
? This has a value of 1 for all the religion choices... it may enable a state religion.
<bNoNonStateReligionSpread>0</bNoNonStateReligionSpread>
With a value 1, there will be no spread of state religions.
<iStateReligionHappiness>0</iStateReligionHappiness>
Happiness caused in a city with the state religion.
<iNonStateReligionHappiness>0</iNonStateReligionHappiness>
Happiness caused in a city with religion other than state. Negative values may or may not cause unhappiness... I tried it and on the civics screen it said -1 unhappiness... needs further testing of negative values.
<iStateReligionUnitProductionModifier>0</iStateReligionUnitProductionModifier>
% unit production bonus in cities with state religion. e.g. 50, 75, 1000.
<iStateReligionBuildingProductionModifier>0</iStateReligionBuildingProductionModifier>
% building production bonus in cities with state religion. e.g. 50, 75, 1000.
<iStateReligionFreeExperience>0</iStateReligionFreeExperience>
# of free experience new units get in a city with the state religion.
<YieldModifiers/>
Changes production bonuses for food, commerce, and shields in each city. Replace this with the following to get an effect (be sure to remove my comments):
<YieldModifiers>
<iYield>0</iYield> ;food % bonus
<iYield>0</iYield> ;hammers % bonus
<iYield>0</iYield> ;commerce % bonus
</YieldModifiers>
<CapitalYieldModifiers/>
Yield modifiers for the capital city. See above but add "Capital" on the opening and closing lines. (NOT ON THE iYield lines)
<TradeYieldModifiers/>
??? Don't know yet... haven't experimented with it.
<CommerceModifiers/>
Changes science, culture, and tax level bonuses in each city. Replace with the following to get an effect (be sure to remove my comments):
<CommerceModifiers>
<iCommerce>0</iCommerce> ;% bonus to taxes
<iCommerce>0</iCommerce> ;% bonus to science
<iCommerce>0</iCommerce> ;% bonus to culture
</CommerceModifiers>
<CapitalCommerceModifiers/>
Changes science, culture, and tax level bonuses for the capital. I'm pretty sure that it's similar as above, but add in "capital" on the opening and closing lines (NOT on the icommerce lines)
<SpecialistExtraCommerces/>
Adds extra commerce for specialists, e.g. each specialist produses. Implement as follows using integers rather than % (else each priest would have, like +50 culture).
<SpecialistExtraCommerces>
<iCommerce>0</iCommerce> ;# bonus to tax per specialist
<iCommerce>0</iCommerce> ;# bonus to science per specialist
<iCommerce>0</iCommerce> ;# bonus to culture per specialist
</SpecialistExtraCommerces>
<Hurrys/>
For hurrying.
For gold:
<Hurry>
<HurryType>HURRY_GOLD</HurryType>
<bHurry>1</bHurry>
</Hurry>
For pop rushing:
<Hurry>
<HurryType>HURRY_POPULATION</HurryType>
<bHurry>1</bHurry>
</Hurry>
<SpecialBuildingNotRequireds/>
Makes monestaries not required for missionaries. Haven't experimented with others. Here's what that looks like:
<SpecialBuildingNotRequireds>
<SpecialBuildingNotRequired> <SpecialBuildingType>SPECIALBUILDING_MONASTERY</SpecialBuildingType>
<bNotRequired>1</bNotRequired>
</SpecialBuildingNotRequired>
</SpecialBuildingNotRequireds>
<SpecialistValids/>
Enables unlimeted specialists of various types in cities (like Caste System). Put in as may as you'd like. Example:
<SpecialistValids>
<SpecialistValid>
<SpecialistType>SPECIALIST_ARTIST</SpecialistType>
<bValid>1</bValid>
</SpecialistValid>
</SpecialistValids>
Try it with ARTIST, MERCHANT, SCIENTIST, PRIEST, ENGINEER. I think those should all work.
<BuildingHappinessChanges/>
Buildings make more happiness. I haven't experimented with unhappiness, but I'm interested to know if it'd work.
Example (make the palace give 400 happiness):
<BuildingHappinessChanges>
<BuildingHappinessChange>
<BuildingType>BUILDING_PALACE</BuildingType>
<iHappinessChange>400</iHappinessChange>
</BuildingHappinessChange>
</BuildingHappinessChanges>
Just put in a valid building name and you're all set.
<FeatureHappinessChanges/>
Happiness from terrian. Yea! Example:
<FeatureHappinessChange>
<FeatureType>FEATURE_JUNGLE</FeatureType>
<iHappinessChange>1</iHappinessChange>
</FeatureHappinessChange>
Haven't experimented with other terrains (other than the ones for environmental economic civic) yet, but it should work.
<ImprovementYieldChanges/>
Makes worker improvements produce more stuff. Don't use comments, though.
<ImprovementYieldChanges>
<ImprovementYieldChange>
<ImprovementType>IMPROVEMENT_WORKSHOP</ImprovementType>
<ImprovementYields>
<iYield>1</iYield> ;# of extra food
<iYield>0</iYield> ; # of extra shields
<iYield>0</iYield> ; # of extra commerce??
</ImprovementYields>
</ImprovementYieldChange>
</ImprovementYieldChanges>
<WeLoveTheKing>TXT_KEY_CIVIC_WE_LOVE_DESPOT</WeLoveTheKing>
Replace "TXT...DESPOT" with new text the "We love the XXXXXX" day.
</CivicInfo>
To close the civic.
-----------------------------------
Important, other files you MAY HAVE TO EDIT the following
/GameInfo/Civ4CivicOptionInfos.xml
Changing the name of civics catagories. Just change the descriptions with normal text. I wouldn't mess around with the option types.
Note: If you change any <Type>'s or add new ones, make sure you do the proper adjustments to the following files. Or you may need to adjust them for your scenario anyway:
/GameInfo/Civ4VoteInfo.xml
To change civics appearing in UN resolutions.
/Civilizations/Civ4LeaderHeadInfos.xml
To change perfered (favorite) civics.
/Civilizations/Civ4CivilizationInfos.xml
To change default (beginning game) civics.
Well, that's it. Let me know if I left out anything, or if I'm totally wrong about something. If you know what one of the things does that I don't... please inform me. Thanks, and happy modding!