Skip to content

Zeta Cargo Sling Load Reference

rayswaynl edited this page Jul 7, 2026 · 5 revisions

Zeta Cargo Sling-Load Reference

Source-verified 2026-06-23 against current stable origin/master@f8a76de34 and branch origin/claude/trello-base-integrity-fixes@66d80160; GC-exemption section source-verified 2026-07-07 against claude/build84-cmdcon36@c3cc5b1 (PR #855). Paths are relative to Missions/[55-2hc]warfarev2_073v48co.chernarus/ unless maintained Vanilla is named explicitly. Arma 2 OA 1.64.

ZetaCargo is the airlift module labelled "Zeta Cargo by Benny" in its init file and compiled from client init (Client/Module/ZetaCargo/Zeta_Init.sqf:1; Client/Init/Init_Client.sqf:792-793). The live action grant checks Zeta_Lifter plus WFBE_UP_AIRLIFT, then adds Client\Module\ZetaCargo\Zeta_Hook.sqf as the localized lift action (Common/Init/Init_Unit.sqf:51-53). Current source Chernarus attaches one nearby unmanned land vehicle to the lifter and already passes the lifted vehicle into the manual detach action (Client/Module/ZetaCargo/Zeta_Hook.sqf:15-17,28,30,34-35; Client/Module/ZetaCargo/Zeta_Unhook.sqf:3-7). Maintained Vanilla Takistan is still older on this edge: Missions_Vanilla/[61-2hc]warfarev2_073v48co.takistan/Client/Module/ZetaCargo/Zeta_Hook.sqf:34 adds the detach action without arguments while its Zeta_Unhook.sqf:3-7 still expects _this select 3 select 0.


Boot and Upgrade Gate

Surface Current source behavior Source
Client init The client compiles/runs Client\Module\ZetaCargo\Zeta_Init.sqf from the Zeta Cargo Lifter block. Client/Init/Init_Client.sqf:792-793
Upgrade index WFBE_UP_AIRLIFT is upgrade index 8. Common/Init/Init_CommonConstants.sqf:45
Action grant During unit initialization, _unit_kind must be present in Zeta_Lifter, and _upgrades select WFBE_UP_AIRLIFT must be greater than 0, before the unit receives the localized STR_WF_Lift addAction to Client\Module\ZetaCargo\Zeta_Hook.sqf. Common/Init/Init_Unit.sqf:51-53
Purchase-list color The buy-list filler reads _UpAirlift from WFBE_UP_AIRLIFT and colors rows only when the unit is also in side-specific WFBE_%1LIFTVEHICLE. This is UI marking, not the runtime attach-action gate. Client/Functions/Client_UIFillListBuyUnits.sqf:21,107-109; Common/Init/Init_Unit.sqf:51-53
Buy-menu hint The buy menu shows the lift-capable hint for non-supply-heli units found in side-specific WFBE_%1LIFTVEHICLE. Client/GUI/GUI_Menu_BuyUnits.sqf:619-620
Upgrade label The upgrade label is localized as STR_WF_UPGRADE_Airlift; its description says the upgrade unlocks airlifting. Common/Config/Core_Upgrades/Labels_Upgrades.sqf:63,90; stringtable.xml:3851-3857,4060-4067

Airlift Upgrade Values

The checked Chernarus core upgrade files use the same Airlift shape: enabled, cost [[1000,0]], one level, dependency [[WFBE_UP_AIR,1]], and research time [30].

Upgrade family Enabled Cost Levels Dependency Time
CombinedOps US true [[1000,0]] 1 [[WFBE_UP_AIR,1]] [30]
CombinedOps RU true [[1000,0]] 1 [[WFBE_UP_AIR,1]] [30]
Other Chernarus upgrade files Same Airlift rows and line positions across Upgrades_CO_GUE.sqf, Upgrades_USMC.sqf, Upgrades_RU.sqf, Upgrades_CDF.sqf, Upgrades_GUE.sqf, Upgrades_INS.sqf, Upgrades_OA_US.sqf, Upgrades_OA_TKA.sqf, and Upgrades_OA_TKGUE.sqf. Same Same Same Same

Sources: Common/Config/Core_Upgrades/Upgrades_CO_US.sqf:14,41,69,101,133; Common/Config/Core_Upgrades/Upgrades_CO_RU.sqf:14,41,69,101,133; Common/Config/Core_Upgrades/Upgrades_CO_GUE.sqf:14,41,69,101,133; Common/Config/Core_Upgrades/Upgrades_USMC.sqf:14,41,69,101,133; Common/Config/Core_Upgrades/Upgrades_RU.sqf:14,41,69,101,133; Common/Config/Core_Upgrades/Upgrades_CDF.sqf:14,41,69,101,133; Common/Config/Core_Upgrades/Upgrades_GUE.sqf:14,41,69,101,133; Common/Config/Core_Upgrades/Upgrades_INS.sqf:14,41,69,101,133; Common/Config/Core_Upgrades/Upgrades_OA_US.sqf:14,41,69,101,133; Common/Config/Core_Upgrades/Upgrades_OA_TKA.sqf:14,41,69,101,133; Common/Config/Core_Upgrades/Upgrades_OA_TKGUE.sqf:14,41,69,101,133.


Runtime Lifter Allow-List

Zeta_Lifter is the runtime list used by Init_Unit.sqf before adding the attach action.

Classname Source
MH60S Client/Module/ZetaCargo/Zeta_Init.sqf:4
MV22 Client/Module/ZetaCargo/Zeta_Init.sqf:4
C130J Client/Module/ZetaCargo/Zeta_Init.sqf:4
Mi17_Ins Client/Module/ZetaCargo/Zeta_Init.sqf:4
Mi17_medevac_RU Client/Module/ZetaCargo/Zeta_Init.sqf:4
UH60M_EP1 Client/Module/ZetaCargo/Zeta_Init.sqf:4
UH60M_MEV_EP1 Client/Module/ZetaCargo/Zeta_Init.sqf:4
CH_47F_EP1 Client/Module/ZetaCargo/Zeta_Init.sqf:4
C130J_US_EP1 Client/Module/ZetaCargo/Zeta_Init.sqf:4
Mi17_TK_EP1 Client/Module/ZetaCargo/Zeta_Init.sqf:4
BAF_Merlin_HC3_D Client/Module/ZetaCargo/Zeta_Init.sqf:4
CH_47F_BAF Client/Module/ZetaCargo/Zeta_Init.sqf:4
Mi17_Civilian Client/Module/ZetaCargo/Zeta_Init.sqf:4
An2_TK_EP1 Client/Module/ZetaCargo/Zeta_Init.sqf:4

Side UI Lift Lists

Side root files set WFBE_%1LIFTVEHICLE lists for UI coloring and buy-menu hints. These lists are narrower than the runtime Zeta_Lifter allow-list and are not what Init_Unit.sqf checks when adding the attach action.

Root file UI-marked lift vehicle classes Source
Root_US.sqf MH60S, MV22, C130J, UH60M_EP1, UH60M_MEV_EP1, CH_47F_EP1, C130J_US_EP1, BAF_Merlin_HC3_D, CH_47F_BAF, Mi17_Civilian Common/Config/Core_Root/Root_US.sqf:25
Root_US_Camo.sqf MH60S, MV22, C130J, UH60M_EP1, UH60M_MEV_EP1, CH_47F_EP1, C130J_US_EP1, BAF_Merlin_HC3_D, CH_47F_BAF, Mi17_Civilian Common/Config/Core_Root/Root_US_Camo.sqf:25
Root_USMC.sqf MH60S, MV22, C130J, UH60M_EP1, UH60M_MEV_EP1, CH_47F_EP1, C130J_US_EP1, BAF_Merlin_HC3_D, CH_47F_BAF, Mi17_Civilian Common/Config/Core_Root/Root_USMC.sqf:22
Root_RU.sqf Mi17_Ins, Mi17_medevac_RU, Mi17_TK_EP1 Common/Config/Core_Root/Root_RU.sqf:22
Root_TKA.sqf Mi17_Ins, Mi17_medevac_RU, Mi17_TK_EP1 Common/Config/Core_Root/Root_TKA.sqf:21

Hook Search and Attach Flow

Step Current behavior Source
Caller gate The attach script exits unless the action caller is the driver of the lifter. Client/Module/ZetaCargo/Zeta_Hook.sqf:3-9
Speed/altitude gate C130J and C130J_US_EP1 exit above speed 20; other lifters exit above speed 20 or below altitude 2. Client/Module/ZetaCargo/Zeta_Hook.sqf:10-13; Client/Module/ZetaCargo/Zeta_Init.sqf:11
Target search Current source Chernarus searches nearObjects ["LandVehicle", 10] and exits when none are found; it does not filter the friendly HQ out of _vehicles. Client/Module/ZetaCargo/Zeta_Hook.sqf:15-17
Closest target The nearest searched vehicle is selected through WFBE_CO_FNC_GetClosestEntity. Client/Module/ZetaCargo/Zeta_Hook.sqf:19
Enemy HQ wreck guard WEST callers cannot airlift dead EAST HQ wreck classes BTR90_HQ, BMP2_HQ_TK_EP1, BMP2_HQ_INS; EAST callers cannot airlift dead WEST HQ wreck classes LAV25_HQ, M1130_CV_EP1, BMP2_HQ_CDF. Client/Module/ZetaCargo/Zeta_Hook.sqf:6-7,21-22
Manned target guard Any target with crew exits with localized STR_WF_INFO_Hook_Manned. Client/Module/ZetaCargo/Zeta_Hook.sqf:28; stringtable.xml:849-855
Offset selection Default attach offset is [0,0,-10]; C130J and C130J_US_EP1 use special offset [0,0,-2]. Client/Module/ZetaCargo/Zeta_Init.sqf:8,11-12; Client/Module/ZetaCargo/Zeta_Hook.sqf:23-26
Attach and state The target is attached to the lifter, is stamped wfbe_airlifted = true (public) so the empty-vehicle collector exempts it, and the lifter receives local variable Attached = true. See GC Exemption While Slung. Client/Module/ZetaCargo/Zeta_Hook.sqf:35-37
Action swap Source Chernarus removes the attach action, then adds localized STR_WF_Lift_Detach for Client\Module\ZetaCargo\Zeta_Unhook.sqf with [_vehicle] as the action arguments. Maintained Vanilla still lacks that argument payload. Chernarus Client/Module/ZetaCargo/Zeta_Hook.sqf:32-35; maintained Vanilla Client/Module/ZetaCargo/Zeta_Hook.sqf:34; stringtable.xml:4459-4466
Monitor loop While the game is not over, the hook loop sleeps 2 seconds and detaches automatically if lifter damage is above 0.3, Attached is false, or the lifter no longer has a driver; the automatic-detach block also clears wfbe_airlifted. Client/Module/ZetaCargo/Zeta_Hook.sqf:43-52

Zeta_Types declares Car, Motorcycle, Tank, and Ship, but the current hook search above is the LandVehicle near-object query. Treat Zeta_Types as module configuration, not proof that ships are reachable through the live attach action. Sources: Client/Module/ZetaCargo/Zeta_Init.sqf:5-6; Client/Module/ZetaCargo/Zeta_Hook.sqf:15-17.

GC Exemption While Slung (wfbe_airlifted)

Server/Functions/Server_HandleEmptyVehicle.sqf runs one WFBE_SE_FNC_HandleEmptyVehicle instance per enrolled hull (enrollment sources include Server/FSM/emptyvehiclescollector.sqf:9-17 and the abandoned-hull handler at Server/Functions/Server_HandleSpecial.sqf:1002-1007). Every 20 seconds the loop advances a per-hull timer unless the hull currently has alive crew; once the timer exceeds _delay it deletes the vehicle. The manned-target guard on hook (Client/Module/ZetaCargo/Zeta_Hook.sqf:33) means a slung hull always has zero crew, so before PR #855 a hull already enrolled in the empty-vehicle collector (for example an idle owner-built vehicle) kept advancing its delete timer while airlifted and could be deleted out from under the lifter mid-flight. PR #855 (commit c3cc5b1) adds a wfbe_airlifted flag that Zeta Cargo stamps on attach and clears on every detach path; Server_HandleEmptyVehicle.sqf now treats that flag the same as live crew.

Step Detail Source
Timer reset condition The per-hull timer resets to 0 when crew count is > 0 or _vehicle getVariable ["wfbe_airlifted", false] is true; otherwise it advances by 20 each pass. Server/Functions/Server_HandleEmptyVehicle.sqf:37
Delete guard if (_timer > _delay) exitWith {deleteVehicle _vehicle}; Server/Functions/Server_HandleEmptyVehicle.sqf:38
Poll cadence The tracking loop sleeps 20 seconds between timer checks. Server/Functions/Server_HandleEmptyVehicle.sqf:34-35
Effective fuse (lobby default) WFBE_C_UNITS_EMPTY_TIMEOUT lobby-param default is 300 (5 minutes); this overrides the 1800-second script fallback. Rsc/Parameters.hpp:262-267; Common/Init/Init_CommonConstants.sqf:1668
Flag set on hook _vehicle setVariable ["wfbe_airlifted", true, true]; runs immediately after attachTo. Client/Module/ZetaCargo/Zeta_Hook.sqf:35-36
Flag cleared, manual detach _vehicle setVariable ["wfbe_airlifted", false, true]; runs right after detach _vehicle. Client/Module/ZetaCargo/Zeta_Unhook.sqf:9-11
Flag cleared, automatic detach The hook monitor loop's exitWith block (damage > 0.3, Attached = false, or no driver) also clears the flag before removing the detach action. Client/Module/ZetaCargo/Zeta_Hook.sqf:46-48

Only crewless hulls can ever be hooked (Client/Module/ZetaCargo/Zeta_Hook.sqf:33, hint (localize 'STR_WF_INFO_Hook_Manned') on any manned target), so Server_HandleEmptyVehicle.sqf's crew-count check alone could never distinguish a genuinely abandoned hull from one currently slung under a lifter. A hull already enrolled in the collector before being hooked, or one airlifted longer than the 300s default fuse, was deleted mid-flight at whatever altitude the lifter happened to be, a total loss of the airlifted vehicle with no player action able to prevent it. This section documents the fix; there is no flag gating it.

Detach Path Status

Path Current behavior Source
Manual detach action Current source Chernarus passes [_vehicle] to the detach action; maintained Vanilla still adds the detach action without an argument payload. Chernarus Client/Module/ZetaCargo/Zeta_Hook.sqf:34-35; maintained Vanilla Client/Module/ZetaCargo/Zeta_Hook.sqf:34
Unhook expectation Zeta_Unhook.sqf expects _this select 3, then reads _param select 0 as the lifted vehicle. Client/Module/ZetaCargo/Zeta_Unhook.sqf:3-7
Unhook state If a lifted vehicle is supplied, the script sets Attached = false, detaches the vehicle, clears wfbe_airlifted (re-arming the empty-vehicle GC), applies lifter velocity, removes the detach action, waits 1 second, and clamps below-ground drops back to Z 0 with downward velocity -0.1. Client/Module/ZetaCargo/Zeta_Unhook.sqf:9-11,30-37
C-130 drop position For special lifters, the unhook path moves the lifted vehicle 15 meters behind the lifter's position using getDir _vehicle, then keeps the lifter's current Z position. Client/Module/ZetaCargo/Zeta_Unhook.sqf:11-13
Automatic detach The hook loop can still detach without calling Zeta_Unhook.sqf when damage, missing driver, or Attached = false ends the loop; this path also clears wfbe_airlifted. Client/Module/ZetaCargo/Zeta_Hook.sqf:43-51

Patch caution: source Chernarus and maintained Vanilla are split. If promoting ZetaCargo work, carry the source Chernarus detach-argument behavior into maintained Vanilla, then smoke attach/manual-detach/auto-detach for a normal helicopter and a C-130 variant.

Branch Intel - Trello Base Integrity Candidate

origin/claude/trello-base-integrity-fixes@66d80160 contains Trello #87 ZetaCargo work in source Chernarus plus maintained Vanilla, but it is still branch-only and not current stable behavior. The branch is based directly on current stable origin/master@f8a76de34.

Surface Branch behavior Evidence
Friendly HQ lift filter Removes the friendly side HQ from the nearby LandVehicle candidate list before choosing the closest lift target. Branch Chernarus and maintained Vanilla Client/Module/ZetaCargo/Zeta_Hook.sqf:17-19
Source Chernarus detach argument Keeps the current source Chernarus [_vehicle] detach-argument shape. Branch Chernarus Client/Module/ZetaCargo/Zeta_Hook.sqf:37-38
Maintained Vanilla detach argument Does not add the missing [_vehicle] argument in maintained Vanilla; the branch still has a no-argument detach action there. Branch maintained Vanilla Client/Module/ZetaCargo/Zeta_Hook.sqf:37; Zeta_Unhook.sqf:3-7
Ground drop Replaces the special-lifter-only altitude reposition with a ground-level drop 15 meters behind the lifter for all lifters, then pushes another 25 meters back if the friendly HQ is within 25 meters of the drop point. Branch Chernarus and maintained Vanilla Client/Module/ZetaCargo/Zeta_Unhook.sqf:12-29

Promotion gate: port/rebase only if the owner wants #87, preserve current-stable base changes, add the maintained Vanilla detach-argument parity if manual detach is part of the claim, then smoke own-HQ proximity, nearby non-HQ vehicle choice, normal-heli drop, C-130 drop, lifter-damage auto-detach and maintained Vanilla parity.

Continue Reading

Module gateway: Modules atlas | Support surface: Support specials and tactical modules | Upgrade catalog: Upgrade research cross-faction reference | Gear/cargo caveat: Vehicle cargo equip loop bounds

Sidebar

Clone this wiki locally