Author Topic: *BETA* AI Smokescreen Grenade  (Read 3439 times)

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 799
  • Formerly known as DJ Barney. The Few are many ;)
    • View Profile
    • Homepage
*BETA* AI Smokescreen Grenade
« on: 02-04-2011, 21:04:48 »
OK, I got the templates stable. No CTD ! At least, I don't get one. But I need help with testing. I've used the grenade in game and it seems to work but I have not confirmed this. Doesn't bf2 have a mode that shows visually the ai target ray tracing ?

Add the attached templates and collisionmesh to objects_weapons_server.zip/Weapons/Handheld/AN_M8_Smokegrenade

Keep the collision mesh in it's own directory. The grenade is the German hand thrown smoke grenade.

The screen works by spawning a transparent collision mesh (a sphere) that blocks the bot targetting. This is a beta and therefore there are more tweaks to do before final release, and at the moment it may not be any use for actual game play.
« Last Edit: 03-04-2011, 19:04:18 by DJ Barney »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: *BETA* AI Smokescreen Grenade
« Reply #1 on: 02-04-2011, 22:04:43 »
wow, nice! Will give this a try. If this works though, it will be give our AI for Fh2 an outstanding lead for this engine.

Great going, man!


Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 799
  • Formerly known as DJ Barney. The Few are many ;)
    • View Profile
    • Homepage
Re: *BETA* AI Smokescreen Grenade
« Reply #2 on: 02-04-2011, 22:04:19 »
Thanks  ;D. This is only fair. @ the moment the bots fog me out with smoke grenades with smoke that they can see through. The toads.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: *BETA* AI Smokescreen Grenade
« Reply #3 on: 03-04-2011, 02:04:48 »
haven't tried it yet, but are you saying, they can't see through YOUR smoke but they can through theirs?

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 799
  • Formerly known as DJ Barney. The Few are many ;)
    • View Profile
    • Homepage
Re: *BETA* AI Smokescreen Grenade
« Reply #4 on: 03-04-2011, 16:04:40 »
No, no. I was just saying how including this mod will level the playing field with bots. But your posts brings up something I had not thought of. Will bot deployed smoke block them as well ? The answer - of course it will. Their smoke should work the same as human deployed smoke. Anyway this will be examined in testing.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: *BETA* AI Smokescreen Grenade
« Reply #5 on: 03-04-2011, 17:04:55 »
Will check this out soon - But it will also be wonderful to see it work for tank smoke also.

I will say, don't know how doable it is, but can that interruption radius be smaller than the smoke screen? Because there are always the fringes of the screen that players can see through. Dont want to leave bots even more shorthanded.

A couple of questions,
Does the radius grow with the build? Or does it appear as soon as the smoke is deployed? Or does it appear once the smoke reaches it full size?


Offline Raziel

  • Jr. Member
  • **
  • Posts: 859
  • Bullet Magnet
    • View Profile
Re: *BETA* AI Smokescreen Grenade
« Reply #6 on: 03-04-2011, 17:04:48 »
Nice one DJ! Really great work!!  :)

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 799
  • Formerly known as DJ Barney. The Few are many ;)
    • View Profile
    • Homepage
Re: *BETA* AI Smokescreen Grenade
« Reply #7 on: 03-04-2011, 18:04:48 »
LOL, thanks :D ... but the 64 millions dollar question has yet to be answered. Does it work ?

Will check this out soon - But it will also be wonderful to see it work for tank smoke also.

I will say, don't know how doable it is, but can that interruption radius be smaller than the smoke screen? Because there are always the fringes of the screen that players can see through. Dont want to leave bots even more shorthanded.

A couple of questions,
Does the radius grow with the build? Or does it appear as soon as the smoke is deployed? Or does it appear once the smoke reaches it full size?

This is all being tweaked ATM.

The sphere spawns whole. It's simple a case, by the look of it of synchronising the time to live with the smoke time to live.

If this works, then yes, tank shells.
« Last Edit: 03-04-2011, 18:04:16 by DJ Barney »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: *BETA* AI Smokescreen Grenade
« Reply #8 on: 03-04-2011, 19:04:41 »
 ;D

*giggles like a little girl*

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: *BETA* AI Smokescreen Grenade
« Reply #9 on: 23-04-2011, 12:04:22 »
Yep. this works  :D

I noted that the German nade is at full concealment for 10seconds, before and beyond which time its now building up or diminishing.

 ofcourse, the way that particular smoke grenade works, same for Americans, it conceals almost immediately. Bots probably get affected by it for no more than 3 seconds though. I did have bots almost run into me before firinf when I deployed it, but it didn't take long for them to start firing right through it. So what I say is, increase the time a bit, otherwise it wont be tactical enough.

great work man, can't wait for this to be in all grenades


Remick, I sure hope you're seeing all this - One more addition for FH2 AI coming up!!

CannonFodder, I think this solution needs to be put as a link the DL section.

DJ, I think you should take over where Drawde left of. PM if you are interested. You certainly have some skill with AI :)

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 799
  • Formerly known as DJ Barney. The Few are many ;)
    • View Profile
    • Homepage
Re: *BETA* AI Smokescreen Grenade
« Reply #10 on: 23-04-2011, 12:04:43 »
Thanks for the confirmation. Been wondering if this is working or not. I ran it in AI debug mode (where you can see AI raycasting drawn on the screen), but I don't understand enough about that mode to check if this is working. If it's only for a few seconds as you say then that would make sense from what I was seeing ... bot's raycasting to targets with an occasional lapse as the grenade does its thing. I want to replace the texture on the sphere spawn with a visible texture so I can see what is going on, but I've not had much time for this recently ... I should be back on it soon.

BTW, remember this is still in beta, so I'm not sure about the download thread yet .. although I suppose it could be on there if clearly labelled BETA.


Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: *BETA* AI Smokescreen Grenade
« Reply #11 on: 23-04-2011, 13:04:05 »
Always welcome.

And I suggested it for DL because well, blocking bot's line of sight is better than nothing, right?



Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: *BETA* AI Smokescreen Grenade
« Reply #12 on: 05-05-2011, 05:05:28 »
Hi, DJ... any update on this... Either in how long smoke lasts for German grenade, or any new grenade additions ?


Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 799
  • Formerly known as DJ Barney. The Few are many ;)
    • View Profile
    • Homepage
Re: *BETA* AI Smokescreen Grenade
« Reply #13 on: 08-05-2011, 12:05:03 »
Got some other things going on at the moment, but I'm looking forward to getting back to this after the 16th of May.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: *BETA* AI Smokescreen Grenade
« Reply #14 on: 01-07-2011, 13:07:27 »
Any word of this?

I am really hoping the next Fh2 RC ships out with your smoke AI, and chances are, it might be soon.

Not too caught up with RL are you? Cuz the Germans have suddenly developed an unfair advantage.. jk :)