View Full Version : Editing Traits (XML)
Munch Mar 16, 2007, 07:56 AM Hi there; as you might expect I've looked around and can't find an answer to my XML problem...
I'm trying to edit the Spiritual trait; can anyone tell me where (if anywhere) in the XML it is specified that Spiritual allows double production speed of temple? I can't seem to find this at all.
It doesn't seem to be in Buildings/CIV4BuildingInfos.xml, and in fact the temple is not a building type, instead that the Jewish Temple etc are instances of the SpecialBuilding_Temple:
<BuildingInfo> <BuildingClass>BUILDINGCLASS_JEWISH_TEMPLE</BuildingClass>
<Type>BUILDING_JEWISH_TEMPLE</Type> <SpecialBuildingType>SPECIALBUILDING_TEMPLE</SpecialBuildingType>
To add to my confusion I can't find any reference to SpecialBuilding_Temple anywhere else in any xml file which could be responsible for the Spiritual double production.
I'm having a similar problem with Missionary units: there are 7 different types, 1 for each religion. So, say, I can make them double production speed with a trait, but only by editing <ProductionTraits> for each of the 7 units. And the trait itself is then described as "Double production speed of Jewish Missionary, Christian Missionary, Islamic ...". Is there any way around this?
Any advice/directions would be greatly appreciated!
Munch
woodelf Mar 16, 2007, 08:13 AM It's in the Civ4SpecialBuildingsInfo XML file here:
ProductionTraits>
<ProductionTrait>
<ProductionTraitType>TRAIT_SPIRITUAL</ProductionTraitType>
<iProductionTrait>100</iProductionTrait>
</ProductionTrait>
</ProductionTraits>
Not sure about your missionary question since I've never messed with them.
Aranor Mar 16, 2007, 08:27 AM missionaries are considered a world unit and can be adjusted in the UnitClassInfos.xml Ill use the Jewish missionary as an example of how you change how many can be built.
<UnitClassInfo>
<Type>UNITCLASS_JEWISH_MISSIONARY</Type>
<Description>TXT_KEY_UNIT_JEWISH_MISSIONARY</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>3</iMaxPlayerInstances> this is what you need to edit
<DefaultUnit>UNIT_JEWISH_MISSIONARY</DefaultUnit>
</UnitClassInfo>
and change it to:
<UnitClassInfo>
<Type>UNITCLASS_JEWISH_MISSIONARY</Type>
<Description>TXT_KEY_UNIT_JEWISH_MISSIONARY</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>7</iMaxPlayerInstances>
<DefaultUnit>UNIT_JEWISH_MISSIONARY</DefaultUnit>
</UnitClassInfo>
if you want unlimited units avaliable to you instead of putting a positive number in the iMaxPlayerInstances line place -1. So it looks like this:
<UnitClassInfo>
<Type>UNITCLASS_JEWISH_MISSIONARY</Type>
<Description>TXT_KEY_UNIT_JEWISH_MISSIONARY</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<DefaultUnit>UNIT_JEWISH_MISSIONARY</DefaultUnit>
</UnitClassInfo>
Hope that helps! :D
If you want to edit the trait itself. Go to the CIV4Traitinfos.xml file located in the civilizations folder.
the CIV4UnitCLassInfos.xml is located in the Units folder.
I hope all that helped you
Aranor
Munch Mar 16, 2007, 11:40 AM @woodelf:
SpecialBuildingsInfo.xml, well I should have thought of that! In fact, I believe I searched for files containing "spiritual" and didn't find it, odd. Thanks very much for this! I will check if I can get this to work (after "real" work).
@Aranor:
Thanks for the missionary details location. I'm at work at the minute so can't check the .xml file.. does it have a (currently closed) tag <ProductionTraits/>? It doesn't look like it from your response. Shame if so, as I was attempting to allow double production speed of missionaries for Spiritual leaders.
Can you simply add a tag like <ProductionTraits> to an object?
woodelf Mar 16, 2007, 12:12 PM np. Good luck.
Aranor Mar 16, 2007, 09:10 PM @Aranor:
Thanks for the missionary details location. I'm at work at the minute so can't check the .xml file.. does it have a (currently closed) tag <ProductionTraits/>? It doesn't look like it from your response. Shame if so, as I was attempting to allow double production speed of missionaries for Spiritual leaders.
Can you simply add a tag like <ProductionTraits> to an object?
if you go into CIV4UnitInfos.xml (its in the same folder as the UnitClassInfos.xml) and search for your missionaries you should find this line:
<UnitInfo>
<Class>UNITCLASS_JEWISH_MISSIONARY</Class>
<Type>UNIT_JEWISH_MISSIONARY</Type>
<UniqueNames/>
<Special>SPECIALUNIT_PEOPLE</Special>
<Capture>NONE</Capture>
<Combat>NONE</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_MISSIONARY</DefaultUnitAI>
<Invisible>NONE</Invisible>
<SeeInvisible>NONE</SeeInvisible>
<Description>TXT_KEY_UNIT_JEWISH_MISSIONARY</Description>
<Civilopedia>TXT_KEY_CONCEPT_RELIGION_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_JEWISH_MISSIONARY_STRATEGY</Strategy>
<Advisor>ADVISOR_RELIGION</Advisor>
<bAnimal>0</bAnimal>
<bFood>0</bFood>
<bNoBadGoodies>0</bNoBadGoodies>
<bOnlyDefensive>0</bOnlyDefensive>
<bNoCapture>0</bNoCapture>
<bRivalTerritory>0</bRivalTerritory>
<bMilitaryHappiness>0</bMilitaryHappiness>
<bMilitarySupport>0</bMilitarySupport>
<bMilitaryProduction>0</bMilitaryProduction>
<bPillage>0</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/>
<UnitClassTargets/>
<UnitCombatTargets/>
<UnitClassDefenders/>
<UnitCombatDefenders/>
<UnitAIs/>
<NotUnitAIs/>
<Builds/>
<ReligionSpreads>
<ReligionSpread>
<ReligionType>RELIGION_JUDAISM</ReligionType>
<bReligionSpread>1</bReligionSpread>
</ReligionSpread>
</ReligionSpreads>
<GreatPeoples/>
<Buildings/>
<ForceBuildings/>
<HolyCity>NONE</HolyCity>
<ReligionType>NONE</ReligionType>
<StateReligion>NONE</StateReligion>
<PrereqReligion>RELIGION_JUDAISM</PrereqReligion>
<PrereqBuilding>BUILDING_JEWISH_MONASTERY</PrereqBuilding>
<PrereqTech>NONE</PrereqTech>
<TechTypes/>
<BonusType>NONE</BonusType>
<PrereqBonuses/>
<ProductionTraits/>
<Flavors/>
<iAIWeight>0</iAIWeight>
<iCost>40</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iMinAreaSize>-1</iMinAreaSize>
<iMoves>2</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>0</iCombat>
<iAirCombat>0</iAirCombat>
<iAirCombatLimit>0</iAirCombatLimit>
<iXPValueAttack>0</iXPValueAttack>
<iXPValueDefense>0</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>0</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>0</iConscription>
<iCultureGarrison>0</iCultureGarrison>
<iExtraCost>0</iExtraCost>
<iAsset>1</iAsset>
<iPower>0</iPower>
<UnitMeshGroups>
<iGroupSize>1</iGroupSize>
<fMaxSpeed>1.75</fMaxSpeed>
<iMeleeWaveSize>1</iMeleeWaveSize>
<iRangedWaveSize>0</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>1</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_JEWISH_MISSIONARY</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<Button>,Art/Interface/Buttons/Units/Missionary_Jewish.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,6,3</Button>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<FreePromotions/>
<LeaderPromotion>NONE</LeaderPromotion>
<iLeaderExperience>0</iLeaderExperience>
</UnitInfo>
I believe that is what you were after no? I hope that helped you. :goodjob:
Munch Mar 20, 2007, 05:32 AM @Aranor:
Thanks, but that is already how I had attempted a double production speed of missionaries trait addition, and it results in a very messy trait description:
"Double production speed of jewish missionary, christian missionary,..." etc. Ideally, the trait description should simply read "Double production speed of missionary" (or "missionaries").
1) Is there no way of editing the <ProductionTraits> for some superclass of which UNITCLASS_JEWISH_MISSIONARY, UNITCLASS_CHRISTIAN_MISSIONARY etc are instances? Such as SPECIALUNIT_PEOPLE, or is this entirely unlike temples inheriting from SpecialBuilding?
2) If this isn't possible, and it is required to change the production speed for each of the seven missionary types as you describe, can the trait description string be edited to read "Double production speed of missionary"?
Sorry to bombard you with questions!
Munch
Aranor Mar 20, 2007, 08:14 AM @Aranor:
Thanks, but that is already how I had attempted a double production speed of missionaries trait addition, and it results in a very messy trait description:
"Double production speed of jewish missionary, christian missionary,..." etc. Ideally, the trait description should simply read "Double production speed of missionary" (or "missionaries").
1) Is there no way of editing the <ProductionTraits> for some superclass of which UNITCLASS_JEWISH_MISSIONARY, UNITCLASS_CHRISTIAN_MISSIONARY etc are instances? Such as SPECIALUNIT_PEOPLE, or is this entirely unlike temples inheriting from SpecialBuilding?
2) If this isn't possible, and it is required to change the production speed for each of the seven missionary types as you describe, can the trait description string be edited to read "Double production speed of missionary"?
Sorry to bombard you with questions!
Munch
to be honest I've never fiddled to much with the missionaries. So unfortunately I have no idea :blush: :(
sorry
aranor
Impaler[WrG] Mar 20, 2007, 09:44 AM I already just just that in a trait mod I produced a long time ago, create a new SpecialUnitGroup called, place all 7 missionary types in it and link it with the trait, add a new Text String to name the grouping "Missionaries" and you will have just what you want.
Munch Mar 20, 2007, 10:29 AM @Impaler:
I searched around, I guess you mean this project: http://forums.civfanatics.com/showthread.php?t=150211
"SPIRITUAL: Droped no Anarchy, double production speed Temple, Cathedral, Monastary, +50% prdocution speed on Missionaries"
The missionaries part is exactly what I am trying to enact! I looked in that thread and also in the downloads section briefly but I couldn't find a download for the mod..? :confused: I'd really like to check out what you've edited.. could you link me please?
|
|