Help us help you
Environment
Description
Changing the console variable for config files should reload all the new templates. However, omitting the "robotattributes" keyvalue from a template will cause it to carry over the attribute from a previous template that occupied the same template index. Not sure if this is intentional, but can probably be avoided by making it blank like so in the file: "robotattributes" ""
For example, if the template that occupied index 5 had nobomb
, the new template at index 5 will carry over the attribute if the line "robotattributes" was omitted.
The cause may be due to this line. Perhaps a default value with a blank string should be set here.
The same probably happens with "description" as well, but I have not checked.
Steps to reproduce
Make a template with the same number in a new file without using "robotattributes", and changing the ConVar to the new file.
Default
"5"
{
"name" "Awper Sniper"
"robotattributes" "nobomb,alwayscrits"
"currency" "0"
"primaryweapon"
{
"classname" "tf_weapon_sniperrifle"
"index" "851"
"attributes"
{
"damage bonus" "1.40"
"crit kill will gib" "1.0"
}
}
"secondaryweapon"
{
"classname" "tf_wearable_razorback"
"index" "57"
"spawnchance" "60"
}
"meleeweapon"
{
"classname" "tf_weapon_club"
"index" "3"
}
}
New
"5"
{
"name" "Adept Archer"
"health" "1200"
"scale" "1.3"
"playerattributes"
{
"move speed bonus" "0.85"
"dmg taken from fire increased" "2"
}
"primaryweapon"
{
"classname" "tf_weapon_compound_bow"
"index" "56"
"attributes"
{
"fire rate bonus" "0.6"
"damage bonus" "0.75"
}
}
"meleeweapon"
{
"classname" "tf_weapon_club"
"index" "3"
}
}
There is no "robotattributes" in the new file, but it still carried over the old attributes from the previous.