AI soldiers don't like to use shields?

Post everything from general questions, to modding questions, to map WIPs to releases. (SWBF1 only)

Moderator: Moderators

sereja2
Command Sergeant Major
Command Sergeant Major
Posts: 253
Joined: Wed Aug 31, 2011 4:22 am
Projects :: Naboo Otoh Gunga
Games I'm Playing :: swbf 1
xbox live or psn: No gamertag set
Location: Ukraine

AI soldiers don't like to use shields?

Post by sereja2 »

As far, as I know, stock droidekas, and many other AI soldiers, (maded in many mods, by many modders), 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?
Here is my samples of soldier odf:
Hidden/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\heroes;all_1st_gungan"
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 = 310.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"
and shield odf:
Hidden/Spoiler:
[WeaponClass]

ClassLabel = "shield"

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

//GeometryName = "gun_gungan_shield"
//HighResGeometry = "gun_gungan_shield"
//AnimationBank = "lightsabre"

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"
Please, tell me, if you found something incorrect.
User avatar
AaTc Snake
Private
Posts: 37
Joined: Fri Feb 13, 2009 5:04 pm
Projects :: ApeX Cantina
Games I'm Playing :: SWBF1 GRAW2 ACB
xbox live or psn: No gamertag set
Location: Mobile, AL
Contact:

Re: AI soldiers don't like to use shields?

Post by AaTc Snake »

Try using different UnitTypes
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: AI soldiers don't like to use shields?

Post by AQT »

In SWBF2, it seems that only AI units on the CIS team (as specified in the lua) will use the shield weapon, much like how only AI units on the ALL team like to shoot dead bodies. It might just be the same case here for SWBF1.
User avatar
giftheck
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2218
Joined: Mon Jan 19, 2009 5:58 pm
Projects :: Star Wars Battlefront Legacy

Re: AI soldiers don't like to use shields?

Post by giftheck »

I think certain weapon types are given priority over others. If a unit has a melee weapon, a blaster, and thermal detonators, it'll use the blaster first, then the thermal detonators, then the melee weapon. It's probably the exact same for shields. I don't know if it's possible to switch priorities, though.
Bob
Brigadier General
Brigadier General
Posts: 633
Joined: Thu May 27, 2010 4:28 am
Location: at home

Re: AI soldiers don't like to use shields?

Post by Bob »

ggctuk wrote:I think certain weapon types are given priority over others. If a unit has a melee weapon, a blaster, and thermal detonators, it'll use the blaster first, then the thermal detonators, then the melee weapon. It's probably the exact same for shields. I don't know if it's possible to switch priorities, though.
There actually are priorities, but they have nothing to do with the weapon type. A weapon is used if:
the enemy can be targetet with it
the enemy is within the weapon's OptimalRange, but outside the MinRange
the weapon can do at least a little bit of damage to the enemy
the weapon has ammo
If all of these conditions are met for the target, the AI will chose the weapon with the ordenance with the highest MaxDamage value. Sometimes the AI ignore these conditions (eg. attacking troopers with rocket launchers) Also, AI prefer to shoot at players over shooting at AI.
[/redunant_information]

Back to topic:
What AQT said. And if that's not the case it is propably hardcoded for the walkerdroid ClassLabel (droidekas).
sereja2
Command Sergeant Major
Command Sergeant Major
Posts: 253
Joined: Wed Aug 31, 2011 4:22 am
Projects :: Naboo Otoh Gunga
Games I'm Playing :: swbf 1
xbox live or psn: No gamertag set
Location: Ukraine

Re: AI soldiers don't like to use shields?

Post by sereja2 »

