<aside> 💡 This article is valid for OCAP2 v1.1.0

</aside>

Capture automatically begins when the server reaches the configured minimum player count (see userconfig settings). The addon can also be set to automatically save the recorded when the mission is ended.

Settings

  1. Configure /web/setting.json with your public-facing IP, port, and a custom secret.

  2. Configure /addon/addons/@ocap/OcapReplaySaver2.cfg.json with matching IP/port destination and secret.

    newServerGameType is used to "tag" uploaded recordings for better organization. this will be the default tag if one isn't provided to the ocap_fnc_exportData command in-game traceLog set to 1 will cause the extension to log all calls for debugging purposes

  3. Configure /addon/userconfig/config.hpp with desired values

    ocap_minPlayerCount determines how many players must be connected before recording begins, useful for avoiding extra recordings of test tessions

    ocap_minMissionTime determines the minimum length of a mission -- if it's shorter, the recording will not be saved

    ocap_frameCaptureDelay sets how frequently the capture of all units and vehicles is run (in seconds)

    ocap_saveMissionEnded determines whether or not the recording should be saved automatically when the MPEnded event handler fires

    ocap_preferACEUnconscious defaults true, assuming that you're using ACE Medical and their unconscious system. If you aren't, please set this to false, and we'll instead track Arma 3's vanilla revive/down system.

    ocap_excludeClassFromRecord blacklists object classnames that shouldn't be tracked by OCAP

    ocap_excludeKindFromRecord use isKindOf checking to exclude one or more hierarchies of objects from recording

    ocap_excludeMarkerFromRecord blacklists markers containing any of these strings in their name so they won't be captured -- used primarily for marker framework systems you don't want to include in recordings

    ocap_trackTimes determines whether or not periodic updates are recorded containing time data from in-world. This should be set to true if you run missions that use time acceleration or time skips, to ensure the accurate time is recorded rather than having inaccurate extrapolation.

    ocap_trackTimeInterval determines how often time data is saved. The default is every 10 frames, which would be 10*ocap_frameCaptureDelay.

    ocap_isDebug will cause additional log items to be written in the 'ocaplog' files during recording. Useful for troubleshooting specific issues or getting more data on what takes place during a round.


Mission Framework Integration

To end a mission and export capture data, call the following (server-side):

// simple message
["OPFOR Wins. Their enemies suffered heavy losses!"] call ocap_fnc_exportData;

// includes side who won
[east, "Their enemies suffered heavy losses!"] call ocap_fnc_exportData;

// includes a specific 'tag', which will be filterable in the playback menu.
// i.e. in playback menu, selecting "PvP" from the dropdown would make this and any other mission tagged "PvP" visible in the search
[east, "OPFOR triumphed over their enemy!", "PvP"] call ocap_fnc_exportData;

Tip: You can use the above function in a trigger. e.g. Create a trigger that activates once all objectives complete. Then on activation:

if (isServer) then {

	// Saves and uploads the recording to your server
	[east, "OPFOR has achieved all of their objectives!"] call ocap_fnc_exportData;

	// Ends mission for everyone
	"end1" call BIS_fnc_endMissionServer; 
};

WARNING

To ensure your recordings are saved and uploaded:

  1. The mission should be ended using a BIS_fnc_endMission/BIS_fnc_endMissionServer function and configured to auto-save, or the ocap_fnc_exportData function should be called prior to it ending.
  2. The web server process should be running and able to accept incoming network connections.

If the web component is not running, the upload will fail and a local copy of the compressed recording will be saved. Logs are available in the Arma 3/ocaplog directory to troubleshoot.