Skip to content

Addon Structure

LengthenedGradient edited this page Apr 9, 2024 · 20 revisions

We suggest you familiarize yourself with the structure of the addon here, as it will help you in the guides.


ACF-3\

image

  • lua contains the main logic (code) of the addon. (We will focus on this).
  • materials, models, particles, sounds contains the resources the addon uses (e.g. wav/mp3 files for sounds, vtf files for component models, etc.)
  • You shouldn't need to modify .github and the rest of the files at this level.

ACF-3\lua\

image

  • acf contains much of the logic that the addon uses overall (e.g. ballistics/damage)
  • effects contains the code for many of the particles ACF uses.
  • entities contains the code for ACF's entities.
  • vgui contains code for ACF's Temporal Panels. These are used for generating the ACF menu.
  • weapons contains code for ACF's in game tools.
  • tests contains automated tests that can be ran to verify ACF functions as intended.
  • starfall contains the definitions of various starfall functions ACF provides.
  • autorun, includes contain code used to load the addon. You shouldn't need to modify this.

ACF-3\lua\acf\

image

  • ballistics contains code relevant to simulating the trajectory of projectiles as well as their impacts.
  • compatibility contains code to aid in backwards compatibility (making sure old builds still work).
  • contraption contains helper functions for dealing with contraptions
  • core contains the definitions of ACF's class system, which is used for defining things like ammo types, guidance types etc.
  • damage contains code relevant to handling how damage should be applied to entities
  • entities contains the class definitions for various entities (e.g. gearbox types for the gearbox entity)
  • menu contains helper functions for dealing with the menu
  • persisted_vars contains code about variables that should be saved between servers/server restarts

Just an extra bit, but ACF-3\lua\entities\gmod_wire_expression2 contains the definitions of various e2 functions ACF provides.

Clone this wiki locally