Working Smoke Grenades against bots

Insights into the development of Project Reality.
Arab
PR:BF2 Developer
Posts: 2880
Joined: 2012-05-18 03:37

Working Smoke Grenades against bots

Post 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! ;)
Image
Petar97
Posts: 29
Joined: 2014-11-21 12:27

Post by Petar97 »

Finally! great work sir
Fastjack
PR:BF2 Contributor
Posts: 525
Joined: 2011-09-04 19:47

Post by Fastjack »

Nice done.
sweedensniiperr
Posts: 2784
Joined: 2009-09-18 10:27

Post 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?
Image
Veterans-Gaming
Posts: 382
Joined: 2010-04-06 20:25

Post by Veterans-Gaming »

Thank you all very much for your hard work!
Image
keed
Posts: 2
Joined: 2015-04-25 12:15

Post by keed »

Thank you for the COOP love! Is mortar smoke viable too?
Arab
PR:BF2 Developer
Posts: 2880
Joined: 2012-05-18 03:37

Post 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 :)
Image
User avatar
ALADE3N
PR:BF2 Developer
Posts: 573
Joined: 2016-02-13 17:34
Location: Philippines

Post by ALADE3N »

Finally , I've been wondering when will this be in PR
Image
Rotblut
Posts: 63
Joined: 2015-04-09 14:12

Post 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.
Image
Skywalker-11
Posts: 34
Joined: 2016-11-26 21:25

Post by Skywalker-11 »

Are bots able to run through the smoke or are they just going around or getting stuck in front of it?
Arab
PR:BF2 Developer
Posts: 2880
Joined: 2012-05-18 03:37

Post 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.
Image
milosv123344
Posts: 100
Joined: 2012-07-29 13:26

Post by milosv123344 »

I can't believe we finally lived to see the day, thank you so much for your hard work!
milosv
Dr. Phil Perlmutter
Posts: 11
Joined: 2015-10-20 15:17

Post 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.
MaxP
Posts: 117
Joined: 2008-09-08 19:18

Post 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.
space1
Posts: 9
Joined: 2017-06-26 10:11

Post 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!
ssd21345
Posts: 2
Joined: 2016-02-07 14:37

Post 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.
Insanitypays
PR:BF2 Developer
Posts: 753
Joined: 2009-06-13 09:23

Post by Insanitypays »

I'm late to the party here, but this is impressive stuff

"Go to Heaven for the climate, Hell for the company." -Mark Twain
[/CENTER]
Arab
PR:BF2 Developer
Posts: 2880
Joined: 2012-05-18 03:37

Post 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.
Image
itl0g
Posts: 2
Joined: 2009-03-28 04:25

Post by itl0g »

Is this possible to use for aircrafts as CHAFFS that will somehow block the lock on?
Post Reply

Return to “Development Blogs”