PDA

View Full Version : Question about config


jwright8
10-13-2012, 12:29
First of all I wanted to say thanks to asherkin for making this plugin. Secondly, thank you Darthninja for making the FAQ; it was a big help.

My question is about the tf2items.weapons.txt config.

First, when you apply a custom attribute to an item, do you have to reapply the other attributes for them to take effect? For instance, if you apply an instant charge to the Machina, and add nothing else, will the +15% damage at 100% charge still take effect, or do you need to redefine it in the item attributes?

That brings me to my next question. On the list of item attributes ( http://wiki.teamfortress.com/wiki/List_of_item_attributes ), how do you handle the items that are pretty much a yes or no question? I had assumed a "1" or "0" for yes/no, but that doesn't seem to be the case. So, going back to the Machina example, we have this entry in that list:

305 sniper fires tracer DISPLAY ONLY Fires tracer rounds additive sniper_fires_tracer_DISPLAY_ONLY


How would you add that? I had thought it would be something like this:

"14" // Sniper rifle (stock/reg) | Default Mods: None
{
"1" "41 ; 100" // +n% sniper charge rate per sec
}
"201" // Sniper Rifle (renamed/strange) | Default Mods: None
{
"1" "41 ; 100" // +n% sniper charge rate per sec
}
"526" // The Machina | Default Mods: +15% dmg full charge, bullet pen full charge, only fires zoomed, tracer rounds
{
"1" "41 ; 100" // +n% sniper charge rate per sec
"2" "304 ; 15" // On full charge: % dmg per shot
"3" "305 ; 1" // Fires tracer rounds
}


However, when I try to apply the "1/0" concept for those type of attributes, it just doesn't seem to work.

My next question is about which ones apply to which item. I can tell from the items_game.txt that some are pretty much self-explanatory, but some I just can't get to work. For instance, increasing the clip size for rocket launchers. I have the following lines in my config:


"18" // Rocket Launcher (stock/reg) | Default Mods: None
{
"1" "135 ; 0.0" // Percentage blast damage from rocket jumps, 0 = none
"2" "4 ; 3" // # clip bonus size, so 7 since 4 (base clip) + 3 = 7
}


But it doesn't change my clip amount.

Sorry for the barrage of questions, and thank you in advance for your help!

serpentine
10-13-2012, 14:09
For the first part I believe you can use the "preserve-attributes" attribute to keep the item's default stats then add whatever you want to it.

Powerlord
10-13-2012, 15:30
DISPLAY ONLY attributes are useless to add, because they're actually implemented in either the weapon class itself or as part of another attribute. The former is why the Bazaar Bargain is a tf_weapon_sniperrifle_decap instead of a tf_weapon_sniperrifle.

With the Machina, it's likely that "sniper penetrate players when charged" (attribute 308 ) also implements the tracer rounds.