Author Topic: why stop at smoke?  (Read 2235 times)

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 811
  • The Few are many ;)
    • View Profile
    • Homepage
Re: why stop at smoke?
« Reply #15 on: 02-03-2012, 14:03:51 »
OK, I've abandoned work on the invisible object spawner smoke grenade. It's basically a clever hack but with all the problems that hacks have with them. It's not using the AI the way it's supposed to be used.

So on examination  of the internals I wonder if one of the custom or special triggers could be used (that are in aibehaviours.con) that could be triggered by the activation of a smoke grenade, smoke shell and even other suppression techniques (bullets). I know when I'm in smoke I tend to want to get out of it. If the AI could be made to strongly avoid the smoke grenade (as they are supposed to do with normal grenades - run away) then they won't be targetting the player because they will be in avoid mode. This could mimick being blinded by the smoke quite well - and by using mechanisms already built in to bf2, no hacks !

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: why stop at smoke?
« Reply #16 on: 02-03-2012, 14:03:26 »
But the issue is, some uses of smoke is at range. So where it would block your view, bots wont be avoiding that far away, but will be firing through it.

I personally think the initial method had something to it. When I tested it, I actually had bots stop firing once the smoke went up for 3 seconds, Or fire in an obviously blind fashion even when i was at point blank range.

I really thought it was simply a matter of increasing the duration of the invisible object and editing the rate of increase for British smoke...

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 811
  • The Few are many ;)
    • View Profile
    • Homepage
Re: why stop at smoke?
« Reply #17 on: 02-03-2012, 15:03:12 »
Yes the invisible object spawner smoke grenade seems amazing at first. It had me in it's thrall for a while. But it's a hack that does not follow the way the AI back end is coded to allow graceful solutions to problems such as this.

But the issue is, some uses of smoke is at range. So where it would block your view, bots wont be avoiding that far away, but will be firing through it.

If I'm correct they will actually avoid smoke fired at range (you mean like a tank smoke shell?), because the weapon type will contain a TRIGGER in it's template that will effect the bots in and around where the smoke hits. But I have to do more research on this. I suspect that at least I've got the style of the approach right now. I had to understand how DICE coded the AI backend. I suspect it's "object orientated" (yes, scary coding term) in order to allow solutions to be setup to almost any problem (such as this one) without DICE having to pay for more many man hours coding for each instance of a problem.

EDIT: I found a huge clue !

"[BFSP]Korben_Dallas> One of the BF2 patches added two AI new behaviors - Random & Triggerable - what are these?
[DICE]_Tobias_Karlsson> I don't know, to be honest. I think that these were added for special forces. I'm guessing that random is the teargased/flash banged behaviour." ... from "BFSP Live Chat with DICE Sweden, Full chat log here".

Can't believe I forgot about tear gas and flashbang.
« Last Edit: 02-03-2012, 22:03:51 by DJ Barney »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: why stop at smoke?
« Reply #18 on: 03-03-2012, 10:03:58 »
What I'm saying is, if the bots see smoke as something flee from, I'm not sure if smoke is seen far off, they will avoid it. They will keep to their path, firing right through it, and will only think to flee if they were closer.


Did the hack of the invisble object NOT perform as intended?

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 811
  • The Few are many ;)
    • View Profile
    • Homepage
Re: why stop at smoke?
« Reply #19 on: 03-03-2012, 21:03:46 »
Oh I see. I'll worry about that one later.

The hack will never perform very well because its a hack.

I need to look through AIX2 as I wonder if they came up for some solutions for this that I have missed. I'm just going through each stage of doing this now. Already threw out using flashbang ("Random" in aibehaiours.ai) as that was for Special Forces which is a different bf2.exe.