nosoop / SM-TFCustomWeaponsX

SourceMod plugin that allows players to use custom TF2 items.
GNU General Public License v3.0
22 stars 11 forks source link
sourcemod-plugin team-fortress-2 tf2 tf2-plugins user-generated-content

Custom Weapons X

:coffee: fund my caffeine addiction :coffee:

A new iteration of Custom Weapons.

This was not a sponsored project.

Discuss this plugin on AlliedModders.

Features

Same as previous iterations of Custom Weapons:

New to CWX:

More information is provided in the project wiki.

Installation

Dependencies

The SourceMod plugins / extensions listed below are required for Custom Weapons X to run:

Additional software recommendations that aren't completely necessary:

Prebuilt Package

This repository is configured to have Github automatically compile the plugin and create a release whenever commits are pushed.

Download the package.zip from the releases section and unpack into your SourceMod directory.

This plugin can run alongside CW2/3, other than conflicting when weapons are applied. (As CW2/3 handles their logic later during spawn / resupply, their weapons will be the ones active.)

Upgrading

If you're upgrading an existing installation, please make sure to make a note of your currently installed version, then read over the Upgrade Notes section of the wiki to upgrade any changed dependencies between your current version and the latest.

Building

This project can be built in a consistent manner with Ninja, git, and Python 3.

  1. Clone the repository and its submodules: git clone --recurse-submodules ...
  2. Execute python3 configure.py --spcomp-dir ${PATH} within the repo, where ${PATH} is the path to the directory containing spcomp. This repository targets 1.10.
  3. Run ninja. Output will be available under build/.

(If you'd like to use a similar build system for your project, the template project is available here.)

Differences

Core design changes in TF2 necessitated a clean break from previous iterations of Custom Weapons. This means that attributes originally written for CW2 or CW3 are not compatible with CWX; they will need to be rewritten.

CWX is also not backwards-compatible with configuration files written for CW2 or CW3.

To keep the responsibilities of the core plugin to a minimum, a number of properties that were previously integral to CW2 / CW3 are delegated to attribute-implementing plugins in CWX.

This includes:

For implementations of those, see the Core Attribute Implementations page on the project wiki.

For attribute developers

CWX has no unique format for attributes. Instead, it has first-class support for the following systems:

By implementing your attribute in one of those two formats, they will interoperate with plugins that support those systems; they are not bound to specifically to CWX.

If you're coming from CW2 or CW3, native / CAF-based attributes are very different (though native / CAF-based attributes share similarities among themselves).

The main difference is the storage mechanism. Whereas CW2 / CW3 receive attribute information through forward functions and store them globally in-plugin, native / CAF-based ones retrieve the value from entities at runtime and are tied to the game's attribute system.