Skip to content

Commit e542417

Browse files
committed
Update ConVar descriptions and document them in README
1 parent 7596ec4 commit e542417

File tree

2 files changed

+56
-15
lines changed

2 files changed

+56
-15
lines changed

README.md

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
Inspired by the plugins I played many years back that were never made accessible to the public, Deathrun Neu aims to keep weapon restrictions as little as possible while not ruining the core gameplay.
33

44
## Features
5-
* Activator queue system (``!drnext``)
6-
* Ability to hide teammates in crowded areas (``!drhide``)
7-
* Built-in third-person mode (``!drthirdperson``)
5+
* Activator queue system (`!drnext`)
6+
* Ability to hide teammates in crowded areas (`!drhide`)
7+
* Built-in third-person mode (`!drthirdperson`)
88
* Dynamic Activator health for fair combat minigames
99
* Highly customizable item configuration
10-
* Configurable round timer
10+
* Configurable round timer (using the `tf_arena_round_time` ConVar)
1111

1212
## Dependencies
1313
* SourceMod 1.10
@@ -16,8 +16,8 @@ Inspired by the plugins I played many years back that were never made accessible
1616
* [More Colors](https://forums.alliedmods.net/showthread.php?t=185016) (compile only)
1717

1818
## Configuration
19-
The global item configuration found in ``configs/deathrun/items.cfg`` allows you to configure and restrict each player's items as you please.
20-
Map-specific configuration files are read from the ``configs/deathrun/maps`` directory.
19+
The global item configuration found in `configs/deathrun/items.cfg` allows you to configure and restrict each player's items as you please.
20+
Map-specific configuration files are read from the `configs/deathrun/maps` directory.
2121

2222
For example, there are two different ways to disable the jumping capabilities of the Ullapool Caber.
2323

@@ -42,7 +42,7 @@ Using entity properties:
4242
{
4343
"entprops"
4444
{
45-
"1" // Sets the m_iDetonated entity prop to 1
45+
"1" // Makes the weapon start already detonated
4646
{
4747
"name" "m_iDetonated"
4848
"type" "send"
@@ -52,11 +52,51 @@ Using entity properties:
5252
}
5353
}
5454
```
55-
See [items.cfg](https://github.com/Mikusch/deathrun/blob/master/addons/sourcemod/configs/deathrun/items.cfg) for more details and the default configuration.
55+
56+
These two methods may also be combined. For example, to give Medics a one-time use ÜberCharge that can not be rebuilt:
57+
```
58+
"29" // Medi Gun
59+
{
60+
"attributes"
61+
{
62+
"1"
63+
{
64+
"name" "heal rate penalty" // No healing
65+
"value" "0.0"
66+
}
67+
"2"
68+
{
69+
"name" "ubercharge rate penalty" // No ÜberCharge gain
70+
"value" "0.0"
71+
}
72+
}
73+
"entprops"
74+
{
75+
"1" // Sets the ÜberCharge level to 100%
76+
{
77+
"name" "m_flChargeLevel"
78+
"type" "send"
79+
"field_type" "float"
80+
"value" "1.0"
81+
}
82+
}
83+
}
84+
```
85+
86+
See [items.cfg](/addons/sourcemod/configs/deathrun/items.cfg) for more details and the default configuration.
5687

5788
### Map Configuration
5889
Some older maps have issues with players being able to activate buttons or kill other players through walls with explosive or throwable weapons. Instead of having to block these weapons in the global item configuration you have the option of creating a configuration file for each map.
5990

60-
To do that, put a file called ``<map name>.items.cfg`` in the ``configs/deathrun/maps`` directory. Workshop prefixes and suffixes should be omitted.
91+
To do that, put a file called `<map name>.items.cfg` in the `configs/deathrun/maps` directory. Workshop prefixes and suffixes should be omitted.
92+
93+
Any item definition indexes specified in a map-specific item configuration will override the global configuration.
6194

62-
Any item definition indexes specified in a map-specific item configuration will override the global configuration.
95+
## ConVars
96+
- `dr_version` - Plugin version, don't touch.
97+
- `dr_queue_points ( def. "15" )` - Amount of queue points awarded to runners at the end of each round.
98+
- `dr_allow_thirdperson ( def. "1" )` - If enabled, players may toggle thirdperson. Set to 0 if you use other thirdperson plugins that may conflict.
99+
- `dr_chattips_interval ( def. "240" )` - Interval between helpful tips printed to chat, in seconds. Set to 0 to disable chat tips.
100+
- `dr_runner_glow ( def. "0" )` - If enabled, runners will have a glowing outline.
101+
- `dr_num_activators ( def. "1" )` - Amount of activators chosen at the start of a round.
102+
- `dr_scout_speed_penalty ( def. "80.0" )` - Max speed penalty for Scouts, in HU/s.

addons/sourcemod/scripting/deathrun/convars.sp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ static ArrayList g_GameConVars;
2727

2828
void ConVars_Init()
2929
{
30-
CreateConVar("dr_version", PLUGIN_VERSION, "Plugin version");
31-
dr_queue_points = CreateConVar("dr_queue_points", "15", "Amount of queue points awarded to clients at the end of each round.", _, true, 1.0);
32-
dr_allow_thirdperson = CreateConVar("dr_allow_thirdperson", "1", "Whether thirdperson mode may be toggled by clients. Set to 0 if you use other thirdperson plugins that may conflict.");
33-
dr_chattips_interval = CreateConVar("dr_chattips_interval", "240", "How often chat tips should be shown to clients, in seconds. Set to 0 to disable chat tips.");
34-
dr_runner_glow = CreateConVar("dr_runner_glow", "0", "Whether runners should have a glowing outline.");
30+
CreateConVar("dr_version", PLUGIN_VERSION, PLUGIN_NAME..." version", FCVAR_SPONLY | FCVAR_REPLICATED | FCVAR_NOTIFY | FCVAR_DONTRECORD);
31+
32+
dr_queue_points = CreateConVar("dr_queue_points", "15", "Amount of queue points awarded to runners at the end of each round.", _, true, 1.0);
33+
dr_allow_thirdperson = CreateConVar("dr_allow_thirdperson", "1", "If enabled, players may toggle thirdperson. Set to 0 if you use other thirdperson plugins that may conflict.");
34+
dr_chattips_interval = CreateConVar("dr_chattips_interval", "240", "Interval between helpful tips printed to chat, in seconds. Set to 0 to disable chat tips.");
35+
dr_runner_glow = CreateConVar("dr_runner_glow", "0", "If enabled, runners will have a glowing outline.");
3536
dr_num_activators = CreateConVar("dr_num_activators", "1", "Amount of activators chosen at the start of a round.", _, true, 1.0, true, float(MaxClients - 1));
3637
dr_scout_speed_penalty = CreateConVar("dr_scout_speed_penalty", "80.0", "Max speed penalty for Scouts, in HU/s.");
3738

0 commit comments

Comments
 (0)