Skip to content

Contribution Guidelines

Cephei edited this page Mar 30, 2015 · 4 revisions

General

  • All modules must be compatible with the A3G Framework.
  • All modules must be capable of being used standalone.
  • All modules must be self-contained, meaning that no module must require another module to work. They must work 100% modular.

Coding Style

It is generally a good idea to keep a consistent coding style for any larger project.

  • Tab length: 2 Spaces (use actual spaces, not tabs).
  • Open the scope { on the same line.
  • Example:
if !(player diarySubjectExists "A3GFramework") then {
  player createDiarySubject ["A3GFramework", "A3G Framework"];
};

Required Files and Features

  • README.md in module root folder, this file should explain what the module does and how to use it and also how to install it if you are not using the framework.
  • module.hpp to register the module with the framework in module root folder.
  • All scripting files should be encapsulated in functions. All functions should reside in a functions folder. The only files in the module root directory should be the ones that you need to #include.

Naming Convention

  • All mission related config classes, ie. Functions, must be in files that reflect the class they should be in. If you need to add functions, put them in a cfgFunctions.hpp file. This does not mean your cfgFunctions.hpp file should contain the class class Functions {}. There's more than one module.
  • The settings file should be called settings.hpp.
  • All variables and functions should follow the naming convention: ModuleName_[fnc/var]_Name. Example: AGMDefault_fnc_Medical or AntiLoot_var_Mode

Clone this wiki locally