Community AFK Kicker

by kahn_key
Community AFK Kicker

Summary

Testing

Description

# Community AFK Kicker - Arma Reforger 1.7 Starter Source


A lightweight, server-side AFK kicker for Arma Reforger community servers.


## What it does


- Runs server-side only.
- Auto-creates a JSON config under `$profile:CommunityAFKKicker/CommunityAFKKicker.json`.
- Hot-reloads the config while the server is running.
- Tracks player position and rotation on a timer, not every frame.
- Warns players with a client-side hint before kicking.
- Kicks players who remain AFK past the configured limit.
- Supports exempt Arma Reforger Identity IDs.


## Intended performance profile


Default settings:


- Player AFK check: every 30 seconds.
- Config reload check: every 15 seconds.
- No per-frame checks.
- No constant client RPCs.
- No keypress/input tracking.


At 128 players, this only checks connected player entity position/angles twice per minute.


## Files to copy into your Workbench addon


Copy the `Scripts` folder from this package into your new Workbench addon root.


```text
Scripts/Game/CommunityAFKKicker/CAFK_AFKConfig.c
Scripts/Game/CommunityAFKKicker/CAFK_AFKPlayerState.c
Scripts/Game/CommunityAFKKicker/CAFK_AFKKickerManager.c
Scripts/Game/CommunityAFKKicker/CAFK_AFKKickerGameMode.c
```


## Runtime config path


Once the server starts with the mod loaded, the mod creates:


```text
$profile:CommunityAFKKicker/CommunityAFKKicker.json
```


On many Windows self-hosted servers, `$profile:` usually resolves somewhere like:


```text
Documents\My Games\ArmaReforger\profile\
```


On hosting panels, it depends on the `-profile` startup parameter and the provider's file layout.


## Test settings


For first test, use:


```json
{
  "enabled": true,
  "playerCheckIntervalSeconds": 15,
  "configReloadIntervalSeconds": 10,
  "idleKickSeconds": 120,
  "warningSeconds": 30,
  "kickTimeoutSeconds": 0,
  "movementThresholdMeters": 0.75,
  "rotationThresholdDegrees": 8.0,
  "exemptIdentityIds": [],
  "logToServerConsole": true
}
```


Then join the server, stand still, and confirm:


- Warning at about 90 seconds.
- Kick at about 120 seconds.
- Moving or turning resets the timer.
- Adding your Identity ID to `exemptIdentityIds` stops the kick after the next config reload.


## Notes


This source is intentionally simple. It avoids client input tracking because server-side position/rotation checks are much cheaper and safer for public Workshop use.



## v1.2 UI note


The warning overlay was changed to use ImageWidget-based solid boxes and centered text flags. This fixes the issue where the background/border did not appear and the warning text looked like plain floating text.



## v1.3 UI note


The warning overlay text was shortened and the card was widened slightly to prevent text overflow. Replace only CAFK_AFKWarningOverlay.c if you already have v1.2 installed.



## v1.4 UI note


The warning overlay now applies WorkspaceWidget.DPIUnscale() to the workspace width/height before calculating widget positions. This fixes the card drifting left when UI scale is not 100%.



Created by Kahn

License

Arma Public License No Derivatives (APL-ND)

Version
1.4.2
Game Version
1.7.0.49
Version size
1.87 MB
Downloads
6,669
Created
16.06.2026
Last Modified
21.06.2026
ID
69A14DCAA8DB0EBC