This plugin is a lightweight acheivements system for CS2 servers that want to have a system seperate from something like a battlepass system. Server owners can create achievements for any server or specific servers/gamemodes.
You can load the achievements from a local file or via a URL. Progress is saved in the database of your choice although only MySQL has been tested.
- Load achievements from a remote source (URL)
- Supports CS2 Game Events
- Progress can be shared across mulitple servers.
- Achievements can be restricted to specific servers/gamemodes.
- Season support
{
"AchievementsSW2": {
"DatabaseConnection": "default",
"Commands": [
"achievements",
"achievement",
"ach"
],
"AdminReloadCommand": "achievements_reload",
"ServerType": "default",
"AchievementSource": 0,
"RemoteUrl": "",
"RemoteTimeoutSeconds": 10,
"SeasonKey": null,
"MinimumPlayers": 0,
"AllowProgressDuringWarmup": false,
"EventDebugLogs": false
}
}[
{
"Id": "general_100_kills",
"Name": "First Century",
"Description": "Kill 100 enemy players.",
"Category": "General",
"ServerTypes": [
"all"
],
"Event": "EventPlayerDeath",
"Target": "Attacker",
"Amount": 100,
"RewardCommands": [],
"RewardPhrase": "",
"Hidden": false
},
{
"Id": "general_10_round_wins",
"Name": "On a Roll",
"Description": "Win 10 rounds.",
"Category": "General",
"ServerTypes": [
"all"
],
"Event": "EventRoundEnd",
"Target": "winner",
"Amount": 10,
"RewardCommands": [
"say u0022{name}u0022 has won 10 rounds in a row!"
],
"RewardPhrase": "Get a shoutout!",
"Hidden": false
},
{
"Id": "retake_100_defuses",
"Name": "Clutch Technician",
"Description": "Defuse 100 bombs.",
"Category": "Retake",
"ServerTypes": [
"retake"
],
"Event": "EventBombDefused",
"Target": "Userid",
"Amount": 100,
"RewardCommands": [
"eco give {steamid64} 30.0 coins"
],
"RewardPhrase": "30 coins",
"Hidden": false
}- Open the project in your preferred .NET IDE (e.g., Visual Studio, Rider, VS Code).
- Build the project. The output DLL and resources will be placed in the
build/directory. - The publish process will also create a zip file for easy distribution.
- Use the
dotnet publish -c Releasecommand to build and package your plugin. - Distribute the generated zip file or the contents of the
build/publishdirectory.# CS2-AchievementsSW2
AI was used in the creation of this plugin. I reviewed the code and did not let design decisions be outsourced to an agent.
This plugin wouldn't have been possible without the work and inspiration of these projects: