Quick Modding Questions Thread

How do I make a city in World builder a colony.
 
I am considering restoring walls to reflect the defenses built up around, Leningrad, Moscow, Kursk.

When I tried to restore a Civ 4 building a while back to the RtW files it crashed, so I suspect that the building/class/schema files may be different. I am thinking the safest way to add them may be copy an existing Road to War building and simply modify the links to the artworks/Text files/ etc.

Are their any gotchas with walls as they are dynamic on the map, i.e. change as the city grows.
 
Thanks for that. I'll have some practise of that.
 
How do you stop a civilization from sucumbing to cultural influence.

I have Switzerland setup as 1 city nation, and it eventually surrenders to the influence of Italian culture. How can I stop this ?
 
maybe go into worldbuilder and crank up their cultural output for that city?


Also, I have a question. When I save textures in .dds format they are painted right, but often end up saved with grey pixels in places. Any thoughts?
 
I can build them, I can see them on Civilopedia and I can add them via world builder, but, how can I be certain that they add to the defense of units

Spoiler :
Code:
		<BuildingInfo>
			<BuildingClass>BUILDINGCLASS_WALLS</BuildingClass>
			<Type>BUILDING_WALLS</Type>
			<SpecialBuildingType>NONE</SpecialBuildingType>
			<Description>TXT_KEY_BUILDING_WALLS</Description>
			<Civilopedia>TXT_KEY_BUILDING_WALLS_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_WALLS_STRATEGY</Strategy>
			<Advisor>ADVISOR_MILITARY</Advisor>
			<ArtDefineTag>ART_DEF_BUILDING_WALLS</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_WW2_TECH01</PrereqTech>
			<TechTypes/>
			<Bonus>NONE</Bonus>
			<PrereqBonuses/>
			<ProductionTraits>
				<ProductionTrait>
					<ProductionTraitType>TRAIT_PROTECTIVE</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>0</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>1</bCenterInCity>
			<iAIWeight>0</iAIWeight>
			<iCost>5000</iCost>
			<iHurryCostModifier>0</iHurryCostModifier>
			<iAdvancedStartCost>100</iAdvancedStartCost>
			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
			<iMinAreaSize>-1</iMinAreaSize>
			<iConquestProb>0</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>100</iDefense>
			<iBombardDefense>100</iBombardDefense>
			<iAllCityDefense>0</iAllCityDefense>
			<iEspionageDefense>0</iEspionageDefense>
			<iAsset>1</iAsset>
			<iPower>2</iPower>
			<fVisibilityPriority>1.0</fVisibilityPriority>
			<SeaPlotYieldChanges/>
			<RiverPlotYieldChanges/>
			<GlobalSeaPlotYieldChanges/>
			<YieldChanges/>
			<CommerceChanges/>
			<ObsoleteSafeCommerceChanges/>
			<CommerceChangeDoubleTimes/>
			<CommerceModifiers/>
			<GlobalCommerceModifiers/>
			<SpecialistExtraCommerces/>
			<StateReligionCommerces/>
			<CommerceHappinesses/>
			<ReligionChanges/>
			<SpecialistCounts/>
			<FreeSpecialistCounts/>
			<CommerceFlexibles/>
			<CommerceChangeOriginalOwners/>
			<ConstructSound>AS2D_BUILD_WALLS</ConstructSound>
			<BonusHealthChanges/>
			<BonusHappinessChanges/>
			<BonusProductionModifiers>
				<BonusProductionModifier>
					<BonusType>BONUS_STONE</BonusType>
					<iProductonModifier>100</iProductonModifier>
				</BonusProductionModifier>
			</BonusProductionModifiers>
			<UnitCombatFreeExperiences/>
			<DomainFreeExperiences/>
			<DomainProductionModifiers/>
			<BuildingHappinessChanges/>
			<PrereqBuildingClasses/>
			<BuildingClassNeededs/>
			<SpecialistYieldChanges/>
			<BonusYieldModifiers/>
			<ImprovementFreeSpecialists/>
			<Flavors>
				<Flavor>
					<FlavorType>FLAVOR_MILITARY</FlavorType>
					<iFlavor>10</iFlavor>
				</Flavor>
			</Flavors>
			<HotKey/>
			<bAltDown>0</bAltDown>
			<bShiftDown>0</bShiftDown>
			<bCtrlDown>0</bCtrlDown>
			<iHotKeyPriority>0</iHotKeyPriority>
		</BuildingInfo>
It seems to imply that they will not add defence to against gun-powder units - with in my mod of Rtw is all units :confused:
 
It's in the unitInfos.xml, a tag like ignoreBuildingDefense or so.

Yes, they are building textures 512x512

Ups, sorry, i thought in the wrong way.
More precise question: Does the image which you've used for the texture been resized for the texture?
 
It's in the unitInfos.xml, a tag like ignoreBuildingDefense or so.
Thats an idea. I can make it so tanks do not get bonus and infantry do. ;)
 
How do I reduce the captured cities default culture from 1,000 to 10 ?
 
Yes. When you capture a city, it gets a 1,000 point bonus of the player's culture, at the end of the rebellion and converts to the player. I can't for the life of me find where this is set.

EDIT: I think I have found it in CvEventManager.py

Code:
	def onCityAcquired(self, argsList):
		'City Acquired'
		iPreviousOwner,iNewOwner,pCity,bConquest,bTrade = argsList
		CvUtil.pyPrint('City Acquired Event: %s' %(pCity.getName()))
##### RtW Stuff
		player = PyPlayer(pCity.getOwner())
		pCity.setCulture(player.getID(), 1000, True)
	
	def onCityAcquiredAndKept(self, argsList):
		'City Acquired and Kept'
		iOwner,pCity = argsList
		CvUtil.pyPrint('City Acquired and Kept Event: %s' %(pCity.getName()))
##### RtW Stuff
		iPlayer = PyPlayer(pCity.getOwner())
		pCity.setCulture(iPlayer.getID(), 1000, True)
 
I'm not sure where to ask this but figured this is the best place to start.

Basically, I'm trying to set up a test game for the purpose of testing out a competitive game that I"m playing, that is, I'm trying to simulate it. I have the known map worked out using WB and I've been able to make certain adjustments based on the state of the game - like changing/adding civs as encountered, adding improvement and buildings, changing religions, adding/subtracting techs, and getting to the correct date.

What I can't figure out how to change in the WB file is date related to teching (that is, beakers invested in a tech), GPP generation by city and empire, and score. I have a feeling that this in not possible as it's somehow calculated by the game engine itself. However, if there is a way to do this it would be helpful to know.

(One more thing: I've been able to get the game to the correct date by changing the start turn to the correct turn from the real game. However, it sets the turn counter back to 0. Is there a way to change this?)

thanks
 
To enable the carrying of some types of units on submarines (i.e. commandos), I will need to create specialinfos entries and modify the submarines to be able to carry them. Is that correct ?
 
Can I have units requiring both Oil and Iron, for example and how to add that.
 
Top Bottom