Well, I set soldiers, as CIS team, make them assault type (just like droidekas), and give them shield, as only one, single weapon. But, got the same zero result...
Still, I don't think, shields are "hard coded", becouse, as I say before, many modders make them works.
For example: Bounty Hunters: Tibana Gas Depot, by Rends. Those gamorreans, equped by grenades, and missile launcher, using shield, all the time. :? Is there exist some explanation for this?
User avatar
jdee/barc
1st Lieutenant
1st Lieutenant
Posts: 444
Joined: Wed Aug 25, 2010 2:47 pm
Projects :: Battlefront One and a Half
xbox live or psn: No gamertag set
Location: Boston

Re: AI soldiers don't like to use shields?

Post by jdee/barc »

I can't really explain what causes this but my CIS droid commander in my mod has a droideka shield and ai use it. Constantly.

Here's the odf for reference.

Hidden/Spoiler:
[code]

[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"


[/code]
Shield ODF
Hidden/Spoiler:
[code]
[WeaponClass]

ClassLabel = "shield"

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

RoundsPerClip = "1"
ReloadTime = "0.0"

MaxShield = 3000
AddShield = -100
AddShieldOff = 600

ShieldOffset = "0.0 1.0 0.125"
ShieldRadius = 1.65

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

ShieldEffect = "droidekashield"


[/code]
Edit: This is a stupid idea of mine but you may have to name the shield odf "cis_weap_walk_droideka_shield"

Edit #2: A much smarter idea. Change the UnitType to "trooper" instead of assault, like with my droid and see if that does the trick!
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: AI soldiers don't like to use shields?

Post by AQT »

sereja2 wrote:Well, I set soldiers, as CIS team
You did this how?
sereja2
Command Sergeant Major
Command Sergeant Major
Posts: 253
Joined: Wed Aug 31, 2011 4:22 am
Projects :: Naboo Otoh Gunga
Games I'm Playing :: swbf 1
xbox live or psn: No gamertag set
Location: Ukraine

Re: AI soldiers don't like to use shields?

Post by sereja2 »

AQT wrote:
sereja2 wrote:Well, I set soldiers, as CIS team
You did this how?
!? :? I am just edit CW mission.lua, and add my edited rebel soldier, from custom sides folder, instead super battle droid. That's it...
jdee/barc, I am copy your both odf samples, and try it, without any changes. Result: still nothing. So, this is real mystery to me :? .
Well, I must say, look's like shields, somehow connected, with any weapon, in the same slot. For example, if you got shield, and grenades, as secondary weapon, so, when you throw grenade - the shield will be switch on. When you throw grenade again - shield will be switch off. So, may be, when your AI, using grenades, they trigger shield automaticaly, and you may think, "they use shields"?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: AI soldiers don't like to use shields?

Post by AQT »

sereja2 wrote:
AQT wrote:
sereja2 wrote:Well, I set soldiers, as CIS team
You did this how?
!? :?
Um, what's up with that? All I did was ask a simple question. That's what people do when they can't read others' minds.
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

Re: AI soldiers don't like to use shields?

Post by ANDEWEGET »

The Confused-Smiley could indicate that he didn't understand your question.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: AI soldiers don't like to use shields?

Post by AQT »

The answer he gave made it seem he understood it, though, so I just thought it was odd, as if I had offended him or something by asking.
sereja2
Command Sergeant Major
Command Sergeant Major
Posts: 253
Joined: Wed Aug 31, 2011 4:22 am
Projects :: Naboo Otoh Gunga
Games I'm Playing :: swbf 1
xbox live or psn: No gamertag set
Location: Ukraine

Re: AI soldiers don't like to use shields?

Post by sereja2 »

I was realy confused, becouse, just in a second imagine, there is exist some other way, to add soldiers in game, and I do it wrong all this time.
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

Re: AI soldiers don't like to use shields?

Post by ANDEWEGET »

Ah, I thought he edited the answer in later because you only quoted that part without ... or anything. Well, it's clear now. :)
User avatar
jdee/barc
1st Lieutenant
1st Lieutenant
Posts: 444
Joined: Wed Aug 25, 2010 2:47 pm
Projects :: Battlefront One and a Half
xbox live or psn: No gamertag set
Location: Boston

Re: AI soldiers don't like to use shields?

Post by jdee/barc »

I think I have discovered why my units were using the shield when no on elses were.

The unit had another secondary weapon, grenades. It seems Clicking secondary fire to throw the grenades triggers the shield as well, even when the shield is not the selected secondary weapon. So whenever droid commanders in my mod were using the shield they were really just accidentally activating the shield while throwing the grenades...if that makes any sense.
sereja2
Command Sergeant Major
Command Sergeant Major
Posts: 253
Joined: Wed Aug 31, 2011 4:22 am
Projects :: Naboo Otoh Gunga
Games I'm Playing :: swbf 1
xbox live or psn: No gamertag set
Location: Ukraine

Re: AI soldiers don't like to use shields?

Post by sereja2 »

jdee/barc wrote:I think I have discovered why my units were using the shield when no on elses were.

The unit had another secondary weapon, grenades. It seems Clicking secondary fire to throw the grenades triggers the shield as well, even when the shield is not the selected secondary weapon. So whenever droid commanders in my mod were using the shield they were really just accidentally activating the shield while throwing the grenades...if that makes any sense.
Yes, it may makes some sense. At least now, we know, the using shields by soldiers, is only illusion... In Rends map, gamorreans, also was equpped by grenades... So, the shields using may realy connected, only with droidekas...
jdee/barc, If I remember, some times ago, you try give your "monster darktrooper" droidekas odf. If you hase success in this, cud be interesting, if you try to give them shields, and see, what they will do...
User avatar
jdee/barc
1st Lieutenant
1st Lieutenant
Posts: 444
Joined: Wed Aug 25, 2010 2:47 pm
Projects :: Battlefront One and a Half
xbox live or psn: No gamertag set
Location: Boston

Re: AI soldiers don't like to use shields?

Post by jdee/barc »

I haven't tried making a walkerdroid Darktrooper because it won't. A WalkerDroid entity needs to be able to transform into a secondary "ball" mode. It's an entity class specifically for the droideka.
User avatar
RebelMarksman
Private Third Class
Posts: 55
Joined: Sun Feb 12, 2012 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 1
xbox live or psn: No gamertag set

Re: AI soldiers don't like to use shields?

Post by RebelMarksman »

I also hardship with these shields. As a rule - when using of any weapons, personage turned off the shield. When the enemy was near. In the end I just made a quick recovery of the health of some of the characters instead. Until just too lazy to configure it. But if You Sereja, get a handle on this, I would be grateful to you for advice.
sereja2
Command Sergeant Major
Command Sergeant Major
Posts: 253
Joined: Wed Aug 31, 2011 4:22 am
Projects :: Naboo Otoh Gunga
Games I'm Playing :: swbf 1
xbox live or psn: No gamertag set
Location: Ukraine

Re: AI soldiers don't like to use shields?

Post by sereja2 »

Yes, I can say, I handle with them. If you try my "Fairy Tale" map, you may see how AI always try swith on shields. The trick is next: I just set shield as primary weapon, and give them "fake" melee, as primary second weapon, with very long recharge time.
Here the odf for fake melee weapon:
Hidden/Spoiler:
[WeaponClass]

ClassLabel = "melee"

[Properties]
IconTexture = "hud_lightsaber_shield_icon"

GeometryName = "gam_weap_weequayaxe"
AnimationBank = "lightsabre"

MuzzleFlash = "med_muzzle_flash"
Discharge = "med_smoke_effect"

RoundsPerClip = "0"
ReloadTime = "99992.0"

LockOnRange = "9991.0"
LockTime = "9990.4"
AutoAimSize = "0.0"

MinRange = "9990"
OptimalRange = "9991.5"
MaxRange = "9993"

SwingTime = "1000.7 1000.5 imp_weap_lightsabre"

HitSound = "imp_weap_lightsabre_hit"
DeflectSound = "imp_weap_lightsabre_deflect"

SwingTime = "1000.9 1000.4 com_weap_throw"
CanDeflect = "0"
User avatar
RebelMarksman
Private Third Class
Posts: 55
Joined: Sun Feb 12, 2012 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 1
xbox live or psn: No gamertag set

Re: AI soldiers don't like to use shields?

Post by RebelMarksman »

Thank You! gam_weap_weequayaxe - melee weapon ? Unfortunately I have not heard of it, so I do not know its characteristics. Can I ask you, if give a radiation rifle (I have tat_weap_inf_tuskensniperrifle), as a secondary weapon will do from this sense ? And what exactly should be set up in the ODF file ?
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "cannon"

[Properties]
AnimationBank = "rifle"
GeometryName = "all_weap_inf_sniperrifle"
HighResGeometry = "all_1st_weap_inf_sniperrifle"

//***********************************************
//************* TARGET & RANGE VALUES **********
//***********************************************

TargetEnemy = "1"
TargetNeutral = "0"
TargetFriendly = "0"

TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "0"
TargetBuilding = "0"

MinRange = "20"
OptimalRange = "64"
MaxRange = "128"

LockOnRange = "0.0"
LockTime = "0.0"
LockOnAngle = "1.0"

SniperScope = 1
ZoomFirstPerson = 1
ZoomMin = "4.0"
ZoomMax = "12.0"
ZoomRate = "0.0"

YawSpread = "0.0"
PitchSpread = "0.0"

KickStrength = "2.0"

SpreadPerShot = "1.1"
SpreadRecoverRate = "4.8"
SpreadThreshold = "1.6"
SpreadLimit = "6.0"

StandStillSpread = "0.0"
StandMoveSpread = "0.0"
CrouchStillSpread = "0.0"
CrouchMoveSpread = "0.0"
ProneStillSpread = "0.0"
ProneMoveSpread = "0.0"

//***********************************************
//*********** WEAPON PERFORMANCE VALUES *********
//***********************************************

RoundsPerClip = "5"
ReloadTime = "2.0"
ShotDelay = "1.0"
TriggerSingle = "1"
MaxPressedTime = "0.0"

SalvoCount = "1"
SalvoDelay = "0.0"
InitialSalvoDelay = "0.0"
SalvoTime = "0.0"

OrdnanceName = "Allin_sniperrifle_ord"
FirePointName = "hp_fire"

//***********************************************
//*********** HUD & CONTROLLER VALUES *********
//***********************************************

IconTexture = "IMP_sniperrifle_icon"
ModeTexture = "HUD_weap_semiauto"
ReticuleTexture = "reticule_sniper"
ScopeTexture = "weapon_scope3"

MuzzleFlash = "small_muzzle_flash"
FlashColor = "164 43 255 255"
FlashLength = 0.025
FlashLightColor = "240 221 255 175"
FlashLightRadius = "2.0"
FlashLightDuration = "0.25"
Discharge = "small_smoke_effect"

//************************************************
//******************* SOUND *****************
//************************************************

FireSound = "all_weap_inf_pistol_fire"
FireEmptySound = "com_weap_inf_ammo_empty"
OverheatSound = "com_weap_energy_depleted"
OverheatSoundPitch = "0.5"
OverheatStopSound = "com_weap_energy_refilled"
ChangeModeSound = "com_weap_inf_equip_sm"
WeaponChangeSound = "com_weap_inf_equip_sm"
JumpSound = "com_weap_inf_pistol_mvt_jump"
LandSound = "com_weap_inf_pistol_mvt_land"
RollSound = "com_weap_inf_pistol_mvt_roll"
//ProneSound = "com_weap_inf_pistol_mvt_lie"
SquatSound = "com_weap_inf_pistol_mvt_squat"
//StandSound = "com_weap_inf_pistol_mvt_getup"
Thank you in advance for the advice.
Post Reply