ComradeKristov
Warlord
I've read there is a XML tag to overwrite original XML modularly. If there is such a TAG could someone show me an example of how to use it? I would really appriciate it.
I've read there is a XML tag to overwrite original XML modularly. If there is such a TAG could someone show me an example of how to use it? I would really appriciate it.
<BuildingInfo>
<BuildingClass>BUILDINGCLASS_FISHERMAN_HUT</BuildingClass>
<Type>BUILDING_FISHERMAN_HUT</Type>
[B] [U]<bForceOverwrite>1</bForceOverwrite>[/U][/B]
<SpecialBuildingType>NONE</SpecialBuildingType>
<Description>TXT_KEY_BUILDING_FISHERMAN_HUT</Description>
<Civilopedia>TXT_KEY_BUILDING_FISHERMAN_HUT_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDING_FISHERMAN_HUT_STRATEGY</Strategy>
<Advisor>ADVISOR_GROWTH</Advisor>
<ArtDefineTag>ART_DEF_BUILDING_VIKING_TRADING_POST</ArtDefineTag>
<MovieDefineTag>NONE</MovieDefineTag>
<HolyCity>NONE</HolyCity>
<ReligionType>NONE</ReligionType>
<StateReligion>NONE</StateReligion>
<bStateReligion>0</bStateReligion>
<PrereqReligion>NONE</PrereqReligion>
<PrereqCorporation>NONE</PrereqCorporation>
<FoundsCorporation>NONE</FoundsCorporation>
<GlobalReligionCommerce>NONE</GlobalReligionCommerce>
<GlobalCorporationCommerce>NONE</GlobalCorporationCommerce>
<VictoryPrereq>NONE</VictoryPrereq>
<FreeStartEra>NONE</FreeStartEra>
<MaxStartEra>NONE</MaxStartEra>
<ObsoleteTech>NONE</ObsoleteTech>
<PrereqTech>TECH_FISHING</PrereqTech>
<TechTypes/>
<Bonus>NONE</Bonus>
<!--<PrereqVicinityBonuses>
<VicinityBonus>BONUS_FISH</VicinityBonus>
<VicinityBonus>BONUS_CRAB</VicinityBonus>
<VicinityBonus>BONUS_WHALE</VicinityBonus>
<VicinityBonus>BONUS_SHRIMP</VicinityBonus>
</PrereqVicinityBonuses>-->
<ProductionTraits>
<ProductionTrait>
<ProductionTraitType>TRAIT_SEAFARING</ProductionTraitType>
<iProductionTrait>100</iProductionTrait>
</ProductionTrait>
</ProductionTraits>
<HappinessTraits/>
<NoBonus>NONE</NoBonus>
<PowerBonus>NONE</PowerBonus>
<FreeBonus>NONE</FreeBonus>
<iNumFreeBonuses>0</iNumFreeBonuses>
<FreeBuilding>NONE</FreeBuilding>
<FreePromotion>NONE</FreePromotion>
<CivicOption>NONE</CivicOption>
<GreatPeopleUnitClass>NONE</GreatPeopleUnitClass>
<iGreatPeopleRateChange>0</iGreatPeopleRateChange>
<iHurryAngerModifier>0</iHurryAngerModifier>
<bBorderObstacle>0</bBorderObstacle>
<bTeamShare>0</bTeamShare>
<bWater>1</bWater>
<bRiver>0</bRiver>
<bPower>0</bPower>
<bDirtyPower>0</bDirtyPower>
<bAreaCleanPower>0</bAreaCleanPower>
<DiploVoteType>NONE</DiploVoteType>
<bForceTeamVoteEligible>0</bForceTeamVoteEligible>
<bCapital>0</bCapital>
<bGovernmentCenter>0</bGovernmentCenter>
<bGoldenAge>0</bGoldenAge>
<bAllowsNukes>0</bAllowsNukes>
<bMapCentering>0</bMapCentering>
<bNoUnhappiness>0</bNoUnhappiness>
<bNoUnhealthyPopulation>0</bNoUnhealthyPopulation>
<bBuildingOnlyHealthy>0</bBuildingOnlyHealthy>
<bNeverCapture>0</bNeverCapture>
<bNukeImmune>0</bNukeImmune>
<bPrereqReligion>0</bPrereqReligion>
<bCenterInCity>0</bCenterInCity>
<iAIWeight>100</iAIWeight>
<iCost>45</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iAdvancedStartCost>100</iAdvancedStartCost>
<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
<iMinAreaSize>10</iMinAreaSize>
<iConquestProb>75</iConquestProb>
<iCitiesPrereq>0</iCitiesPrereq>
<iTeamsPrereq>0</iTeamsPrereq>
<iLevelPrereq>0</iLevelPrereq>
<iMinLatitude>0</iMinLatitude>
<iMaxLatitude>90</iMaxLatitude>
<iGreatPeopleRateModifier>0</iGreatPeopleRateModifier>
<iGreatGeneralRateModifier>0</iGreatGeneralRateModifier>
<iDomesticGreatGeneralRateModifier>0</iDomesticGreatGeneralRateModifier>
<iGlobalGreatPeopleRateModifier>0</iGlobalGreatPeopleRateModifier>
<iAnarchyModifier>0</iAnarchyModifier>
<iGoldenAgeModifier>0</iGoldenAgeModifier>
<iGlobalHurryModifier>0</iGlobalHurryModifier>
<iExperience>0</iExperience>
<iGlobalExperience>0</iGlobalExperience>
<iFoodKept>0</iFoodKept>
<iAirlift>0</iAirlift>
<iAirModifier>0</iAirModifier>
<iAirUnitCapacity>0</iAirUnitCapacity>
<iNukeModifier>0</iNukeModifier>
<iNukeExplosionRand>0</iNukeExplosionRand>
<iFreeSpecialist>0</iFreeSpecialist>
<iAreaFreeSpecialist>0</iAreaFreeSpecialist>
<iGlobalFreeSpecialist>0</iGlobalFreeSpecialist>
<iMaintenanceModifier>0</iMaintenanceModifier>
<iWarWearinessModifier>0</iWarWearinessModifier>
<iGlobalWarWearinessModifier>0</iGlobalWarWearinessModifier>
<iEnemyWarWearinessModifier>0</iEnemyWarWearinessModifier>
<iHealRateChange>0</iHealRateChange>
<iHealth>0</iHealth>
<iAreaHealth>0</iAreaHealth>
<iGlobalHealth>0</iGlobalHealth>
<iHappiness>0</iHappiness>
<iAreaHappiness>0</iAreaHappiness>
<iGlobalHappiness>0</iGlobalHappiness>
<iStateReligionHappiness>0</iStateReligionHappiness>
<iWorkerSpeedModifier>0</iWorkerSpeedModifier>
<iMilitaryProductionModifier>0</iMilitaryProductionModifier>
<iSpaceProductionModifier>0</iSpaceProductionModifier>
<iGlobalSpaceProductionModifier>0</iGlobalSpaceProductionModifier>
<iTradeRoutes>0</iTradeRoutes>
<iCoastalTradeRoutes>0</iCoastalTradeRoutes>
<iGlobalTradeRoutes>0</iGlobalTradeRoutes>
<iTradeRouteModifier>0</iTradeRouteModifier>
<iForeignTradeRouteModifier>0</iForeignTradeRouteModifier>
<iGlobalPopulationChange>0</iGlobalPopulationChange>
<iFreeTechs>0</iFreeTechs>
<iDefense>0</iDefense>
<iBombardDefense>0</iBombardDefense>
<iAllCityDefense>0</iAllCityDefense>
<iEspionageDefense>0</iEspionageDefense>
<iAsset>5</iAsset>
<iPower>0</iPower>
<fVisibilityPriority>1.0</fVisibilityPriority>
<SeaPlotYieldChanges>
<iYield>1</iYield>
<iYield>0</iYield>
<iYield>0</iYield>
</SeaPlotYieldChanges>
<RiverPlotYieldChanges/>
<GlobalSeaPlotYieldChanges/>
<YieldChanges/>
<CommerceChanges/>
<ObsoleteSafeCommerceChanges/>
<CommerceChangeDoubleTimes/>
<CommerceModifiers/>
<GlobalCommerceModifiers/>
<SpecialistExtraCommerces/>
<StateReligionCommerces/>
<CommerceHappinesses/>
<ReligionChanges/>
<SpecialistCounts/>
<FreeSpecialistCounts/>
<CommerceFlexibles/>
<CommerceChangeOriginalOwners/>
<ConstructSound>AS2D_BUILD_FISHING_HUT</ConstructSound>
<BonusHealthChanges>
<BonusHealthChange>
<BonusType>BONUS_SALT</BonusType>
<iHealthChange>1</iHealthChange>
</BonusHealthChange>
</BonusHealthChanges>
<BonusHappinessChanges/>
<BonusProductionModifiers/>
<UnitCombatFreeExperiences/>
<DomainFreeExperiences/>
<DomainProductionModifiers/>
<BuildingHappinessChanges/>
<PrereqBuildingClasses/>
<BuildingClassNeededs/>
<SpecialistYieldChanges/>
<BonusYieldModifiers/>
<ImprovementFreeSpecialists/>
<Flavors>
<Flavor>
<FlavorType>FLAVOR_PRODUCTION</FlavorType>
<iFlavor>10</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_GOLD</FlavorType>
<iFlavor>2</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_GROWTH</FlavorType>
<iFlavor>15</iFlavor>
</Flavor>
</Flavors>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<iDCMAirbombMission>2</iDCMAirbombMission>
</BuildingInfo>
<UnitInfo>
<Class>UNITCLASS_FIGHTER</Class>
<Type>UNIT_spitfire</Type>
<bForceOverwrite>1</bForceOverwrite>
<iBombRate>0</iBombRate>
</UnitInfo>
also i think i'll need a bForceOverwrite tag for civics. or did you already add one?
to add the override tag to a schema open a arbitrary schema that includes it, find all occurrences of the tag, copy them over on the fitting places in your scheme file. note that the override tag needs to be placed as an element of the UnitInfo tag if you want to use it inside a unitbForceOverwrite is a universal tag, it works on all objects. I haven't updated all the schema's though, so you may need to add it there if I haven't. (But I'm pretty sure I updated the GameInfo Schema).
Does it work differently if I'm trying to overwrite the xml in a module file? Just running very similar code to what was listed in the thread for a minimalist approach caused the game to not load the buildings for me at all.
...The reason for WoC is the XML lists of items, like PrereqOrBuildings, only get appended when the game loads WoC style, which can cause nasty side-effects if you are trying to rewrite the building stats. That's where bForceOverwrite comes in. It will wipe EVERYTHING, all stats, clean, then load your new stats. Keep in mind, you must provide any old stats from the old entry that you want to keep with the new stats; as the old ones will be wiped out.