Navigation Menu

Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Unit Caching and Distribution Script v1.0 RC 4

Compare
Choose a tag to compare
@dylanplecki dylanplecki released this 28 Jan 00:21
· 3 commits to master since this release

Description

A SQF script designed to dynamically cache and distribute AI units across machines for maximum performance.

Notes

To disable caching on a per-unit basis, put this code in its init:

this setVariable ["cacheObject", false, true];

Caching may break scripts which count units (such as scripts which monitor AI counts for the mission ending), and distribution may break scripts which modify AI behaviour (such as UPSMON). To fix this, one may use a the "CACHE_UNIT_SPAWN_FNC" definition to define a function to load and process on every cached unit spawn, such as:

{_this call MY_fnc_unitSpawn;} // _this == _spawnedObject

Where "MY_fnc_unitSpawn" contains code with differentiates between vehicles and units and runs scripts accordingly (ie. UPSMON).

Changelog

1.0.2.4

  • [FIXED] Crewed vehicles retain their states over caching and distributions.
  • [FIXED] Units now properly retain set positions if specified before caching/distribution.
  • [FIXED] Vehicles are no longer distributed (needless operation).
  • [FIXED] Setting of vehicleVarName should now propagate to all machines.
  • [FIXED] Renamed array manipulation function to match syntax (minor edit).

1.0.2.2

  • [FIXED] AI no longer flee when their group is cached (work-around).
  • [FIXED] Library linkages now correctly handle others' exceptions.
  • [FIXED] 'No entry in CfgMagazines ...' error has been fixed (due to currentMagazine command).
  • [FIXED] Rewrote the caching functions to check for all exceptions at the correct points.

1.0.1.8

  • [FIXED] 1.0.1.7 regression which caused caching checks to spin infinitely.

1.0.1.7

  • [FIXED] Units' volatile shifts to leadership are now accounted for while caching.
  • [NOTE] SSD crashed, proceeding without testing (for now).

1.0.1.6

  • [FIXED] Possible error in config.sqf with wrong types.
  • [FIXED] Enabled CBA caching of static files for release version.

1.0.1.5

  • [NEW] Initial public release.

License

Copyright © 2013 Dylan Plecki. All rights reserved.
Except where otherwise noted, this work is licensed under CC BY-NC-ND 4.0, available for reference at http://creativecommons.org/licenses/by-nc-nd/4.0/.