Skip to content

Commit 0543b88

Browse files
committed
v2.1.0 - Unified config.json with customizable tag, colors, defaults, database settings
1 parent d50e4cc commit 0543b88

File tree

2 files changed

+182
-80
lines changed

2 files changed

+182
-80
lines changed

README.md

Lines changed: 59 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SSJ Plugin for CounterStrikeSharp
1+
# Sharpyku-SSJ — Strafe Sync Jump Plugin for CS2
22

33
A **Strafe Sync Jump (SSJ)** plugin for CS2 servers running [CounterStrikeSharp](https://github.com/roflmuffin/CounterStrikeSharp). Displays per-jump strafe statistics in chat, helping players improve their bunny hopping technique.
44

@@ -13,9 +13,10 @@ Uses a **velocity cross/dot product** algorithm (inspired by [FL-StrafeMaster](h
1313
- **Per-jump stats** — Pre speed, speed, gain %, sync %, strafe count
1414
- **Accurate sync** — Velocity-based cross/dot product sync algorithm
1515
- **Autobhop support** — Detects in-air re-jumps (same-tick land+jump)
16+
- **Fully configurable** — Auto-generated `config.json` with all settings (tag, colors, database, defaults, tuning)
1617
- **Startzone integration** — Only tracks jumps after leaving the start zone (requires [SharpTimer](https://github.com/DEAFPS/SharpTimer))
1718
- **Per-player settings** — Toggle SSJ on/off, repeat mode, max jumps to display (1-10)
18-
- **MySQL/MariaDB persistence** — Player settings are saved to database and persist across server restarts
19+
- **MySQL/MariaDB persistence** — Player settings saved to database, persist across server restarts
1920
- **T3Menu integration** — Interactive settings menu via `!ssj` command (requires [T3Menu-API](https://github.com/T3Marius/T3Menu-API))
2021

2122
## Chat Output
@@ -49,8 +50,8 @@ Colors: Sync ≥80% = green, ≥60% = yellow, ≥40% = gold, <40% = red
4950
csgo/addons/counterstrikesharp/plugins/SSJ-Plugin/
5051
```
5152
3. Make sure `SSJ-Plugin.dll` and `MySqlConnector.dll` are both in the folder
52-
4. Start/restart your server
53-
5. Configure the database (see below)
53+
4. Start/restart your server — a `config.json` will be auto-generated
54+
5. Edit the config to your liking (see below)
5455

5556
### File Structure
5657
```
@@ -62,38 +63,72 @@ csgo/addons/counterstrikesharp/
6263
└── configs/
6364
└── plugins/
6465
└── SSJ-Plugin/
65-
└── database.json ← auto-created on first load
66+
└── config.json ← auto-created on first load
6667
```
6768

68-
## Database Configuration
69+
## Configuration
6970

70-
On first load, the plugin creates a default config at:
71+
On first server start, the plugin auto-generates a config file at:
7172
```
72-
csgo/addons/counterstrikesharp/configs/plugins/SSJ-Plugin/database.json
73+
csgo/addons/counterstrikesharp/configs/plugins/SSJ-Plugin/config.json
7374
```
7475

75-
Edit it with your MySQL/MariaDB credentials:
76+
**All plugin settings are configured from this single file.** Here's the full default config with explanations:
7677

7778
```json
7879
{
79-
"Host": "localhost",
80-
"Port": 3306,
81-
"Database": "your_database",
82-
"User": "your_user",
83-
"Password": "your_password"
80+
"ChatTag": "[SSJ]",
81+
"ChatTagColor": "DarkBlue",
82+
"StartzoneOnly": true,
83+
"DefaultMaxJumps": 6,
84+
"DefaultEnabled": true,
85+
"DefaultRepeat": true,
86+
"MinAirTicksToReport": 2,
87+
"PrintThrottleTicks": 8,
88+
"GroundSettleTicksAir": 3,
89+
"ChainResetGroundTicks": 24,
90+
"Database": {
91+
"Enabled": false,
92+
"Host": "localhost",
93+
"Port": 3306,
94+
"Database": "BhopServer",
95+
"User": "root",
96+
"Password": "",
97+
"TableName": "ssj_settings"
98+
}
8499
}
85100
```
86101

87-
The plugin automatically creates the `ssj_settings` table:
88-
89-
| Column | Type | Description |
90-
|------------|-------------------|------------------------------|
91-
| SteamID | BIGINT UNSIGNED | Player's Steam ID (Primary) |
92-
| Enabled | TINYINT | SSJ enabled (1) or off (0) |
93-
| RepeatMode | TINYINT | Show every run (1) or once |
94-
| MaxJumps | INT | Max jump number to display |
95-
96-
> **No database?** The plugin works fine without it — settings just won't persist between sessions.
102+
### Config Options
103+
104+
| Option | Default | Description |
105+
|--------|---------|-------------|
106+
| `ChatTag` | `[SSJ]` | The tag shown in chat before each message. Change to anything you want (e.g. `[BHOP]`, `[EG]`) |
107+
| `ChatTagColor` | `DarkBlue` | Color of the tag. Options: `DarkBlue`, `Blue`, `LightBlue`, `Red`, `DarkRed`, `Green`, `Lime`, `Gold`, `Yellow`, `Purple`, `Magenta`, `Olive`, `Orange`, `Grey`, `LightRed`, `LightPurple` |
108+
| `StartzoneOnly` | `true` | Only track SSJ after player leaves the start zone. Set to `false` to track all jumps anywhere |
109+
| `DefaultMaxJumps` | `6` | Default number of jumps to display per run (players can override via `!ssj` menu) |
110+
| `DefaultEnabled` | `true` | Whether SSJ is enabled by default for new players |
111+
| `DefaultRepeat` | `true` | Whether stats repeat every run by default |
112+
| `MinAirTicksToReport` | `2` | Minimum air ticks before a jump is reported (filters micro-jumps) |
113+
| `PrintThrottleTicks` | `8` | Minimum ticks between chat messages (prevents spam) |
114+
| `GroundSettleTicksAir` | `3` | Ticks in air before takeoff is confirmed |
115+
| `ChainResetGroundTicks` | `24` | Ticks on ground before bhop chain resets |
116+
117+
### Database Settings
118+
119+
| Option | Default | Description |
120+
|--------|---------|-------------|
121+
| `Database.Enabled` | `false` | Set to `true` to enable MySQL/MariaDB persistence |
122+
| `Database.Host` | `localhost` | Database server address |
123+
| `Database.Port` | `3306` | Database server port |
124+
| `Database.Database` | `BhopServer` | Database name |
125+
| `Database.User` | `root` | Database username |
126+
| `Database.Password` | `""` | Database password |
127+
| `Database.TableName` | `ssj_settings` | Name of the settings table |
128+
129+
The plugin automatically creates the database table on first connect. Player settings (Enabled, Repeat, MaxJumps) are saved per SteamID.
130+
131+
> **No database?** Leave `Database.Enabled` as `false` — the plugin works fine without it, settings just won't persist between sessions.
97132
98133
## Commands
99134

0 commit comments

Comments
 (0)