Page 1 of 1
Changing AI behavior
Posted: Wed Mar 17, 2010 11:04 pm
by wishihadaname
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.
Re: Chaning AI behavior
Posted: Wed Mar 17, 2010 11:33 pm
by 501st_commander
kinetosimpetus wrote:
Short answer: No.
Long answer: Noooooooooooooooooooooooo.
Re: Chaning AI behavior
Posted: Wed Mar 17, 2010 11:41 pm
by Maveritchell
501st_commander wrote:kinetosimpetus wrote:
Short answer: No.
Long answer: Noooooooooooooooooooooooo.
Short answer: Wrong.
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"
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).
Re: Chaning AI behavior
Posted: Thu Mar 18, 2010 10:28 am
by 501st_commander
Maveritchell wrote:501st_commander wrote:kinetosimpetus wrote:
Short answer: No.
Long answer: Noooooooooooooooooooooooo.
Short answer: Wrong.
Long answer: Wrong. You can adjust what each weapon individually is used for with the "AITargetXXX" .odf parameters. E.g.: ....
Ah, sorry, i thought it was hard-coded for some reason

Re: Chaning AI behavior
Posted: Thu Mar 18, 2010 10:44 am
by kinetosimpetus
Nope not hardcoded.
I made AI shoot rocket launchers at infantry once, mifht do it again...
Re: Chaning AI behavior
Posted: Thu Mar 18, 2010 11:04 am
by Eggman
Maveritchell wrote:501st_commander wrote:kinetosimpetus wrote:
Short answer: No.
Long answer: Noooooooooooooooooooooooo.
Short answer: Wrong.
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"
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).
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.
Re: Chaning AI behavior
Posted: Thu Mar 18, 2010 11:33 am
by mswf
[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]
Re: Chaning AI behavior
Posted: Thu Mar 18, 2010 1:05 pm
by Teancum
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.
Re: Chaning AI behavior
Posted: Thu Mar 18, 2010 2:59 pm
by Eggman
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]
Nope, it's definitely hordes of bots running up to the vehicle and deliberately throwing grenades at point-blank range.
Re: Chaning AI behavior
Posted: Thu Mar 18, 2010 4:55 pm
by wishihadaname
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.
Re: Chaning AI behavior
Posted: Thu Mar 18, 2010 8:05 pm
by Fiodis
Did you change the grenade odfs as well?
Re: Chaning AI behavior
Posted: Thu Mar 18, 2010 10:01 pm
by wishihadaname
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?
Re: Chaning AI behavior
Posted: Thu Mar 18, 2010 10:50 pm
by 501st_commander
I believe that is hard-coded. They will only shoot of it bumps into them or shots at them.
Re: Chaning AI behavior
Posted: Thu Mar 18, 2010 10:57 pm
by Maveritchell
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).
Re: Chaning AI behavior
Posted: Thu Mar 18, 2010 11:40 pm
by wishihadaname
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?