<div>Valve still not adding new weapons to TF2? No problem. Custom Weapons 2 allows you to create your own weapons and let your players use them.<br /><br />Once you've installed the plugin and some weapons, all players have to do is say <b>/custom, /cus or /c</b> for the list of custom weapons for that class.<br /><br />It's somewhat like Advanced Weaponiser, except the creation, modification, and selection of weapons is not limited to a certain group of people; it's up to whoever installs the plugin.<br /><br />You can create your own weapons with unique stats, and share them with other servers using Custom Weapons 2. Apply any Valve attribute you'd like onto your weapon.<br /><br />Valve attributes not unique enough? Create your own attributes sub-plugin with ease. Each custom attribute added allows for more and more unique weapons to be created with it!<br /><br /><font size="5"><b>HOW TO MAKE CUSTOM WEAPONS</b></font><br /><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>-></b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;">Creating a new custom weapon is plain easy. Simply duplicate a custom weapon's config file, and fill out its info with your own.<ul><li>The weapon's name goes right at the top, in "quotes".</li>
<li>"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)</li>
<li>"baseclass" is the <a href="https://wiki.alliedm...ndexes#Weapons" target="_blank">classname</a> of the weapon, without "tf_weapon_".</li>
<li>"baseindex" is the item index of the base weapon, see above classname link. If unsure, stick within the 0-30s.</li>
<li>If it uses ammo (i.e. most non-melee weapons) it should have "mag" and "ammo" keys with the intended starting ammo.</li>
<li>"logname" will be displayed in client consoles when a kill is made with the weapon. Not currently implemented.</li>
<li>"killicon", also not implemented yet, will be able to change the weapon's icon in the kill feed.</li>
<li>"description" is the stat list that players will see when selecting the weapon. n = Newline. "n n" will skip an entire line.</li>
<li>"attributes"; the bread-n-butter. Each attribute has:<ul><li> An identifier, to set what attribute it is. This will either be a case-sensitive name (Custom Weapons, TF2Attributes) or an attribute index (TF2Items).</li>
<li> "plugin": Who will provide the attribute's functionality?<ul><li> For <a href="http://wiki.teamfort...tem_attributes" target="_blank">official Valve attributes</a>, you'll usually want to use TF2Attributes, so put "tf2attributes". A select few attributes require "tf2attributes.int" instead.</li>
<li> 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")</li>
<li> 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".</li>
</ul></li>
<li> 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 <i>half time</i> (good), whereas "2.0" makes it take twice as long (bad). And some attributes are simply "1.0 = on, 0.0 = off".<br />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)</li>
</ul></li>
</ul><br />To Do:
</div>
</div><br /><font size="5"><b>HOW TO MAKE CUSTOM ATTRIBUTES</b></font><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>-></b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;">To be able to make custom attributes, all you need to know are the basics of SourcePawn. That's it!<br />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.</div>
</div>
</div><br /><br /><b><font size="5">QUESTIONS & ANSWERS</font></b><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>-></b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;"><b>How is this different from Advanced Weaponiser?</b><br />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.<br /><br /><b>I gave my custom weapon a model, can other players besides the user see it?</b><br />Nope. The player will be able to see it in both first and third person, though.<br /><br /><b><weapon name> is overpowered/underpowered! Fix it!</b><br />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.<br /><br /><b>Was there a Custom Weapons 1?</b><br />Yes. It was 100% hardcoded, and terrible. Thankfully, it was private. :3<br /><br /><b>Why is it called "customweapons<u>tf</u>.smx"?</b><br />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.<br />So, this is the "TF2 edition" of Custom Weapons.</div>
</div>
</div><br /><br /><b><font size="5">INSTALLATION</font></b><br />Your server needs both <a href="https://forums.allie...d.php?t=115100" target="_blank">TF2Items</a> and <a href="https://forums.allie...d.php?t=210221" target="_blank">TF2Attributes</a> loaded.<br />1. Install customweaponstf.smx into your sourcemod/plugins/ directory.<br />2. Install tf2items.randomizer.txt into your sourcemod/gamedata/ directory.<br />3. Install whatever custom weapons/attributes/packs you'd like. You <i>need</i> at least one custom weapon for this to work, and most likely, that weapon will require an attributes plugin.<br />4. <font face="Courier New">sm plugins load customweaponstf</font>, or <font face="Courier New">sm plugins reload customweaponstf</font> when you install more.<br />5. Done!<br /><br /><font size="5"><b>DLC!</b></font><br /><a href="http://files.mstr.ca...WeaponPack.zip" target="_blank">Starter Custom Weapons + Basic Attributes + Custom Attributes</a><br /><a href="http://files.mstr.ca...HL2Weapons.zip" target="_blank">Half-Life 2 Weapons</a> (requires Starter Pack)<br /><br /><font size="5"><b>CURRENT BETA STATUS</b></font><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>-></b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;"><ul><li> The code is a bit messy</li>
<li> Custom model and sound support is in, but isn't the best yet</li>
<li> The menu starts looking weird if a class has more than 7 custom weapons (I think)</li>
<li> Not tested much!</li>
</ul>Todo:<ul><li> Arena mode support</li>
<li> Applying custom attributes to official weapons a la TF2Items Manager</li>
<li> The ability to change kill icons and weapon_logclassname</li>
<li> Translation support like FF2's boss descriptions has?</li>
<li> "Bots can equip this weapon" key for weapons</li>
<li> The ability to apply/not apply certain attributes if certain cvars (such as hale_enable) are active</li>
</ul></div>
</div>
</div><br /><br />---<br />This is a <b>beta</b> of Custom Weapons 2. Think twice before adding it to your production server(s). It hasn't been fully tested in actual "combat" servers, and I'd like to get a better idea of what everyone thinks about specific features, weapons, and attributes.<br />Things might change completely, but I doubt it.<br /><font size="1">inb4something'sbroken</font></div>
<br /> <div style="padding:6px">
<fieldset class="fieldset">
<legend>Attached Files</legend>
<table cellpadding="0" cellspacing="3" border="0">
<!-- BEGIN TEMPLATE: postbit_attachment -->
<tr>
<td><img class="inlineimg" src="https://forums.allie...attach/smx.gif" alt="File Type: smx" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie...aponstf.smx</a> (27.5 KB)
</td>
</tr>
<!-- END TEMPLATE: postbit_attachment --><!-- BEGIN TEMPLATE: postbit_attachment -->
<tr>
<td><img class="inlineimg" src="https://forums.allie...attach/txt.gif" alt="File Type: txt" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie...domizer.txt</a> (177 Bytes)
</td>
</tr>
<!-- END TEMPLATE: postbit_attachment --><!-- BEGIN TEMPLATE: postbit_attachment -->
<tr>
<td><img class="inlineimg" src="https://forums.allie.../attach/sp.gif" alt="File Type: sp" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="http://www.sourcemod...22"><strong>Get Plugin</strong></a> or
<a href="https://forums.allie...1393694150">Get Source</a> (customweaponstf.sp - 37.6 KB)
</td>
</tr>
<!-- END TEMPLATE: postbit_attachment -->
</table>
</fieldset>
</div>
<!-- END TEMPLATE: postbit_external -->
Wyświetl pełny artykuł