https://wiki.tripwireinteractive.com/index.php?title=KFWeaponStats&feed=atom&action=history
KFWeaponStats - Revision history
2024-03-29T08:14:55Z
Revision history for this page on the wiki
MediaWiki 1.40.0
https://wiki.tripwireinteractive.com/index.php?title=KFWeaponStats&diff=4460&oldid=prev
Benjamin: Fixed regen rate calculation
2012-12-24T04:47:50Z
<p>Fixed regen rate calculation</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 04:47, 24 December 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l64">Line 64:</td>
<td colspan="2" class="diff-lineno">Line 64:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>//</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>//</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>// M79GrenadeProjectile - Defines it and uses in the same way as LAWProj.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>// M79GrenadeProjectile - Defines it and uses in the same way as LAWProj.</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">// M32GrenadeProjectile(M79GrenadeProjectile) - Same as above.</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">// M203GrenadeProjectile(M79GrenadeProjectile) - Same as above.</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>//</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>//</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>// (6) Hunting shotgun uses very specific reload time. See note (4).</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>// (6) Hunting shotgun uses very specific reload time. See note (4).</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l89">Line 89:</td>
<td colspan="2" class="diff-lineno">Line 91:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> var bool bHeals; // Damage that heals, ie. healing dart 'damage'</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> var bool bHeals; // Damage that heals, ie. healing dart 'damage'</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>};</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>};</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">const MaxAmmoCountSub = 5; // 500 / 100</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>// Weapons</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>// Weapons</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l651">Line 651:</td>
<td colspan="2" class="diff-lineno">Line 655:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function GetRegenRate(out StatInfo RegenRate)</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function GetRegenRate(out StatInfo RegenRate)</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> local float RR;</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ResetStat(RegenRate);</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ResetStat(RegenRate);</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> </del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if (class<KFMedicGun>(Weapon) != none)</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if (class<KFMedicGun>(Weapon) != none)</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del style="font-weight: bold; text-decoration: none;">RegenRate </del>=<del style="font-weight: bold; text-decoration: none;">@ ((1.0 / </del>class<KFMedicGun>(Weapon).default.AmmoRegenRate) * 10<del style="font-weight: bold; text-decoration: none;">.0</del>);</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> {</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <ins style="font-weight: bold; text-decoration: none;">RR </ins>= class<KFMedicGun>(Weapon).default.AmmoRegenRate<ins style="font-weight: bold; text-decoration: none;">;</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> RegenRate =@ (((1.0 / RR</ins>) * 10<ins style="font-weight: bold; text-decoration: none;">) / (500 / 100)</ins>);</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> }</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l747">Line 747:</td>
<td colspan="2" class="diff-lineno">Line 755:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> Description="Generates a list of weapon statistics and outputs it to the log."</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> Description="Generates a list of weapon statistics and outputs it to the log."</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{end code}}</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{end code}}</div></td></tr>
</table>
Benjamin
https://wiki.tripwireinteractive.com/index.php?title=KFWeaponStats&diff=4443&oldid=prev
Benjamin at 13:11, 22 December 2012
2012-12-22T13:11:17Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 13:11, 22 December 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Here's a new statistic generator, specifically for weapons. It is used for the information on the [[:Category:Weapons (KF)|weapon]] pages. It supersedes [[KFStatOutput]]. --[[User:Benjamin|Benjamin]] ([[User talk:Benjamin|talk]]) 08:09, 22 December 2012 (EST)</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Here's a new statistic generator, specifically for weapons. It is used for the information on the [[:Category:Weapons (KF)|weapon]] pages. It supersedes [[KFStatOutput]]. --[[User:Benjamin|Benjamin]] ([[User talk:Benjamin|talk]]) 08:09, 22 December 2012 (EST)</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Output is stored [[Data:WeaponStatOutput1045|here]].</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Begin code|MyCode}}</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Begin code|MyCode}}</div></td></tr>
</table>
Benjamin
https://wiki.tripwireinteractive.com/index.php?title=KFWeaponStats&diff=4441&oldid=prev
Benjamin: Created page with "Here's a new statistic generator, specifically for weapons. It is used for the information on the weapon pages. It supersedes KFStatOutput. --~~..."
2012-12-22T13:09:00Z
<p>Created page with "Here's a new statistic generator, specifically for weapons. It is used for the information on the <a href="/index.php?title=Category:Weapons_(KF)" title="Category:Weapons (KF)">weapon</a> pages. It supersedes <a href="/index.php?title=KFStatOutput" title="KFStatOutput">KFStatOutput</a>. --~~..."</p>
<p><b>New page</b></p><div>Here's a new statistic generator, specifically for weapons. It is used for the information on the [[:Category:Weapons (KF)|weapon]] pages. It supersedes [[KFStatOutput]]. --[[User:Benjamin|Benjamin]] ([[User talk:Benjamin|talk]]) 08:09, 22 December 2012 (EST)<br />
<br />
{{Begin code|MyCode}}<br />
//=============================================================================<br />
// Weapon stat generator 22-December-2012 Version 0.1<br />
// Author: Benjamin<br />
//<br />
// KNOWN ISSUES<br />
//<br />
// * Cannot detect where different fire modes share the same<br />
// ammo (boomstick). Take this into account when using info.<br />
//<br />
// * Cannot detect penetration for all weapons, must check manually<br />
// for some, see note (2) below.<br />
//<br />
//=============================================================================<br />
//== INFO =====================================================================<br />
//<br />
// HEADSHOTS<br />
//<br />
// Every weapon's headshot multiplier is stored in its associated damagetype<br />
// class, except (some of) those weapons whose projectiles implement<br />
// ProcessTouch themselves: CrossbowArrow, M99Bullet CrossbuzzsawBlade. These<br />
// projectiles have their own HeadShotDamageMult variable. Other classes<br />
// may have such a variable but the code never allows it to be used (seemingly<br />
// a bug).<br />
//<br />
// Explosive projectiles (LAWProj) do not check for headshots, and certain<br />
// fire-based ones do not either (FlameTendril). However, if these projectiles<br />
// have ImpactDamage then its associated DamType may have a multiplier instead.<br />
//<br />
//=============================================================================<br />
//== NOTES ====================================================================<br />
//<br />
// (1) Some classes don't use AmmoPerFire: MP7MAltFire, M7A3MAltFire.<br />
//<br />
// (2) Hardcoded penetration values: Deagle, MK23, 44Magnum, Crossbow, M99,<br />
// and Buzzsaw bow. Look in script files manually for these stats.<br />
//<br />
// (3) Weapons only have a single ReloadRate stat (none for alt-fire).<br />
//<br />
// (4) Weapons that auto-reload with a specific time: <br />
//<br />
// Hunting shotgun<br />
//<br />
// Fire: Take the minimum of ReloadCountDown(BoomStick) and FireLastRate(BoomStickAltFire)<br />
// Alt-fire: Take the minimum of ReloadCountDown(BoomStick) and FireRate(BoomStickFire)<br />
// Use both for output (2 firing modes).<br />
//<br />
// M79 - FireRate (fire + reload are same animation)<br />
// Crossbow - FireRate (fire + reload are same animation)<br />
// LAW - FireRate (fire + reload are same animation)<br />
// M99 - FireRate (fire + reload are same animation)<br />
// Buzzsaw Bow - FireRate (fire + reload are same animation)<br />
//<br />
// (5) Weapons that use ImpactDamage:<br />
//<br />
// LAWProj - Defines it for the below classes. Only uses it if the rocket duds. HS multiplier applies to impact.<br />
// FlareRevolverProjectile(LAWProj) - Does both impact and 'explosive' fire damage. HS multiplier applies to impact.<br />
// HuskGunProjectile(LAWProj) - Does both impact and 'explosive' fire damage. HS multiplier applies to impact.<br />
// ZEDGunProjectile(LAWProj) - Ignore, only does regular non-explosive projectile damage without impact.<br />
//<br />
// M79GrenadeProjectile - Defines it and uses in the same way as LAWProj.<br />
//<br />
// (6) Hunting shotgun uses very specific reload time. See note (4).<br />
//<br />
// (7) FlameThrower penetration is non-existent since the multiplier is 0,<br />
// resulting in the tendril being destroyed after the first hit. Nonetheless,<br />
// penetration count is shown in case this is a bug that will be fixed. Take<br />
// this into account when using info.<br />
<br />
// ? Add max charge stats for husk gun?<br />
// M79 can do more impact-head damage than explosive damage<br />
//=============================================================================<br />
class KFWeaponStatsMut extends Mutator;<br />
<br />
struct StatInfo<br />
{<br />
var int iValue;<br />
var float fValue;<br />
var bool bValue;<br />
var string StrValue;<br />
var int Type; // 0 = int, 1 = float, 2 = bool, 3 = string, 4 = unknown (string)<br />
var bool bUsed;<br />
<br />
// Stat-specific variables<br />
var bool bHeals; // Damage that heals, ie. healing dart 'damage'<br />
};<br />
<br />
// Weapons<br />
var array< class<KFWeaponPickup> > AdditionalWeapons;<br />
var class<KFWeaponPickup> Pickup;<br />
var class<KFWeapon> Weapon;<br />
var class<WeaponFire> Fire[2];<br />
var class<KFMonster> KFM;<br />
<br />
static final preoperator StatInfo @(int A)<br />
{<br />
local StatInfo DI;<br />
DI.iValue = A;<br />
DI.Type = 0;<br />
DI.bUsed = true;<br />
return DI;<br />
}<br />
<br />
static final preoperator StatInfo @(float A)<br />
{<br />
local StatInfo DI;<br />
DI.fValue = A;<br />
DI.Type = 1;<br />
DI.bUsed = true;<br />
return DI;<br />
}<br />
<br />
static final preoperator StatInfo @(bool A)<br />
{<br />
local StatInfo DI;<br />
DI.bValue = A;<br />
DI.Type = 2;<br />
DI.bUsed = true;<br />
return DI;<br />
}<br />
<br />
static final preoperator StatInfo @(string A)<br />
{<br />
local StatInfo DI;<br />
DI.StrValue = A;<br />
DI.Type = 3;<br />
DI.bUsed = true;<br />
return DI;<br />
}<br />
<br />
static final function SetStatUnknown(out StatInfo A)<br />
{<br />
A.Type = 4;<br />
A.bUsed = true;<br />
}<br />
<br />
static final function string GetStatString(StatInfo A)<br />
{<br />
if (A.Type == 0)<br />
return string(A.iValue);<br />
else if (A.Type == 1)<br />
return string(A.fValue);<br />
else if (A.Type == 2)<br />
return string(A.bValue);<br />
else if (A.Type == 3)<br />
return A.StrValue;<br />
else if (A.Type == 4)<br />
return "Unknown";<br />
}<br />
<br />
static final function ResetStat(out StatInfo A)<br />
{<br />
A.iValue = 0;<br />
A.fValue = 0;<br />
A.bValue = false;<br />
A.StrValue = "";<br />
A.Type = 0;<br />
A.bUsed = false;<br />
A.bHeals = false;<br />
}<br />
<br />
function OutputStat(string Title, StatInfo Stat, optional StatInfo AltStat)<br />
{<br />
local int A, x;<br />
<br />
if (!Stat.bUsed && !AltStat.bUsed)<br />
return;<br />
<br />
// Adjust stat name for alignment<br />
Title $= ":";<br />
A = Len(Title);<br />
if (A < 16)<br />
{<br />
for (x = 0; x < 16 - A; x++)<br />
Title $= " ";<br />
}<br />
<br />
if (Stat.bUsed)<br />
Title $= GetStatString(Stat);<br />
else<br />
Title $= "---";<br />
if (AltStat.bUsed)<br />
Title $= " (" $ GetStatString(AltStat) $ ")";<br />
<br />
Log(Title);<br />
}<br />
<br />
/*<br />
<br />
Fix flamethrower penetration detection<br />
<br />
*/<br />
<br />
function PostBeginPlay()<br />
{<br />
// General<br />
local StatInfo Name;<br />
local StatInfo Perk;<br />
local StatInfo Cost;<br />
local StatInfo Weight;<br />
local StatInfo CanSellBuy;<br />
<br />
// Ammo<br />
local StatInfo AmmoCost;<br />
local StatInfo AmmoCapacity[2];<br />
local StatInfo MagazineCapacity[2];<br />
<br />
// Damage<br />
local StatInfo Damage[2];<br />
local StatInfo DamageRadius[2];<br />
local StatInfo ImpactDamage[2];<br />
local StatInfo HeadMultiplier[2];<br />
<br />
// Firing characteristics<br />
local StatInfo FireRate[2];<br />
local StatInfo ReloadTime[2];<br />
local StatInfo Spread[2];<br />
local StatInfo Pellets[2];<br />
<br />
// Range and penetration<br />
local StatInfo MaxPens[2];<br />
local StatInfo PenReduction[2];<br />
local StatInfo Range[2];<br />
local StatInfo RangeAngle[2];<br />
<br />
// Misc<br />
local StatInfo RegenRate;<br />
<br />
local int i, x;<br />
local array< class<Pickup> > WeaponList;<br />
local string t;<br />
<br />
for (i = 0; i < ArrayCount(class'KFLevelRules'.default.ItemForSale); i++)<br />
if (class'KFLevelRules'.default.ItemForSale[i] != none)<br />
WeaponList[WeaponList.Length] = class'KFLevelRules'.default.ItemForSale[i];<br />
<br />
for (i = 0; i < AdditionalWeapons.Length; i++)<br />
WeaponList[WeaponList.Length] = AdditionalWeapons[i];<br />
<br />
// Main loop<br />
for (i = 0; i < WeaponList.Length; i++)<br />
{<br />
Pickup = class<KFWeaponPickup>(WeaponList[i]);<br />
if (Pickup != none)<br />
{<br />
Weapon = class<KFWeapon>(Pickup.default.InventoryType);<br />
if (Weapon != none)<br />
{<br />
for (x = 0; x < 2; x++)<br />
{<br />
if (Weapon.default.FireModeClass[x] != none && IsTrueFire(Weapon.default.FireModeClass[x]))<br />
Fire[x] = Weapon.default.FireModeClass[x];<br />
else<br />
Fire[x] = none;<br />
}<br />
<br />
//<br />
GetName(Name);<br />
GetPerk(Perk);<br />
GetCost(Cost);<br />
GetWeight(Weight);<br />
GetCanSellBuy(CanSellBuy);<br />
//<br />
GetAmmoCost(AmmoCost);<br />
GetAmmoCapacity(AmmoCapacity);<br />
GetMagazineCapacity(MagazineCapacity);<br />
//<br />
GetDamage(Damage);<br />
GetDamageRadius(DamageRadius);<br />
GetImpactDamage(ImpactDamage);<br />
GetHeadMultiplier(HeadMultiplier);<br />
//<br />
GetFireRate(FireRate);<br />
GetReloadTime(ReloadTime);<br />
GetSpread(Spread);<br />
GetPellets(Pellets);<br />
//<br />
GetMaxPens(MaxPens);<br />
GetPenReduction(PenReduction);<br />
GetRange(Range);<br />
//<br />
GetRangeAngle(RangeAngle);<br />
GetRegenRate(RegenRate);<br />
//<br />
<br />
OutputStat("Name", Name);<br />
OutputStat("Perk", Perk); <br />
OutputStat("Cost", Cost);<br />
OutputStat("Weight", Weight);<br />
OutputStat("Can sell/buy", CanSellBuy);<br />
<br />
OutputStat("Ammo cost", AmmoCost);<br />
OutputStat("Ammo capacity", AmmoCapacity[0], AmmoCapacity[1]);<br />
OutputStat("Mag capacity", MagazineCapacity[0], MagazineCapacity[1]);<br />
<br />
OutputStat("Damage", Damage[0], Damage[1]);<br />
OutputStat("Impact damage", ImpactDamage[0], ImpactDamage[1]);<br />
OutputStat("Radius", DamageRadius[0], DamageRadius[1]);<br />
OutputStat("HS multiplier", HeadMultiplier[0], HeadMultiplier[1] );<br />
<br />
OutputStat("Fire rate", FireRate[0], FireRate[1]);<br />
OutputStat("Reload sp", ReloadTime[0], ReloadTime[1]);<br />
OutputStat("Spread", Spread[0], Spread[1]);<br />
OutputStat("Pellets", Pellets[0], Pellets[1]);<br />
<br />
OutputStat("Max pens", MaxPens[0], MaxPens[1]);<br />
OutputStat("Pen multiplier",PenReduction[0], PenReduction[1]);<br />
OutputStat("Range", Range[0], Range[1]);<br />
OutputStat("Range angle", RangeAngle[0], RangeAngle[1]);<br />
<br />
OutputStat("Regen rate", RegenRate);<br />
<br />
Log("");<br />
}<br />
}<br />
}<br />
<br />
Log("");<br />
Log("");<br />
}<br />
<br />
///////////////////////////////////////////////////////////////////////////////<br />
// WEAPON STAT CALCULATION<br />
///////////////////////////////////////////////////////////////////////////////<br />
<br />
// General<br />
<br />
function GetName(out StatInfo Name)<br />
{<br />
Name =@ Pickup.default.ItemName;<br />
}<br />
<br />
function GetPerk(out StatInfo Perk)<br />
{<br />
ResetStat(Perk);<br />
if (Pickup.default.CorrespondingPerkIndex < KFGameType(Level.Game).default.LoadedSkills.Length)<br />
Perk =@ KFGameType(Level.Game).default.<br />
LoadedSkills[Pickup.default.CorrespondingPerkIndex].default.VeterancyName;<br />
}<br />
<br />
function GetCost(out StatInfo Cost)<br />
{<br />
ResetStat(Cost);<br />
if (Pickup.default.Cost != 0 && !Weapon.default.bKFNeverThrow)<br />
Cost =@ Pickup.default.Cost;<br />
}<br />
<br />
function GetWeight(out StatInfo Weight)<br />
{<br />
ResetStat(Weight);<br />
if (Pickup.default.Weight != 0)<br />
Weight =@ int(Pickup.default.Weight);<br />
}<br />
<br />
function GetCanSellBuy(out StatInfo CanSellBuy)<br />
{<br />
CanSellBuy =@ (Weapon.default.bKFNeverThrow == false);<br />
}<br />
<br />
// Ammo<br />
<br />
function GetAmmoCost(out StatInfo AmmoCost)<br />
{<br />
ResetStat(AmmoCost);<br />
if (!IsMeleeWeapon(Weapon))<br />
AmmoCost =@ Pickup.default.AmmoCost;<br />
}<br />
<br />
function GetAmmoCapacity(out StatInfo AmmoCapacity[2], optional int Index)<br />
{<br />
ResetStat(AmmoCapacity[Index]);<br />
if (Index == 0) GetAmmoCapacity(AmmoCapacity, 1);<br />
<br />
if (Fire[Index] != none && !IsMeleeFire(Fire[Index]) && Fire[Index].default.AmmoClass != none)<br />
AmmoCapacity[Index] =@ Fire[Index].default.AmmoClass.default.MaxAmmo; <br />
}<br />
<br />
function GetMagazineCapacity(out StatInfo MagazineCapacity[2])<br />
{<br />
ResetStat(MagazineCapacity[0]);<br />
ResetStat(MagazineCapacity[1]);<br />
<br />
if (!IsMeleeWeapon(Weapon))<br />
MagazineCapacity[0] =@ Weapon.default.MagCapacity;<br />
// MagazineCapacity[1] =@ 0; // Can't be obtained normally<br />
}<br />
<br />
// Damage<br />
<br />
function GetDamage(out StatInfo Damage[2], optional int Index)<br />
{<br />
local int Dmg;<br />
<br />
ResetStat(Damage[Index]);<br />
if (Index == 0) GetDamage(Damage, 1); <br />
<br />
if (Fire[Index] != none)<br />
{<br />
if (class<InstantFire>(Fire[Index]) != none) // HITSCAN<br />
Dmg = class<InstantFire>(Fire[Index]).default.DamageMax;<br />
else if(class<BaseProjectileFire>(Fire[Index]) != none) // PROJECTILE<br />
{<br />
if (class<KFMedicGun>(Weapon) != none)<br />
{<br />
Dmg = class<KFMedicGun>(Weapon).default.HealBoostAmount;<br />
Damage[Index].bHeals = true;<br />
}<br />
else<br />
Dmg = int(class<BaseProjectileFire>(Fire[Index]).default.ProjectileClass.default.Damage);<br />
}<br />
else if (class<KFMeleeFire>(Fire[Index]) != none) // MELEE<br />
{<br />
Dmg = class<KFMeleeFire>(Fire[Index]).default.MeleeDamage;<br />
}<br />
<br />
if (Dmg != 0)<br />
{<br />
if (Damage[Index].bHeals)<br />
Damage[Index] =@ ("+" $ Dmg);<br />
else<br />
Damage[Index] =@ Dmg;<br />
}<br />
}<br />
}<br />
<br />
function GetDamageRadius(out StatInfo DamageRadius[2], optional int Index)<br />
{<br />
local class<DamageType> DT;<br />
<br />
ResetStat(DamageRadius[Index]);<br />
if (Index == 0) GetDamageRadius(DamageRadius, 1);<br />
<br />
if (Fire[Index] != none && class<BaseProjectileFire>(Fire[Index]) != none)<br />
{<br />
DT = class<BaseProjectileFire>(Fire[Index]).default.ProjectileClass.default.MyDamageType;<br />
if (class<KFWeaponDamageType>(DT) != none)<br />
{<br />
if (class<KFWeaponDamageType>(DT).default.bIsExplosive)<br />
DamageRadius[Index] =@ class<BaseProjectileFire>(Fire[Index]).default.ProjectileClass.default.DamageRadius;<br />
}<br />
}<br />
}<br />
<br />
function GetImpactDamage(out StatInfo Damage[2], optional int Index)<br />
{<br />
local class<Projectile> P;<br />
<br />
ResetStat(Damage[Index]);<br />
if (Index == 0) GetImpactDamage(Damage, 1); <br />
<br />
if (Fire[Index] != none)<br />
{<br />
if (class<BaseProjectileFire>(Fire[Index]) != none)<br />
{<br />
P = class<BaseProjectileFire>(Fire[Index]).default.ProjectileClass;<br />
if (class<LAWProj>(P) != none && P != class'ZEDGunProjectile')<br />
Damage[Index] =@ class<LAWProj>(P).default.ImpactDamage;<br />
else if (class<M79GrenadeProjectile>(P) != none)<br />
Damage[Index] =@ class<M79GrenadeProjectile>(P).default.ImpactDamage;<br />
}<br />
}<br />
}<br />
<br />
function GetHeadMultiplier(out StatInfo HeadMultiplier[2], optional int Index)<br />
{<br />
local class<Projectile> P;<br />
local float Multi;<br />
<br />
ResetStat(HeadMultiplier[Index]);<br />
if (Index == 0) GetHeadMultiplier(HeadMultiplier, 1);<br />
<br />
if (Fire[Index] != none)<br />
{<br />
if (class<InstantFire>(Fire[Index]) != none) // HITSCAN<br />
{<br />
if (class<KFWeaponDamageType>(class<InstantFire>(Fire[Index]).default.DamageType) != none)<br />
Multi = class<KFWeaponDamageType>(<br />
class<InstantFire>(Fire[Index]).default.DamageType).default.HeadShotDamageMult;<br />
}<br />
else if (class<BaseProjectileFire>(Fire[Index]) != none) // PROJECTILE<br />
{<br />
P = class<BaseProjectileFire>(Fire[Index]).default.ProjectileClass;<br />
<br />
if (P == class'CrossbuzzsawBlade') // Buzzsaw bow<br />
Multi = class<CrossbuzzsawBlade>(P).default.HeadShotDamageMult;<br />
else if (P == class'CrossbowArrow') // CROSSBOW<br />
Multi = class<CrossbowArrow>(P).default.HeadShotDamageMult;<br />
else if (P == class'M99Bullet') // M99<br />
Multi = class<M99Bullet>(P).default.HeadShotDamageMult;<br />
else if (IsKFDamageType(P.default.MyDamageType)) // ANY OTHER PROJECTILES USE DAMAGETYPE<br />
{<br />
if (CheckForHeadShots(P.default.MyDamageType))<br />
Multi = class<KFWeaponDamageType>(P.default.MyDamageType).default.HeadShotDamageMult;<br />
else // Handle impact damage headshot multiplier if available<br />
{<br />
if (class<LAWProj>(P) != none && P != class'ZEDGunProjectile')<br />
Multi = class<KFWeaponDamageType>(class<LAWProj>(P).default.ImpactDamageType).default.HeadShotDamageMult;<br />
else if (class<M79GrenadeProjectile>(P) != none && P != class'ZEDGunProjectile')<br />
Multi = class<KFWeaponDamageType>(class<M79GrenadeProjectile>(P).default.ImpactDamageType).default.HeadShotDamageMult;<br />
}<br />
}<br />
}<br />
else if (class<KFMeleeFire>(Fire[Index]) != none) // MELEE<br />
{<br />
if (class<DamTypeMelee>(class<KFMeleeFire>(Fire[Index]).default.hitDamageClass) != none)<br />
Multi = class<DamTypeMelee>(class<KFMeleeFire>(Fire[Index]).default.hitDamageClass).default.HeadShotDamageMult;<br />
}<br />
<br />
if (Multi != 0 && Multi != 1.0)<br />
HeadMultiplier[Index] =@ (int(Multi * 100.0) $ "%");<br />
}<br />
}<br />
<br />
// Firing characteristics<br />
<br />
function GetFireRate(out StatInfo FireRate[2], optional int Index)<br />
{<br />
ResetStat(FireRate[Index]);<br />
if (Index == 0) GetFirerate(FireRate, 1);<br />
<br />
if (IsAutoReloadingWeapon(Weapon)) // (4) Weapons that fire-reload in one animation<br />
// Do nothing<br />
;<br />
else<br />
{<br />
if (Fire[Index] != none)<br />
FireRate[Index] =@ Fire[Index].default.FireRate;<br />
}<br />
}<br />
<br />
function GetReloadTime(out StatInfo ReloadTime[2], optional int Index)<br />
{<br />
ResetStat(ReloadTime[Index]);<br />
if (Index == 0) GetReloadTime(ReloadTime, 1); // (3)<br />
<br />
if (Index == 1 && Weapon != class'BoomStick')<br />
return; // Only do 2nd reload time for hunting shotgun<br />
<br />
if (IsAutoReloadingWeapon(Weapon)) // (4) Weapons that fire-reload in one animation<br />
{<br />
if (Weapon == class'BoomStick') // (5) Hunting shotgun is special case<br />
{<br />
if (Fire[Index] == class'BoomStickAltFire')<br />
ReloadTime[Index] =@ FMax(class'BoomStickAltFire'.default.FireLastRate, class'BoomStick'.default.ReloadCountDown);<br />
else<br />
ReloadTime[Index] =@ FMax(class'BoomStickFire'.default.FireRate, class'BoomStick'.default.ReloadCountDown);<br />
}<br />
else if (Fire[Index] != none)<br />
ReloadTime[Index] =@ Fire[Index].default.FireRate;<br />
}<br />
else if (!IsMeleeFire(Fire[Index]))<br />
{<br />
if (Fire[Index] != none)<br />
ReloadTime[Index] =@ Weapon.default.ReloadRate;<br />
}<br />
}<br />
<br />
function GetSpread(out StatInfo Spread[2], optional int Index)<br />
{<br />
ResetStat(Spread[Index]);<br />
if (Index == 0) GetSpread(Spread, 1);<br />
<br />
if (Fire[Index] != none && Fire[Index].default.Spread != 0)<br />
Spread[Index] =@ Fire[Index].default.Spread;<br />
}<br />
<br />
function GetPellets(out StatInfo Pellets[2], optional int Index)<br />
{<br />
ResetStat(Pellets[Index]);<br />
if (Index == 0) GetPellets(Pellets, 1);<br />
<br />
if (Fire[Index] != none && class<KFShotgunFire>(Fire[Index]) != none)<br />
{<br />
if (IgnoresLoad(Fire[Index])) // (1) see note<br />
Pellets[Index] =@ class<BaseProjectileFire>(Fire[Index]).default.ProjPerFire;<br />
else<br />
Pellets[Index] =@ ( class<BaseProjectileFire>(Fire[Index]).default.ProjPerFire *<br />
class<BaseProjectileFire>(Fire[Index]).default.AmmoPerFire );<br />
}<br />
}<br />
<br />
// Range and penetration<br />
<br />
function GetMaxPens(out StatInfo MaxPens[2], optional int Index)<br />
{<br />
local class<Projectile> P;<br />
<br />
ResetStat(MaxPens[Index]);<br />
if (Index == 0) GetMaxPens(MaxPens, 1);<br />
<br />
if (class<InstantFire>(Fire[Index]) != none) // HITSCAN<br />
{<br />
// (2) Deagle, MK23, 44Magnum<br />
}<br />
else if (class<BaseProjectileFire>(Fire[Index]) != none) // PROJECTILE<br />
{<br />
P = class<BaseProjectileFire>(Fire[Index]).default.ProjectileClass;<br />
<br />
if (class<ShotgunBullet>(P) != none)<br />
MaxPens[Index] =@ class<ShotgunBullet>(P).default.MaxPenetrations; // (7)<br />
}<br />
}<br />
<br />
function GetPenReduction(out StatInfo PenReduction[2], optional int Index)<br />
{<br />
local class<Projectile> P;<br />
<br />
ResetStat(PenReduction[Index]);<br />
if (Index == 0) GetPenReduction(PenReduction, 1);<br />
<br />
if (class<BaseProjectileFire>(Fire[Index]) != none)<br />
{<br />
P = class<BaseProjectileFire>(Fire[Index]).default.ProjectileClass;<br />
if (class<ShotgunBullet>(P) != none)<br />
PenReduction[Index] =@ class<ShotgunBullet>(P).default.PenDamageReduction;<br />
}<br />
}<br />
<br />
function GetRange(out StatInfo Range[2], optional int Index)<br />
{<br />
ResetStat(Range[Index]);<br />
if (Index == 0) GetRange(Range, 1);<br />
<br />
if (class<KFMeleeFire>(Fire[Index]) != none)<br />
Range[Index] =@ class<KFMeleeFire>(Fire[Index]).default.WeaponRange;<br />
}<br />
<br />
function GetRangeAngle(out StatInfo RangeAngle[2], optional int Index)<br />
{<br />
local float Angle;<br />
ResetStat(RangeAngle[Index]);<br />
if (Index == 0) GetRangeAngle(RangeAngle, 1);<br />
<br />
if (class<KFMeleeFire>(Fire[Index]) != none)<br />
{<br />
Angle = class<KFMeleeFire>(Fire[Index]).default.WideDamageMinHitAngle;<br />
if (Angle != 0)<br />
{<br />
Angle = acos(Angle) * (180.0 / Pi) * 2.0;<br />
RangeAngle[Index] =@ (Angle $ "°");<br />
}<br />
}<br />
}<br />
<br />
// Misc<br />
<br />
function GetRegenRate(out StatInfo RegenRate)<br />
{<br />
ResetStat(RegenRate);<br />
<br />
if (class<KFMedicGun>(Weapon) != none)<br />
RegenRate =@ ((1.0 / class<KFMedicGun>(Weapon).default.AmmoRegenRate) * 10.0);<br />
}<br />
<br />
///////////////////////////////////////////////////////////////////////////////<br />
// UTILITIES<br />
///////////////////////////////////////////////////////////////////////////////<br />
<br />
function bool IsTrueFire(class<WeaponFire> Fire) // Returns false for flashlight/nofire/etc fire modes<br />
{<br />
if ( Fire == class'NoFire'<br />
|| Fire == class'ShotgunLightFire'<br />
|| Fire == class'SingleALTFire'<br />
|| Fire == class'NailGunAltFire'<br />
|| Fire == none<br />
)<br />
return false;<br />
<br />
return true;<br />
}<br />
<br />
function bool IsMeleeFire(class<WeaponFire> Fire)<br />
{<br />
if (Fire == none)<br />
return false;<br />
if (class<KFMeleeFire>(Fire) != none)<br />
return true;<br />
return false;<br />
}<br />
<br />
function bool IsMeleeWeapon(class<KFWeapon> Weapon)<br />
{<br />
if (class<KFMeleeGun>(Weapon) != none)<br />
return true;<br />
else<br />
return false;<br />
}<br />
<br />
function bool IgnoresLoad(class<WeaponFire> Fire)<br />
{<br />
if (class<MP7MAltFire>(Fire) != none<br />
|| class<M7A3MAltFire>(Fire) != none)<br />
<br />
return true;<br />
<br />
return false;<br />
}<br />
<br />
function bool IsAutoReloadingWeapon(class<Weapon> WeaponClass) // (4)<br />
{<br />
if (WeaponClass == class'KFMod.Boomstick')<br />
return true;<br />
else if (WeaponClass == class'KFMod.M79GrenadeLauncher')<br />
return true;<br />
else if (WeaponClass == class'KFMod.Crossbow')<br />
return true;<br />
else if (WeaponClass == class'KFMod.LAW')<br />
return true;<br />
else if (WeaponClass == class'KFMod.M99SniperRifle')<br />
return true;<br />
else if (WeaponClass == class'KFMod.Crossbuzzsaw')<br />
return true;<br />
<br />
return false;<br />
}<br />
<br />
function bool CheckForHeadShots(class<DamageType> DT)<br />
{<br />
if (class<KFWeaponDamageType>(DT) != none)<br />
{<br />
if (!class<KFWeaponDamageType>(DT).default.bCheckForHeadShots)<br />
return false;<br />
if (class<DamTypeBurned>(DT) != none || class<DamTypeFlameThrower>(DT) != none)<br />
return false;<br />
<br />
return true;<br />
}<br />
return false;<br />
}<br />
<br />
function bool IsKFDamageType(class<DamageType> DT)<br />
{<br />
if (DT == none || class<KFWeaponDamageType>(DT) == none)<br />
return false;<br />
<br />
return true;<br />
}<br />
<br />
defaultproperties<br />
{<br />
GroupName="KFWeaponStatsMut"<br />
FriendlyName"Generate Weapon Stats 0.1"<br />
Description="Generates a list of weapon statistics and outputs it to the log."<br />
}<br />
<br />
{{end code}}</div>
Benjamin