Search the Community
Showing results for tags 'caching'.
Found 4 results
Hello, @super-truite and I have made a little piece of script to allows missions maker to make a better use of AIs and vehicles on missions. We are guessing that a similar system already exists but we wanted to have a custom system for some of our projects and thought it would be nice to share it. This compilation of script allows a mission make to cache units suchs as vehicles and soldiers with their respective properties (waypoints, stance, direction, position, health, ...). This allows for greater performance and (if chosen) persistence. Features: Grid caching GCS allows the mission maker to automatically cache into the memory AIs andvehicles. Waypoints assigned to a group or a unit are also cached and are reapplied when the unit or group is set up. The mission creator, if necessary, can also exclude a unit or a vehicle from the cache so that the system does not take it into account. Persistence system (optionnal) In addition to all the caching made, the mission maker can also integrate a data persistence system via MySQL so that, even with a restart of the mission or the machine, the units and vehicles will still be saved. How it works: GCS will create a virtual grid on the map based on three parameters available in GCS_configServer.sqf : GCS_VAR_SIZE_SQUARE_GRID - Represents the total size of each cell on the grid GCS_VAR_SIZE_ACTIVATION_SQUARE_GRID - Represents the trigger distance where AIs and vehicles will be created in the cell GCS_VAR_SIZE_UNSPAWN_SQUARES - Represents the trigger distance where AIs and vehicles will be cached and removed in the cell Each cell is defined by these three variables, as described, GCS_VAR_SIZE_UNSPAWN_SQUARES will trigger the caching and removal of units for the given cell, GCS_VAR_SIZE_ACTIVATION_SQUARE_GRID will activate a cell, retrieve it's cached content for the memory or database and will spawn the units. GCS_VAR_SIZE_SQUARE_GRID Defines the cell size. You can disable the caching system on a unit or vehicle by adding the variable "UseGrid" to false on the unit/vehicle init: this setVariable ["UseGrid", False] In this way, even if no player is near the unit or vehicle, it will never be cached and removed. The following gif shows a simple example with a single grid cell being cached, unloaded (player leaving the cell) and reloaded with cached data once the player re-enter the cell: https://i.imgur.com/ai7PeLh.mp4 and the picture below demonstrates a more complete case: Video example: https://streamable.com/jrh43r (4601 units on Stratis) By default, the persistence system is disabled, you will need to install a MySQL database, have the InterceptDB mod installed aswell with CBA. A full tutorial is available on the readme on Github (https://github.com/Super-truite/arma3_GCS.vr/blob/master/README.md) Download: Get the latest release here: https://github.com/Super-truite/arma3_GCS.vr
Download Links: ZBE_Cache [NR6]: ZBE_Cache [NR6] 1.1 (Google Drive) INTRODUCTION Modified version of ZBE_Cache based off version 4.6a of the original script to be compatible with the cargo system used in HAL. Original mod found here by zorrobyte. Script version only included. USAGE Launched and used the same way as the original ZBE_Cache. Call in init.sqf with [AiCacheDistance(players),TargetFPS(-1 for Auto),Debug,CarCacheDistance,AirCacheDistance,BoatCacheDistance] execvm "zbe_cache\main.sqf"; FEATURES Essentially the same script as the original with the exception of modified FSMs and scripts so that the caching system stops as soon as the commanded squad is ordered to enter a vehicle. This way, any group in vehicles or who needs to use a lift for a period of time will be able to do so while away from the players by having their caching disabled for the time they are on board. The caching system starts back as soon as the leader disembarks. This also fixes the problems caused by dysfunctional crews of tanks when cached at the sacrifice of a bit of performance as the groups in vehicles are not cached. CHANGE LOG ZBE_Cache [NR6] 1.1 -Major optimization of AI caching/uncaching in vehicles; -System now uses waypoints AND leader presence to control whether a group is to be cached or not inside a vehicle which greatly improves flow of AI; ZBE_Cache [NR6] 1.00 -Initial release CREDITS All credits for the original ZBE_Cache go to zorrobyte who created the very useful caching system this script only modifies slightly. BUG REPORTING If you encounter any bugs, feel free to comment on this thread. License: ZBE_Caching by Zorrobyte is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License and this modified version is released using the same license. https://creativecommons.org/licenses/by-sa/4.0/
Hello, I was wondering if there was the possibility of getting a variable to be persistent through a mission restart. I want the player's inventory to be saved and then reloaded when connecting back. Any ideas?
Hi, i am trying to find a good AI caching script. I tried this: The problem is, that it often does not spawn a few units of the squad, and often disables reappearing of the units when you kill the new sql... I also tried the vanilla simulation manager module, but it turns on the caching for ALL units (empty vehicles too) and does not seem to affect the performance too much. I am also concerned that it might not work for JIP-ing players. Can anyone help me with the script i am using or the simulation manager? If not, can you recommend a script for me (which is not too hard to use and works with JIP and everything)? I want to make my missions work for air support too, so that means if the units (even though its maybe not spawned) position is hit by a bomb, the unit is dead. If you can not recommend caching at all, is there a good AI spawning script out there that works with mods and makes waypoint placement and customization (like the synching with a CBA module) possible?