Page 1 of 2

Working Smoke Grenades against bots

Posted: 2018-09-23 02:55
by Arab
Image

Update 10/11/19: Due to a series of misunderstandings and lack of communication to the original author, this feature has been falsely credited under ArmourRus. The real creator of this feature is MaxPV1981 (MaxP). Apologies to MaxPV1981 for any trouble caused. -[R-DEV]Arab


Hello all! :)

Today I'm proud to announce that smoke grenades will finally make a come back in COOP!

The reason why they were taken out is because they never worked against bots. They were able to see through them, making cover useless. This has been a problem in Battlefield 2 since it's release, and therefore many servers opted to prohibit using smoke grenades against bots.

...Until now.

So I am pleased to say that all smoke grenades will now properly against bots!

So some history. Originally, the first attempt to make it work was by SatNav in the BF2SP Community, a talented veteran BF2 modder who has contributed a lot of knowledge and helped many out in modding the BF2 Engine and modding in general. The concept was to spawn a particle of a invisible sphere Collision Mesh whenever the weapon fired but it only worked in local/offline, not in an online environment.

Modders have been trying to make this work in an MP modding to no avail, until a modder called MaxPV1981 managed to achieve this seemingly impossible feat!
Special Thanks and Credits to MaxPV1981, the original author who manage to make this work online and refined the system further who is the developer behind AIX2 Reality BF2 COOP Mod. He is the author behind the system below, and small tweaks have been made by me for PR COOP's gameplay.
How it works:

The smoke grenades spawn an invisible sphere collision mesh which is created as a Projectile to be used against bots. Using the napalm system (GLU-1) to create a spawner, it spawns an invisible Player Controlled Object whenever the Smoke Grenade projectile is fired!

Smoke Grenades and UGL SP versions are created to use each spawners with varied delays and only for _sp kits/factions. This is to ensure that it remains in the COOP gamemode only.

How to use:

For Smoke Grenades: A 15 second delay when the projectile lands. Simply wait for the smoke effect to completely fill at its peak before moving.

For UGL's: A 1 second delay when the projectile lands.

It is also included for the new ninja _sp kits so admins can freely use it against bots!

These apply for all smoke grenades including Underbarrel Grenade Launchers but not Signal Grenades.
The same system will hopefully be incorporated for Vehicle Smoke Launchers too (If it works), allowing smokescreens to work against bots too.


This feature will make gameplay more immersive and realistic, allowing teammates to make revives safely, provide cover or as a distraction.

Expect this feature to ship out with the v1.6 update when it's released!

See you on the battlefield! ;)

Posted: 2018-09-23 13:51
by Petar97
Finally! great work sir

Posted: 2018-09-23 14:05
by Fastjack
Nice done.

Posted: 2018-09-23 14:17
by sweedensniiperr
I don't i actually understand how this works... Will thebots shoot through the smoke but the sphere makes the bullets dissapear? Or is it an invisible "object" that bots can't "see" through?

I take it that this will not work properly with bots using thermal controlled vehicles. - They will not see through the smoke even with thermals?

Posted: 2018-09-23 16:45
by Veterans-Gaming
Thank you all very much for your hard work!

Posted: 2018-09-23 19:34
by keed
Thank you for the COOP love! Is mortar smoke viable too?

Posted: 2018-09-24 00:22
by Arab
keed;bt11000 wrote:Thank you for the COOP love! Is mortar smoke viable too?
For mortar smoke, I haven't got it working yet but I've got a few ideas on how to make it work.
sweedensniiperr;bt10998 wrote:I don't i actually understand how this works... Will thebots shoot through the smoke but the sphere makes the bullets dissapear? Or is it an invisible "object" that bots can't "see" through?

I take it that this will not work properly with bots using thermal controlled vehicles. - They will not see through the smoke even with thermals?
It's an invisible sphere object that bots can't see through. I'm not sure if this will affect bots using thermals - hasn't been tested but will add that to the To Do list :)

Posted: 2018-09-24 03:23
by ALADE3N
Finally , I've been wondering when will this be in PR

Posted: 2018-09-25 09:57
by Rotblut
Was waiting for this. It was fun to test this. What surprises me was that the Mortarsmoke is working as well. Dev's, thanks for listnening to our COOP Comunity and for so much work u put in.

Posted: 2018-09-25 19:32
by Skywalker-11
Are bots able to run through the smoke or are they just going around or getting stuck in front of it?

