Civilization Specifc Unit Creation

gradea

Chieftain
Joined
Aug 6, 2005
Messages
14
I have been trying to add a new, civilization specific unit (Like the Navy Seal). This has been going very poorly. I can make a unit by modifying the XML document, and it shows up in world builder, but no city can actually BUILD the unit (Even ones that are copy & paste jobs with modified stats).

No how to guide seems to mention how to make civ specific units, and I'm at a loss myself. I've tryed editing the civilization info XML sheet as well, it didn't help.

Right now, I don't even care about giving the unit its own graphic (yet), I just want to make the unit period. Any help would be greatly apperciated.
 
If Unit Info and Civilization Info XMLs are updated it should work. It only gets complicated when you start adding unique graphics. Do you get any error messages when your mod loads?
 
I assume the XML code in CIV4CivilizationInfos.xml for the civilization you're editing looks something like this? This should work. Is it possible that you are creating more than one unique unit of the same unitclass? I think when I tried having a US Marine and a Navy Seal both as unique units and both being UNITCLASS_MARINE, only one showed up. I can't remember if it was the first or second one though.

Code:
		<CivilizationInfo>
			<Type>CIVILIZATION_UNITED_STATES</Type>
			<Description>TXT_KEY_CIV_UNITED_STATES_DESC</Description>
			<ShortDescription>TXT_KEY_CIV_UNITED_STATES_SHORT_DESC</ShortDescription>
			<Adjective>TXT_KEY_CIV_UNITED_STATES_ADJECTIVE</Adjective>
			<Civilopedia>TXT_KEY_CIV_UNITED_STATES_PEDIA</Civilopedia>
			<DefaultPlayerColor>PLAYERCOLOR_BLUE</DefaultPlayerColor>
			<ArtDefineTag>ART_DEF_CIVILIZATION_UNITED_STATES</ArtDefineTag>
			<ArtStyleType>ARTSTYLE_SOUTH_AMERICAN</ArtStyleType>
			<bPlayable>1</bPlayable>
			<bAIPlayable>1</bAIPlayable>
			<Cities>
				<City>Drassen</City>
			</Cities>
			<Buildings/>
			<Units>
				<Unit>
					<UnitClassType>UNITCLASS_MARINE</UnitClassType>
					<UnitType>UNIT_US_NAVY_SEAL</UnitType>
				</Unit>
				<Unit>
					<UnitClassType>UNITCLASS_MECHANIZED_INFANTRY</UnitClassType>
					<UnitType>UNIT_M2A3_BRADLEY</UnitType>
				</Unit>
				<Unit>
					<UnitClassType>UNITCLASS_MODERN_ARMOR</UnitClassType>
					<UnitType>UNIT_M1A2_ABRAMS</UnitType>
				</Unit>
				<Unit>
					<UnitClassType>UNITCLASS_GUNSHIP</UnitClassType>
					<UnitType>UNIT_AH1_SEA_COBRA</UnitType>
				</Unit>
				<Unit>
					<UnitClassType>UNITCLASS_JET_FIGHTER</UnitClassType>
					<UnitType>UNIT_F18_HORNET</UnitType>
				</Unit>
				<Unit>
					<UnitClassType>UNITCLASS_BOMBER</UnitClassType>
					<UnitType>UNIT_A10_THUNDERBOLT_II</UnitType>
				</Unit>
			</Units>
			<FreeUnitClasses/>
			<FreeBuildingClasses>
				<FreeBuildingClass>
					<BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
					<bFreeBuildingClass>1</bFreeBuildingClass>
				</FreeBuildingClass>
			</FreeBuildingClasses>
			<FreeTechs/>
			<DisableTechs/>
			<InitialCivics>
				<CivicType>CIVIC_REPRESENTATION</CivicType>
				<CivicType>CIVIC_FREE_SPEECH</CivicType>
				<CivicType>CIVIC_EMANCIPATION</CivicType>
				<CivicType>CIVIC_FREE_MARKET</CivicType>
				<CivicType>CIVIC_FREE_RELIGION</CivicType>
			</InitialCivics>
			<Leaders>
				<Leader>
					<LeaderName>LEADER_JAMES_ROOSEVELT</LeaderName>
					<bLeaderAvailability>1</bLeaderAvailability>
				</Leader>
			</Leaders>
			<CivilizationSelectionSound>AS3D_AMERICA_SELECT</CivilizationSelectionSound>
			<CivilizationActionSound>AS3D_AMERICA_ORDER</CivilizationActionSound>
		</CivilizationInfo>
 
You know what? I forgot to seperate it with its own <Unit> </Unit>.

And I've been trying to do this for a month too *Hits forhead* Let me make the modification and see if it works.

*EDIT* That was it. Thank you, I can' believe I was making such a simple mistake. My ultimate goal, for those curious (Besides real world domination) has been to create one end game unit for each side. Anyways, thank you LuvToBuild, truely, there is no boxor you can not roxor. I would name my first born after you, but then he would get beaten up in school and no one would ever date him.
 
Back
Top Bottom