Skip to content

About

Create unique challenges for your players

Topics

Resources

Stars

13 stars

Watchers

1 watching

Forks

Repository files navigation

Warning

You need to configure challenges! This plug-in comes with examples. READ THE DOCS before asking!

CounterstrikeSharp - Challenges

Discord Support GitHub release License issues - cs2-challenges

Challenges menu

Create time-limited challenges for players. Each challenge is a YAML file with tasks that listen for game events (for example three headshots in a row). This plugin tracks progress. It does not grant rewards on its own - wire another plugin via server commands or ChallengesShared (Plugin API).

Tip

Please consider a donation when you're using this plugin - it took a long time to build and improve - it only costs you a few dollars and would help me very much!

Documentation

Important

Create a GitHub Issue for bugs, features, and improvements. Use Discord for everything else.

Tutorial Install, examples, first challenge
Challenge builder Visual editor for challenge YAML
Challenges and tasks Challenge / task fields
Events / Listeners Task type values and attributes
Rules / Actions When events count / completion side effects
Schedules / Settings Active windows and Challenges.json

Source markdown lives in documentation/.

Features

  • One YAML file per challenge (stored under blueprints/), with ordered tasks and requires dependencies inside the file.
  • Track progress; notify other plugins via ChallengesShared, or run server console commands on task completion.
  • Panorama HUD: round-start tracker and fullscreen !c / !challenges menu (Workshop).
  • Player language from !lang is stored and restored on reconnect.
  • Build with Docker (make debug / make release) - no local .NET install required.
  • Challenge builder and documentation on GitHub Pages (live site).

Running tests

The unit tests in tests/Challenges.Tests cover rule checks, progress simulation, the progress pipeline under load, load-time checks (demand, gates, aliases, validation) and the attribute providers. They need no game server: CounterStrikeSharp is loaded but never called.

make test

Without make (for example Git Bash on Windows):

MSYS_NO_PATHCONV=1 docker run --rm -v "$(pwd -W)":/src -v "$HOME/.nuget/packages":/root/.nuget/packages -w /src mcr.microsoft.com/dotnet/sdk:10.0 dotnet test tests/Challenges.Tests/Challenges.Tests.csproj

Microbenchmarks in bench/Challenges.Bench (BenchmarkDotNet, not part of the plugin build) compare the old string rules, full event fill and per-event progress clone with the current code: make bench, or make bench BENCH_ARGS="--job short" for a quick run.

Test servers

Road map

  • Web builder to create challenges (builder/)
  • Documentation site with search (docs)
  • Spawn custom props on the map as a challenge
  • Link possible values for all rules in documentation
  • Discord integration
    • Webhook for challenge completion
    • Webhook when a new schedule starts
    • Webhook for player statistics at an interval

License

Released under GPLv3 by @Kandru.

Authors

About

Create unique challenges for your players

Topics

Resources

Stars

13 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages