AI won't fire Wookiee Bowcaster

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am

AI won't fire Wookiee Bowcaster

Post by razac920 »

Hi, I'm working on a map set on stock Tantive IV and I've noticed that the AI will not fire their bowcasters. I see them charge them up and follow me, but never fire at me (or at each other). I'm not sure why this is.

the weapon odf
Hidden/Spoiler:
[WeaponClass]
ClassParent = "com_weap_inf_bowcaster"
GeometryName = "all_weap_inf_bowcaster.msh"

[Properties]
GeometryName = "all_weap_inf_bowcaster"
HighResGeometry = "all_1st_weap_inf_bowcaster"

//******************************************************
//*************** CHARGE STATES ****************
//******************************************************

ShotsPerSalvo = 7
ShotPatternCount = 7
ShotPatternPitchYaw = "0.0 0.0"
ShotPatternPitchYaw = "0.0 -0.7"
ShotPatternPitchYaw = "0.0 0.7"
ShotPatternPitchYaw = "0.0 -1.4"
ShotPatternPitchYaw = "0.0 1.4"
ShotPatternPitchYaw = "0.0 -2.1"
ShotPatternPitchYaw = "0.0 2.1"

OrdnanceName = "all_weap_inf_bowcaster_ord"

FireSound = "all_weap_inf_bowcaster_fire"
ChargeSound = "all_weap_inf_bowcaster_charge"
ChargeSoundPitch = "0.05"

NextCharge = 0.95
ShotsPerSalvo = 1
ShotPatternCount = 1
OrdnanceName = "all_weap_inf_bowcaster_ord_high"

FireSound = "all_weap_inf_bowcaster_fire"
ChargeSound = "all_weap_inf_bowcaster_charge"
ChargeSoundPitch = "0.05"

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

FireSound = "all_weap_inf_bowcaster_fire"
FireEmptySound = "com_weap_inf_ammo_empty"
FireLoopSound = ""
ReloadSound = "com_weap_inf_reload_med"
ChargeSound = "all_weap_inf_bowcaster_charge"
ChargeSoundPitch = "0.05"
ChangeModeSound = "com_weap_inf_equip_med"
WeaponChangeSound = "com_weap_inf_equip_med"
JumpSound = "com_weap_inf_rifle_mvt_jump"
LandSound = "com_weap_inf_rifle_mvt_land"
RollSound = "com_weap_inf_rifle_mvt_roll"
//ProneSound = "com_weap_inf_rifle_mvt_lie"
SquatSound = "com_weap_inf_rifle_mvt_squat"
//StandSound = "com_weap_inf_rifle_mvt_getup"
I have not edited the Common class parent in any way.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: AI won't fire Wookiee Bowcaster

Post by lucasfart »

Well you do you ShotPatternCount and ShotsPerSalvo in their twice. That could be causing your problem. :P
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am

Re: AI won't fire Wookiee Bowcaster

Post by razac920 »

First set of lines are for the uncharged shot, second set is for the charged shots. I haven't changed the ODF in any way from the default Alliance all_weap_inf_bowcaster, and in fact I tried replacing mine with the original, no change. Then I opened up a different map and gave a class the default all_weap_inf_bowcaster, and they used it properly...
Bob
Brigadier General
Brigadier General
Posts: 633
Joined: Thu May 27, 2010 4:28 am
Location: at home

Re: AI won't fire Wookiee Bowcaster

Post by Bob »

Have you copied both ordenance ODFs? Have you changed their damage value?
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am

Re: AI won't fire Wookiee Bowcaster

Post by razac920 »

Well, no, I haven't, but that's because I'm loading all_inf_wookiee in the LUA before my custom units. I myself can fire the bowcaster, and it works fine, but the bots chooses not to shoot it, instead to charge it up and keep it charged indefinitely.

EDIT: Here's a picture of the problem
Hidden/Spoiler:
Image
EDIT2: Okay, I solved the problem. In my LUA, I had greatly increased AI difficulty: SetAIDifficulty(150,150,"hard") Commenting out this line lead the AI to actually fire their weapon. Odd that this line hadn't negatively affected any other weapon though (they were firing quickly and accurately in other instances). I will try to see how high I can raise AI without this problem occurring.

EDIT3: It seems that some AI begin exhibiting this behavior 12 levels higher than Elite, and by 18 levels higher nearly all do. Topic solved.
Post Reply