nosoop / SM-TFCustomAttributeStarterPack

A collection of plugins to be used with the TF2 Custom Attribute framework.
MIT License
19 stars 10 forks source link

`medigun drains health` is unable to use values below 34 #51

Closed KenanTheFab closed 2 years ago

KenanTheFab commented 3 years ago
"The Blut Thinker"
{
    "classes"
    {
        "medic"     "1"
    }
    "baseclass"     "medigun"
    "baseindex"     "29"
    "nobots"        "1"
    "quality"       "6"
    "logname"       "bloodthinker"
    "description"   ""
    "attributes"
    {
        "medigun drains health"
        {
            "plugin"    "custom-attribute-adapter"
            "value" "30"
        }
    }
}

"Medigun drains health" heals both enemies and allies alike, even with a -30 value. Am I doing something wrong or is it broken?

KenanTheFab commented 3 years ago

Update: Apparantly the value has to be at least 34 to drain the health of enemies. Kinda stupid not to write that down anywhere. Could we get the ability to modify uber on death and for it to actually count as damaging?

nosoop commented 3 years ago

Sounds like a side-effect of how the damage is calculated (on a standard 66-tick server, each tick deals 1/66th of the damage specified, rounded -- so 34 makes it round up). Having the plugin store the fractional amount of damage inflicted would help so it doesn't have to damage every tick.

KenanTheFab commented 3 years ago

While I am here :y I am guessing attributes with multiple values are formatted like

"value" "12345" "value" "12345"

Or am I wrong? Because the minigun shield seems very bugged. Instantly starts draining rage.

nosoop commented 3 years ago

Examples are available within the configs/ directory. Karma Charger originally proposed the attribute for use with a weapon named Chudakov; the configuration file is available here.

Any attributes with "varstring" values have space-delimited values in the form param=1 another_param=2.

KenanTheFab commented 3 years ago

ty <3