UAV Predator

Thx :) I didn't notieced this tutorial before.
 
I seem to be having a problem with this unit in the Civilopedia. In the CIV4UnitInfos.xml I have this:
Code:
		<UnitInfo>
			<Class>UNITCLASS_UAV</Class>
			<Type>UNIT_UAV</Type>
			<UniqueNames/>
			<Special>SPECIALUNIT_PEOPLE</Special>
			<Capture>NONE</Capture>
			<Combat>UNITCOMBAT_RECON</Combat>
			<Domain>DOMAIN_LAND</Domain>
			<DefaultUnitAI>UNITAI_EXPLORE</DefaultUnitAI>
			<Invisible>NONE</Invisible>
			<SeeInvisible>NONE</SeeInvisible>
			<Description>TXT_KEY_UNIT_UAV</Description>
			<Civilopedia>TXT_KEY_UNIT_UAV_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_UNIT_UAV_STRATEGY</Strategy>
			<Advisor>ADVISOR_GROWTH</Advisor>
			<bAnimal>0</bAnimal>
			<bFood>0</bFood>
			<bNoBadGoodies>1</bNoBadGoodies>
			<bOnlyDefensive>1</bOnlyDefensive>
			<bNoCapture>1</bNoCapture>
			<bQuickCombat>0</bQuickCombat>
			<bRivalTerritory>0</bRivalTerritory>
			<bMilitaryHappiness>0</bMilitaryHappiness>
			<bMilitarySupport>1</bMilitarySupport>
			<bMilitaryProduction>1</bMilitaryProduction>
			<bPillage>0</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>0</bFirstStrikeImmune>
			<bNoDefensiveBonus>1</bNoDefensiveBonus>
			<bIgnoreBuildingDefense>1</bIgnoreBuildingDefense>
			<bCanMoveImpassable>0</bCanMoveImpassable>
			<bCanMoveAllTerrain>0</bCanMoveAllTerrain>
			<bFlatMovementCost>0</bFlatMovementCost>
			<bIgnoreTerrainCost>1</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_EXPLORE</UnitAIType>
					<bUnitAI>1</bUnitAI>
				</UnitAI>
			</UnitAIs>
			<NotUnitAIs/>
			<Builds/>
			<ReligionSpreads/>
			<CorporationSpreads/>
			<GreatPeoples/>
			<Buildings/>
			<ForceBuildings/>
			<HolyCity>NONE</HolyCity>
			<ReligionType>NONE</ReligionType>
			<StateReligion>NONE</StateReligion>
			<PrereqReligion>NONE</PrereqReligion>
			<PrereqCorporation>NONE</PrereqCorporation>
			<PrereqBuilding>NONE</PrereqBuilding>
			<PrereqTech>TECH_ROBOTICS</PrereqTech>
			<TechTypes>
				<PrereqTech>TECH_ADVANCED_FLIGHT</PrereqTech>
				<PrereqTech>NONE</PrereqTech>
				<PrereqTech>NONE</PrereqTech>
			</TechTypes>
			<BonusType>NONE</BonusType>
			<PrereqBonuses/>
			<ProductionTraits/>
			<Flavors/>
			<iAIWeight>0</iAIWeight>
			<iCost>100</iCost>
			<iHurryCostModifier>0</iHurryCostModifier>
			<iAdvancedStartCost>100</iAdvancedStartCost>
			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
			<iMinAreaSize>-1</iMinAreaSize>
			<iMoves>5</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>16</iCombat>
			<iCombatLimit>100</iCombatLimit>
			<iAirCombat>0</iAirCombat>
			<iAirCombatLimit>0</iAirCombatLimit>
			<iXPValueAttack>4</iXPValueAttack>
			<iXPValueDefense>2</iXPValueDefense>
			<iFirstStrikes>0</iFirstStrikes>
			<iChanceFirstStrikes>0</iChanceFirstStrikes>
			<iInterceptionProbability>0</iInterceptionProbability>
			<iEvasionProbability>0</iEvasionProbability>
			<iWithdrawalProb>50</iWithdrawalProb>
			<iCollateralDamage>0</iCollateralDamage>
			<iCollateralDamageLimit>0</iCollateralDamageLimit>
			<iCollateralDamageMaxUnits>0</iCollateralDamageMaxUnits>
			<iCityAttack>0</iCityAttack>
			<iCityDefense>0</iCityDefense>
			<iAnimalCombat>0</iAnimalCombat>
			<iHillsAttack>0</iHillsAttack>
			<iHillsDefense>0</iHillsDefense>
			<TerrainNatives/>
			<FeatureNatives/>
			<TerrainAttacks/>
			<TerrainDefenses/>
			<FeatureAttacks/>
			<FeatureDefenses/>
			<UnitClassAttackMods/>
			<UnitClassDefenseMods/>
			<UnitCombatMods/>
			<UnitCombatCollateralImmunes/>
			<DomainMods/>
			<BonusProductionModifiers/>
			<iBombRate>0</iBombRate>
			<iBombardRate>0</iBombardRate>
			<SpecialCargo>NONE</SpecialCargo>
			<DomainCargo>NONE</DomainCargo>
			<iCargo>0</iCargo>
			<iConscription>0</iConscription>
			<iCultureGarrison>0</iCultureGarrison>
			<iExtraCost>1</iExtraCost>
			<iAsset>3</iAsset>
			<iPower>0</iPower>
			<UnitMeshGroups>
				<iGroupSize>1</iGroupSize>
				<fMaxSpeed>1.75</fMaxSpeed>
				<fPadTime>1</fPadTime>
				<iMeleeWaveSize>1</iMeleeWaveSize>
				<iRangedWaveSize>1</iRangedWaveSize>
				<UnitMeshGroup>
					<iRequired>1</iRequired>
					<EarlyArtDefineTag>ART_DEF_UNIT_UAV</EarlyArtDefineTag>
				</UnitMeshGroup>
			</UnitMeshGroups>
			<FormationType>FORMATION_TYPE_MACHINE</FormationType>
			<HotKey/>
			<bAltDown>0</bAltDown>
			<bShiftDown>0</bShiftDown>
			<bCtrlDown>0</bCtrlDown>
			<iHotKeyPriority>0</iHotKeyPriority>
			<FreePromotions>
				<FreePromotion>
					<PromotionType>PROMOTION_SENTRY</PromotionType>
					<bFreePromotion>1</bFreePromotion>
				</FreePromotion>
			</FreePromotions>
			<LeaderPromotion>NONE</LeaderPromotion>
			<iLeaderExperience>0</iLeaderExperience>
		</UnitInfo>

