AI soldiers don't like use shields?

Started by Sereja, August 27, 2012, 01:22:29 PM

Previous topic - Next topic
As far, as I know, droidekas, are very like to use shields, but when I give it to infantry soldier, he never use it.
Is it possible to make AI soldiers use shields?
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:

I cant think whether anything in the ODF actually defines when an A.I. should activate a shield.

Tirbana gas depot has AI gammoreans with shields, but maybe they are always on
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

I've never heard of this problem. In my mod the only ai with shields are Droidekas, Droid Officers, and Imperial Officers and they always use their bubble shields.
Current Projects:
Battlefront One and a Half Era Mod, v2.0. Making great progress (SWBF)

Quote from: jdee-barc on August 27, 2012, 01:48:35 PM
I've never heard of this problem. In my mod the only ai with shields are Droidekas, Droid Officers, and Imperial Officers and they always use their bubble shields.
That's odd... :confused: Are you sure, you didn't add any special odf lines? May be shield should be only single secondary weapon, unit type should be only assault, or something like this?
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:

August 27, 2012, 03:40:48 PM #5 Last Edit: August 31, 2012, 10:14:26 PM by jdee-barc
Nah Here's my Droid Officer odf and the unittype is set to "trooper". And it uses it's shield without any problem


[GameObjectClass]

ClassLabel = "soldier"
GeometryName = "cis_inf_com_droid.msh"


[Properties]
FootWaterSplashEffect = "watersplash_sm"
WaterSplashEffect = "watersplash_md"
WakeWaterSplashEffect = "watersplash_wade"

ExplosionName = "com_inf_droid_exp"
Label = "Battle Droid Infantry"
UnitType = "trooper"
IconTexture = "cis_bdroid_icon"
MapTexture = "troop_icon"
MapScale = 1.4

GeometryName = "cis_inf_com_droid"
GeometryLowRes = "cis_inf_bdroid_low1"
SkeletonName = "cis_inf_bdroid"
SkeletonLowRes = "cis_inf_bdroid_lowres"
FirstPerson = "CIS\cisbdrd;cis_1st_bdroid"
FirstPersonFOV = "70"
ThirdPersonFOV = "65"
AnimationName = "all_inf_snowtrooper"

CAMERASECTION = "STAND"

EyePointOffset = "0.0 1.8 0.0"
TrackCenter = "0.0 1.8 0.0
TrackOffset = "0.0 0.0 3.5"
TiltValue = "5.0"

CAMERASECTION = "STANDZOOM"

EyePointOffset = "0.0 1.8 0.0"
TrackCenter = "0.0 1.8 0.0
TrackOffset = "0.4 0.05 2.8"
TiltValue = "3.5"

CAMERASECTION = "CROUCH"

EyePointOffset = "0.0 1.3 0.0"
TrackCenter = "0.0 1.3 0.0
TrackOffset = "0.0 0.15 3.5"
TiltValue = "5.0"

CAMERASECTION = "CROUCHZOOM"

EyePointOffset = "0.0 1.3 0.0"
TrackCenter = "0.0 1.3 0.0
TrackOffset = "0.4 0.2 2.8"
TiltValue = "3.5"

CAMERASECTION = "PRONE"

EyePointOffset = "0.0 0.5 0.0"
TrackCenter = "0.0 0.5 0.0"
TrackOffset = "0.0 0.0 3.0"
TiltValue = "5.0"

CAMERASECTION = "PRONEZOOM"

EyePointOffset = "0.0 0.5 0.0"
TrackCenter = "0.0 0.5 0.0"
TrackOffset = "0.4 0.2 2.8"
TiltValue = "3.5"


HealthType = "droid"
MaxHealth = 1500.0
AddHealth = 15.0

Acceleraton = 70.0
MaxSpeed = 6.5
MaxStrafeSpeed = 4.5
MaxTurnSpeed = 4.0

