Skip to content

Commit e1e41f6

Browse files
committed
(Enhancement #1) Add special statistics
1 parent fb580bc commit e1e41f6

File tree

8 files changed

+1828
-562
lines changed

8 files changed

+1828
-562
lines changed

README.md

Lines changed: 92 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,33 @@
44

55
- This plugin tracks and records player statistics from human players. The following statistics are currently being recorded:
66

7-
| Name | Team |
8-
| ------------------- | -------- |
9-
| Survivors Kils | Infected |
10-
| Survivors In capped | Infected |
11-
| Infected Kills | Survivor |
12-
| Infected Headshots | Survivor |
7+
Basic Statistics (Default)
8+
9+
| Name | Team | Description |
10+
| ------------------ | -------- | ------------------------------------------------------------ |
11+
| Survivors Kils | Infected | Number of times an infected has killed a survivor |
12+
| Survivors Incapped | Infected | Number of times an infected player has incapped a survivor |
13+
| Infected Kills | Survivor | Number of times a survivor player has killed a Special Infected (Commons not counted) |
14+
| Infected Headshots | Survivor | Number of times a survivor killed a Special Infected by Headshot |
15+
16+
Extra Statistics for the more skilled (Disabled by default)
17+
18+
| Name | Team | Description |
19+
| ---------------------- | -------- | ------------------------------------------------------------ |
20+
| Hunter Skeet (Sniper) | Survivor | Number of hunters skeeted with sniper by a survivor |
21+
| Hunter Skeet (SG) | Survivor | Number of hunters skeeted with shotgun by a survivor |
22+
| Hunter Skeet (Melee) | Survivor | Number of hunters skeeted with melee by a survivor |
23+
| Tank Rock Skeets | Survivor | Number rocks skeeted by a survivor |
24+
| Witch Crown (Standard) | Survivor | Number of standard witch crowns by a survivor (up close) |
25+
| Witch Crown (Draw) | Survivor | Number of witch draw crowns by a survivor (chip from a distance and kill up-close) |
26+
| Boomer Pops | Survivor | Number of boomer pops by a survivor (Boomer spawning and getting killed without having the chance to hurt/boom a survivor) |
27+
| Charger Levels | Survivor | Number of chargers leveled by a survivor |
28+
| Smoker Tongue Cuts | Survivor | Number of smoker tongues cut by a survivor |
29+
| Hunter Deadstops | Survivor | Number of hunter deadstops by a survivor |
30+
| Quad Booms | Infected | Number of times survivors have been quad boomed (all 4 boomed) |
31+
| 25 Hunter Pounces | Infected | Number of 25 point hunter pounces |
32+
| Death Charges | Infected | Number of times a charger has death charged a survivor |
33+
| Tank Rock Hits | Infected | Number of times a tank rocked a survivor |
1334

1435

1536

@@ -19,12 +40,20 @@
1940

2041
- A display panel showing the player statistics of a user. This can be triggered by issuing `sm_rank` on the console or by typing `!rank`in chat.
2142

22-
![Player Rank](player_rank.png)
43+
![Player Rank (Basic)](player_rank.png)
44+
45+
- A display panel showing additional stats (disabled by default)
46+
47+
![Player Ranks (Extras)](player_rank_extras.png)
2348

2449
- A display panel showing the top N players sorted by their ranking. This feature also allows the the requesting player to be able to view other player's statistics/ranking on the server.
2550

2651
![Top N Players](top_players.png)
2752

53+
- A display panel showing the ranks of the players currently present in the server
54+
55+
![Ranks of all players in-game](ranks_ingame.png)
56+
2857
- A point system is also implemented and can be further customized by modifying the point multipliers from the plugin configuration file (`playerstats.cfg`)
2958

3059
### Installation
@@ -68,10 +97,27 @@ The plugin can be further customized through the `playerstats.cfg` file located
6897
"survivor_incapped" "1.0"
6998
"infected_killed" "1.0"
7099
"infected_headshot" "1.0"
100+
"skeet_hunter_sniper" "1.0"
101+
"skeet_hunter_shotgun" "1.0"
102+
"skeet_hunter_melee" "1.0"
103+
"skeet_tank_rock" "1.0"
104+
"witch_crown_standard" "1.0"
105+
"witch_crown_draw" "1.0"
106+
"boomer_pop" "1.0"
107+
"charger_level" "1.0"
108+
"smoker_tongue_cut" "1.0"
109+
"hunter_dead_stop" "1.0"
110+
"boomer_quad" "1.0"
111+
"hunter_twenty_five" "1.0"
112+
"death_charge" "1.0"
113+
"tank_rock_hits" "1.0"
71114
}
72-
"PlayerRankPanel"
115+
"StatPanels"
73116
{
74-
"title" "► Player Stats ◄"
117+
"title_rank_player" "Player Stats"
118+
"title_rank_topn" "Top {top_player_count} Players"
119+
"title_rank_ingame" "Player In-Game Ranks"
120+
"title_rank_extras" "Extra Player Stats"
75121
}
76122
"ConnectAnnounce"
77123
{
@@ -95,12 +141,14 @@ Connect Announce Output:
95141
| Section Name | Description |
96142
| --------------- | ------------------------------------------------------------ |
97143
| StatModifiers | This section contains the modifiers for the point system. These values affects the total points of the user. For example, if a player has killed 10 special infected by headshot (infected_headshot) and the point modifier is 2.5 the total points for the number of infected headshots would be 25 (10 * 2.5). |
98-
| PlayerRankPanel | This section configures the display panel of the player statistics/ranking. Currently you will only be able to customize the title of the panel. |
99-
| ConnectAnnounce | This section configures the format of the player connect announce. The formatting rules are explained below. |
144+
| StatPanels | This section allows you to customize/add title headers to each of the available display panels. |
145+
| ConnectAnnounce | This section allows you to customize the the format of the player connect announce feature. Formatting rules are explained below. |
100146

101147
#### Connect Announce Formatting Rules
102148

103-
**<u>Colour Tags</u>**
149+
**<u>Colour Tags</u>**
150+
151+
> Note: Some colour tags might work for Left 4 Dead 2
104152
105153
| Tag | Color |
106154
| ----- | -------------------------------------- |
@@ -141,20 +189,43 @@ Tag Prefix
141189
| {f:total_points} | Total Points (Sum of everything) |
142190
| {i:rank_num} | Current Ranking |
143191

192+
Extra Tags
193+
194+
| Name | Description |
195+
| ------------------------ | ------------------------------------------------------------ |
196+
| {i:skeet_hunter_sniper} | Number of hunters skeeted with sniper by a survivor |
197+
| {i:skeet_hunter_shotgun} | Number of hunters skeeted with shotgun by a survivor |
198+
| {i:skeet_hunter_melee} | Number of hunters skeeted with melee by a survivor |
199+
| {i:skeet_tank_rock} | Number rocks skeeted by a survivor |
200+
| {i:witch_crown_standard} | Number of standard witch crowns by a survivor |
201+
| {i:witch_crown_draw} | Number of draw crowns by a survivor |
202+
| {i:boomer_pop} | Number of boomer pops by a survivor |
203+
| {i:charger_level} | Number of charger levels by a survivor |
204+
| {i:smoker_tongue_cut} | Number of smoker tongue cuts by a survivor |
205+
| {i:hunter_dead_stop} | Number of hunter deadstops by a survivor |
206+
| {i:boomer_quad} | Number of times survivors have been quad boomed (all 4 boomed) |
207+
| {i:hunter_twenty_five} | Number of 25 point hunter pounces |
208+
| {i:death_charge} | Number of times a charger has death charged a survivor |
209+
| {i:tank_rock_hits} | Number of times a tank rocked a survivor |
210+
144211

145212

146213
------
147214

148215
### ConVars
149216

150-
| Name | Description | Default value | Min Value | Max Value |
151-
| ----------------------- | ------------------------------------------------------------ | :------------ | --------- | --------- |
152-
| pstats_enabled | Enable/Disable this plugin | 1 | 0 | 1 |
153-
| pstats_debug_enabled | Enable debug messages | 0 | 0 | 1 |
154-
| pstats_versus_exclusive | If set, the plugin will only work for versus gamemodes | 1 | 0 | 1 |
155-
| pstats_record_bots | Sets whether we should record bots. By default only human players are recorded. | 0 | 0 | 1 |
156-
| pstats_menu_timeout | The timeout value for the player stats panel | 30 (seconds) | 3 | 9999 |
157-
| pstats_max_top_players | The max top N players to display | 10 | 10 | 50 |
217+
| Name | Description | Default value | Min Value | Max Value |
218+
| ------------------------ | ------------------------------------------------------------ | :------------ | --------- | --------- |
219+
| pstats_enabled | Enable/Disable this plugin | 1 | 0 | 1 |
220+
| pstats_debug_enabled | Enable debug messages | 0 | 0 | 1 |
221+
| pstats_versus_exclusive | If set, the plugin will only work for versus gamemodes | 1 | 0 | 1 |
222+
| pstats_record_bots | Sets whether we should record bots. By default only human players are recorded. | 0 | 0 | 1 |
223+
| pstats_menu_timeout | The timeout value for the player stats panel | 30 (seconds) | 3 | 9999 |
224+
| pstats_max_top_players | The max top N players to display | 10 | 10 | 50 |
225+
| pstats_extras_enabled | Include extra stats to be recorded | 0 | 0 | 1 |
226+
| pstats_display_type | 1 = Display points, 2 = Display the count, 3 = Both points and count | 2 | 1 | 3 |
227+
| pstats_show_rank_onjoin | If set, player rank will be displayed to the user on the start of each map | 1 | 0 | 1 |
228+
| pstats_cannounce_enabled | If set, connect announce will be displayed to chat when a player joins | 1 | 0 | 1 |
158229

159230
### Commands
160231

@@ -166,4 +237,5 @@ Tag Prefix
166237
| sm_top | Display the top N players. A menu panel will be displayed to the requesting player | Number | Anyone | The number of players to be displayed. |
167238
| sm_ranks | Display the ranks of the players currently playing in the server. A menu panel will be displayed to the requesting player. | Number | Anyone | The number of players to be displayed. |
168239
| sm_pstats_reload | Reloads plugin configuration. This is useful if you have modified the `playerstats.cfg` file. 'This command also synchronizes the modifier values set from the configuration file to the database. This is quite an expensive operation, so please only use this command when necessary. | None | Admin (Root) | None |
240+
| sm_hidestats | Allows a player to prevent other players from viewing his extra statistics. | None | Anyone | None |
169241

configs/playerstats.cfg

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,23 @@
3535
// {f:total_points} : Total Points (Sum of everything)
3636
// {i:rank_num} : Current Ranking
3737
//
38+
// Extra stats (applicable only if enabled):
39+
//
40+
// {i:skeet_hunter_sniper} : Number of hunters skeeted with sniper by a survivor
41+
// {i:skeet_hunter_shotgun} : Number of hunters skeeted with shotgun by a survivor
42+
// {i:skeet_hunter_melee} : Number of hunters skeeted with melee by a survivor
43+
// {i:skeet_tank_rock} : Number rocks skeeted by a survivor
44+
// {i:witch_crown_standard} : Number of standard witch crowns by a survivor
45+
// {i:witch_crown_draw} : Number of draw crowns by a survivor
46+
// {i:boomer_pop} : Number of boomer pops by a survivor
47+
// {i:charger_level} : Number of charger levels by a survivor
48+
// {i:smoker_tongue_cut} : Number of smoker tongue cuts by a survivor
49+
// {i:hunter_dead_stop} : Number of hunter deadstops by a survivor
50+
// {i:boomer_quad} : Number of times survivors have been quad boomed (all 4 boomed)
51+
// {i:hunter_twenty_five} : Number of 25 point hunter pounces
52+
// {i:death_charge} : Number of times a charger has death charged a survivor
53+
// {i:tank_rock_hits} : Number of times a tank rocked a survivor
54+
//
3855
// =============================================================
3956

4057
"PlayerStats" {
@@ -44,10 +61,27 @@
4461
"survivor_incapped" "1.0"
4562
"infected_killed" "1.0"
4663
"infected_headshot" "1.0"
64+
"skeet_hunter_sniper" "1.0"
65+
"skeet_hunter_shotgun" "1.0"
66+
"skeet_hunter_melee" "1.0"
67+
"skeet_tank_rock" "1.0"
68+
"witch_crown_standard" "1.0"
69+
"witch_crown_draw" "1.0"
70+
"boomer_pop" "1.0"
71+
"charger_level" "1.0"
72+
"smoker_tongue_cut" "1.0"
73+
"hunter_dead_stop" "1.0"
74+
"boomer_quad" "1.0"
75+
"hunter_twenty_five" "1.0"
76+
"death_charge" "1.0"
77+
"tank_rock_hits" "1.0"
4778
}
48-
"PlayerRankPanel"
79+
"StatPanels"
4980
{
50-
"title" "► Player Stats ◄"
81+
"title_rank_player" "Player Stats"
82+
"title_rank_topn" "Top {top_player_count} Players"
83+
"title_rank_ingame" "Player In-Game Ranks"
84+
"title_rank_extras" "Extra Player Stats"
5185
}
5286
"ConnectAnnounce"
5387
{

0 commit comments

Comments
 (0)