Creating custom weapons - basics: Difference between revisions
From TF2 Classified Wiki
More actions
mNo edit summary |
mNo edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 21: | Line 21: | ||
== custom_items_game.txt == | == custom_items_game.txt == | ||
To begin, create a file named {{code|custom_items_game.txt}} in | To begin, create a file named {{code|custom_items_game.txt}} in the {{code|<SteamUserDir>\Team Fortress 2 Classified\tf2classified\custom\<Mod Name>\scripts\items}} directory. This is the file that contains all the information regarding your custom weapons. Please note that you cannot have multiple {{code|custom_items_game.txt}} files loaded simultaneously, so any other mod folders that contain them should be placed in {{code|tf2classified\custom\disabled}} to allow the new custom item schema to load. | ||
It should be noted that the {{code|custom_items_game.txt}} method is the simplest and objectively best option for defining custom weapons, as it automatically inherits data from the newest version of the vanilla {{code|items_game.txt}} file. It is possible to override the vanilla item schema with one that contains custom weapons, but this method is not recommended as the overriding file must be manually updated each patch for parity with the vanilla {{code|items_game.txt}} file. For you and your players' sake, use the {{code|custom_items_game.txt}} method ''only''. | It should be noted that the {{code|custom_items_game.txt}} method is the simplest and objectively best option for defining custom weapons, as it automatically inherits data from the newest version of the vanilla {{code|items_game.txt}} file. It is possible to override the vanilla item schema with one that contains custom weapons, but this method is not recommended as the overriding file must be manually updated each patch for parity with the vanilla {{code|items_game.txt}} file. For you and your players' sake, use the {{code|custom_items_game.txt}} method ''only''. | ||
| Line 481: | Line 481: | ||
= Modifying vanilla weapons = | = Modifying vanilla weapons = | ||
''This section will potentially include a different method for editing vanilla weapons that isn't widely used. In the meantime, please do '''not''' write any current methods here.'' | ''This section will potentially include a different method for editing vanilla weapons that isn't widely used. In the meantime, please do '''not''' write any current methods here or use this as a guide.'' | ||
By including empty copies of stock weapons in your custom item schema, you can prevent them from disappearing when you edit one of them. | |||
Everything added into the empty copies will be combined with the corresponding entries in the vanilla item schema. | |||
Below is an example {{code|custom_items_game.txt}} file that contains empty copies of every item with the {{code|preset=3|baseitem}} parameter. | |||
<pre> | |||
#base "items_game.txt" | |||
"items_game" | |||
{ | |||
"items" | |||
{ | |||
"0" // Bat | |||
{ | |||
} | |||
"1" // Bottle | |||
{ | |||
} | |||
"2" // Fire Axe | |||
{ | |||
} | |||
"3" // Kukri | |||
{ | |||
} | |||
"4" // Knife | |||
{ | |||
} | |||
"5" // Fists | |||
{ | |||
} | |||
"6" // Shovel | |||
{ | |||
} | |||
"7" // Wrench | |||
{ | |||
} | |||
"8" // Bonesaw | |||
{ | |||
} | |||
"9" // Shotgun (Engineer) | |||
{ | |||
} | |||
"10" // Shotgun (Soldier) | |||
{ | |||
} | |||
"11" // Shotgun (Heavy) | |||
{ | |||
} | |||
"12" // Shotgun (Pyro) | |||
{ | |||
} | |||
"13" // Scattergun | |||
{ | |||
} | |||
"14" // Sniper Rifle | |||
{ | |||
} | |||
"15" // Minigun | |||
{ | |||
} | |||
"16" // SMG | |||
{ | |||
} | |||
"17" // Syringe Gun | |||
{ | |||
} | |||
"18" // Rocket Launcher | |||
{ | |||
} | |||
"19" // Grenade Launcher | |||
{ | |||
} | |||
"20" // Stickybomb Launcher | |||
{ | |||
} | |||
"21" // Flame Thrower | |||
{ | |||
} | |||
"22" // Pistol (Engineer) | |||
{ | |||
} | |||
"23" // Pistol (Scout) | |||
{ | |||
} | |||
"24" // Revolver | |||
{ | |||
} | |||
"25" // PDA: Teleporter (Construction PDA) | |||
{ | |||
} | |||
"26" // Destruction PDA | |||
{ | |||
} | |||
"27" // Disguise Kit | |||
{ | |||
} | |||
"28" // Builder (Toolbox) | |||
{ | |||
} | |||
"29" // Medi Gun | |||
{ | |||
} | |||
"30" // Invis Watch | |||
{ | |||
} | |||
"735" // Sapper | |||
{ | |||
} | |||
"1132" // Spellbook Magazine (Halloween) | |||
{ | |||
} | |||
"1152" // Grappling Hook (Mannpower) | |||
{ | |||
} | |||
"1155" // PASS Time Jack (PASS Time) | |||
{ | |||
} | |||
"2000" // Umbrella | |||
{ | |||
} | |||
} | |||
} | |||
</pre> | |||
= List of useful attributes = | = List of useful attributes = | ||