BoxingGloveMod

If you liked this item, please rate it up on Steam Workshop page.

Author: basics :)

Last revision: 4 Jul, 2022 at 04:24 UTC

File size: 2.32 MB

On Steam Workshop

Description:

Punch Zombies.

——————————————————————

https://github.com/basicsmods/BoxingGloveMod

——————————————————————

This mod adds the BoxingGlove weapon to the game. This weapon comes in 3 tiers (1, 2, and 3) and comes as blue or red (so 6 total items). The weapon’s range is quite short (if I make it longer, you can punch zombies without physically making contact), but it can attack quite fast as compensation.

The way the weapon works is that the weapon’s skin is actually invisible. But whenever you equip the weapon, it simultaneously spawns and equips the real boxing glove item from the vanilla game. When you unequip the weapon, it unequips the gloves and deletes them. So you can’t use this weapon AND gloves at the same time.

This mod also adds the vanilla Boxing Shorts and Boxing Helmet items to the drop tables of zombies. The helmets come in 3 tiers while the shorts have a warm version (with insulation) and cold version (with no insulation). Both the helmets and shorts have blue and red versions.

Currently, these weapons use a combination of the Stab animation (looks like a jab) and the Bat animation (looks like different types of swinging punches). There is a Punch animation within the game code, but I can’t figure out how to assign it to a weapon. If someone can do it that would be incredible.

All of the items from this mod drop off of zombies.

——————————————————————
Customizability
——————————————————————
To give you more control over the weapons, I added two sets of options:
1) In-game settings tab where you can control the drop rates for the three different weapon tiers. You can also set your jab:swing ratio here.
2) Server / World Sandbox settings tab where you can control the different weapon tiers’ stats (damage, weight, crit chance, durability, etc.).

For (1), only the server host’s drop rate settings will be applied if you’re in multiplayer and you MUST reload your lua after changing the drop rates or they won’t apply to the world you launch into. The jab:swing ratio can be controlled by clients in single player or multiplayer worlds.

For (2), one of the weapon stats you can control is knockdown %. Only the Swing animation can actually knock zombies (Stab animation cannot). So based on what knockdown % the server has set and what jab:swing ratio the client has set in their in-game settings, that will be the client’s knockdown % when they get a Swing attack. For example, if the server has a knockdown % of 25% and a player has a jab:swing ratio of 0.4 (60% of their attacks will be Swings), the % chance to get a knock when the player gets a Stab attack is 0. But the % chance to get a knock when the player gets a Swing attack is 41.6%. This results in an "overall" knockdown chance of 25%.

I tried to put the drop rate settings within the sandbox settings as well, but they don’t get applied when I do that.

Since single player worlds cannot alter the Sandbox settings after the world has been created (multiplayer worlds can change the server settings + sandbox settings after hitting Host, but before launching the server), I recommend you get this mod https://steamcommunity.com/sharedfiles/filedetails/?id=2829504578 . With that mod, you can alter the single player world’s sandbox settings from within the world and then restart the world to get them applied.

——————————————————————
Future ideas
——————————————————————
– (Done) Give users the ability to tune the weapon stats + drop rate from within their game.
– Change the animation to the actual punch animation that there are files for in-game. (Not sure if this one is possible at this time.)
– (Done poorly) Add stars to the icons used for the different weapon and helmet tiers so they are easy to differentiate.
– (Done) After each swing, randomly select which type of swing animation will be used for the next one. (The stab animation looks like a jab which is nice, but it’s one animation every attack and it also doesn’t ever get knockdowns. The bat animation still looks decently appropriate and has some variety to it while also allowing for knockdowns. Causing it to randomly rotate between the two will give us the best of both worlds.)
– Add a hotkey that toggles between the Bat swing animation and the Stab swing animation. Have different weapon stats associated with each swing type (so for example, stabs could be faster and cause less durability damage, but bat swings could do more damage and have a chance to knock zombies down). This one might have to become its own mod (as an extension to this one) since it would change the nature of the mod quite a bit. But it would make combat a little more interesting since you’d be choosing which type of attack to do whenever you wanted.

Feel free to comment with any suggestions / requests / bug reports. Also feel free to use the github link and make comments there / contribute to the repository.
Mod ID: BoxingGloveMod

Workshop ID: 2827693830
Mod ID: BoxingGloveMod