Posted: 2018-09-26 13:00
by Arab
Skywalker-11;bt11005 wrote:Are bots able to run through the smoke or are they just going around or getting stuck in front of it?
Bots go through the smoke to seek out the target :)
This happens when the bots fire at the player and smoke is deployed, they follow their line of sight to find the player.

Posted: 2018-10-01 22:33
by milosv123344
I can't believe we finally lived to see the day, thank you so much for your hard work!

Posted: 2018-10-14 22:04
by Dr. Phil Perlmutter
Hey Arab, that's great news, waiting so long for that, being a player that mainly plays coop.
I am wondering if this solution would be applicable to bushes in maps with a lot vegetation as well, cause bots technically view though bushes which makes such maps a whole different experience in coop compared to playing them in p vs p.

Posted: 2018-10-17 12:51
by MaxP
Hm, are we going the absolutely same way with somebody, or is it my config?
I've implemented the same a year ago or so.
I gave a tweak to some modders too this summer:
http://www.battlefieldsingleplayer.com/ ... opic=15744
I wonder 'cause there is a some irony: I used "the napalm system (GLU-1) to create a spawner, that spawns an invisible Player Controlled Object with mapped materials and detonation code that uses the collision mesh when the projectile is activated", then I've implemented the smoke greande, based on SatNav colmesh, and also the vehicle smokescreens.
https://www.youtube.com/watch?v=ez9QSLDrSnA
https://www.youtube.com/watch?v=UVKJDHKQByk
In process:
https://youtu.be/QkhXfW_xT4s

I'm very grateful to PR team for their mod, as it brings me to modding, and I always glad to share my work with them, like it was with AI bomber cars implementation (but you've made your own) or other stuff. I never asked nothing for my own work, but if it is my work, it will really hurts me. I've spend years to implement this feature, and only a couple of people thanked me...
I am wondering if this solution would be applicable to bushes in maps with a lot vegetation as well, cause bots technically view though bushes
Technically it is very simple to make bots to not see through the leaves, and it doesn't needs any tricks, but it would be a very bad decision, 'cause their behavior will become very weird.

Posted: 2018-12-03 21:09
by space1
MaxP;bt11025 wrote:Technically it is very simple to make bots to not see through the leaves, and it doesn't needs any tricks, but it would be a very bad decision, 'cause their behavior will become very weird.
Is that a fact or speculation?? Cant bots have a code that will let them know they can walk through a special object that is a vegetation but cant see through them? Lot of maps are unplayable CoOp because of this issue, like Sareeme which is my favorite!

Posted: 2018-12-14 04:31
by ssd21345
It's reported that if it is made cannot see through leaves the bot would be not working well fighting at open space.

Posted: 2018-12-30 03:59
by Insanitypays
I'm late to the party here, but this is impressive stuff

Posted: 2019-03-03 05:49
by Arab
MaxP;bt11025 wrote:Hm, are we going the absolutely same way with somebody, or is it my config?
I've implemented the same a year ago or so.
I gave a tweak to some modders too this summer:
http://www.battlefieldsingleplayer.com/ ... opic=15744
I wonder 'cause there is a some irony: I used "the napalm system (GLU-1) to create a spawner, that spawns an invisible Player Controlled Object with mapped materials and detonation code that uses the collision mesh when the projectile is activated", then I've implemented the smoke greande, based on SatNav colmesh, and also the vehicle smokescreens.
https://www.youtube.com/watch?v=ez9QSLDrSnA
https://www.youtube.com/watch?v=UVKJDHKQByk
In process:
https://youtu.be/QkhXfW_xT4s

I'm very grateful to PR team for their mod, as it brings me to modding, and I always glad to share my work with them, like it was with AI bomber cars implementation (but you've made your own) or other stuff. I never asked nothing for my own work, but if it is my work, it will really hurts me. I've spend years to implement this feature, and only a couple of people thanked me...


Technically it is very simple to make bots to not see through the leaves, and it doesn't needs any tricks, but it would be a very bad decision, 'cause their behavior will become very weird.
Hey MaxP, sorry for the long reply.
It's actually from ArmorRus who has given me permission to include it. It is from the Zone of Continuous Fire 2 mod:
https://www.moddb.com/mods/zcf

With anything, we ask for permission before we include it for release as we avoid plagiarism of any kind, respecting artist's decision to include them in the game or not.

Updated the main post.

Posted: 2019-04-10 14:22
by itl0g
Is this possible to use for aircrafts as CHAFFS that will somehow block the lock on?