Jump to content
zorrobyte

ZBE_Cache AI & Vehicle caching script/addon

Recommended Posts

Hey Khan,

 

AFAIK zbe_cache will pick up all units spawned by any means.  Works perfectly from all my testing (and is great with HAL) - if a unit is close to another one they will come out of cache so they can fight :)

Yeah I am using it now. Thank you for clarifying  :D

Share this post


Link to post
Share on other sites

Hi, ZB.

Strange behaviour reported here with addon version:

 

Testing it in DUWS or Editor, every team is cached and never uncached. No matter what distance i am from units. I just create a team and inmediatly are cached ( except leader )

No any other addon enabled.

 

 

Any idea?

Share this post


Link to post
Share on other sites

Will check on it now for you.

 

EDIT:  Checked now and there are NO problems.  I ran DUWS and the editor (and VTS) and units cache (except leader) when there are no enemies within 1000m and they are not in combat.  When closer than that, and in combat (ie fired upon) they uncache correctly and attack.  You have a problem on your end I'm afraid.  Check installation.

Share this post


Link to post
Share on other sites

How do I disable caching on an empty vehicle? Specifically a Taru Pod.

 

this setVariable ["zbe_cacheDisabled", true];

 

 

That does not disable caching on the vehicle in question. I have a respawn point on the vehicle but it disappears since the vehicle is being cached. Any suggestions? Thanks.

Share this post


Link to post
Share on other sites

Question, is there reported problem where units do not unchached under the default distance? I had report of units appearing out of thin air in front of players.

I am using default settings and Headless client.

Share this post


Link to post
Share on other sites

Using (ZBE) caching with a headless client is not recommended. 

Share this post


Link to post
Share on other sites

Anyone using this in coordination with large, full servers that utilize extDB saving? Curious on adding this to my always full exile server and I'm wondering what it'll bust, if anything.

 

Will this touch buildables in these sorts of mods as well?

Share this post


Link to post
Share on other sites

Anyone using this in coordination with large, full servers that utilize extDB saving? Curious on adding this to my always full exile server and I'm wondering what it'll bust, if anything.

 

Will this touch buildables in these sorts of mods as well?

 

It should work just fine. Caching disables simulation/visibility of units that are XXX meters away from nearest player. Among other things, caching distance can be be configured. ZBE caching does not alter groups, it caches all units besides the group leader.

Share this post


Link to post
Share on other sites

First time using the script/mod very cool stuff it always amazes me how BOHEMIA can just leave simple things like this out of the vanilla game that will make the game play some much cleaner with less lag. Thank you for the script/addon.

 

question one: How can I turn off the debugging hint menu on the top right corner

question two: Does the Vehicle caching work with the vehicles. I know I read where it works with crew but the number of vehicles shown on the map is the same all the time.

Share this post


Link to post
Share on other sites

1. See the init.sqf inside the archive:

//[AiCacheDistance(players),TargetFPS(-1 for Auto),Debug,CarCacheDistance,AirCacheDistance,BoatCacheDistance]execvm "zbe_cache\main.sqf";

if (isServer) then {[1000,-1,true,100,1000,1000]execvm "zbe_cache\main.sqf"};

Change true to false.

 

2. Caching changes simulation of the vehicle. It does not hide/remove the vehicle.

Share this post


Link to post
Share on other sites

Is there a way to make units uncache faster?

 

By default the script checks every 15 seconds for caching/uncaching. To increase or decrease open 'main.sqf' and change line 26 to sleep XX; Where xx is the number of seconds you want the cycle to pause.

Share this post


Link to post
Share on other sites

By default the script checks every 15 seconds for caching/uncaching. To increase or decrease open 'main.sqf' and change line 26 to sleep XX; Where xx is the number of seconds you want the cycle to pause.

 

Thanks.

Share this post


Link to post
Share on other sites

By empty vehicles it means vehicles with no players or AI, correct? It does not count vehicles with loot inside?

 

As well, I see old notes about the server-side one not doing vehicle cacheing, is this still the case? Should I implement this missionside instead? My AI being spawned in and the like are all done through serverside  mods, nothing mission related.

Share this post


Link to post
Share on other sites

By empty vehicles it means vehicles with no players or AI, correct? It does not count vehicles with loot inside?

 

As well, I see old notes about the server-side one not doing vehicle cacheing, is this still the case? Should I implement this missionside instead? My AI being spawned in and the like are all done through serverside  mods, nothing mission related.

 

Vehicle caching is different from group/unit caching. E.g. a squad in a truck does get cached if it falls within the configured params. The groups minus the group leader gets cached. Same with vehicles. Drivers AND group leaders do not get cached, rest of the crew/group is cached.

 

Empty vehicles, when cached, have their simulation disabled. Otherwise nothing changes. The vehicle is visible and all vehicle inits remain.

 

I have no idea what you mean with missionside.

 

Note, that I only work with the scrtipt version of ZBE_chaching, although I presume there is no difference between the mod version and script version

  • Like 1

Share this post


Link to post
Share on other sites

Vehicle caching is different from group/unit caching. E.g. a squad in a truck does get cached if it falls within the configured params. The groups minus the group leader gets cached. Same with vehicles. Drivers AND group leaders do not get cached, rest of the crew/group is cached.

 

Empty vehicles, when cached, have their simulation disabled. Otherwise nothing changes. The vehicle is visible and all vehicle inits remain.

 

I have no idea what you mean with missionside.

 

Note, that I only work with the scrtipt version of ZBE_chaching, although I presume there is no difference between the mod version and script version

I meant the different versions on the front page. Gotcha, I was just curious as I run a fair amount of server mods and was wondering if it makes sense to do it there, or do it on the mission.

Share this post


Link to post
Share on other sites

Trying to get this working in Exile and it is causing loot to stop spawning around players, oddly enough.

 

Not sure why this would be. This doesn't touch anything like that, correct?

 

Getting a fair amount of:

19:51:15 "3197 ZBE_Cache (Error: No vehicle) ---  Groups: 98 # All/Cached Units: 126/32 # All/Cached Vehicles: 419/342 # FPS: 8 # ObjectDrawDistance: 0"
 
Not sure what the error: no vehicle bit is meant to reference. Tons of vehicles.

Share this post


Link to post
Share on other sites

Error no vehicle should represent the entity that is reporting. If testing locally (e.g. editor) the players name would appear there..

 

If you want to disble caching for objects/units than use: XXXX setVariable ["zbe_cacheDisabled", true];

Share this post


Link to post
Share on other sites

So... looking at the "main.sqf" file I'm seeing a bunch of code I don't understand.

 

zbe_aiCacheDist = _this select 0;
zbe_minFrameRate = _this select 1;
zbe_debug = _this select 2;
zbe_vehicleCacheDistCar = _this select 3;
zbe_vehicleCacheDistAir = _this select 4;
zbe_vehicleCacheDistBoat = _this select 5;
 
zbe_allGroups   = 0;
zbe_cachedGroups   = [];
zbe_cachedUnits   = 0;
zbe_allVehicles   = 0;
zbe_cachedVehicles = 0;
zbe_objectView   = 0;
zbe_players = [];

 

 

 

What options am I setting? And how? Change "0" to "1"? What do the brackets "[]" mean?

 

EDIT: Disregard, I think I'm just looking at main.sqf instead of init.sqf.

Share this post


Link to post
Share on other sites

Hello all!

Using HAL alongside this fantastic script and it works like a dream. The only drama i am having currently is that ai that are cached, do not embark vehicles. Any ideas why this may be?

Thanks.

Share this post


Link to post
Share on other sites

Hello all!

Using HAL alongside this fantastic script and it works like a dream. The only drama i am having currently is that ai that are cached, do not embark vehicles. Any ideas why this may be?

Thanks.

 

No idea. HAL is single player? You could solve group initialization issues by:

 

Delaying the cache script start on mission start by lets say 2 minutes. Open main.sqf and on line 23 (after 'zbe_centerPOS = [zbe_mapside, zbe_mapside, 0];') add:

waitUntil {sleep 1; time > 120};

Or you can disable caching for certain groups by adding: 

(group this) setVariable ["zbe_cacheDisabled", true]; 

to the group leader init.

Share this post


Link to post
Share on other sites

Does a group with a trigger synced waypoint keep the trigger sync when getting un cached? Or is it best to exclude all these groups from caching?

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

×