A badge issuing service for rc3.world where you have to find a certain amount of places to receive a badge.
Go to file
2022-01-01 01:28:06 +01:00
howto Initial commit 2022-01-01 01:18:13 +01:00
counterbadge.example.json Add comments to counterbadge.example.json 2022-01-01 01:28:06 +01:00
counterbadge.py Initial commit 2022-01-01 01:18:13 +01:00
counterbadge.service Initial commit 2022-01-01 01:18:13 +01:00
LICENSE Initial commit 2022-01-01 01:18:13 +01:00
README.md Add disclaimer 2022-01-01 01:19:53 +01:00

rC3 Counter-Badge

This project was created during rC3 2021 NOWHERE in order to issue badges (i.e. achievements) for a treasure hunt style game on a WorkAdventure map.

Disclaimer: This project was hacked in a single evening, doesn't have any quality control measures and is not actively maintained. Use with appropriate care.

License

See LICENSE

Dependencies

  • Python 3 >= 3.6
  • Bottle
  • Beaker

How To Set Up

Create your Badges in Maschinenraum

Create your badge in Maschinenraum

  1. Click the + button next to the Badges menu entry
  2. Give you badge a name
  3. Make the badge an achievement
  4. Upload a badge picture
  5. Save the badge

Repeat for every badge you want to create.

Issue Badge Redeem Tokens

Issue Badge Redeem Tokens

  1. Click on the Badges menu entry
  2. Select your badge
  3. Under Create Badge Redeem Tokens, choose the Permanent type.
  4. Click Create Redeem Token. Save the redeem token for later use.

Repeat for every badge you want to create.

Create OAuth2 Client

Create OAuth2 Client

  1. Click on the Authentication menu entry
  2. If not already done, create a rC3 API token by clicking Request a new token. *Save the API token for later use.
  3. Give your new OAuth2 client a name.
  4. Set its type to Public.
  5. Set the grant type to Auhtoziation code.
  6. Click New application to create the OAuth2 client.

Generate Counter Tokens

Create Layers in Tiled

  1. For each unique place on your WorkAdventure map, generate a unique token, e.g. using uuidgen.
  2. Create a layer in Tiled for each unique place and add at least the openWebsite layer property with a value of e.g. https://<yourdomain>/counter/<my-counter-name>/<the-unique-token>.

Deploy

Set up counterbadge.py as a service on your system, e.g. as a systemd service (see counterbadge.service as an example). Set up a TLS-terminating reverse proxy.

Configure

See counterbadge.example.json as a config example. Put in the API, OAuth2 and Badge credentials you created earlier.