Jump to content
zorrobyte

ZBE_Cache AI & Vehicle caching script/addon

Recommended Posts

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?

 

The group should keep their directives, but I never work with editor placed units, so you'll need to do a quick test yourself.

Share this post


Link to post
Share on other sites

How would I make the script except some vehicle types, and cache others?

Share this post


Link to post
Share on other sites

How would I make the script except some vehicle types, and cache others?

 

use: XXXX setVariable ["zbe_cacheDisabled", true];

Share this post


Link to post
Share on other sites

use: XXXX setVariable ["zbe_cacheDisabled", true];

 

That doesn't work for empty vehicles. But what I did was in zbe_functions.sqf under function: zbe_vehicleCache, defined classnames for the specific vehicles I wanted and wrote an if-statement:

zbe_vehicleCache = {
	_ex = [
	"Land_Pod_Heli_Transport_04_medevac_F", 
	"Land_Pod_Heli_Transport_04_covered_F", 
	"Land_Pod_Heli_Transport_04_repair_F", 
	"Land_Pod_Heli_Transport_04_fuel_F", 
	"Land_Pod_Heli_Transport_04_ammo_F",  
	"Land_Pod_Heli_Transport_04_box_F", 
	"I_Heli_light_03_F", 
	"B_Heli_Transport_03_F", 
	"O_Heli_Transport_04_F", 
	"B_Quadbike_01_F", 
	"I_MRAP_03_hmg_F", 
	"I_MRAP_03_gmg_F", 
	"B_MRAP_01_F", 
	"O_Plane_CAS_02_F", 
	"B_APC_Tracked_01_AA_F", 
	"B_MBT_01_TUSK_F", 
	"B_UGV_01_rcws_F"
	];
	
	if !((typeOf _vehicle) in _ex) then {
		_vehicle enablesimulationglobal false;
	};
}; 

It works, and does what I want, like preventing the vehicles in my base from spontaneously explode when the mission starts and when I return to base.

  • Like 3

Share this post


Link to post
Share on other sites

:D I'm glad to see that ZBE_Cache lives on and is still used. I've been away from the Arma community for some time, the development experience I gained in Arma translated to some pretty awesome job opportunities over the last few years. So here is to you, hobbyist developer - Arma development can lead to some awesome real-life work - the experience gained in SQF can be built upon with sites like teamtreehouse and Lynda. Start out contracting via upwork or another freelance site to build up some resume fodder and land yourself an awesome job.

 

Anywho, I've been exclusively on Macs for the last few years due to my work - I ended up selling off the gaming rig instead of sitting idle into obscurity. I went out the other day and got a GTX 970 to cram in my DIY NAS machine to do some light gaming - this ended up with time spent in Arma that was enjoyable (3k+ hours will burn anyone out). Apex is coming soon and I'm very interested in what the Vive and Rift will bring to Arma if anything. Long story short, it may be not the last of me around these forums. I'll do some catching up and see if ZBE_Cache can be improved in the coming year.

  • Like 8

Share this post


Link to post
Share on other sites

Hey ZB!  Good to see you back mate.  yes ZBE_Cache is being used constantly!  BTW I have a Rift and playing Arma3 in it is awesome, however I wish BIS put a SBS (side by side) mode in for PROPER 3D !

Share this post


Link to post
Share on other sites

Hi ZB. Glad that your back on the scene. I use ZB cache every time I play. Essential add on. Cheers.

  • Like 1

Share this post


Link to post
Share on other sites

G'day Zorrobyte

 

We too used your caching script until we noticed that with it enabled, vehicles from various mods (even vanilla) would spontaneously explode. Regrettably we've had to shelve it in favour of an alternative until fixed. Hopefully this information is helpful.

 

Anfo

Share this post


Link to post
Share on other sites

G'day Zorrobyte

 

We too used your caching script until we noticed that with it enabled, vehicles from various mods (even vanilla) would spontaneously explode. Regrettably we've had to shelve it in favour of an alternative until fixed. Hopefully this information is helpful.

 

Anfo

 

I fixed this issue for my own use by disabling damage when caching and waiting 2 seconds before enabling damage after uncaching. Here is a link to the .pbo if you want it. https://www.dropbox.com/s/8u1w6prxlecj32r/zbe_cache_addon_version.pbo?dl=0

