Skip to content

Commit b077dfb

Browse files
authored
Release 2.0.0 (#34)
* Rewrite the entire thing * Add convar to allow enabling teleporters * Fix VGUI screens not being hidden * Let server operators decide on tracktrains * Make the button prevention configurable And disabled by default * Make the code styling consistent * Allow disabling WFP * Add hideplayers to menu * Display chat hints * Add activator health kit convar * Allow adding more hints with no code changes * Open class menu on join * Assume 0 queue points if not loaded * Add replacement weapons system * Overhaul README * Copy replacement defindex from prefab * Replace GRU with MvM GRU * Fix messed up translation phrase * Revert "Replace GRU with MvM GRU" This reverts commit e1cbfcd. * Add preference to disable activator speed boost * Wrong way! * Fix waiting for players restarting or getting stuck * Pre mode for player_death * Add admin command * Add various convars and preferences * Few convar changes * Remove unused defines * Only use alive activator in kill feed * How did I never catch that before * Add actions file * Make script ready for master * Add health bar convar * Update convar names and descriptions * Add credits * Add messages for toggling visibility * Keep convars mostly the same * Add license headers * Move a function from util to player
1 parent 6afca86 commit b077dfb

28 files changed

+2076
-3599
lines changed

.github/workflows/main.yml

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Compile and release
2+
3+
on:
4+
push:
5+
branches:
6+
master
7+
8+
env:
9+
PLUGIN_NAME: deathrun
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
sm-version: [ '1.12.x' ]
17+
permissions:
18+
contents: write
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Set environment variables
24+
run: echo SCRIPTS_PATH=$(pwd) >> $GITHUB_ENV
25+
26+
- name: Download includes
27+
run: |
28+
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/FlaminSarge/tf2attributes/master/scripting/include/tf2attributes.inc
29+
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/asherkin/TF2Items/master/pawn/tf2items.inc
30+
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/nosoop/SM-TFUtils/master/scripting/include/tf2utils.inc
31+
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/nosoop/SM-TFEconData/master/scripting/include/tf_econ_data.inc
32+
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/Mikusch/PluginStateManager/refs/heads/master/addons/sourcemod/scripting/include/pluginstatemanager.inc
33+
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/DoctorMcKay/sourcemod-plugins/master/scripting/include/morecolors.inc
34+
35+
- name: Setup SourcePawn Compiler ${{ matrix.sm-version }}
36+
id: setup_sp
37+
uses: rumblefrog/setup-sp@master
38+
with:
39+
version: ${{ matrix.sm-version }}
40+
version-file: ./addons/sourcemod/scripting/${{ env.PLUGIN_NAME }}.sp
41+
define-name: "PLUGIN_VERSION"
42+
43+
- name: Compile plugins
44+
run: |
45+
mkdir ../plugins
46+
spcomp -v2 -E -i "include" -o"../plugins/${{ env.PLUGIN_NAME }}.smx" ${{ env.PLUGIN_NAME }}.sp
47+
echo "===OUT FILES==="
48+
ls ../plugins
49+
echo "===VERSION==="
50+
echo ${{ steps.setup_sp.outputs.plugin-version }}
51+
working-directory: ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting
52+
53+
- name: Install zip
54+
uses: montudor/action-zip@v1
55+
56+
- name: Zip output
57+
run: |
58+
zip -qq -y -r ${{ github.event.repository.name }}.zip addons scripts
59+
working-directory: ${{ env.SCRIPTS_PATH }}
60+
61+
- name: List files in the directory
62+
run: ls -R
63+
working-directory: ${{ env.SCRIPTS_PATH }}
64+
65+
- name: List files in the zip
66+
run: unzip -l ${{ github.event.repository.name }}.zip
67+
working-directory: ${{ env.SCRIPTS_PATH }}
68+
69+
- name: Create Release
70+
uses: ncipollo/release-action@v1
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
with:
74+
token: ${{ secrets.GITHUB_TOKEN }}
75+
tag: ${{ steps.setup_sp.outputs.plugin-version }}
76+
artifacts: ${{ github.event.repository.name }}.zip
77+
draft: true
78+
allowUpdates: true
79+
updateOnlyUnreleased: true
80+
skipIfReleaseExists: true

README.md

+40-72
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
# Deathrun Neu
22

3-
Deathrun Neu is inspired by the plugins I played many years ago that were never made accessible to the public.
4-
It aims to keep weapon restrictions as little as possible while not ruining the core gameplay.
3+
A Deathrun plugin for Team Fortress 2 with minimal weapon and class restrictions.
54

65
## Features
76

8-
* Activator queue system (`!drqueue`)
9-
* Ability to hide other players in crowded areas (`!drhide`)
10-
* Dynamic Activator health for fair combat minigames
11-
* Configurable round timer (using the `tf_arena_round_time` ConVar)
7+
* Activator queue system (`!queue`)
8+
* Ability to toggle visility of teammates in crowded areas (`!hideplayers`)
9+
* Dynamic activator health for combat minigames
10+
* Anti-exploit measures
1211
* Highly customizable item and plugin configuration
1312

1413
## Dependencies
1514

16-
* SourceMod 1.11
17-
* [DHooks with Detour Support](https://forums.alliedmods.net/showpost.php?p=2588686&postcount=589)
15+
* SourceMod 1.12+
1816
* [TF2Attributes](https://forums.alliedmods.net/showthread.php?t=210221)
17+
* [TF2Items](https://forums.alliedmods.net/showthread.php?t=115100)
18+
* [TF2 Econ Data](https://forums.alliedmods.net/showthread.php?t=315011)
19+
* [Plugin State Manager](https://github.com/Mikusch/PluginStateManager) (compile only)
1920
* [More Colors](https://forums.alliedmods.net/showthread.php?t=185016) (compile only)
2021

2122
## Configuration
2223

2324
The global item configuration found in `configs/deathrun/items.cfg` allows you to configure and restrict each player's
24-
items as you please. Map-specific configuration files are read from the `configs/deathrun/maps` directory.
25+
items as you please.
2526

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

@@ -32,98 +33,65 @@ Using attributes:
3233
{
3334
"attributes"
3435
{
35-
"1" // Zeroes out the self damage push force
36-
{
37-
"name" "self dmg push force decreased"
38-
"value" "0.0"
39-
"mode" "set"
40-
}
36+
"self dmg push force decreased" "0"
4137
}
4238
}
4339
```
4440

45-
Using entity properties (advanced):
41+
Using netprops:
4642

4743
```
4844
"307" // Ullapool Caber
4945
{
50-
"entprops"
46+
"netprops"
5147
{
52-
"1" // Makes the weapon start already detonated
48+
"m_iDetonated" // Makes the weapon start already detonated
5349
{
54-
"target" "weapon"
55-
"name" "m_iDetonated"
56-
"type" "send"
50+
"target" "item"
51+
"type" "send"
5752
"field_type" "int"
58-
"value" "1"
53+
"value" "1"
5954
}
6055
}
6156
}
6257
```
6358

64-
These two methods may also be combined. For example, to give Medics a one-time use ÜberCharge that can not be rebuilt:
59+
These two methods may also be combined. For example, you can give Medics a one-time use ÜberCharge with this
60+
configuration:
6561

6662
```
6763
"29" // Medi Gun
6864
{
6965
"attributes"
7066
{
71-
"1"
72-
{
73-
"name" "heal rate penalty" // No healing
74-
"value" "0.0"
75-
}
76-
"2"
77-
{
78-
"name" "ubercharge rate penalty" // No ÜberCharge gain
79-
"value" "0.0"
80-
}
67+
"heal rate penalty" "0" // No healing
68+
"ubercharge rate penalty" "0" // No ÜberCharge gain
8169
}
82-
"entprops"
70+
"netprops"
8371
{
84-
"1" // Sets the ÜberCharge level to 100%
72+
"m_flChargeLevel" // Sets the ÜberCharge level to 100%
8573
{
86-
"target" "weapon"
87-
"name" "m_flChargeLevel"
88-
"type" "send"
74+
"target" "weapon"
75+
"type" "send"
8976
"field_type" "float"
90-
"value" "1.0"
77+
"value" "1"
9178
}
9279
}
9380
}
9481
```
9582

96-
See [items.cfg](/addons/sourcemod/configs/deathrun/items.cfg) for more details and the default configuration.
83+
If you don't want to copy-paste the same configuration onto similar weapons, you may use the prefabs system. After an
84+
item has been defined, you can copy its properties over to another weaopon:
9785

98-
### Map Configuration
99-
100-
Some older maps have issues with players being able to activate buttons or kill other players through walls with
101-
explosive or throwable weapons. Instead of having to block these weapons in the global item configuration you have the
102-
option of creating a configuration file for each map.
103-
104-
To do that, put a file called `<map name>.items.cfg` in the `configs/deathrun/maps` directory. Workshop prefixes and
105-
suffixes should be omitted.
106-
107-
Any item definition indexes specified in a map-specific item configuration will override the global configuration.
108-
109-
## ConVars
110-
111-
- `dr_version` - Plugin version, don't touch.
112-
- `dr_queue_points ( def. "15" )` - Amount of queue points awarded to runners at the end of each round.
113-
- `dr_chattips_interval ( def. "240" )` - Interval between helpful tips printed to chat, in seconds. Set to 0 to disable
114-
chat tips.
115-
- `dr_runner_glow ( def. "0" )` - If enabled, runners will have a glowing outline.
116-
- `dr_activator_count ( def. "1" )` - Amount of activators chosen at the start of a round.
117-
- `dr_activator_health_modifier ( def. "1.0" )` - Modifier of the health the activator receives from runners.
118-
- `dr_activator_healthbar ( def. "1" )` - If enabled, the activator health will be displayed on screen.
119-
- `dr_backstab_damage ( def. "750.0" )` - Damage dealt to the activator by backstabs. Set to 0 to let the game determine the damage.
120-
- `dr_speed_modifier ( def. "0.0" )` - Maximum speed modifier for all classes, in HU/s.
121-
- `dr_speed_modifier_scout ( def. "0.0" )` - Maximum speed modifier for Scout, in HU/s.
122-
- `dr_speed_modifier_sniper ( def. "0.0" )` - Maximum speed modifier for Sniper, in HU/s.
123-
- `dr_speed_modifier_soldier ( def. "0.0" )` - Maximum speed modifier for Soldier, in HU/s.
124-
- `dr_speed_modifier_demoman ( def. "0.0" )` - Maximum speed modifier for Demoman, in HU/s.
125-
- `dr_speed_modifier_medic ( def. "0.0" )` - Maximum speed modifier for Medic, in HU/s.
126-
- `dr_speed_modifier_heavy ( def. "0.0" )` - Maximum speed modifier for Heavy, in HU/s.
127-
- `dr_speed_modifier_pyro ( def. "0.0" )` - Maximum speed modifier for Pyro, in HU/s.
128-
- `dr_speed_modifier_spy ( def. "0.0" )` - Maximum speed modifier for Spy, in HU/s.
129-
- `dr_speed_modifier_engineer ( def. "0.0" )` - Maximum speed modifier for Engineer, in HU/s.
86+
```
87+
"211" // Medi Gun (Renamed/Strange)
88+
{
89+
"prefab" "29"
90+
}
91+
"35" // Kritzkrieg
92+
{
93+
"prefab" "29"
94+
}
95+
```
96+
97+
See [items.cfg](/addons/sourcemod/configs/deathrun/items.cfg) for more details and the default configuration.

0 commit comments

Comments
 (0)