Skip to content
coavins edited this page Aug 11, 2022 · 7 revisions

A model describes a set of parts and how they fit together. Firearms can be matched to models that accurately describe their internal parts. The mod will only recognize firearms that have been matched to a model.

Models

These models are currently in the game and can be used when adding support for a new firearm. Just match the gun to the model that best represents how it's made. If there is no suitable model, you will have to make a new one (see below).

GenericPistol

  • PistolReceiver
  • PistolSlide
    • PistolBarrel

GenericRevolver

  • RevolverReceiver
  • RevolverCylinder

GenericShotgun

  • ShotgunReceiver
    • ShotgunForend
      • ShotgunBoltCarrier
      • ShotgunBolt
  • ShotgunBarrel

M16Rifle

  • M16UpperReceiver
    • M16BoltCarrier
      • M16FiringPin
      • M16Bolt
  • M16LowerReceiver

BoltActionRifle

  • BoltActionReceiver
  • BoltActionBolt

Adding models

To improve realism and accuracy, a new model sometimes needs to be created in order to better represent a firearm.

Most pistols are currently matched to GenericPistol which means they all share the same slides and barrels. A custom Glock 17 item can use the same slide and barrel as the M9 because it's close enough, but sometimes a new model is needed because a gun is too different. The TEC-9 for example is probably different enough that it should use its own model with some of its own parts. This means planning a new model that describes a realistic breakdown of the TEC-9, and creating new items that are used by the model.

Adding support for firearms

To add support for a firearm, just match it to a model as seen in CoavinsInclude.lua. If there is no suitable model already, you need to make one.

Clone this wiki locally