Skip to content

SourceMod function call and memory access natives for TF2

License

Notifications You must be signed in to change notification settings

nosoop/SM-TFUtils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1e8b6cb · Apr 19, 2023

History

73 Commits
Jul 25, 2022
Jan 5, 2023
Sep 2, 2021
Apr 19, 2023
Aug 27, 2022
Jul 14, 2020
Sep 2, 2021
Sep 2, 2021
Jul 23, 2022
Jul 14, 2020
Mar 10, 2022
Sep 2, 2021

Repository files navigation

TF2 Utils

SourceMod utility natives for Team Fortress 2. Mainly focused around gameplay-related functionality that require gamedata that may break during updates, including calls to game functions and raw memory accessors that aren't already in some other library.

One of the design decisions is to only use dependencies built-in to SourceMod. That means this excludes most hooks (handled by DHooks), and SDKCalls that require allocation of some structure (which can be done with Source Scramble).

Installation

Go to the releases page and get the following from the topmost release:

  • Copy tf2utils.smx to plugins/
  • Copy tf2.utils.nosoop.txt to gamedata/
  • Copy tf2utils.inc to scripting/include/

Similar plugins

There are a number of shared plugins for TF2 that are focused on specific aspects. These include:

Merged plugins

The following plugins have some of their functionality merged in.

  • TF2 Wearable Tools, which provides some functionality to access currently equipped wearable entities or attach new ones.

Building

This plugin depends on [stocksoup][] for compilation. This project is also configured for building via Ninja; see BUILD.md for detailed instructions on how to build it. tl;dr:

git clone --recurse-submodules ${repo_url} ${repo_local_dir}
cd ${repo_local_dir}
python3 configure.py --spcomp-dir ${spcomp_dir}
ninja

If you'd like to use the build system for your own projects, the template is available here.