Arma Reforger · Online Manual

STW Garbage System

A server-side cleanup system for Arma Reforger by Bohemia Interactive. It applies administrator-controlled lifetimes to destroyed vehicles, dead bodies, and inventory items while preserving the native garbage system’s protection rules.

Destroyed vehiclesDead bodiesInventory itemsNative distance safetyServer configuration

STW suite connection

STW Garbage System is a server-authoritative STW (ScienceTechWorks) add-on. It is designed to clean suitable server-world clutter without replacing the native garbage system’s eligibility or player-distance handling. It needs no player-side setup and does not require another STW mod for core operation.

What it does

The system supplies JSON-configured lifetimes when qualifying entities enter the native garbage system. It keeps native automatic insertion, destroyed-state filtering, and player-distance checks active.

Destroyed vehicles

Only destroyed vehicles qualify. Intact vehicles are excluded by the native rule and are not collected by this system.

Bodies and items

Dead ChimeraCharacter bodies and entities with an InventoryItemComponent receive their own independently configurable lifetimes.

Safe cleanup behavior

Player-distance checks remain enabled. The mod changes timing for qualifying entities; it does not remove native safeguards or indiscriminately delete world entities.

For players and Game Masters

Players need no setup. In the Game Master Scenario Properties dialog, select the STW Garbage System tab (white garbage-bag icon) and choose the session-only Aggressive Mode: Off, Destruction, or Limbo. The choice is server-authoritative and resets to Off in the next session. The same tab has two independent experimental AI-cleanup switches, both On by default; see Experimental AI cleanup before using them in a curated scenario. Normal destroyed-vehicle, body, and inventory-item cleanup remains governed by the server configuration.

Aggressive Mode

Aggressive Mode is intended for administrators who need to reduce AI and battlefield clutter more quickly during a live scenario. The server starts a pass immediately after the Game Master changes the mode, then runs later passes at the configured interval. It processes AI groups in small queued batches rather than performing a per-frame world scan.

ModeBehavior
OffUses the normal configured native garbage lifetimes. No aggressive AI-group pass runs.
DestructionDeletes an on-foot AI group when every member is farther than the configured despawn distance from every connected player. A group with any vehicle occupant is retained.
LimboUses the same distant, on-foot group rule, but saves each member's prefab and position before removal. A later pass restores the saved members when a player is within the configured limbo-respawn distance.
Operational caution: Aggressive Mode can remove AI that are deliberately placed far from players. Use Off for curated or scripted encounters unless you have chosen distances and a pass interval appropriate for that scenario. Aggressive Mode removes dead bodies, dropped inventory items, and confirmed wrecks quickly only when they are outside the configured player-protection distance. The server checks that distance again immediately before native deletion, so a body, item, or wreck near a player is retained. Intact vehicles are never aggressively removed.

Experimental AI cleanup

These server-authoritative controls are independent of Aggressive Mode. They scan eligible AI immediately at server startup and then approximately every five minutes, processing candidates in queued batches. Both are session-only Scenario Properties switches and default to On each new session.

SwitchBehavior
Remove non-observant unitsConsiders only AI-active, on-foot characters with a perception component, and only if every connected player's controlled entity is more than 1,000 m away. A recent enemy sighting—less than one hour ago—protects the AI. A remembered sighting older than one hour permits removal on the next pass. If there is no enemy perception history at all, such as after a fresh spawn or server restart, the server starts a full one-hour grace period instead of deleting immediately. The five-minute scan cadence does not shorten the one-hour perception window.
Remove blocked unitsRemoves an eligible on-foot AI that moved 0.5 m or less since the preceding experimental observation, unless its group is executing a GUARD waypoint. This rule has no 1,000 m player-distance protection. Disable it when stationary nearby AI are deliberate.
Operational caution: The experimental rules are intended for testing. A non-observant deletion log means the AI was distant from connected players and either had a confirmed enemy sighting older than one hour or completed the no-history grace period; it does not by itself prove that the server has been online for an hour. Disable either switch in Scenario Properties while investigating unexpected removals.

Server setup

  1. Install and enable STW Garbage System on the authoritative server, then start a session once.
  2. The mod creates $profile:STW/GarbageSystem/STWGarbageSystemConfig.json and $profile:STW/GarbageSystem/LoneWolfRemoval/STWLoneWolfRemovalConfig.json.
  3. Stop the server before editing a JSON file, then restart to apply changes.
  4. Confirm the authoritative server log reports that the configuration loaded.
Important: configuration changes apply after a restart. Entities already tracked by the native garbage system keep the lifetime that was assigned when they were added, so changes do not retroactively retime them.

Configuration

The configuration file is $profile:STW/GarbageSystem/STWGarbageSystemConfig.json.

SettingDefaultMeaning
destroyedVehicleLifetimeMinutes120Time before a qualifying destroyed vehicle is removed.
deadBodyLifetimeMinutes60Time before a qualifying dead ChimeraCharacter body is removed.
inventoryItemLifetimeMinutes60Time before a qualifying entity with an InventoryItemComponent is removed.
aggressivePassIntervalMinutes15Interval between aggressive passes after the immediate pass caused by a Game Master mode change. Minimum 1 minute.
aggressiveDespawnDistanceMeters1500Player-protection distance for Destruction and Limbo. A candidate AI group is retained if any member is within this distance of a connected player.
aggressiveLimboRespawnDistanceMeters1200Distance at which a connected player causes saved Limbo members to be restored during an aggressive pass.

All lifetimes and the aggressive pass interval must be at least one minute. Negative aggressive distances become zero. Invalid values are corrected and the normalized configuration is saved during startup.

Lone-wolf removal

This optional server-side cleanup removes an eligible on-foot AI soldier only when its AI group has one member and it has remained unprotected for the configured duration. Civilians, player-controlled characters, vehicle occupants, AI near connected players, and AI near another AI are protected.

The configuration file is $profile:STW/GarbageSystem/LoneWolfRemoval/STWLoneWolfRemovalConfig.json.

SettingDefaultMeaning
enabledtrueEnables lone-wolf removal.
aloneLifetimeMinutes90Continuous eligible time required before removal.
playerProtectionDistanceMeters1000Connected-player protection radius; contact resets the timer.
nearbyAIProtectionDistanceMeters100Other-AI protection radius; set to 0 to disable. Uses the engine spatial index and stops at the first matching AI.
candidateCheckIntervalSeconds120Target interval for rechecking tracked candidates; minimum 10 seconds.
discoveryIntervalSeconds600Low-frequency engine AI-list refresh for mod-spawned units and newly split groups; minimum 60 seconds.
civilianFactionKeys["CIV"]Faction keys excluded from removal.
Performance: candidate checks are round-robin—one entity per call-queue tick. AI-list discovery occurs every 10 minutes by default and its results are processed in 8-agent batches. The system does not repeatedly scan world entities.

Compatibility and validation

The add-on detects known incompatible Workshop mods by ID and writes a warning to the authoritative server log when one is enabled. Treat such a warning as a reason to test cleanup behavior carefully before relying on it in a live server.

For Workbench validation, open addon.gproj, reload scripts, and verify that the Script and Resource consoles report no STW Garbage System errors. For a runtime check, start an authoritative session and look for the configuration-loaded entry in the server log.

Captain Sprocket community

Captain Sprocket patch

Captain Sprocket

Arma Reforger server: STW Reforger

Community: https://discord.gg/T2AZp6GGMJ

More STW manuals: STW Online Manuals