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.
| Mode | Behavior |
|---|---|
| Off | Uses the normal configured native garbage lifetimes. No aggressive AI-group pass runs. |
| Destruction | Deletes 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. |
| Limbo | Uses 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. |
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.
| Switch | Behavior |
|---|---|
| Remove non-observant units | Considers 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 units | Removes 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. |
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
- Install and enable STW Garbage System on the authoritative server, then start a session once.
- The mod creates
$profile:STW/GarbageSystem/STWGarbageSystemConfig.jsonand$profile:STW/GarbageSystem/LoneWolfRemoval/STWLoneWolfRemovalConfig.json. - Stop the server before editing a JSON file, then restart to apply changes.
- Confirm the authoritative server log reports that the configuration loaded.
Configuration
The configuration file is $profile:STW/GarbageSystem/STWGarbageSystemConfig.json.
| Setting | Default | Meaning |
|---|---|---|
destroyedVehicleLifetimeMinutes | 120 | Time before a qualifying destroyed vehicle is removed. |
deadBodyLifetimeMinutes | 60 | Time before a qualifying dead ChimeraCharacter body is removed. |
inventoryItemLifetimeMinutes | 60 | Time before a qualifying entity with an InventoryItemComponent is removed. |
aggressivePassIntervalMinutes | 15 | Interval between aggressive passes after the immediate pass caused by a Game Master mode change. Minimum 1 minute. |
aggressiveDespawnDistanceMeters | 1500 | Player-protection distance for Destruction and Limbo. A candidate AI group is retained if any member is within this distance of a connected player. |
aggressiveLimboRespawnDistanceMeters | 1200 | Distance 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.
| Setting | Default | Meaning |
|---|---|---|
enabled | true | Enables lone-wolf removal. |
aloneLifetimeMinutes | 90 | Continuous eligible time required before removal. |
playerProtectionDistanceMeters | 1000 | Connected-player protection radius; contact resets the timer. |
nearbyAIProtectionDistanceMeters | 100 | Other-AI protection radius; set to 0 to disable. Uses the engine spatial index and stops at the first matching AI. |
candidateCheckIntervalSeconds | 120 | Target interval for rechecking tracked candidates; minimum 10 seconds. |
discoveryIntervalSeconds | 600 | Low-frequency engine AI-list refresh for mod-spawned units and newly split groups; minimum 60 seconds. |
civilianFactionKeys | ["CIV"] | Faction keys excluded from removal. |
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
Arma Reforger server: STW Reforger
Community: https://discord.gg/T2AZp6GGMJ
More STW manuals: STW Online Manuals