Skip to content

Commit

Permalink
Release 2.0.0 (#34)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Mikusch authored Dec 10, 2024
1 parent 6afca86 commit b077dfb
Show file tree
Hide file tree
Showing 28 changed files with 2,076 additions and 3,599 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Compile and release

on:
push:
branches:
master

env:
PLUGIN_NAME: deathrun

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
sm-version: [ '1.12.x' ]
permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: Set environment variables
run: echo SCRIPTS_PATH=$(pwd) >> $GITHUB_ENV

- name: Download includes
run: |
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/FlaminSarge/tf2attributes/master/scripting/include/tf2attributes.inc
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/asherkin/TF2Items/master/pawn/tf2items.inc
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/nosoop/SM-TFUtils/master/scripting/include/tf2utils.inc
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/nosoop/SM-TFEconData/master/scripting/include/tf_econ_data.inc
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/Mikusch/PluginStateManager/refs/heads/master/addons/sourcemod/scripting/include/pluginstatemanager.inc
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/DoctorMcKay/sourcemod-plugins/master/scripting/include/morecolors.inc
- name: Setup SourcePawn Compiler ${{ matrix.sm-version }}
id: setup_sp
uses: rumblefrog/setup-sp@master
with:
version: ${{ matrix.sm-version }}
version-file: ./addons/sourcemod/scripting/${{ env.PLUGIN_NAME }}.sp
define-name: "PLUGIN_VERSION"

- name: Compile plugins
run: |
mkdir ../plugins
spcomp -v2 -E -i "include" -o"../plugins/${{ env.PLUGIN_NAME }}.smx" ${{ env.PLUGIN_NAME }}.sp
echo "===OUT FILES==="
ls ../plugins
echo "===VERSION==="
echo ${{ steps.setup_sp.outputs.plugin-version }}
working-directory: ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting

- name: Install zip
uses: montudor/action-zip@v1

- name: Zip output
run: |
zip -qq -y -r ${{ github.event.repository.name }}.zip addons scripts
working-directory: ${{ env.SCRIPTS_PATH }}

- name: List files in the directory
run: ls -R
working-directory: ${{ env.SCRIPTS_PATH }}

- name: List files in the zip
run: unzip -l ${{ github.event.repository.name }}.zip
working-directory: ${{ env.SCRIPTS_PATH }}

- name: Create Release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.setup_sp.outputs.plugin-version }}
artifacts: ${{ github.event.repository.name }}.zip
draft: true
allowUpdates: true
updateOnlyUnreleased: true
skipIfReleaseExists: true
112 changes: 40 additions & 72 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
# Deathrun Neu

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

## Features

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

## Dependencies

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

## Configuration

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

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

Expand All @@ -32,98 +33,65 @@ Using attributes:
{
"attributes"
{
"1" // Zeroes out the self damage push force
{
"name" "self dmg push force decreased"
"value" "0.0"
"mode" "set"
}
"self dmg push force decreased" "0"
}
}
```

Using entity properties (advanced):
Using netprops:

```
"307" // Ullapool Caber
{
"entprops"
"netprops"
{
"1" // Makes the weapon start already detonated
"m_iDetonated" // Makes the weapon start already detonated
{
"target" "weapon"
"name" "m_iDetonated"
"type" "send"
"target" "item"
"type" "send"
"field_type" "int"
"value" "1"
"value" "1"
}
}
}
```

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

```
"29" // Medi Gun
{
"attributes"
{
"1"
{
"name" "heal rate penalty" // No healing
"value" "0.0"
}
"2"
{
"name" "ubercharge rate penalty" // No ÜberCharge gain
"value" "0.0"
}
"heal rate penalty" "0" // No healing
"ubercharge rate penalty" "0" // No ÜberCharge gain
}
"entprops"
"netprops"
{
"1" // Sets the ÜberCharge level to 100%
"m_flChargeLevel" // Sets the ÜberCharge level to 100%
{
"target" "weapon"
"name" "m_flChargeLevel"
"type" "send"
"target" "weapon"
"type" "send"
"field_type" "float"
"value" "1.0"
"value" "1"
}
}
}
```

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

### Map Configuration

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.

To do that, put a file called `<map name>.items.cfg` in the `configs/deathrun/maps` directory. Workshop prefixes and
suffixes should be omitted.

Any item definition indexes specified in a map-specific item configuration will override the global configuration.

## ConVars

- `dr_version` - Plugin version, don't touch.
- `dr_queue_points ( def. "15" )` - Amount of queue points awarded to runners at the end of each round.
- `dr_chattips_interval ( def. "240" )` - Interval between helpful tips printed to chat, in seconds. Set to 0 to disable
chat tips.
- `dr_runner_glow ( def. "0" )` - If enabled, runners will have a glowing outline.
- `dr_activator_count ( def. "1" )` - Amount of activators chosen at the start of a round.
- `dr_activator_health_modifier ( def. "1.0" )` - Modifier of the health the activator receives from runners.
- `dr_activator_healthbar ( def. "1" )` - If enabled, the activator health will be displayed on screen.
- `dr_backstab_damage ( def. "750.0" )` - Damage dealt to the activator by backstabs. Set to 0 to let the game determine the damage.
- `dr_speed_modifier ( def. "0.0" )` - Maximum speed modifier for all classes, in HU/s.
- `dr_speed_modifier_scout ( def. "0.0" )` - Maximum speed modifier for Scout, in HU/s.
- `dr_speed_modifier_sniper ( def. "0.0" )` - Maximum speed modifier for Sniper, in HU/s.
- `dr_speed_modifier_soldier ( def. "0.0" )` - Maximum speed modifier for Soldier, in HU/s.
- `dr_speed_modifier_demoman ( def. "0.0" )` - Maximum speed modifier for Demoman, in HU/s.
- `dr_speed_modifier_medic ( def. "0.0" )` - Maximum speed modifier for Medic, in HU/s.
- `dr_speed_modifier_heavy ( def. "0.0" )` - Maximum speed modifier for Heavy, in HU/s.
- `dr_speed_modifier_pyro ( def. "0.0" )` - Maximum speed modifier for Pyro, in HU/s.
- `dr_speed_modifier_spy ( def. "0.0" )` - Maximum speed modifier for Spy, in HU/s.
- `dr_speed_modifier_engineer ( def. "0.0" )` - Maximum speed modifier for Engineer, in HU/s.
```
"211" // Medi Gun (Renamed/Strange)
{
"prefab" "29"
}
"35" // Kritzkrieg
{
"prefab" "29"
}
```

See [items.cfg](/addons/sourcemod/configs/deathrun/items.cfg) for more details and the default configuration.
Loading

0 comments on commit b077dfb

Please sign in to comment.