Share this post


Link to post
Share on other sites

dooks,

 

I looked through your pbo and could not find where you turned damage on and off, could you point me in the right direction in the script of this code?

 

Thanks

I fixed this issue for my own use by disabling damage when caching and waiting 2 seconds before enabling damage after uncaching. Here is a link to the .pbo if you want it. https://www.dropbox.com/s/8u1w6prxlecj32r/zbe_cache_addon_version.pbo?dl=0

Share this post


Link to post
Share on other sites

Hi

 

Is it possible to have ZBE caching map building that we add with EDEN editor ? Like houses / FOB / etc... ?

 

And is it worth it ?

Share this post


Link to post
Share on other sites

Is there such a way to set it up so that groups that I don't need to move around while I'm far away can also cache the group leader so that the entire group is cached? I am trying to implement VCOM AI into DUWS but it has the issue of severe scheduler lag when there are too many groups present in the mission. I tried including the enable/disable line to the ai spawn scripts for the groups I want to cache in particular but I believe this still leaves the leader, so the group still exists.

 

TL;DR is there a way to cache an entire group without leaving the leader behind to move about freely?

Share this post


Link to post
Share on other sites

AFAIK the whole idea was just to collapse the group to the leader to save on processing power.   Why can't you not just spawn them again?  Keeping the leader makes the mission dynamic until you approach (or they are within LOS of an enemy).

Share this post


Link to post
Share on other sites
11 minutes ago, kremator said:

AFAIK the whole idea was just to collapse the group to the leader to save on processing power.   Why can't you not just spawn them again?  Keeping the leader makes the mission dynamic until you approach (or they are within LOS of an enemy).

 

By nature of DUWS, the patrols that spawn will already be dynamic in the position that they spawn in. As long as they're within the AO, it doesn't really matter much whether they're in a position because they spawned there or because they walked there while I was away from the AO. The issue I'm more concerned about is that VCOM AI breaks the mission when there are too many groups in the mission. Because the leader is left behind when the AI is cached, the leader still counts as a group, so the number of total groups in the mission doesn't change.

Share this post


Link to post
Share on other sites

can i get rid of the debug message in right top corner?

Share this post


Link to post
Share on other sites
On 6/21/2017 at 8:42 PM, loopdk said:

can i get rid of the debug message in right top corner?

 

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

true = enabled 

false - disable

 

thanks to Tajin on discord he helped me :D  

  • Thanks 1

Share this post


Link to post
Share on other sites

probably a stupid question but what's the syntax for the script,

 [1000,-1,true,100,1000,1000]execvm "zbe_cache\main.sqf", 

what do the numbers represent ?

Share this post


Link to post
Share on other sites
On 2/9/2018 at 11:37 AM, notproplayer3 said:

probably a stupid question but what's the syntax for the script,

 [1000,-1,true,100,1000,1000]execvm "zbe_cache\main.sqf", 

what do the numbers represent ?

 

1. cache distance from players
2. target FPS (-1 for Auto)
3. debug (true/false)
4. car cache distance
5. aircraft cache distance
6. boat cache distance

  • Like 2

Share this post


Link to post
Share on other sites

I just found a bug.

 

If you have static Ai units on your mission (with ZBE enabled) when all your playable units (players) get far from the animated units and they return to the location of the ai units they would have moved several meters away from their original location. (in the air or into buildings etc). In my mission I have set the respawn location far from the base and then move the playable units via trigger to the base and then the Ai would be in another location from where they were supposed to be. Removing ZBE fixes this right away. 

 

 

PS: This happens even if you put 

this setVariable ["zbe_cacheDisabled",true];

on the Static Ai inits.

 

Otherwise this is a great solution. It would be great if someone could update it to work with the latest Arma 3 update. 

  • Like 1

Share this post


Link to post
Share on other sites

@LSValmont I suspect your issue lies elsewhere. You basically proved it is not zbe_cache as the error also occurs on units that are not cached by zbe (zbe_cacheDisabled). Perhaps you are running both zbe_cache and the BIS Vanilla option (dynamic simulation). If that is the case you need to switch off either BIS dynamic simulation or zbe_cache.

 

  • Like 1
  • Thanks 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

×