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.

For example, most pistols are currently matched to GenericPistol which means they all share the same slides and barrels. To improve accuracy and realism, you could create a model called BerettaM9 which matches only to the Beretta M9 and nothing else. This model might reuse existing generic pistol parts (like PistolSlide) or it might use new exclusive parts (e.g. BerettaM9Slide). Ideally, every firearm would be perfectly simulated with its own unique model, but we will have to settle for "close enough."

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