User:SofiPandaRights/Custom Weapons
“ | Yes. I like this new weapon.
Click to listen
— The Heavy.
|
” |
Custom Weapons 2, also known as Custom TF2 Weapons and CTF2W, is a SourceMod server plugin which adds additional weapons to Team Fortress 2. It was developed by MasterOfTheXP, and has last been updated on 01/15/17.
It is currently maintained by Crafting, Chdata, Chawlz, Orion and Theray070696.
Unlike Advanced Weaponiser, there is no loadout viewer nor a drop system because all weapons are available to the public.
Contents
Commands / Cvar
All players can equip custom weapons by saying !custom, !cus, or !c.
- Admin commands
- custom_addattribute <client> <slot> <"attribute name"> <"value"> <"plugin"> - Adds a custom attribute onto any weapon.
- Want your melee weapon to ignite whoever it crits on? custom_addattribute @me 2 "crits ignite" "1" "basic-attributes"
- custom_addattribute <client> <slot> <"attribute name"> <"value"> <"plugin"> - Adds a custom attribute onto any weapon.
- Cvars
- sm_customweapons_enable (1/0, def. 1) Enables the plugin, of course! Set to 0 to remove all active custom weapons.
- sm_customweapons_onlyinspawn (1/0, def. 1) Only allow /custom to be used inside of a spawn room.
- sm_customweapons_arena_time (def. 20) Time, in seconds, to allow /custom after spawning in Arena.
- sm_customweapons_bots (def. 0.15) Percent chance, per slot, that bots will equip a random custom weapon.
- sm_customweapons_menu (1/0, def. 1) Clients are allowed to say /custom to equip weapons manually. Set to 0 to disable manual weapon selection without disabling the entire plugin.
- sm_customweapons_killwearablesondeath (1/0, def. 1) Removes custom weapon models when the user dies. Recommended unless bad things start happening.
- sm_customweapons_sethealth (1/0, def. 1) When a custom weapon is equipped, the user's health will be set to their maximum.
- sm_customweapons_onlyteam (def. 0) If non-zero, custom weapons can only be equipped by one team; 2 = RED, 3 = BLU.
How to make custom weapons
Creating a new custom weapon is plain easy. Simply duplicate a custom weapon's config file, and fill out its info with your own.
- The weapon's name goes right at the top, in "quotes".
- "classes" is the array of player classes the weapon should be available for; the number next to each class is the weapon slot (0 = Primary, 1 = Secondary, 2 = Melee)
- "baseclass" is the classname of the weapon, without "tf_weapon_".
- "baseindex" is the item index of the base weapon, see above classname link. If unsure, stick within the 0-30s.
- If it uses ammo (i.e. most non-melee weapons) it should have "mag" and "ammo" keys with the intended starting ammo.
- "logname" will be displayed in client consoles when a kill is made with the weapon. Not currently implemented.
- "killicon", also not implemented yet, will be able to change the weapon's icon in the kill feed.
- "description" is the stat list that players will see when selecting the weapon. \n = Newline. "\n \n" will skip an entire line.
- "attributes"; the bread-n-butter. Each attribute has:
- An identifier, to set what attribute it is. This will either be a case-sensitive name (Custom Weapons, TF2Attributes) or an attribute index (TF2Items).
- "plugin": Who will provide the attribute's functionality?
- For official Valve attributes, you'll usually want to use TF2Attributes, so put "tf2attributes". A select few attributes require "tf2attributes.int" instead.
- If TF2Attributes doesn't work for said attribute (so far I've only seen "alt-fire is vampire" not work with TF2Att) then try "tf2items" instead, with the identifier being the number beside the attribute's name. (e.g. "move speed penalty" should instead be "54")
- Or, of course, a custom attribute! In which case, "plugin" should be set to the name of the attributes plugin, minus ".smx". The starter pack includes "basic-attributes" and "custom-attributes".
- And of course, a value. Most attributes are multipliers; with "damage bonus/penalty", "2.0" is double (+100%), and "0.5" is halved (-50%). With time-based attributes such as "Reload time increased/decreased", "0.5" is half time (good), whereas "2.0" makes it take twice as long (bad). And some attributes are simply "1.0 = on, 0.0 = off".
- If you're unsure about values, check out a weapon that already has that attribute (Ctrl+F the official weapon's name in tf/scripts/items_game.txt, or just look at the custom weapon's config)
How to make custom attributes
To be able to make custom attributes, all you need to know are the basics of SourcePawn. That's it! (Also, you need customweaponstf.inc from the bottom of this post)
Take a look at basic-attributes.sp in the Starter Weapons Pack; it's fairly simple, and has some comments here, there, and everywhere to explain things. Think of it as somewhat of a template for attributes plugins.
Q&A
How is this different from Advanced Weaponiser? You (who runs the game server) can change around the weapons in whatever ways you'd like. The weapons are always equippable, and not tied to any "master server". Also, this plugin isn't abandoned, private, or what have you.
I gave my custom weapon a model, can other players besides the user see it? Nope. The player will be able to see it in both first and third person, though.
<weapon name> is overpowered/underpowered! Fix it! No u! Change its stats, or disable it (after all, that's the point of this plugin!) and perhaps suggest a tweak to its stats once you've done so.
Was there a Custom Weapons 1? Yes. It was 100% hard coded, and terrible. Thankfully, it was private.
Why is it called "customweaponstf.smx"?
I actually, for some reason, originally made this for CS:GO; as a proof of concept, and because bot matches were getting a bit stale with CS:GO's plain, realistic weapons.
So, this is the "TF2 edition" of Custom Weapons.
Installation
Your server needs both TF2Items and TF2Attributes loaded.
- 1. Install customweaponstf.smx into your sourcemod/plugins/ directory.
- 2. Install tf2items.randomizer.txt into your sourcemod/gamedata/ directory.
- 3. Install whatever custom weapons/attributes/packs you'd like. You need at least one custom weapon for this to work, and most likely, that weapon will require an attributes plugin.
- 4. sm plugins load customweaponstf, or sm plugins reload customweaponstf when you install more.
- 5. Done!
List of weapons
Active weapons
The following weapons are currently available to be equipped.
Active Weapons | ||||
---|---|---|---|---|
Class | Weapon | Authors | Attributes/Notes | |
Scout |
Primary |
20% life-leech, up to 200% overhealed health | ||
Primary |
On hit: applies hotsauce for 4 seconds (Mad Milk, Jarate, bleeding, and fire) | |||
Primary |
Weapon damage increases as health decreases, up to 50% | |||
Primary |
Hold fire to load up to 4 shots and release fire to unleash held shots instantly | |||
Primary |
On kill: Recharge all rechargeable weapons by 50% | |||
Secondary |
On hit: Increases damage by +25%, up to +100% | |||
Secondary |
250% increased air control on wearer | |||
Secondary |
No damage falloff | |||
Melee |
All melee damage charges the Handiness meter, alt-fire (while active) to gain 80% sentry bullet damage resistance and 50% reduction in push force taken from damage or airblasts for 10 seconds | |||
Melee |
Mini-crits targets launched airborne by explosions, grapple hooks or enemy attacks | |||
Melee |
On kill: Gain a speed boost for 6 seconds | |||
Soldier |
Primary |
25% bonus push force against both enemy players and the user | ||
Primary |
On hit: Gain 1 stack | |||
Secondary |
10% bonus fire rate and reload speed for your primary weapon | |||
Secondary |
Immunity from all debuffs on wearer | |||
Secondary |
All damage dealt and taken charges the Berzerk meter, taunt to activate several buffs once at 100% | |||
Secondary |
All damage dealt and taken charges the Berzerk meter, taunt to activate several buffs once at 100% | |||
Melee |
On hit: target is launched into the air | |||
Melee |
On hit: +10 health | |||
Melee |
On kill with any weapon OR assist kill: Enemy players killed drop cursed gibs that heals any player | |||
Melee |
On kill with any weapon: Stores one speed boost, up to 5 speed boosts can be stored | |||
Pyro |
Primary |
50% bonus afterburn damage | ||
Primary |
Reflected projectiles are full crit instead of mini-crit | |||
Secondary |
100% mini-crit hit vs burning players | |||
Secondary |
40% faster switch speed to your melee from this weapon (Sharp Shooter in Melee slot required) | |||
Melee |
While active: | |||
Melee |
40% faster switch speed to your melee from this weapon (Sharp Shooter in secondary slot required) | |||
Demoman |
Primary |
50% bonus clip size | ||
Primary |
50% bonus clip size | |||
Primary |
On hit: ignite target for up to 4 seconds | |||
Secondary |
While charging: 75% damage resistance and full knockback resistance | |||
Secondary |
This shield blocks 15 damage from attacks that deal 50 damage or more | |||
Secondary |
When a stickybomb explodes, it spawns 3 mini-bombs | |||
Melee |
When you pick up a health pack, you will receive 1 pint of Moonshine | |||
Melee |
This weapon deploys and holsters 25% faster | |||
Melee |
On kill: gain a 5 second speed boost | |||
Melee |
On kill: Store +1 head, with maximum of 4 heads | |||
Heavy |
Primary |
Bullets penetrate all enemies | ||
Primary |
Full knockback resistance while spun up | |||
Primary |
On melee kill: Gain mini-crits for your Minigun for 5 seconds | |||
Primary |
10% faster spin up time | |||
Secondary |
10% bonus base movement speed on wearer | |||
Melee |
On hit: knocks back the target | |||
Melee |
While active and wet: | |||
Melee |
While active: | |||
Engineer |
Primary |
On hit: reduce 25% of enemy's current offhand ammo supply for both primary and secondary weapons | ||
Primary |
On kill: +20 maximum metal and +5% bonus damage vs players, up to 10 times for both | |||
Primary |
On hit friendly building: +20 upgrade | |||
Secondary |
On hit: target is engulfed in flames at close range for 8 seconds | |||
Secondary |
While active: | |||
Secondary |
No self inflicted blast damage taken | |||
Melee |
While active: | |||
Melee |
Press your reload key to choose to teleport to spawn or your exit teleporter | |||
PDA |
50 bonus health on wearer | |||
PDA |
All buildings are level 3 when built | |||
PDA |
50% damage taken is removed from metal supply | |||
Medic |
Primary |
On hit: +5% bonus Medi Gun healing rate | ||
Secondary |
ÜberCharge rate increases as health decreases, up to 50% | |||
Secondary |
50% bonus overheal | |||
Secondary |
While active: | |||
Secondary |
While active: | |||
Melee |
100% critical hit vs the enemy who killed your healing target for the next 8 seconds | |||
Melee |
While active: | |||
Melee |
On hit: +25% bonus ÜberCharge rate, up to 100% | |||
Sniper |
Primary |
While scoped in: slowly fade to be almost fully transparent | ||
Primary |
On headshot: deals 25% explosive damage to all nearby enemies | |||
Primary |
On scoped shot: Applies Mad Milk, Jarate, bleeding, and fire for 1 second | |||
Secondary |
While firing, fire rate is increased, up to 50% bonus fire rate | |||
Secondary |
20 damage on head-shots | |||
Secondary |
When you take damage from behind, Jarate all nearby enemies for 3 seconds with a 10 second cooldown | |||
Secondary |
Initial damage impact does 25 damage and enemies are damaged for 10 seconds | |||
Melee |
This weapon deploys & holsters 25% faster | |||
Melee |
On hit: Gain 25% bonus charge rate for your primary weapon | |||
Spy |
Secondary |
On hit: gain speed boost for 3 seconds | ||
Secondary |
MasterOfTheXP (Original Weapon Stats) |
No ammo spent on successful hits | ||
Melee |
Instant cloak upon a backstab and infect the victim | |||
Melee |
On backstab: Plants a bomb on the target | |||
Melee |
On backstab kill: Gain 4% bonus movement speed, 4% bonus cloaking and decloaking speed, but decreases 15% Sapper power (These effects can stack up to 5 times) | |||
Melee |
On backstab: remove 50% of victim's ammo supply for both weapons | |||
Building |
50% bonus damage against buildings | |||
Building |
5 health regenerated per second for each active sapper | |||
PDA 2 |
While cloaked: User has a 75% chance to dodge any damage when taken | |||
PDA 2 |
Receive a speed boost while cloaked | |||
Soldier, Pyro, Heavy and Engineer |
On kill: Increase clip size by 1 shot, up to 8 shots in total can be held | |||
Scout, Soldier, Pyro, Demoman, Heavy, Medic, Sniper | Melee |
25% bonus damage against the same class type | ||
Melee |
On kill: gain a bumper car and Battalion's Backup effect for 15 seconds | |||
Melee |
While active: | |||
All Classes |
On kill with any weapon as any class except Engineer: Heals you for 15% of that enemy's maximum health, which can overheal |
Development team
MasterOfTheXP - Author and Former Developer
Chdata - Main Developer
404 - Former Developer
Theray070696 - Creator of the Advanced Weaponiser 2 Attributes Pack, Main Developer
Nergal - Creator of the Nergalpak Attributes Pack
Orion™ - Creator of the Orion's Attributes Pack, More Advanced Weaponiser 2 Attributes Pack, and Dota 2 Attributes Pack, Main Developer
KarmaCharger - Team Fortress 2 Wiki Contributor and Weapon Demonstrator
Crafting - Main Developer and Steam Group Owner
Chawlz - Main Developer
Update history
- Added support for Arena
- Added 9 natives for other plugins to use
- Added 3 more cvars to configure the plugin
- Added error message for when there are no custom weapons for the player's class
- Added warning message to server console for when there are no custom weapons installed at all
- Added simple output for typing "custom" into the server console
- Added version cvar (whoops!)
- "nobots" "1" may now be placed in weapon configs to prevent bots from equipping them
- Fixed weapons that changed maximum health not having health updated upon equip
- Fixed being able to equip weapons that players already had equipped
- Released the WIP Weapons Pack! Contains a few unbalanced/unfinished weapons. Try 'em, and see if you can get them working/balanced!
- Starter Weapons Pack
- Hell-Sap
- Increased damage bonus to 80% (up from 65%)
- Decreased length of both effects (cooldown and rage) to 10 seconds (was 20 seconds)
- Hell-Sap
- HL2 Weapons
- Annabelle
- Reversed self-aimpunch (now recoils upwards instead of downwards)
- Annabelle
- Custom Attributes
- Fixed the effects of "sapper causes rage" never ending (the user would take crits from the victim for the rest of the match)
- "fires lasers" now accepts a value, which will set the base damage of the laser (formerly always 25)
- Added missing documentation for a few attributes to the top of the .sp
External links
|