Skip to content

Shaneajm/CS2-AchievementsSW2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AchievementsSW2

An acheivements system for SwifltyS2 CS2 servers.

Build Status Downloads Stars License

Info

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.

Features

  • 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

Config

{
  "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
  }
}

Achievements Example

[
  {
    "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
  }

Building

  • 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.

Publishing

  • Use the dotnet publish -c Release command to build and package your plugin.
  • Distribute the generated zip file or the contents of the build/publish directory.# CS2-AchievementsSW2

Disclosure

AI was used in the creation of this plugin. I reviewed the code and did not let design decisions be outsourced to an agent.

Special Thanks

This plugin wouldn't have been possible without the work and inspiration of these projects:

About

An extensible achievements plugin for SwifltyS2.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages