A lightweight and stable weekly playtime tracking plugin for
SCP: Secret Laboratory (EXILED).
This plugin records how long each player stays on the server and stores the data in
a simple playtime.csv file.
Supports UTF-8 nicknames, automatic saving, nickname updates,
and safe file replacement during runtime.
- ✔ Tracks every player's total playtime based on
UserId - ✔ Saves data in
EXILED/Configs/WeeklyPlaytime/playtime.csv - ✔ Automatically updates:
- When the player is verified (joins)
- When the player disconnects
- When a round ends
- ✔ Nickname updates do not reset playtime
- ✔ Uses CSV with UTF-8 encoding (supports Chinese names)
- ✔ Safe file replacement logic (prevents data loss on save)
- ✔ Handles concurrent read/write gracefully
- ✔ Extremely stable (optimized version by 秋风拂过发梢)
The saved CSV looks like:
UserId,Nickname,PlayTime
makefile
Example:
76561198000000000@steam,"秋风拂过发梢",02:34:51 12345678901234567@steam,"ZJY",00:15:22
markdown
UserId: Steam or Northwood IDNickname: UTF-8 encoded, automatically escapedPlayTime: HH:mm:ss
- Install EXILED on your SCP:SL server.
- Build the plugin using .NET Framework 4.8.1.
- Place the compiled
WeeklyPlaytime.dllinto:
SCP Secret Laboratory/EXILED/Plugins/
markdown
- Start the server once. EXILED will generate:
EXILED/Configs/WeeklyPlaytime.yml EXILED/Configs/WeeklyPlaytime/playtime.csv
yaml
You're done 🎉
WeeklyPlaytime.yml:
is_enabled: true
debug: false
Options
Setting Type Description
is_enabled bool Enables or disables the plugin
debug bool Outputs extra debug information
📦 Project Structure
kotlin
WeeklyPlaytime/
│
├── WeeklyPlaytime.cs (main plugin logic)
├── Config.cs (Exiled configuration class)
├── WeeklyPlaytime.csproj (project file)
├── README.md (this file)
└── .gitignore (recommended)
🔧 Recommended .gitignore
markdown
bin/
obj/
.vs/
*.dll
*.pdb
*.user
*.cache
*.log
🔮 Future Plans
Weekly leaderboard
Admin commands (wp top, wp reset)
Integration with VIP / Points / Exp systems
Web dashboard for viewing playtime