Quick Modding Questions Thread

I used the above parameter limit the movement of my Pillboxes, Anti-Tank Ditches and Fortresses, as recommended earlier.

I then created a new unit "Coastal Fortifications", with the same parameter "Domain_Immobile", but I then could not build them.

Is it possible to build "Domain_immobile" units.
 
@Bahmo: Maybe there are no erros :dunno:. But maybe it's still misconfigured, you should ask in Davids thread again.

@kiwitt: ICBM is DOMAIN_IMMOBILE, so yes.
What are the stats of the unit?


And looking at all the tanks...has someone in here maybe considered to change his avatar :mischief:?
 
When I changed the unit to "Domain_Land" I could build them.
Spoiler :
Code:
		<UnitInfo>
			<Class>UNITCLASS_WW2_MODERN_ARTILLERY</Class>
			<Type>UNIT_WW2_MODERN_ARTILLERY</Type>
			<UniqueNames/>
			<Special/>
			<Capture/>
			<Combat>UNITCOMBAT_SIEGE</Combat>
			<Domain>DOMAIN_LAND</Domain>
			<DefaultUnitAI>UNITAI_CITY_DEFENSE</DefaultUnitAI>
			<Invisible/>
			<SeeInvisible/>
			<Description>TXT_KEY_UNIT_WW2_MODERN_ARTILLERY</Description>
			<Civilopedia>TXT_KEY_UNIT_ARTILLERY_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_UNIT_WW2_ARTILLERY_STRATEGY</Strategy>
			<Advisor>ADVISOR_MILITARY</Advisor>
			<bAnimal>0</bAnimal>
			<bFood>0</bFood>
			<bNoBadGoodies>0</bNoBadGoodies>
			<bOnlyDefensive>1</bOnlyDefensive>
			<bNoCapture>0</bNoCapture>
			<bQuickCombat>0</bQuickCombat>
			<bRivalTerritory>1</bRivalTerritory>
			<bMilitaryHappiness>1</bMilitaryHappiness>
			<bMilitarySupport>1</bMilitarySupport>
			<bMilitaryProduction>1</bMilitaryProduction>
			<bPillage>1</bPillage>
			<bSpy>0</bSpy>
			<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>1</bFirstStrikeImmune>
			<bNoDefensiveBonus>0</bNoDefensiveBonus>
			<bIgnoreBuildingDefense>1</bIgnoreBuildingDefense>
			<bCanMoveImpassable>0</bCanMoveImpassable>
			<bCanMoveAllTerrain>0</bCanMoveAllTerrain>
			<bFlatMovementCost>0</bFlatMovementCost>
			<bIgnoreTerrainCost>0</bIgnoreTerrainCost>
			<bNukeImmune>0</bNukeImmune>
			<bPrereqBonuses>0</bPrereqBonuses>
			<bPrereqReligion>0</bPrereqReligion>
			<bMechanized>0</bMechanized>
			<bSuicide>0</bSuicide>
			<bHiddenNationality>0</bHiddenNationality>
			<bAlwaysHostile>0</bAlwaysHostile>
			<UnitClassUpgrades/>
			<UnitClassTargets/>
			<UnitCombatTargets/>
			<UnitClassDefenders/>
			<UnitCombatDefenders/>
			<FlankingStrikes/>
			<UnitAIs>
				<UnitAI>
					<UnitAIType>UNITAI_CITY_DEFENSE</UnitAIType>
					<bUnitAI>1</bUnitAI>
				</UnitAI>
			</UnitAIs>
			<NotUnitAIs/>
			<Builds/>
			<ReligionSpreads/>
			<CorporationSpreads/>
			<GreatPeoples/>
			<Buildings/>
			<ForceBuildings/>
			<HolyCity/>
			<ReligionType/>
			<StateReligion/>
			<PrereqReligion/>
			<PrereqCorporation/>
			<PrereqBuilding>BUILDING_WW2_BUILD12</PrereqBuilding>
			<PrereqTech>TECH_WW2_TECH06</PrereqTech>
			<TechTypes/>
			<BonusType/>
			<PrereqBonuses/>
			<ProductionTraits/>
			<Flavors/>
			<iAIWeight>2000</iAIWeight>
			<iCost>2000</iCost>
			<iHurryCostModifier>0</iHurryCostModifier>
			<iAdvancedStartCost>-1</iAdvancedStartCost>
			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
			<iMinAreaSize>-1</iMinAreaSize>
			<iMoves>0</iMoves>
			<bNoRevealMap>0</bNoRevealMap>
			<iAirRange>0</iAirRange>
			<iAirUnitCap>0</iAirUnitCap>
			<iDropRange>0</iDropRange>
			<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>
			<iEspionagePoints>0</iEspionagePoints>
			<TerrainImpassables/>
			<FeatureImpassables/>
			<TerrainPassableTechs/>
			<FeaturePassableTechs/>
			<iCombat>60</iCombat>
			<iCombatLimit>25</iCombatLimit>
			<iAirCombat>60</iAirCombat>
			<iAirCombatLimit>100</iAirCombatLimit>
			<iXPValueAttack>4</iXPValueAttack>
			<iXPValueDefense>4</iXPValueDefense>
			<iFirstStrikes>0</iFirstStrikes>
			<iChanceFirstStrikes>0</iChanceFirstStrikes>
			<iInterceptionProbability>30</iInterceptionProbability>
			<iEvasionProbability>0</iEvasionProbability>
			<iWithdrawalProb>0</iWithdrawalProb>
			<iCollateralDamage>0</iCollateralDamage>
			<iCollateralDamageLimit>0</iCollateralDamageLimit>
			<iCollateralDamageMaxUnits>0</iCollateralDamageMaxUnits>
			<iCityAttack>0</iCityAttack>
			<iCityDefense>100</iCityDefense>
			<iAnimalCombat>0</iAnimalCombat>
			<iHillsAttack>0</iHillsAttack>
			<iHillsDefense>100</iHillsDefense>
			<TerrainNatives/>
			<FeatureNatives/>
			<TerrainAttacks/>
			<TerrainDefenses/>
			<FeatureAttacks/>
			<FeatureDefenses/>
			<UnitClassAttackMods/>
			<UnitClassDefenseMods/>
			<UnitCombatMods>
				<UnitCombatMod>
					<UnitCombatType>UNITCOMBAT_ARMOR</UnitCombatType>
					<iUnitCombatMod>200</iUnitCombatMod>
				</UnitCombatMod>
				<UnitCombatMod>
					<UnitCombatType>UNITCOMBAT_SIEGE</UnitCombatType>
					<iUnitCombatMod>200</iUnitCombatMod>
				</UnitCombatMod>
				<UnitCombatMod>
					<UnitCombatType>UNITCOMBAT_GUN</UnitCombatType>
					<iUnitCombatMod>50</iUnitCombatMod>
				</UnitCombatMod>
				<UnitCombatMod>
					<UnitCombatType>UNITCOMBAT_NAVAL</UnitCombatType>
					<iUnitCombatMod>200</iUnitCombatMod>
				</UnitCombatMod>				
			</UnitCombatMods>
			<UnitCombatCollateralImmunes>
				<UnitCombatCollateralImmune>
					<UnitCombatType>UNITCOMBAT_SIEGE</UnitCombatType>
					<iUnitCombatCollateralImmune>1</iUnitCombatCollateralImmune>
				</UnitCombatCollateralImmune>
				<UnitCombatCollateralImmune>
					<UnitCombatType>UNITCOMBAT_AIR</UnitCombatType>
					<iUnitCombatCollateralImmune>1</iUnitCombatCollateralImmune>
				</UnitCombatCollateralImmune>
				<UnitCombatCollateralImmune>
					<UnitCombatType>UNITCOMBAT_NAVAL</UnitCombatType>
					<iUnitCombatCollateralImmune>1</iUnitCombatCollateralImmune>
				</UnitCombatCollateralImmune>
			</UnitCombatCollateralImmunes>
			<DomainMods/>
			<BonusProductionModifiers/>
			<iBombRate>0</iBombRate>
			<iBombardRate>0</iBombardRate>
			<SpecialCargo/>
			<DomainCargo/>
			<iCargo>0</iCargo>
			<iConscription>0</iConscription>
			<iCultureGarrison>12</iCultureGarrison>
			<iExtraCost>3</iExtraCost>
			<iAsset>6</iAsset>
			<iPower>60</iPower>
			<UnitMeshGroups>
				<iGroupSize>3</iGroupSize>
				<fMaxSpeed>1.25</fMaxSpeed>
				<fPadTime>1</fPadTime>
				<iMeleeWaveSize>3</iMeleeWaveSize>
				<iRangedWaveSize>3</iRangedWaveSize>
				<UnitMeshGroup>
					<iRequired>3</iRequired>
					<EarlyArtDefineTag>ART_DEF_UNIT_WW2_COASTAL</EarlyArtDefineTag>
				</UnitMeshGroup>
			</UnitMeshGroups>
			<FormationType>FORMATION_TYPE_DEFAULT</FormationType>
			<HotKey/>
			<bAltDown>0</bAltDown>
			<bShiftDown>0</bShiftDown>
			<bCtrlDown>0</bCtrlDown>
			<iHotKeyPriority>0</iHotKeyPriority>
			<FreePromotions>
				<FreePromotion>
					<PromotionType>PROMOTION_WINTERWARFARE</PromotionType>
					<bFreePromotion>1</bFreePromotion>
				</FreePromotion>
			</FreePromotions>
			<LeaderPromotion/>
			<iLeaderExperience>0</iLeaderExperience>
			<iDCMBombRange>2</iDCMBombRange>
			<iDCMBombAccuracy>50</iDCMBombAccuracy>
		</UnitInfo>
and the Class file
Code:
		<UnitClassInfo>
			<Type>UNITCLASS_WW2_MODERN_ARTILLERY</Type>
			<Description>TXT_KEY_UNIT_WW2_MODERN_ARTILLERY</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>5</iMaxPlayerInstances>
			<iInstanceCostModifier>0</iInstanceCostModifier>
			<DefaultUnit>UNIT_WW2_MODERN_ARTILLERY</DefaultUnit>
		</UnitClassInfo>

RE: ICBM ... the RtW ICBM is as follows
Code:
		<UnitInfo>
			<Class>UNITCLASS_WW2_ICBM</Class>
			<Type>UNIT_WW2_ICBM</Type>
			<UniqueNames/>
			<Special>SPECIALUNIT_MISSILE</Special>
			<Capture/>
			<Combat>UNITCOMBAT_AIR</Combat>
			<Domain>DOMAIN_AIR</Domain>
... so I suspect a change was made to the DLL to restrict "Domain_immobile" units from being built.

Btw: I may change my Avatar to a tiger tank when make an new animated one ;)
 
When I changed the unit to "Domain_Land" I could build them.

Can't see it :dunno:.
But you maybe want to set iMoves to 1, because else the unit can't attack.
Maybe this is a problem for immobile units. Trial and error is the way to go here, i guess.
 
Hmmm ... Trial Error then.

They don't need to attack only defend <bOnlyDefensive>1</bOnlyDefensive>
 
I am working on an ancient near east mod, and I am creating or editing civs like Egypt or Sumer, but I also need to have 3-4 non-playable tribes (minor civilizations) similiar to the Charmalagne 'pagan tribes'. How is this done?:confused:

This is a Warlords mod, if that helps.
 
Create the Civs as per normal and then in the Worldbuilder scenario set
PlayableCiv= the setting to turn on whether this civ can be played by a human or not. Valid values are 0 (AI only) or 1 (playable by human).

MinorNationStatus= the setting to determine if a civ is a minor nation in relation to diplomacy. Valid values are 0 (full power civ) or 1 (minor nation civ that won't do diplomacy with anyone).
NOTE: the second setting makes them like barbarian nations and can be attacked and can attack unrestricted.

I did this in my scenario for Iran and Arabia.
 
Thank You, but I have a few more questions...

What are the meanings of the following leader attitude phrases-

iBaseAttitude
iPeaceWeightRand (and 'rand' in general
iMaxWarMinAdjacentLandPercent
iLimited(or Dogpile)war Rand(or Power Ratio)
iDeclareWarTradeRand
 
Thank You, but I have a few more questions...

What are the meanings of the following leader attitude phrases-

iBaseAttitude
iPeaceWeightRand (and 'rand' in general
iMaxWarMinAdjacentLandPercent
iLimited(or Dogpile)war Rand(or Power Ratio)
iDeclareWarTradeRand

Check out the modiki. The link is in the top bar. Here's explained all LeaderHeadInfos tags.
 
@Bahmo: Maybe there are no erros :dunno:. But maybe it's still misconfigured, you should ask in Davids thread again.

@kiwitt: ICBM is DOMAIN_IMMOBILE, so yes.
What are the stats of the unit?


And looking at all the tanks...has someone in here maybe considered to change his avatar :mischief:?

David's thread? Which one is that?

Also, tanks make thw world go round. Long live tanks!
 
Quick question from a noob.

I'm creating my first mod and trying to add some downloaded units to this mod. I've placed everything where it needs to go and updated all the XML. Both of the units I've downloaded point to vanilla .kfm files.

One points to the Lion, another points to the swordsman. I load the mod with no errors, but when I place these units on the map... half the time they still look like a lion or a swordsman and not like the custom art files I downloaded.

Is this a common error? What could I be doing wrong?
 
Welcome to CFC :).



:yup: it is.
Check your graphics options in Civ. You've probably disabled the animations, just active them again.

Ah, that makes sense. I had them turned off because it's installed on my laptop which isn't really designed with gaming in mind.
 
Is there are movement penalty for crossing a river. And if so, where is it and where can I can increase it.

The reason being, when an army needs to cross it, it needs to use many narrow bridges as opposed to wider expanses of roads,
 
Is there are movement penalty for crossing a river.

Before you get a special tech (construction, i think, but not sure), you will lose the movement bonus of roads over rivers. But i don't see a way to increase that :dunno:.
 
Thanks The J
Code:
bBridgeBuilding	 Enables bridge building, or movement via road over a river without penalty.
I'll change the "1" to "0" and playtest it.

I will give one of the later techs, the setting.

Btw: I changed my "Tank" avatar to Heinz Guderian.
 
It should be possible to mess with any and all movement costs from one plot to another by editing CvPlot::movementCost, so if bBridgebuilding is not enough for you, there you can do even more. It's SDK though.
 
I have set a -1 for happiness if you have a military unit in a city. I have not yet encountered an "A.I." - "Stack of Doom".

This makes it more real. I suspect the A.I. notices negative happiness in the city and spreads the units around their other cities.
 
Top Bottom