Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converted repository to utilize the Steam workshop #33

Merged
merged 17 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 59 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,59 @@
name: main
on:
push:
tags:
- "v*.*.*"
branches:
- "*"
permissions:
contents: write
discussions: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
mkdir annotations
cp -r local/ annotations/local/
zip -r annotations.zip annotations/
# Only release when a tag is pushed, which triggered this workflow
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: annotations.zip
fail_on_unmatched_files: true
generate_release_notes: true
make_latest: true
name: main
on:
push:
tags:
- v*.*.*
branches:
- "*"
permissions:
contents: write
discussions: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.12]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
mkdir annotations
cp -r local/ annotations/local/
zip -r annotations.zip annotations/
- name: Release zip
# Only release when a tag is pushed, which triggered this workflow
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: annotations.zip
fail_on_unmatched_files: true
generate_release_notes: true
make_latest: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
if: startsWith(github.ref, 'refs/tags/')
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- id: setup-steam-dir
if: startsWith(github.ref, 'refs/tags/')
run: |
mkdir -p "/home/runner/Steam/config"
echo "$SteamConfigVDF" > "/home/runner/Steam/config/config.vdf"
chmod 777 "/home/runner/Steam/config/config.vdf"
- id: setup-steamcmd
if: startsWith(github.ref, 'refs/tags/')
uses: CyberAndrii/[email protected]
- id: update_workshop
if: startsWith(github.ref, 'refs/tags/')
env:
# Plain-text steam config vdf generated for the account being used. Used for MFA
# Generate the content by logging in locally using MFA
STEAM_CONFIG_VDF: ${{ secrets.STEAM_CONFIG_VDF }}
run: |
python src/workshop.py --steam_account_name ${{ secrets.STEAM_ACCOUNT_NAME }} --steam_cmd ${{ steps.setup-steamcmd.outputs.executable }}
4 changes: 2 additions & 2 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
python-version: [3.12]
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Python
.venv

*.pyc

# Ignores all local annotations except for those named as map names
local/*
!local/de_*/
!local/de_*/de_*.txt