WeaponName1 = "cis_weap_inf_rifle"
WeaponAmmo1 = 1
WeaponName2 = "cis_weap_inf_pistol"
WeaponAmmo2 = 0
WeaponName3 = "cis_weap_inf_thermaldetonator"
WeaponAmmo3 = 2
WeaponChannel3 = 1
WeaponName4 = "cis_weap_walk_droideka_shield"
WeaponAmmo4 = 0
WeaponChannel4 = 1

AISizeType = "SOLDIER"

DropItemClass = "com_item_powerup_ammo"
DropItemProbability = 0.07
NextDropItem = "-"
DropItemClass = "com_item_powerup_health25"
DropItemProbability = 0.08
NextDropItem = "-"
DropItemClass = "com_item_powerup_health100"
DropItemProbability = 0.0

ChunkFrequency = 0.6

CHUNKSECTION = "CHUNK1"
ChunkGeometryName = "bdroid_chunk1"
ChunkNodeName = "bone_neck"
ChunkTerrainCollisions = "4"
ChunkTerrainEffect = "dirtspray"
ChunkTrailEffect = "chunksmoke"
ChunkPhysics = "FULL"
ChunkOmega = "4.0 4.0 4.0"
ChunkSpeed = 8.0

CHUNKSECTION = "CHUNK2"
ChunkGeometryName = "bdroid_chunk2"
ChunkNodeName = "bone_l_upperarm"
ChunkTerrainCollisions = "4"
ChunkTerrainEffect = "dirtspray"
ChunkTrailEffect = "chunksmoke"
ChunkPhysics = "FULL"
ChunkOmega = "4.0 4.0 4.0"
ChunkSpeed = 8.0

CHUNKSECTION = "CHUNK3"
ChunkGeometryName = "bdroid_chunk3"
ChunkNodeName = "bone_l_calf"
ChunkTerrainCollisions = "4"
ChunkTerrainEffect = "dirtspray"
ChunkTrailEffect = "chunksmoke"
ChunkPhysics = "FULL"
ChunkOmega = "4.0 4.0 4.0"
ChunkSpeed = 8.0

CHUNKSECTION = "CHUNK4"
ChunkGeometryName = "bdroid_chunk4"
ChunkNodeName = "bone_r_thigh"
ChunkTerrainCollisions = "4"
ChunkTerrainEffect = "dirtspray"
ChunkTrailEffect = "chunksmoke"
ChunkPhysics = "FULL"
ChunkOmega = "4.0 4.0 4.0"
ChunkSpeed = 8.0

CHUNKSECTION = "CHUNK5"
ChunkGeometryName = "bdroid_chunk5"
ChunkNodeName = "bone_a_spine"
ChunkTerrainCollisions = "4"
ChunkTerrainEffect = "dirtspray"
ChunkTrailEffect = "chunksmoke"
ChunkPhysics = "FULL"
ChunkOmega = "4.0 4.0 4.0"
ChunkSpeed = 8.0

HurtSound = "cis_inf_com_chatter_wound"
DeathSound              = "droid_death"
AcquiredTargetSound     = "cis_inf_com_chatter_acquired"
HidingSound             = "cis_inf_com_chatter_hide"
ApproachingTargetSound  = "cis_inf_com_chatter_approach"
FleeSound               = "cis_inf_com_chatter_flee"
PreparingForDamageSound = "cis_inf_com_chatter_predamage"
HeardEnemySound         = "cis_inf_com_chatter_heard"
ShockFadeOutTime        = ""
ShockFadeInTime         = ""
ShockFadeOutGain        = ""
ShockSound              = ""
ClothingRustleSound     = ""
LowHealthSound          = ""
//LowHealthThreshold      = ".25"
FoleyFXClass            = "cis_inf_droid"

// squad command VO
SCFieldMoveOutSound = "cis_inf_com_chatter_tac_moveout"
SCFieldHoldSound = "cis_inf_com_chatter_tac_hold"
SCFieldFollowSound = "cis_inf_com_chatter_tac_follow"
SCDriverGetInSound = "cis_inf_com_chatter_tac_needgunner"
SCDriverGetOutSound = "cis_inf_com_chatter_tac_moveout"
SCPassengerMoveOutSound = "cis_inf_com_chatter_tac_spreadout"
SCPassengerStopSound = "cis_inf_com_chatter_tac_stop"
SCPassengerGetInSound = "cis_inf_com_chatter_tac_needgunner"
SCPassengerGetOutSound = "cis_inf_com_chatter_tac_moveout"
SCGunnerAllClearSound = "cis_inf_com_chatter_tac_allclear"
SCGunnerSteadySound = "cis_inf_com_chatter_tac_stop"
SCGunnerGetInSound = "cis_inf_com_chatter_tac_needgunner"
SCGunnerGetOutSound = "cis_inf_com_chatter_tac_moveout"
SCResponseYessirSound = "cis_inf_com_chatter_tac_yes"
SCResponseNosirSound = "cis_inf_com_chatter_tac_no"

// AI Squad Command VO
AISCFieldMoveOutSound = "ai_cis_inf_com_chatter_tac_moveout"
AISCFieldHoldSound = "ai_cis_inf_com_chatter_tac_hold"
AISCFieldFollowSound = "ai_cis_inf_com_chatter_tac_follow"
AISCDriverGetInSound = "ai_cis_inf_com_chatter_tac_needgunner"
AISCDriverGetOutSound = "ai_cis_inf_com_chatter_tac_moveout"
AISCPassengerMoveOutSound = "ai_cis_inf_com_chatter_tac_spreadout"
AISCPassengerStopSound = "ai_cis_inf_com_chatter_tac_stop"
AISCPassengerGetInSound = "ai_cis_inf_com_chatter_tac_needgunner"
AISCPassengerGetOutSound = "ai_cis_inf_com_chatter_tac_moveout"
AISCGunnerAllClearSound = "ai_cis_inf_com_chatter_tac_allclear"
AISCGunnerSteadySound = "ai_cis_inf_com_chatter_tac_stop"
AISCGunnerGetInSound = "ai_cis_inf_com_chatter_tac_needgunner"
AISCGunnerGetOutSound = "ai_cis_inf_com_chatter_tac_moveout"
AISCResponseYessirSound = "ai_cis_inf_com_chatter_tac_yes"
AISCResponseNosirSound = "ai_cis_inf_com_chatter_tac_no"


[/spoiler]
Current Projects:
Battlefront One and a Half Era Mod, v2.0. Making great progress (SWBF)

Well, I check maps, with infantry shields, and they realy use them! But how it happens, it is still big mistery for me.
I found the way, how to force them use shields:
WeaponAmmo4    = 0 
change to
WeaponAmmo4    = 1
But in this case, they become almost immortal, like jedi, becouse they can't swith off theyr shields, and can be killed only by explosion or meele weapon.
Here is my samples of soldier odf:
[spoiler][GameObjectClass]
ClassLabel      = "soldier"
GeometryName        = "nab_inf_gungan.msh"

[Properties]
FootWaterSplashEffect   = "watersplash_sm"
WaterSplashEffect   = "watersplash_md"
WakeWaterSplashEffect   = "watersplash_wade"

UnitType        = "assault"
IconTexture         = "rep_trooper_icon"
MapTexture      = "troop_icon"
MapScale        = 1.4
HealthTexture           = "HUD_gungan_icon"

GeometryName        = "nab_inf_gungan"
AnimationName       = "all_inf_snowtrooper"
GeometryLowRes      = "nab_inf_gungan_low1"
SkeletonName = "nab_inf_gungan"
SkeletonRootScale = "1.1"

FirstPerson        = "IMP\imppilot;imp_1st_pilot"
FirstPersonFOV = "70"
ThirdPersonFOV = "65"

OverrideTexture     = "gungan"

CAMERASECTION = "STAND"

EyePointOffset = "0.0 1.8 0.0"
TrackCenter = "0.0 1.8 0.0
TrackOffset = "0.0 0.0 3.5"
TiltValue = "5.0"

CAMERASECTION = "STANDZOOM"

