Jump to content
ekstramarko

Mod that spawns invisible "bushes" around player to force AI to not see through ground clutter

Recommended Posts

Hi all,

I've tried putting this together, got somewhat far and then got stuck and frustrated. I'll be dropping it for now but I thought I'd type it all out and share the files if someone here might want to dig around.

 

The idea:
Read "surfaceType" around player at 7 spots - directly underneath and 1 meter in 6 directions away from player. If more than (for now) 2 surfaces are the type that usually contains ground clutter, spawn "hideyBushes". For now there's only one "hideyBush", the idea is to have taller and shorter ones to correspond to amount of ground clutter.

Spawn "hideyBushes" around the player. They have transparent textures but do have viewGeometry so they should block the AI's view. As the player moves, keep spawning them around and despawning the old ones once they're further away than (for now) 40 meters.
For now this is just meant to work on Altis but could be expanded (different maps can have different "surfaceTypes" so it would have to be hand added).

 

Early test where all the bushes were deleted and respawned every 1 second with semi transparent "hideyBushes":
https://imgur.com/a/eUHqCUl

 

The reality:

As soon as I make the texture of the "hideyBush" fully transparent, it stops blocking the AI's view. I then learned about "named properties":
https://community.bistudio.com/wiki/Arma_3:_Named_Properties

and https://community.bistudio.com/wiki/Arma_3:_Vegetation_P3D

because I did sort of want to replicate the behavior of a bush.

 

The end:

I took the actual tree sample p3d from "Arma samples", made it transparent, sunk all of its geometries into the ground to act like a bush and put that into the game.

It sort of works but the performance is bad and I couldn't stop it from deflecting bullets, making it impossible to hit anyone through it.

I then learned about RVMATs

https://community.bistudio.com/wiki/RVMAT_basics

and

BISURFs

https://community.bistudio.com/wiki/Arma_3:_CfgSurfaces_Config_Reference

 

and how those should also be used to dictate how an object behaves, and this is where I stopped.

I didn't want to research how to make my own RVMAT and tried applying a custom BISURF to the tree object, but that didn't seem to work.

 

So, using the right RVMAT and namedProperties in the Object Builder might be all this needs to work.

I think it's best someone who actually knows what they're doing to just build their own bush P3D from scratch because god knows what I did in my hideyBushTall_1.p3d file.

 

If someone is willing and more experienced, I'd love it if they would take a look and tinker - I'm dropping this for now.

I think it's, in theory, a valid dumb idea that could allow for more natural feeling gameplay and a more fair feeling game. We're just used to AI seeing through ground clutter and that's it. 

 

 

There's two zips inside the link below - first contains the SQFs you can use in an Eden scenario to run the spawning and despawning system.

Second contains the P3D for the actual "hideyBush" and source files to build this as an addon. Currently it's that tree from Arma 3 Samples but just made invisible.

https://www.dropbox.com/sh/s2pg4en72o3bgoh/AADkqUCfXJAZiC54vKf7nkF_a?dl=0

 

 

 

The SQFs are, of course, not documented- if anyone wants do dig into this let me know and can walk you through the code and/or reupload a well documented version.

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×