Units dont attack
#1
Posted 02 May 2004 - 10:36 AM
Im not sure if this is the right forum to post this but i think my problem is AI related. For the past few weeks i've been creating my own small mod and i added a few units into my mod. Im not interested at the moment in adding AI so that i can have computer players, but when i playtested my mod last night with a few friends, the units were unresponsive. For example, my friend set his migs to anti air guard, a group of raptors few past and the migs did nothing. Also, my friend had a group of tanks in his base. I attacked them with my group and instead of them attacking me, they just sat there and died. The guard function also failed to work and wasnt registering units entering their guard zone.
I was just wondering if you guys had any help/advice on how to fix my problem so that i can continue to play my mod since its rather annoying when units dont attack back.
Thnx
AdmiralGT
#2
Posted 02 May 2004 - 12:18 PM
#3
Posted 03 May 2004 - 10:35 AM
#4
Posted 03 May 2004 - 11:02 AM
#5
Posted 03 May 2004 - 11:50 AM
;------------------------------------------------------------------------------ Object ChinaTankDuelBattleMaster ; *** ART Parameters *** SelectPortrait = SNBattlemaster_L ButtonImage = SNBattlemaster UpgradeCameo1 = Upgrade_Nationalism UpgradeCameo2 = Upgrade_ChinaUraniumShells UpgradeCameo3 = Upgrade_ChinaNuclearTanks ;UpgradeCameo4 = NONE ;UpgradeCameo5 = NONE Draw = W3DTankDraw ModuleTag_01 OkToChangeModelColor = Yes DefaultConditionState Model = NVDBMaster Turret = Turret01 WeaponFireFXBone = PRIMARY Muzzle WeaponRecoilBone = PRIMARY Barrel WeaponMuzzleFlash = PRIMARY MuzzleFX WeaponLaunchBone = PRIMARY Muzzle End ConditionState = REALLYDAMAGED Model = NVDBMaster_D Turret = Turret01 WeaponFireFXBone = PRIMARY Muzzle WeaponRecoilBone = PRIMARY Barrel WeaponMuzzleFlash = PRIMARY MuzzleFX WeaponLaunchBone = PRIMARY Muzzle End ConditionState = RUBBLE Model = NVDBMaster_D Turret = Turret01 End TrackMarks = EXTnkTrack.tga End ; ***DESIGN parameters *** DisplayName = OBJECT:DuelBattleMaster Side = China EditorSorting = VEHICLE TransportSlotCount = 3 ;how many "slots" we take in a transport (0 == not transportable) WeaponSet Conditions = None Weapon = PRIMARY DuelBattleMasterTankGun End ArmorSet Conditions = None Armor = TankArmor DamageFX = TankDamageFX End BuildCost = 1200 BuildTime = 12.0 ;in seconds VisionRange = 150 ShroudClearingRange = 300 Prerequisites Object = ChinaWarFactory Science = SCIENCE_ChinaTankDuelBattleMaster End ExperienceValue = 100 100 200 400 ;Experience point value at each level ExperienceRequired = 0 200 300 600;Experience points needed to gain each level IsTrainable = Yes ;Can gain experience CrusherLevel = 2 ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles CrushableLevel = 2 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles CommandSet = ChinaVehicleDuelBattleMasterCommandSet ; *** AUDIO Parameters *** VoiceSelect = BattleMasterTankVoiceSelect VoiceMove = BattleMasterTankVoiceMove VoiceGuard = BattleMasterTankVoiceMove VoiceAttack = BattleMasterTankVoiceAttack SoundMoveStart = BattleMasterTankMoveStart SoundMoveStartDamaged = BattleMasterTankMoveStart UnitSpecificSounds ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs VoiceCreate = BattleMasterTankVoiceCreate TurretMoveStart = NoSound TurretMoveLoop = TurretMoveLoop VoiceCrush = BattleMasterTankVoiceCrush VoiceEnter = BattleMasterTankVoiceMove End ; *** ENGINEERING Parameters *** RadarPriority = UNIT KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE Body = ActiveBody ModuleTag_02 MaxHealth = 500.0 InitialHealth = 500.0 End Behavior = AIUpdateInterface ModuleTag_03 Turret TurretTurnRate = 120 ; turn rate, in degrees per sec ControlledWeaponSlots = PRIMARY End AutoAcquireEnemiesWhenIdle = Yes End Locomotor = SET_NORMAL BattleMasterLocomotor Locomotor = SET_NORMAL_UPGRADED NuclearBattleMasterLocomotor Behavior = HordeUpdate ModuleTag_04 RubOffRadius = 150 ; if I am this close to a real hordesman, I will get to be an honorary hordesman UpdateRate = 1000 ; how often to recheck horde status (msec) Radius = 75 ; how close other units must be to us to count towards our horde-ness (~30 feet or so) KindOf = VEHICLE ; what KindOf's must match to count towards horde-ness AlliesOnly = Yes ; do we only count allies towards horde status? ExactMatch = Yes ; do we only count units of our exact same type towards horde status? (overrides kindof) Count = 5 ; how many units must be within Radius to grant us horde-ness Action = HORDE ; when horde-ing, grant us the HORDE bonus End Behavior = PhysicsBehavior ModuleTag_05 Mass = 40.0 End Behavior = FireWeaponWhenDeadBehavior ModuleTag_06 DeathWeapon = NuclearTankDeathWeapon StartsActive = No ; turned on by upgrade TriggeredBy = Upgrade_ChinaNuclearTanks End Behavior = LocomotorSetUpgrade ModuleTag_07 TriggeredBy = Upgrade_ChinaNuclearTanks End ; A crushing defeat Behavior = DestroyDie ModuleTag_08 DeathTypes = NONE +CRUSHED +SPLATTED End Behavior = FXListDie ModuleTag_09 DeathTypes = NONE +CRUSHED +SPLATTED DeathFX = FX_CarCrush End Behavior = CreateObjectDie ModuleTag_10 DeathTypes = NONE +CRUSHED +SPLATTED CreationList = OCL_CrusaderTank_CrushEffect End Behavior = CreateCrateDie ModuleTag_11 CrateData = SalvageCrateData ;CrateData = EliteTankCrateData ;CrateData = HeroicTankCrateData End Behavior = SlowDeathBehavior ModuleTag_12 DeathTypes = ALL -CRUSHED -SPLATTED ProbabilityModifier = 25 DestructionDelay = 200 DestructionDelayVariance = 100 OCL = FINAL OCL_ChinaTankBattleMasterDebris FX = FINAL FX_BattleMasterExplosionOneFinal End Behavior = TransitionDamageFX ModuleTag_13 ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01 ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition End Behavior = FlammableUpdate ModuleTag_21 AflameDuration = 5000 ; If I catch fire, I'll burn for this long... AflameDamageAmount = 3 ; taking this much damage... AflameDamageDelay = 500 ; this often. End Geometry = BOX GeometryMajorRadius = 13.0 GeometryMinorRadius = 9.0 GeometryHeight = 10 GeometryIsSmall = Yes Shadow = SHADOW_VOLUME ShadowSizeX = 45 ; minimum elevation angle above horizon. Used to limit shadow length End
This is taken from FactonUnit.ini since im modding the original generals and not zero hour.
#6
Posted 03 May 2004 - 12:37 PM
#7
Posted 03 May 2004 - 12:55 PM
#8
Posted 16 June 2004 - 08:27 AM
and that is exacly whats happaning with my units, they wont attack.
The only way I can get them to attack is to force attack them, also the AI don't attack me(AI are using standered sides). The same goes for my structures.
I know its not the INI code for the unit because the code is cppyed from relivent units and edited, like the model, its cost things like that.
What do you think it is?
#9
Posted 16 June 2004 - 08:32 AM
Are you sure that the weapon entry is correct and has your units\structure got a good sight range?
#10
Posted 16 June 2004 - 08:38 AM
My 'mega cannon defence battery' has a range of 375
Also when I have the unit selected and put my curser over an enimy unit it does not show the attack curser, it changes to the select curser
I'm so confused
#11
Posted 16 June 2004 - 08:42 AM
#12
Posted 16 June 2004 - 08:47 AM
just 'ARMOUR PIERSING' and 'EXPLOSIVE'
(sorry if the spelling is wrong, I'm bad at english. But before you ask, I coppy most thing to try and prevent errors)
#13
Posted 16 June 2004 - 09:02 AM
*thinks* *thinks* *thinks*
Hmm your units aren't stealthed are they?
Also try AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
#14
Posted 16 June 2004 - 09:05 AM
just standed units, just asec I have some of the code
This is the basic tank
;------------------------------------------------------------------------------
Object SigmaTigerFox
; *** ART Parameters ***
SelectPortrait = SACLeopard_L
ButtonImage = SACLeopard
UpgradeCameo1 = Upgrade_AmericaBattleDrone
UpgradeCameo2 = Upgrade_AmericaScoutDrone
UpgradeCameo3 = Upgrade_AmericaHellfireDrone
UpgradeCameo4 = Upgrade_AmericaAdvancedTraining
UpgradeCameo5 = Upgrade_AmericaCompositeArmor
Draw = W3DTankDraw ModuleTag_01
DefaultConditionState
Model = PDF_T-F
Turret = TURRET
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
End
ConditionState = REALLYDAMAGED
Model = PDF_T-F_D
End
ConditionState = RUBBLE
Model = PDF_T-F_R
End
TrackMarks = None
OkToChangeModelColor = Yes
End
; ***DESIGN parameters ***
DisplayName = OBJECT:SigmaTigerFox
Side = Sigma
EditorSorting = VEHICLE
TransportSlotCount = 3
WeaponSet
Conditions = None
Weapon = PRIMARY CrusaderTankGun
; Uncomment this when we want the crusader to have a machine too again
;Weapon = SECONDARY CrusaderMachineGun
End
ArmorSet
Conditions = None
Armor = TankArmor
DamageFX = TankDamageFX
End
;ArmorSet
; Conditions = PLAYER_UPGRADE
; Armor = UpgradedTankArmor
; DamageFX = TankDamageFX
;End
BuildCost = 800
BuildTime = 10.0 ;in seconds
VisionRange = 150
ShroudClearingRange = 300
Prerequisites
Object = SigmaWarFactory
End
ExperienceValue = 100 100 200 400 ;Experience point value at each level
ExperienceRequired = 0 200 300 600 ;Experience points needed to gain each level
IsTrainable = Yes ;Can gain experience
CrusherLevel = 2 ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
CrushableLevel = 2 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CommandSet = AmericaTankCrusaderCommandSet
; *** AUDIO Parameters ***
VoiceSelect = CrusaderTankVoiceSelect
VoiceMove = CrusaderTankVoiceMove
VoiceGuard = CrusaderTankVoiceMove
VoiceAttack = CrusaderTankVoiceAttack
SoundMoveStart = CrusaderTankMoveStart
SoundMoveStartDamaged = CrusaderTankMoveStart
UnitSpecificSounds
; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
VoiceCreate = CrusaderTankVoiceCreate
VoiceEnter = CrusaderTankVoiceMove
TurretMoveStart = NoSound
TurretMoveLoop = TurretMoveLoop
SoundEject = PilotSoundEject
VoiceEject = PilotVoiceEject
VoiceCrush = CrusaderTankVoiceCrush
End
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE CLIFF_JUMPER
Body = ActiveBody ModuleTag_02
MaxHealth = 480
InitialHealth = 480
; Subdual damage "Subdues" you (reaction defined by BodyModule) when it passes your max health.
; The cap limits how extra-subdued you can be, and the other numbers detemine how fast it drains away on its own.
SubdualDamageCap = 960
SubdualDamageHealRate = 500
SubdualDamageHealAmount = 50
End
Behavior = AIUpdateInterface ModuleTag_03
Turret
TurretTurnRate = 180 ;60 // turn rate, in degrees per sec
ControlledWeaponSlots= PRIMARY
End
AutoAcquireEnemiesWhenIdle = Yes
End
Locomotor = SET_NORMAL HoverLocomotor HoverCliffLocomotor
Behavior = PhysicsBehavior ModuleTag_04
Mass = 50.0
End
Behavior = ObjectCreationUpgrade ModuleTag_05
UpgradeObject = OCL_AmericanBattleDrone
TriggeredBy = Upgrade_AmericaBattleDrone
ConflictsWith = Upgrade_AmericaScoutDrone Upgrade_AmericaHellfireDrone
End
Behavior = ObjectCreationUpgrade ModuleTag_06
UpgradeObject = OCL_AmericanScoutDrone
TriggeredBy = Upgrade_AmericaScoutDrone
ConflictsWith = Upgrade_AmericaBattleDrone Upgrade_AmericaHellfireDrone
End
Behavior = ObjectCreationUpgrade ModuleTag_20
UpgradeObject = OCL_AmericanHellfireDrone
TriggeredBy = Upgrade_AmericaHellfireDrone
ConflictsWith = Upgrade_AmericaBattleDrone Upgrade_AmericaScoutDrone
End
Behavior = ProductionUpdate ModuleTag_07
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
End
Behavior = ExperienceScalarUpgrade ModuleTag_08
TriggeredBy = Upgrade_AmericaAdvancedTraining
AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
End
Behavior = MaxHealthUpgrade ModuleTag_09
TriggeredBy = Upgrade_AmericaCompositeArmor
AddMaxHealth = 100.0
ChangeType = ADD_CURRENT_HEALTH_TOO ;Choices are PRESERVE_RATIO, ADD_CURRENT_HEALTH_TOO, and SAME_CURRENTHEALTH
End
; Turret fly off death
Behavior = SlowDeathBehavior ModuleTag_10
DeathTypes = ALL -CRUSHED -SPLATTED
ProbabilityModifier = 50
DestructionDelay = 500
DestructionDelayVariance = 100
FX = INITIAL FX_GenericTankDeathEffect
OCL = MIDPOINT OCL_GenericTankDeathEffect
FX = FINAL FX_GenericTankDeathExplosion
OCL = FINAL OCL_CrusaderTurret
End
; Catch fire, and explode death
Behavior = SlowDeathBehavior ModuleTag_11
DeathTypes = ALL -CRUSHED -SPLATTED
ProbabilityModifier = 50
DestructionDelay = 2000
DestructionDelayVariance = 300
FX = INITIAL FX_CrusaderCatchFire
OCL = FINAL OCL_GenericTankDeathEffect
FX = FINAL FX_GenericTankDeathExplosion
End
Behavior = TransitionDamageFX ModuleTag_12
ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
End
Behavior = DestroyDie ModuleTag_13
DeathTypes = NONE +CRUSHED +SPLATTED
End
; A crushing defeat
Behavior = FXListDie ModuleTag_14
DeathTypes = NONE +CRUSHED +SPLATTED
DeathFX = FX_CarCrush
End
Behavior = CreateObjectDie ModuleTag_15
DeathTypes = NONE +CRUSHED +SPLATTED
CreationList = OCL_CrusaderTank_CrushEffect
End
Behavior = CreateCrateDie ModuleTag_CratesChange
CrateData = SalvageCrateData
;CrateData = EliteTankCrateData
;CrateData = HeroicTankCrateData
End
Behavior = EjectPilotDie ModuleTag_17
GroundCreationList = OCL_EjectPilotOnGround
AirCreationList = OCL_EjectPilotViaParachute
ExemptStatus = HIJACKED
VeterancyLevels = ALL -REGULAR ;only vet+ gives pilot
End
Behavior = MaxHealthUpgrade ModuleTag_18
TriggeredBy = Upgrade_AmericaCompositeArmor
AddMaxHealth = 100.0
ChangeType = ADD_CURRENT_HEALTH_TOO ;Choices are PRESERVE_RATIO, ADD_CURRENT_HEALTH_TOO, and SAME_CURRENTHEALTH
End
Behavior = FlammableUpdate ModuleTag_21
AflameDuration = 5000 ; If I catch fire, I'll burn for this long...
AflameDamageAmount = 3 ; taking this much damage...
AflameDamageDelay = 500 ; this often.
End
Geometry = BOX
GeometryMajorRadius = 15.0
GeometryMinorRadius = 10.0
GeometryHeight = 10.0
GeometryIsSmall = Yes
Shadow = SHADOW_VOLUME
ShadowSizeX = 45 ; minimum elevation angle above horizon. Used to limit shadow length
End
#15
Posted 16 June 2004 - 09:08 AM
#17
Posted 16 June 2004 - 10:10 AM
#18 Guest_Guest_*
Posted 16 June 2004 - 03:26 PM
Have you guys added your new unit to the object defines lists and given it a priority set and/or behavoir?
Pete
#19
Posted 16 June 2004 - 07:18 PM
#20 Guest_Pete_*
Posted 17 June 2004 - 02:25 AM
I just spent some time re-writing those I didnt like em. hehe I thought they needed to be broken down more and then more specific priorities written for units.
im kind of new and all thoughm, <only been doin it for about two weeks now> so this may not even be close.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users