About OpenPrefirePrac
From GitHubAn open-source CounterStrikeSharp powered server-side practicing plugin for CS2. It provides multiple prefire practices on competitive maps and support multiplayer practicing simultaneously.
OpenPrefirePrac
An open-source CounterStrikeSharp powered server-side practicing plugin for CS2. It provides multiple prefire practices on competitive map pool maps and support multiplayer practicing concurrently.
Get started
Requirement
- CounterStrikeSharp
Installation
Download the latest release files and extract all files into "game/csgo/addons/counterstrikesharp/plugins/OpenPrefirePrac/".
To install the latest version of CounterStrikeSharp, please refer to this guide.
How to use
Tips on operating a practice server
When starting a server, I recommend using these parameters.
[CS2 Installation Directory]/game/bin/linuxsteamrt64/cs2 -dedicated -insecure +map de_inferno -maxplayers_override 64 +game_alias competitive +sv_hibernate_when_empty 0
Note: "-maxplayers_override 64" is the most important one. It allows the server to add more than 5 bots on one team, which is crucial to achieve the goal of allowing multiplayer training simultaneously.
Start prefire practice in game
Send "!prefire" in chatbox or use command "css_prefire" in console. This will bring up the main menu.
There are also some shortcut commands you can use.
- !prefire prac [number]: Start practicing on a selected route.
- !prefire map [map name]: Switch to another map.
- !prefire df [1-6]: Set the difficulty.
- !prefire mode [rand/full]: Set training mode.
- !prefire bw [rand/ump/ak/sct/awp]: Set weapons for bots.
- !prefire lang [en/pt/zh]: Set language. en for English, pt para português, 中文选择 zh。
- !prefire exit: Stop practicing.
You can always use !prefire help to see how to use them.
Adjust default settings
Now the plugin supports loading default settings of difficulty and training mode from a json file. You can rename default_cfg.json.example to default_cfg.json and modify the value as you like.
Explanation of values:
- Difficulty
- 0: No healing.
- 1: Init hp 500 with no healing.
- 2: +25hp for each kill.
- 3: Reheal to 100hp after a kill.
- 4: +100hp for each kill.
- 5: +500hp for each kill.
- Training Mode
- 0: Random mode, randomly spawn some targets.
- 1: Full mode, all targets.
- Bot Weapon
- 0: Bots buy weapons randomly.
- 1: Bots use UMP45.
- 2: Bots use AK47.
- 3: Bots use Scout.
- 4: Bots use AWP.
- Aim lock for bots
- 0: CS2's native bot behavior. It works in a consistant manner but is less powerful.
- 1: CSS based aim lock: Bots always aim at players' heads. But this may conflict with CS2's native bot logic, causing bots to not react under certain circumstances.
- 2: Behavior tree based aim lock: Hard mode.
- EquipPlayer:
- 0: Disabled. To avoid interfering with other weapon related plugins
- 1: Enabled (default). Players will be equipped with AK47, deagle and nades every time they respawn.
For detailed discussion on bot difficulty, please refer to this issue.
Development
Provide translation
First you can make a copy of an existing translation profile from the lang folder and start translate the sentences into your language.
Then you might want to create a pull request. Because the plugin uses player's IP to decide the language shown to each player, a mapping from country to language needs to be hard coded into the translator module.
How to customize a practice profile?
The folder "maps" is organized as follows: Each sub-folder in "maps" contains practice profiles for the corresponding map. Each text file in that sub-folder is a practice profile.
A practice profile consists of five parts:
The first line contains the file names of practice profiles that might interfere with this practice, separated by spaces.
The second line contains 2 numbers, indicating how many bots are needed in this practice and a spawn ratio between 0 and 1 (how many of them should be spawned in random practice mode) respectively.
The third line instructs the place and facing direction of the player. The first 3 floating numbers are the position and the other 3 are the rotation. This line should only contain 6 numbers.
pos_x pos_y pos_z ang_x ang_y ang_z
The fourth part with an arbitrary number of lines describes spawn positions of bots. Bot will be spawn in the same order as that of the lines.
There should be at least 6 numbers and a True or False value in each line. The first 3 numbers describe position, following 3 numbers indicating the rotation angle. The 7th value is either a True or a False indicating whether the bot is crouching. You can have comments at the end of the line if needed (optional).
The positions and rotations can be retrieved from in-game get\_pos command. But please notice that, the height values used in profiles should be the values returned by get\_pos minus 64. I made a python script that does this calculation for you. The usage is explained in next section.
pos_x pos_y pos_z ang_x ang_y ang_z is_crouching
The fifth part with an arbitrary number of lines describes joint points of a guiding line. The guiding line is used to provide a better narration of how the practice is designed to be played. This also requires a bit calculation on height of joints and it can also be handled by the python script.
Each line contains 3 numbers.
pos_x pos_y pos_z
How to use the python helper script to convert heights
The script calculate_height.py receives output of the getpos in-game function and automatically convert them to the proper format of bot spawn positions and joint positions of a guiding line. The steps of how it is used is described as follows.
Highlights
From source dataLoaders
Runs on Counterstrikesharp.
Footprint
Rated a light load on a server.
License
Published under MIT.
OpenPrefirePrac on Nxeon
From our catalogue- One-click install
- Supported on Nxeon Counter-Strike 2 servers. We download it from GitHub, place it, and restart the server.
- Server side
- Required on the server
- Server type needed
- Counterstrikesharp
- Server load
- light
- Smallest plan we suggest
- CS2 — 2 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
- Latest build
- v0.1.47, released 2025-02-12
Recent builds
| Build | Released | Game versions | Loaders |
|---|---|---|---|
| v0.1.47 | 2025-02-12 | n/a | n/a |
| v0.1.46 | 2025-01-18 | n/a | n/a |
| v0.1.45 | 2025-01-13 | n/a | n/a |
| v0.1.44 | 2025-01-09 | n/a | n/a |
| v0.1.43 | 2025-01-07 | n/a | n/a |
| v0.1.42 | 2025-01-03 | n/a | n/a |
Run OpenPrefirePrac on a Counter-Strike 2 server
Pick a server or deploy a new one above; it is installed in one click.
What kind of mod it is
From the catalogGame modes & minigames
Game modes, minigames and competitive formats for your server.
Runs on your server
From source side supportGitHub lists OpenPrefirePrac as required on the server. Check its GitHub page to see whether players need it too.
Compatibility
- Game
- Counter-Strike 2
- Loaders
- Counterstrikesharp
- Runs on
- Serverrequired on the server
Verified at the source
- ✓GitHubOfficial listing, checked 2026-10-16Open ↗
- ✓Authorlengran, as published on GitHub
- ✓LicenseMITFree