# Ignore output files
annotations/*
annotations.zip
annotations.zip

# vs code settings
.vscode/
48 changes: 25 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
# CS2-Annotations

This repository contains utility lineups for Counter-Strike 2, using the built-in annotations feature.
This repository contains curated utility lineups for Counter-Strike 2, using the built-in annotations feature.

| | |
| --------------------------------------------------- | ---------------------------------------------- |
| ![Preview standing positions](assets/positions.jpg) | ![Preview aim targets](assets/aim-targets.jpg) |

Annotations are to be placed in the following directory:
## Usage

```text
C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\annotations
```
1. Go to [the Steam workshop page](https://steamcommunity.com/sharedfiles/filedetails/?id=3397847952) and click
"Subscribe to all". This will download the annotations to your game. Any updates to the annotations will be
automatically downloaded.
2. Start the game, select __practice__ and __competitive__ in the top menu, choose a map, enable 'Load Map Guide' on the
left, select the map guide from the dropdown, and click 'Go'. The annotations will be loaded and displayed in-game.

## Usage
## Updating annotations

### Using the zip file (recommended)
Annotations are to be placed in the following directory upon saving:

- Download the latest 'annotations.zip' file from the
[releases page](https://github.com/ReneRebsdorf/CS2-annotations/releases)
- Extract the zip file to the csgo directory from the above step, replace any files if prompted
- Start the game, select _practice_ and _competitive_ in the top menu, choose a map, enable 'Load Map Guide' on the
left, and click 'Go'
```text
C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\annotations\local\map-name\name-of-the-annotation-file.txt
```

### Using git (advanced)
It is important to know that when using annotation_create as described in the below steps, three annotations are
created:

- Git clone this repository in the csgo directory
- Rename the directory from `CS2-annotations` to `annotations`
- Start the game, select _practice_ and _competitive_ in the top menu, choose a map, enable 'Load Map Guide' on the
left, and click 'Go'
1. The position annotation for where to stand
2. The lineup annotation for where to aim
3. The destination annotation for where to throw (a target circle)

## Creating annotations in-game
Steps to update the annotations:

- Start the game with annotations enabled (see above or use sv_allow_annotations 1)
- Start the game with annotations enabled (see above [Usage section](#usage)), __or__ use the zip file in the
[releases](https://github.com/ReneRebsdorf/CS2-annotations/releases), __or__ git clone this repo to the csgo folder,
and rename the folder to 'annotations'.
- Throw the lineup you want to create annotations for (this is important to record the destination target, whether it is
a jump throw, etc.)
- Open the console and type `annotation_create grenade [smoke|flash|he|fire|decoy] "label"`
- Open the console and type `annotation_create grenade [smoke|flash|he|molotov|incgrenade|decoy] "label"`
- Save the annotations with `annotation_save de_map-name`
- Open the annotation file in the annotations directory and copy the new annotations to this repository,
or just use [git method described under 'Usage'](#using-git-advanced)
- Open the annotation file in the annotations directory and copy the new annotations to this repository (unless using
the git clone method from the first step)
- Modify the 3 newest annotations (those in the bottom of the file), the following properties are useful to check:
- For the first annotation (the position annotation):
- `Color`: The color of the annotation, see [Color codes](#color-codes)
Expand All @@ -55,7 +57,7 @@ Annotations use the annotation\_\* commands in the console. Below are some usefu
- `annotation_create`: Creates a new lineup, described below. Omit parameters to get help text.
The below commands can be used in combination to provide a more detailed lineup, with where to stand, where to aim,
etc.
- `annotation_create grenade [smoke|flash|he|fire|decoy] "label"`: Creates a set of annotations with predefined values and uses a grenade icon with
- `annotation_create grenade [smoke|flash|he|molotov|decoy] "label"`: Creates a set of annotations with predefined values and uses a grenade icon with
an arrow to help find the lineup. the label field becomes the name of the lineup. This also results in the lineup
having a success-score, where after 2 successful throws, the help text and icons will disappear, and you will have to
line it up yourself for 2 more successful throws. This is the recommended way to create lineups, but do note that the
Expand Down
Binary file added assets/de_ancient.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/de_anubis.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/de_dust2.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/de_inferno.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/de_mirage.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/de_nuke.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/de_overpass.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/de_train.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/de_vertigo.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,26 @@
"dictionaryDefinitions": [],
"dictionaries": [],
"words": [
"akamaihd",
"Andrii",
"contentfolder",
"csgo",
"incgrenade",
"iniconfig",
"keyvalues",
"Molo",
"pluggy",
"previewfile",
"publishedfileid",
"pytest",
"softprops",
"steamapps",
"venv"
"steamcdn",
"steamupload",
"venv",
"workshopitem",
"zitrez",
"zxvf"
],
"ignoreWords": [],
"import": []
Expand Down
108 changes: 103 additions & 5 deletions local/de_inferno/de_inferno.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@
}
Desc =
{
Text = "Middle top of the 2nd brick in the arch"
Text = "Aim at middle of grout between 2nd and 3rd brick"
FontSize = 75
FadeInDist = 50.0
FadeOutDist = -1.0
Expand Down Expand Up @@ -1890,7 +1890,7 @@
}
Desc =
{
Text = "Lineup at the lock at the bottom of the garage door"
Text = "In front of garage door (not sensitive)"
FontSize = 75
FadeInDist = 300.0
FadeOutDist = 40.0
Expand Down Expand Up @@ -1924,7 +1924,7 @@
}
Desc =
{
Text = "Aim in the middle of 2nd and 3rd stone\nW + jump throw"
Text = "X: Aim between 2nd and 3rd stone\nY: Align between tower windows\nW + jump throw"
FontSize = 75
FadeInDist = 50.0
FadeOutDist = -1.0
Expand Down Expand Up @@ -3907,7 +3907,7 @@
}
Desc =
{
Text = "Stand in middle 2nd and 3rd mailbox"
Text = "Stand between 2nd and 3rd mailbox"
FontSize = 75
FadeInDist = 300.0
FadeOutDist = 40.0
Expand Down Expand Up @@ -3941,7 +3941,7 @@
}
Desc =
{
Text = "Aim at corner of the roof on the building in the distance\n2 step runthrow"
Text = "Aim slightly above corner of the roof on the building in the distance\n2 step runthrow"
FontSize = 75
FadeInDist = 50.0
FadeOutDist = -1.0
Expand Down Expand Up @@ -4569,4 +4569,102 @@
MasterNodeId = "4ba87ae0-f385-4fb6-9a78-c42993de048c"
DistanceThreshold = 80.0
}
MapAnnotationNode140 =
{
Enabled = true
Type = "grenade"
Id = "a0f11a12-5c32-487a-8175-30cec8587949"
SubType = "main"
Position = [ 479.024567, 2016.966919, 136.031204 ]
Angles = [ 0.0, 61.87912, 0.0 ]
VisiblePfx = true
Color = [ 255, 239, 111 ]
TextPositionOffset = [ 0.0, 0.0, 70.0 ]
TextFacePlayer = true
TextHorizontalAlign = "center"
RevealOnSuccess = false
Title =
{
Text = "B entry flash"
FontSize = 125
FadeInDist = 600.0
FadeOutDist = 40.0
ShowBackground = true
}
Desc =
{
Text = ""
FontSize = 75
FadeInDist = 300.0
FadeOutDist = 40.0
ShowBackground = true
}
StreakLimitGuidesOn = 2
StreakLimitGuidesOff = 2
JumpThrow = false
GrenadeType = "flash"
}
MapAnnotationNode141 =
{
Enabled = true
Type = "grenade"
Id = "8edd729b-2755-44ba-ad1d-b6d1bdf6db71"
SubType = "aim_target"
Position = [ 524.470276, 2077.608887, 265.118713 ]
Angles = [ -40.728477, 53.151718, 0.0 ]
VisiblePfx = true
TextPositionOffset = [ 0.0, 0.0, 30.0 ]
TextFacePlayer = false
TextHorizontalAlign = "center"
RevealOnSuccess = false
Title =
{
Text = "B entry flash"
FontSize = 125
FadeInDist = 50.0
FadeOutDist = -1.0
ShowBackground = true
}
Desc =
{
Text = ""
FontSize = 75
FadeInDist = 50.0
FadeOutDist = -1.0
ShowBackground = true
}
MasterNodeId = "a0f11a12-5c32-487a-8175-30cec8587949"
}
MapAnnotationNode142 =
{
Enabled = true
Type = "grenade"
Id = "df98ea8b-fc11-4c5d-b95c-dd91dd820101"
SubType = "destination"
Position = [ 945.309204, 2639.165771, 580.089539 ]
Angles = [ -40.728477, 53.151718, 0.0 ]
VisiblePfx = true
TextPositionOffset = [ 0.0, 0.0, 0.0 ]
TextFacePlayer = false
TextHorizontalAlign = "center"
RevealOnSuccess = false
Title =
{
Text = ""
FontSize = 75
FadeInDist = 50.0
FadeOutDist = -1.0
ShowBackground = true
}
Desc =
{
Text = ""
FontSize = 75
FadeInDist = 50.0
FadeOutDist = -1.0
ShowBackground = true
}
MasterNodeId = "a0f11a12-5c32-487a-8175-30cec8587949"
DistanceThreshold = 80.0
}
}
10 changes: 10 additions & 0 deletions src/workshop-metadata-template.vdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"workshopitem"
{
"appid" "730"
"contentfolder" "{content_folder}"
"previewfile" "{preview_file}"
"visibility" "0"
"title" "{title}"
"description" "{description}"
"publishedfileid" "{published_file_id}"
}
Loading
Loading