WW3 Mod/Scenario

I am currently adding 200+ unique units to my game. This is what I do.

Create a Template file for the type of unit you are working. e.g Fighter

- CIV4CivilizationInfos.xml
Code:
				<Unit>
					<UnitClassType>UNITCLASS_WW2_FIGHTER</UnitClassType>
					<UnitType>UNIT_WW2_FIG1_abc</UnitType>
				</Unit>
CIV4UnitInfos.xml
Code:
		<UnitInfo>
			<Class>UNITCLASS_WW2_FIGHTER</Class>
			<Type>UNIT_WW2_FIG1_abc</Type>
			<UniqueNames/>
			<Special>NONE</Special>
			<Capture>NONE</Capture>
			<Combat>UNITCOMBAT_AIR</Combat>
			<Domain>DOMAIN_AIR</Domain>
			<DefaultUnitAI>UNITAI_DEFENSE_AIR</DefaultUnitAI>
			<Invisible>NONE</Invisible>
			<SeeInvisible>NONE</SeeInvisible>
			<Description>TXT_KEY_UNIT_WW2_FIG1_abc</Description>
...
... Not complete <UnitInfo> template
...
			<UnitMeshGroups>
				<iGroupSize>1</iGroupSize>
				<fMaxSpeed>10.0</fMaxSpeed>
				<fPadTime>1</fPadTime>
				<iMeleeWaveSize>1</iMeleeWaveSize>
				<iRangedWaveSize>1</iRangedWaveSize>
				<UnitMeshGroup>
					<iRequired>1</iRequired>
					<EarlyArtDefineTag>ART_DEF_UNIT_WW2_FIG1_abc</EarlyArtDefineTag>
				</UnitMeshGroup>
			</UnitMeshGroups>
			<FormationType>FORMATION_TYPE_DEFAULT</FormationType>
			<HotKey/>
			<bAltDown>0</bAltDown>
			<bShiftDown>0</bShiftDown>
			<bCtrlDown>0</bCtrlDown>
			<iHotKeyPriority>0</iHotKeyPriority>
			<FreePromotions/>
			<LeaderPromotion>NONE</LeaderPromotion>
			<iLeaderExperience>0</iLeaderExperience>
			<bDCMAirBomb1>1</bDCMAirBomb1>
			<bDCMAirBomb2>0</bDCMAirBomb2>
			<bDCMAirBomb3>0</bDCMAirBomb3>
			<bDCMAirBomb4>1</bDCMAirBomb4>
			<bDCMAirBomb5>0</bDCMAirBomb5>
			<bDCMFighterEngage>1</bDCMFighterEngage>
		</UnitInfo>
CIV4ArtDefines_Unit.xml
Code:
			<UnitArtInfo>
			<Type>ART_DEF_UNIT_WW2_FIG1_abc</Type>
			<Button>Art/Interface/Buttons/Units/Fighter1.dds</Button>
			<fScale>0.35</fScale>
			<fInterfaceScale>1.0</fInterfaceScale>
			<bActAsLand>0</bActAsLand>
			<bActAsAir>0</bActAsAir>
			<NIF>Art/UnitsHist/  Nif File </NIF>
			<KFM>Art/Units/Fighter/Fighter.kfm</KFM>
			<SHADERNIF>Art/UnitsHist/ Nif FX File </SHADERNIF>
			<ShadowDef>
				<ShadowNIF>Art/Units/01_UnitShadows/FighterShadow.nif</ShadowNIF>
				<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
				<fShadowScale>0.75</fShadowScale>
			</ShadowDef>
			<iDamageStates>4</iDamageStates>
			<fBattleDistance>0.35</fBattleDistance>
			<fRangedDeathTime>0.31</fRangedDeathTime>
			<bSmoothMove>1</bSmoothMove>
			<bActAsRanged>0</bActAsRanged>
			<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
			<AudioRunSounds>
				<AudioRunTypeLoop/>
				<AudioRunTypeEnd/>
			</AudioRunSounds>
			<PatrolSound>AS3D_UN_FIGHTER_PATROL</PatrolSound>
			<SelectionSound>AS3D_UN_FIGHTER_COMMAND_PATROL</SelectionSound>
			<ActionSound>AS3D_UN_FIGHTER_COMMAND_PATROL</ActionSound>
		</UnitArtInfo>
TextFile.XML
Code:
	<TEXT>
		<Tag>TXT_KEY_UNIT_WW2_FIG1_abc</Tag>
		<English>Fighter II Sqn</English>
		<French>Fighter II Sqn</French>
		<German>Fighter II Sqn</German>
		<Italian>Fighter II Sqn</Italian>
		<Spanish>Fighter II Sqn</Spanish>
	</TEXT>

Then copy and paste the templates into the relevant files and edit the parameters to the settings I require.

Then just simply replace "abc" with the three letter code I have chosen for the Civilization.

Note: The hardest part of this is not the actual coding but the research (It has taken me 6 months to do all the 30+ nations in my mod) in to all the unique units performance parameters and scaling them to Civ 4.

See this tutorial based on this one
 
the problem is that some nations are supposed to be able to build more units than others but the regular UU system wasn't designed for that
 
This is one of the reasons I decided to focus on representative units. i.e. A unit represents a Infantry Division, Tank Division, Infantry Corps, Panzer Corps, etc.

If you are going to replicate WWIII, you will need to do a similar system. Just having unique models for each nation, as opposed to what I have done above, would not be realistic, albeit looking realistic.

What is your focus - A game with lot's of unique units or a game with a realistic conflict of WWIII ?

I have also decided to limit the number of models available, to only the most representative, which is why I suggested the 1984-86 time period as this is the "peak" of the Cold War.
 
Well when i create a class for all of them and set the class's default unit to "NONE" it crashes the game and when i set the default unit to the unit everyone can build it so i dont really have a way out
 
I found a workaround i made every unit its own class and then made a unbuildible varient which is the base unit for each class problem solved but the actual scenario was corrupted so i have to redo it but hers is a pic
Spoiler :
Civ4ScreenShot0008.JPG
what is the cause of the You hae been defeated bug by the way
 
Help it crashes and this is the error it gives me in the log PythonErr2:
Code:
19:36:59 DEBUG: BugInit - global context not ready
PY:OnInit
load_module CvAppInterface
What does this mean i didn't edit any python yet either
 
Top Bottom