Controll how AI uses weapons

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
User avatar
Benoz
Corporal
Corporal
Posts: 140
Joined: Tue May 28, 2013 12:34 pm
Projects :: Clone Wars Era Mod Version 2
Games I'm Playing :: OldFront - EAFront
xbox live or psn: No gamertag set
Location: Germany

Controll how AI uses weapons

Post by Benoz »

Sorry for the question because I know it was already asked. I searched almost 30 min but I couldn't find the post.
How do you controll how often the AI uses a specific weapon?

I gave my sniper an invisibility weapon as an award weapon and now every AI sniper is running around switching between the sniper and the invisibility weapon non stop.
I just want him to go with the sniper and never/only now and then use the other weapon.

Thanks in advance. Post can be deleted after solving.
Robobermann
Private
Posts: 33
Joined: Wed Jul 25, 2018 6:58 pm
Projects :: My projects
Games I'm Playing :: SWBF2 2005

Re: Controll how AI uses weapons

Post by Robobermann »

These define when the AI are allowed to use a specific weapon. When set to zero, they will not use the weapon under those conditions:

Code: Select all

AITargetPerson			= "0"
AITargetAnimal			= "0"
AITargetDroid			= "0"
AITargetVehicle			= "0"
AITargetBuilding		= "0"
User avatar
Benoz
Corporal
Corporal
Posts: 140
Joined: Tue May 28, 2013 12:34 pm
Projects :: Clone Wars Era Mod Version 2
Games I'm Playing :: OldFront - EAFront
xbox live or psn: No gamertag set
Location: Germany

Re: Controll how AI uses weapons

Post by Benoz »

I asume this goes to the weapons ODF?
Can you control it with a precentage of e.g. AITargetPerson = 0.3 or is it absolute?
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: Controll how AI uses weapons

Post by giftheck »

It'll be an absolute 0/1 entry.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Controll how AI uses weapons

Post by AQT »

You can also set the ranges of the weapon to 0, like the stock trishot:

Code: Select all

MinRange        = "0"
OptimalRange        = "0"
MaxRange        = "0"
That's why the Super Battle Droids never use it, but humans players can.
User avatar
Benoz
Corporal
Corporal
Posts: 140
Joined: Tue May 28, 2013 12:34 pm
Projects :: Clone Wars Era Mod Version 2
Games I'm Playing :: OldFront - EAFront
xbox live or psn: No gamertag set
Location: Germany

Re: Controll how AI uses weapons

Post by Benoz »

Thanks for the information AQT, but it seems this trick only works when the weapon is not in the WeaponChannel = 1.
I want the stealth ability to be a secondary weapon. With that the sniper just chills back and spams the invisibility weapon over and over.
Post Reply