Changing AI behavior
Moderator: Moderators
- wishihadaname
- Captain

- Posts: 493
- Joined: Fri Dec 28, 2007 2:10 pm
- Projects :: The Corellian Resistance
- Location: Look to your left.... no, your other left....
Changing AI behavior
Is there a way to make the AI shoot their guns at tanks instead of spam grenades? That stupid behavior is killing my sfx memory pool and making things like the flame thrower and EMP launcher look bad.
-
501st_commander
- Master Bounty Hunter

- Posts: 1570
- Joined: Wed Dec 10, 2008 7:48 pm
Re: Chaning AI behavior
kinetosimpetus wrote: Short answer: No.
Long answer: Noooooooooooooooooooooooo.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Chaning AI behavior
Short answer: Wrong.501st_commander wrote:kinetosimpetus wrote: Short answer: No.
Long answer: Noooooooooooooooooooooooo.
Long answer: Wrong. You can adjust what each weapon individually is used for with the "AITargetXXX" .odf parameters. E.g.:
Code: Select all
AITargetPerson = "1"
AITargetAnimal = "1"
AITargetDroid = "1"
AITargetVehicle = "0"
AITargetBuilding = "0"-
501st_commander
- Master Bounty Hunter

- Posts: 1570
- Joined: Wed Dec 10, 2008 7:48 pm
Re: Chaning AI behavior
Ah, sorry, i thought it was hard-coded for some reasonMaveritchell wrote:Short answer: Wrong.501st_commander wrote:kinetosimpetus wrote: Short answer: No.
Long answer: Noooooooooooooooooooooooo.
Long answer: Wrong. You can adjust what each weapon individually is used for with the "AITargetXXX" .odf parameters. E.g.: ....
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Chaning AI behavior
Nope not hardcoded. 
I made AI shoot rocket launchers at infantry once, mifht do it again...
I made AI shoot rocket launchers at infantry once, mifht do it again...
- Eggman
- Master Bounty Hunter

- Posts: 1516
- Joined: Mon Jul 16, 2007 1:30 pm
- Projects :: Battlefront Chronicles
- Location: Las Vegas
Re: Chaning AI behavior
Logic agrees with that post, but for some reason I've never been able to prevent AI from tossing grenades at tanks. Definitely try that first though, since it is supposed to be the correct solution.Maveritchell wrote:Short answer: Wrong.501st_commander wrote:kinetosimpetus wrote: Short answer: No.
Long answer: Noooooooooooooooooooooooo.
Long answer: Wrong. You can adjust what each weapon individually is used for with the "AITargetXXX" .odf parameters. E.g.:That's the easy way, to just tell the AI not to throw grenades and to shoot their guns (regular blasters should disable vehicle targeting by default). You can also tool around with the range parameters in the weapon .odfs to give a wider range in which the AI use their guns and a smaller range in which they throw grenades (if you want them to use both).Code: Select all
AITargetPerson = "1" AITargetAnimal = "1" AITargetDroid = "1" AITargetVehicle = "0" AITargetBuilding = "0"
-
mswf
- Master Bounty Hunter

- Posts: 1674
- Joined: Tue Mar 31, 2009 3:40 pm
- Location: Twello, The Netherlands
- Contact:
Re: Chaning AI behavior
[guess]That could be because grenades have splash damage and because of the AI not being able to see where an obstruction (= hull of vehicle) is.[/guess]
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Chaning AI behavior
If that's killing your effects pool I strongly suggest trimming down the overall level. If you're getting issues there then the level will likely never work online.
- Eggman
- Master Bounty Hunter

- Posts: 1516
- Joined: Mon Jul 16, 2007 1:30 pm
- Projects :: Battlefront Chronicles
- Location: Las Vegas
Re: Chaning AI behavior
Nope, it's definitely hordes of bots running up to the vehicle and deliberately throwing grenades at point-blank range.mswf wrote:[guess]That could be because grenades have splash damage and because of the AI not being able to see where an obstruction (= hull of vehicle) is.[/guess]
- wishihadaname
- Captain

- Posts: 493
- Joined: Fri Dec 28, 2007 2:10 pm
- Projects :: The Corellian Resistance
- Location: Look to your left.... no, your other left....
Re: Chaning AI behavior
I did that but they still aren't shooting. I changed the common files for each type of blaster vehicles so the AI targets vehicles but they still only spam grenades.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Chaning AI behavior
Did you change the grenade odfs as well?
- wishihadaname
- Captain

- Posts: 493
- Joined: Fri Dec 28, 2007 2:10 pm
- Projects :: The Corellian Resistance
- Location: Look to your left.... no, your other left....
Re: Chaning AI behavior
Nevermind, it is working, I just didn't notice it before. The AI will only target a tank if it shoots at them, otherwise they just ignore it. Is there a way to make them more noticable?
-
501st_commander
- Master Bounty Hunter

- Posts: 1570
- Joined: Wed Dec 10, 2008 7:48 pm
Re: Chaning AI behavior
I believe that is hard-coded. They will only shoot of it bumps into them or shots at them.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Chaning AI behavior
wishihadaname wrote:Nevermind, it is working, I just didn't notice it before. The AI will only target a tank if it shoots at them, otherwise they just ignore it. Is there a way to make them more noticable?
You can also tool around with the range parameters in the weapon .odfs to give a wider range in which the AI use their guns and a smaller range in which they throw grenades (if you want them to use both).
- wishihadaname
- Captain

- Posts: 493
- Joined: Fri Dec 28, 2007 2:10 pm
- Projects :: The Corellian Resistance
- Location: Look to your left.... no, your other left....
Re: Chaning AI behavior
I know about the range thing and I fiddled arround with that too. I'm wondering though, what if I changed their unit type to assault? Don't assault units attack vehicles?