And in CIV4ArtDefines_Unit.xml I am using
Code:
		<UnitArtInfo>
			<Type>ART_DEF_UNIT_UAV</Type>
			<Button>Art/Interface/Buttons/Units/predator.dds</Button>
			<fScale>0.48</fScale>
			<fInterfaceScale>1.0</fInterfaceScale>
			<bActAsLand>0</bActAsLand>
			<bActAsAir>0</bActAsAir>
			<NIF>Art/Units/Predator/Predator.nif</NIF>
			<KFM>Art/Units/Predator/fighter.kfm</KFM>
			<SHADERNIF/>
			<ShadowDef>
				<ShadowNIF>Art/Units/01_UnitShadows/FighterShadow.nif</ShadowNIF>
				<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
				<fShadowScale>0.75</fShadowScale>
			</ShadowDef>
			<iDamageStates>4</iDamageStates>
			<fBattleDistance>0.5</fBattleDistance>
			<fRangedDeathTime>0.12</fRangedDeathTime>
			<bActAsRanged>1</bActAsRanged>
			<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
			<AudioRunSounds>
				<AudioRunTypeLoop/>
				<AudioRunTypeEnd/>
			</AudioRunSounds>
			<SelectionSound>AS3D_UN_AIRSHIP_COMMAND_PATROL</SelectionSound>
			<ActionSound>AS3D_UN_AIRSHIP_COMMAND_PATROL</ActionSound>
		</UnitArtInfo>
Could anyone tell me what I'm doing wrong here?
 

Attachments

  • UAV.jpg
    UAV.jpg
    42.7 KB · Views: 96
asioasioasio, by any chance did you include the wrong animation file in the predator.zip? the fighter.kfm file that came in the zip shows(for me anyway) as last modified 3/17/06. the predator.nif and predator.dds show as being modified 1/20/08.

i had the same problem as Xenomorph while using the included kfm. when i used the default fighter.kfm(Art/Units/Fighter/Fighter.kfm) then the predator unit showed properly in the civipedia
 
It looks like .kfm problem - I've put old, because it's impossible to edit .kfm file. I've changed only .kf file - it works well here, shots missiles, etc (tough i didn't checked it in civilopedia but i'm quite sure it works there).

If you link to orginal fighter, the predator use fighter animations wich means it doesn't shoot missiles anymore.

I'll check once again my file at home.
 
Xenomorph you need to adda TXT_KEY_UNIT_UAV_PEDIA entry in a GameText file.
I did that. If you don't have an entry for text, it just displays "TXT_KEY_UNIT_UAV_PEDIA" (I've seen this enough times in other mods...).

It looks like .kfm problem - I've put old, because it's impossible to edit .kfm file. I've changed only .kf file - it works well here, shots missiles, etc (tough i didn't checked it in civilopedia but i'm quite sure it works there).
If you link to orginal fighter, the predator use fighter animations wich means it doesn't shoot missiles anymore.
I'll check once again my file at home.
When you say you "put old," do you mean you put the old version of the file in? If so, what's the difference between it and the new file?
 
old = civ4orginal
It's IMPOSSIBLE to edit .kfm file
 
I'll check the files once again at home - it worked for me before upload

kfm - i's responsible for animation sequence.
 
asio

I'm using this in my artdef (and I added the team color fix) but I keep getting a fighter instead of the uav...

Code:
	<UnitArtInfo>
			<Type>ART_DEF_UNIT_UAV</Type>
			<Button>Modules/Custom Units/UAV/UAVbutton.dds</Button>
			<fScale>0.25</fScale>
			<fInterfaceScale>1.0</fInterfaceScale>
			<bActAsLand>0</bActAsLand>
			<bActAsAir>0</bActAsAir>
			<NIF>Modules/Custom Units/UAV/Predator.nif</NIF>
			<KFM>Modules/Custom Units/UAV/Fighter.kfm</KFM>
			<SHADERNIF>Art/Units/Fighter/Fighter_FX.nif</SHADERNIF>
			<ShadowDef>
				<ShadowNIF>Art/Units/01_UnitShadows/FighterShadow.nif</ShadowNIF>
				<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
				<fShadowScale>0.25</fShadowScale>
			</ShadowDef>
			<iDamageStates>4</iDamageStates>
			<fBattleDistance>0.35</fBattleDistance>
			<fRangedDeathTime>0.31</fRangedDeathTime>
			<bSmoothMove>1</bSmoothMove>
			<fBankRate>0.35</fBankRate>
			<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>
 
yeah
<SHADERNIF>Art/Units/Fighter/Fighter_FX.nif</SHADERNIF> is wrong
 
sorry i don't understand. You want to fly it higher?

I don't think i would be able to use gunship animations - it will be tough with propeller.
 
sorry i don't understand. You want to fly it higher?
I want it to act like the gunship; idle/hover above the ground (rather than on it). I tried editing the model and moving it "up" along the z-axis, but that didn't seem to do any good. As for the propeller, couldn't you use the rotor animation and just rotate the bone 90 degrees so that it spins on the vertical axis rather than the horizontal?
 
The rotating of propeller didn't worked for me when i made various research some time ago.
 
First off, beautiful work!

I have successfully added the Predator to my BtS 3.13 game but when I add one through World Builder to make sure everything is working right the model seems to be submerged part way into the ground instead of flying over it.

I can get it to fly by setting <Domain> to DOMAIN_AIR in CIV4UnitInfos.xml but then the unit will not respond to move commands. I am using the same settings that Xenomorph posted earlier in this thread.

Thanks in advance!

-Greymalkin2k
 
I get the same problem!

I copy the fighter info in xml just to make sure none of my tags are doing it. In the worldbuilder if i add it then go back to the game it has no commands. But if I add another ar unit there, then the UAV commands are the air ones and it works. If the other unit in the same city as the UAV are there then it give land unit commands to the UAV (!) which don't run. Also there is nothing showing in the civilopedia. Any ideas how to fix it????????????
 
Back
Top Bottom