• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

[Mutator] Reload options

a1eat0r

Grizzled Veteran
Feb 26, 2013
213
2
(Whitelisted)

This mutator adds options to disable auto-reload and to make the reload animation interruptible.

Options

  • Allow to interrupt: allow actions, which can be changed in the config file (see below), to interrupt the reload animation. If interrupted, it has to start over. If the magazine has been removed during the animation, interrupting it will set the amount of ammo in the magazine to zero (the ammo won't be lost).
  • Disable auto-reload: play a dry-fire sound instead of triggering auto-reload.
  • Options to display in-game messages when the animation is interrupted and when your weapon needs to be reloaded or has no ammo.


Config file
For an action to interrupt the reload animation, the corresponding alias has to be added to the mutator's config file. For example:

  • ReloadOptionsMut.ini
    Code:
    InterruptAliases=Jump
    InterruptAliases=GetWeapon


  • User.ini
    Code:
    Space=Jump
    X=GetWeapon Knife | Say Take that, auto-reload!


Acknowledgements
[Tutorial] Creating a Basic Mutator by Benjamin.
[Mutator] ScrnBalance by poosh. The bit of code that disables auto-reload is taken directly from there.
Adding Tabs to Esc Menu by scary ghost.

Download
Mutator
Source code
Workshop

Change Notes

Video (old version)
Killing Floor: Reload Options Mutator - YouTube
 
Last edited:
As a disclaimer, I have no experience with neither mutators nor UnrealScript. The mutator works but is not finished; I'm posting the source code in case someone more competent would want to finish it.

MWPMzl.jpg


Good Luck anyways, i'm doing sometimes same thing :)
 
Upvote 0
the reload cancel isn't working on Hunting Rifle
If you mean the custom weapon, the code needs to be modified to include new weapons. If you mean the Hunting Shotgun, it's a subclass of the KFWeaponShotgun class which I haven't extended yet. These are the weapons that should work with the current version:
Spoiler!


Also, I've figured out how to subclass KFPawn, so I plan on making the mutator work with dualies with my next update.

EDIT: No longer relevant.
 
Last edited:
Upvote 0
I've had a closer look at the way manual reload is implemented in ScrNBalance (which I should've done from the beginning), and it seems there's no need to replace every weapon, just a subclass of KFHumanPawn should work, though I haven't tested it yet.

EDIT: It works, but I need to write a new code from scratch. I'm going to edit the first post and update the download links after I've made more progress.https://www.dropbox.com/s/97fyqyl8xw6d8tr/test_Source.zip
 
Last edited:
Upvote 0
Updated. The mutator no longer replaces weapons, so it should also work with custom ones. I don't think there's anything more to add to the code, except make it work online. This is something I can't do, because not only do I have no clue about networking, but I also don't run a server to test it online. So for now I'm just going to wait for any feedback and fix any possible bugs.
 
Upvote 0
Updated.

Everything works the same way, except now it's less advantageous to cancel reload. If the mag has been removed during the reload animation, interrupting it will set the current mag capacity to zero (no ammo will be lost). The interval before the mag is removed ranges from 0.3s to 0.7s for different weapons and is adjusted for any reload speed bonuses. The Interrupted! message has been changed to be shown only when the capacity is set to zero.
 
Upvote 0
This surely must be whitelisted and popularized like AntiBlocker once was! I wonder why reloading wasn't interruptable from the very beginning - what moron will continue to fiddle with that AA-12 mag or juggle those Dualies for eternity when he's being eaten alive, if he got an AK, Bullpup or some other spare wapon fully loaded and ready for action?
 
Upvote 0