EyePointOffset = "0.0 1.8 0.0"
TrackCenter = "0.0 1.8 0.0
TrackOffset = "0.4 0.05 2.8"
TiltValue = "3.5"

CAMERASECTION = "CROUCH"

EyePointOffset = "0.0 1.3 0.0"
TrackCenter = "0.0 1.3 0.0
TrackOffset = "0.0 0.15 3.5"
TiltValue = "5.0"

CAMERASECTION = "CROUCHZOOM"

EyePointOffset = "0.0 1.3 0.0"
TrackCenter = "0.0 1.3 0.0
TrackOffset = "0.4 0.2 2.8"
TiltValue = "3.5"

CAMERASECTION = "PRONE"

EyePointOffset = "0.0 0.33 0.0"
TrackCenter = "0.0 0.5 0.0"
TrackOffset = "0.0 0.0 3.0"
TiltValue = "5.0"

CAMERASECTION = "PRONEZOOM"

EyePointOffset = "0.0 0.33 0.0"
TrackCenter = "0.0 0.5 0.0"
TrackOffset = "0.4 0.2 2.8"
TiltValue = "3.5"


MaxHealth       = 125.0

Acceleraton         = 30.0
MaxSpeed        = 6.0
MaxStrafeSpeed      = 4.0
MaxTurnSpeed        = 2.25
PCMaxTurnSpeed      = 20.0
PCMaxStrafeSpeed    = 20.0

WeaponName1 = "all_weap_inf_atlatl"
WeaponAmmo1 = 50

WeaponName2 = "all_weap_inf_cesta"
WeaponAmmo2 = 0

WeaponName3 = "all_weap_inf_powerup_dispenser"
WeaponAmmo3 = 5


WeaponName4 = "all_weap_inf_shield_gungan"
WeaponAmmo4 = 0
WeaponChannel4 = 1


AimFactorPostureSpecial = 50
AimFactorPostureStand   = 100
AimFactorPostureCrouch  = 140
AimFactorPostureProne   = 160
AimFactorStrafe     = 60
AimFactorMove       = 70

HurtSound               = "gungan_hurt"
DeathSound              = "gungan_die"
AcquiredTargetSound     = "gungan_chatter_acquired"
HidingSound             = "gungan_chatter_hide"
ApproachingTargetSound  = "gungan_chatter_approach"
FleeSound               = "gungan_chatter_flee"
PreparingForDamageSound = "gungan_chatter_predamage"
HeardEnemySound         = "gungan_chatter_heard"
WaterWadingSound        = "com_inf_wading"
ShockFadeOutTime        = ""
ShockFadeOutGain        = ""
ShockFadeInTime         = ""
ShockSound              = ""
ClothingRustleSound     = ""
LowHealthSound          = "gungan_chatter_heartbeat"
LowHealthThreshold      = "1.1"

FoleyFXClass            = "wok_inf_soldier"


AISizeType          = "SOLDIER"
NoEnterVehicles         = 0

AnimatedAddon = "CAPE"

GeometryAddon = "add_gungan_shield"
AnimationAddon = "imp_inf_vader_cape"
AddonAttachJoint = "bone_l_hand"
[/spoiler]
and shield odf:
[spoiler][WeaponClass]

ClassLabel = "shield"

[Properties]
IconTexture     = "HUD_shield_icon"
Label               = "Shield"

MaxShield           = 3000
AddShield           = -10
AddShieldOff        = 300

ShieldOffset        = "0.0 1.0 0.125"
ShieldRadius = "0.7 1.3"

FireSound          = "cis_droideka_shield_on"
FireEmptySound    = ""
FireLoopSound      = ""
ReloadSound        = ""
ChargeSound        = ""
ChangeModeSound    = ""
WeaponChangeSound = ""
ShieldSound           = "cis_droideka_shield"
//ShieldSound         = "droid_fx7_hum"
ShieldOffSound      = ""

ShieldEffect = "gungan_shield"
[/spoiler]
Please, tell me, if you found something incorrect.
Beauty is, the way to perfection.

Glory to Ukraine!  :mf: