Skip to content

Using Attributes

nosoop edited this page Nov 23, 2023 · 2 revisions

This is a list of common ways to apply attributes.

Keep in mind the following:

  • If a name isn't specified, attributes are created using the attribute class as its name.
  • You may create entries using existing class names at specific attribute definition indices by using the compatibility shim that ships with Econ Dynamic. You may need to do so if using a plugin that relies strictly on the definition index.
  • Attribute plugin developers should avoid shipping configuration files or setting definition indices when registering attributes to minimize the possibility of conflicts.

Custom Weapons X

Custom Weapons X, usually shortened to CWX.

Use the attributes_game section in the weapon's entry:

"attributes_game"
{
    "nosoop.mult_dmg_real"          "0.5"
    "nosoop.mult_gravity_active"    "0.6"
}

attributes_custom is a section for attributes using the Custom Attribute Framework. While formatted similarly, it is a separate, older (but still usable) ecosystem.

TF2Items

The manager's configuration uses a semicolon-separated pair denoting the attribute definition index and value:

"12"
{
    "quality"        "5"
    "level"          "100"
    "admin-flags"    "a"

    "1"              "134 ; 2"
    "2"              "2 ; 100"
    "3"              "4 ; 10"
    "4"              "6 ; 0.25"
}

You will need to set up a configuration file allocating an attribute definition index to each custom attribute class you would like to use.

Clone this wiki locally