Coavins Firearm Repair

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

Author: Yuki

Last revision: 30 Sep, 2022 at 17:49 UTC (1)

File size: 417.79 KB

On Steam Workshop

Description:

Disassemble firearms into parts that can be individually repaired (or replaced) and reassembled. Parts can also be looted from places where you normally find guns, and they can be removed from other guns and re-used. Replaces the default "Repair" action on supported guns.

✔ Works in Multiplayer
✔ Tested on 41.73
✔ Compatible with most other firearm mods

This is a WORK IN PROGRESS, expect things to change.
It should be safe to add this mod to an existing save file. Always back up your save.
Reassemble your guns before removing this mod or they will disappear forever.

How it works
Repairing a firearm

You won’t be able to directly repair firearms anymore. You will instead have to disassemble the gun and either repair or replace the broken parts.

Individual components can be repaired using things like duct tape or metalworking. You should expect firearms to degrade at around the same rate as before, and it should take around the same level of effort to repair a gun the first few times that it breaks.

Alternatively, just replace the broken part with one taken from a different gun.

⚠ It will become increasingly more difficult to repair a firearm as more of its parts are broken.

Components

This mod adds many new items that are used in repair and reassembly. Spare components can be looted from most places where guns are normally found.

Check the wiki[github.com] for a full list of the different models used to simulate firearm disassembly.

ℹ Some parts can contain other parts, forming a tree structure – all components must be in full working condition before the firearm will operate. If any part is missing or broken, the firearm (if you reassemble it) will be "broken" and will not fire.

ℹ Parts can be swapped between firearms of the same style.

Condition

This mod completely replaces the existing system that handles condition for firearms.

Vanilla

A firearm has a chance to lose condition every time you shoot. When this happens, the condition of the gun goes down. The gun can be repaired using another one of the same type of gun.

With this mod

Firearms retain their original chance to lose condition every time you shoot, but when this happens, we instead check to see if each part inside the gun should lose condition. Different parts lose condition at different rates. The gun itself will display the condition of its most damaged component.

Compatibility with other mods

This mod should be compatible with most other mods that introduce new firearms or change how they work.

Support has to be added manually for every mod. This is a work in progress.

Most guns supported

✅ Firearms B41
✅ VANILLA FIREARMS EXPANSION (B41.65)

Some guns supported

✅ Arsenal(26) GunFighter
✅ Brita’s Weapon Pack

This mod is designed to be extensible so that it can be used with custom firearms without much effort.

If you are a player and you want to disassemble custom firearms, then either:

  • use one of the included compatibility patches,
  • ask the other author to include support for this mod,
  • or submit a pull request to add a compatibility patch

If you are a developer and you want to add support for this feature in your mod, refer to my example mod coavinssupport1 which shows how to add compatibility with custom firearms.

⚠ By default, only vanilla firearms can be disassembled – if a mod is not explicitly supported, its custom firearms will use the normal repair feature and can not be disassembled.

Included Mods

These are the mods provided by this Steam workshop item.

coavinsfirearms

This is the main mod, and must be enabled. Supports all of the firearms present in the base game.

coavinssupport1

Compatibility patch for "Firearms B41"
https://steamcommunity.com/sharedfiles/filedetails/?id=2256623447
Supports most of the custom guns in this mod, except for a small handful (the M60, etc.)
The "Gun Toolkit" items are used to repair components instead of the guns themselves.

coavinssupport2

Compatibility patch for "Arsenal(26) GunFighter"
https://steamcommunity.com/sharedfiles/filedetails/?id=2297098490
Adds support for some of the custom guns in this mod. Should also work for "Brita’s Weapons".

coavinssupport3

Compatibility patch for "VANILLA FIREARMS EXPANSION"
https://steamcommunity.com/sharedfiles/filedetails/?id=2667899942
Adds support for most of the custom guns in this mod, only missing a few (SKS, Tec9, W1866, etc.)
The "Gun Cleaning Kit" and "FireKlean" items are used to repair components instead of the guns themselves.
The "FireKlean" item is overridden to increase the number of uses to 4.

Roadmap

Ideas for future development:

  • Add support for more guns
  • Improve realism by adding more parts and models
  • Parts get dirty, affect chance to jam, have to be cleaned
  • Add cleaning products like solvents and brushes
  • Add alternative parts that can be swapped in to affect firearm stats

Contribute

✔ Pull requests are encouraged! Please submit your translations, bug fixes, and new features.

🌎 Code is available on Github: https://github.com/coavins/zomboid-coavins-firearms

ℹ You are free to make changes to my code for your own use.

⛔ Please don’t reupload this mod to the Steam workshop, either on its own or as part of a public mod pack. This item is not authorized for posting on Steam, except under the Steam account named Yuki.

[ko-fi.com]

[liberapay.com]

Workshop ID: 2847408431
Mod ID: coavinsfirearms
Mod ID: coavinssupport1
Mod ID: coavinssupport2
Mod ID: coavinssupport3

Download
Revisions:

Old revisions of this mod are available below. Click the link to download.