Jump to content

Recommended Posts

configGenerator2 is a tool to aid modders in speeding up the development process of factions by automating a large portion of this process. I've written this tool because manually writing 1000s of lines of config is error prone and mind crushingly boring. With it I've created the Ukraine Border Guard faction for our NLD Units: OPFOR mod.

This tool is written in Python 3 and combines what makes and defines a faction written in YAML and puts this in a mold consisting out of a handful of jinja2 templates. After running this tool it should generate a config.cpp file that did most of the work and require some minor edits.

Please note that this tool is meant to speed up the process of generating config.cpp, not creating an error-less drop-in config.cpp. If you only need some group config, feel free to edit render.py.

I recommend using a single instance of this tool per faction. Because not all projects need all the features currently in the tool. If you need something changed, change it!


tl;dr: It creates from a bunch of files one big file so the modders have an easy time creating factions instead of churning out config.


  • An easy way to create factions
  • Easy to understand yaml configuration
  • Properly indented config file through jinja2 templates
  • Automates the creation of an otherwise dull and manually error prone config file
  • Python v3 (Works on Linux too!)
  • Texture files or class-names of your gear. This is something you have to do yourself
DownloadKnown issues
  • It isn't bug free and it never intended to be
  • cfgWeapons or cfgVehicles might have to many } on the end


  • Initial release
Credits and thanksInstallation

This program requires python v3.x to run. I've developed this on v3.4 and v3.5, anything lower should work. While I developed this using Ubuntu 14.04 LTS I am going to assume you will be editing and running this using your prefered Windows version (mine is 7).

1. Download Python v3.5+

This bit is simple, go to https://www.python.org/downloads/ and download the latest version of python v3.x

2. Install Python

When installing this, please make sure you fully in stall it and tell it to add python to your installation path.

3. Download ConfigGen2

Go to https://bitbucket.org/ligthert/configgenerator2/downloads and download/clone yourself a copy of configGenerator v2. Unzip and stash it somewhere safely.

4. Installing dependencies

  • Start cmd.exe
  • cd to where you unzipped the configgenerator2 folder
  • run pip3 install -r requirements.txt
  • and let it do its thing
5. Check your installation

Final step of the road is running:

python render.py
 This either will give you a lengthy config file ready for ArmA 3 or an error. With the latter,something went wrong. If this config, you can save it to a file by adding

> config.cpp
 at the end.


  • render.py: This file glues the yaml and jinja2 together into a single tool
  • writeConfig.py: The function definitions used by render.py to do its thing
  • faction.yaml: This file tells you what the faction looks like, what a simple soldier looks like, what the gear looks like, what flags and insignia look like and what the basic load-out is the rifleman.
  • infantry.yaml: this file tells what the different unit look like
  • infantry_backpacks.yaml: what backpacks are there and what do they look like
  • infantry_groups.yaml: Which groups are there and what do they look like


A word of warning: the yaml use 2 spaces as indenting. Do this the wrong way the tool will break.

Class names

The third line of faction.yaml says the following:

class: nldo_ua_uaf_bg

This class name shall serve as the base classname used throughout the faction to define units, backpacks, gear etc etc. Using nldo_ua_uaf_bg as an example.

A rifleman would be called:


A backpack would be for example:


Please note that bp was added to indicate that this class is a backpack.

Group classes in infantry_groups.yaml will automatically prepended:


( This is going to change in the future, since it can conflict with units)

If you look for example at the fire time:


  name: Fireteam

  rank: 2


    - tl

    - rifleman

    - mmg

    - at

This would create a group called nldo_ua_uaf_bg_team with the following team members:






Rifleman is the basic soldier. His loadout is defined in faction.yaml under items:, weapons: and magazines:. This is a list in yaml iterated through. But the rifleman isn't the only unit type, this is where infantry.yaml comes in. This tells which units there are and what they carry.

You can tell how a unit looks by defining the following:

  • name: The name of the unit
  • backpack: What the dude has on its back
  • icon: What kind of icon this user has
  • add_items: add extra items (1 per line) compared to the rifleman
  • add_weapons: add extra weapons (1 per line) compared to the rifleman
  • add_magazine: ^--- you get it
  • weapons: Tells you which weapons the unit carries
  • magazines: Tells you which magazines the unit carries
  • isMedic: is the unit a medic?
  • isEngineer: is the unit an engineer?
  • isExplosive: can he do things that go boom?
  • canHideBodies: that is some operation flashpoint shit right there...
Take a look at the infantry.yaml, it is pretty easy. It speaks for itself.


The backpack config is a bit odd do to how the config.cpp is made up:

   - 150Rnd_762x54_Box_Tracer:2
   - 30Rnd_556x45_Stanag:8
   - smokeShell:4
This creates a backpack called nldo_ua_uaf_bg_bp_ammo  and adds 2 belts for the AR, 8 stanag rounds and 4 party makers. The : is a delimiter here. Take a look at the infantry_backpacks.yaml for some more examples

Share this post

Link to post
Share on other sites

Nice to see, I'll have to test this out later :) 

  • Like 1

Share this post

Link to post
Share on other sites

I've updated the repo at bitbucket with a different and more complete faction (NLDO_UA_UAF_95, the 95th Airmobile Brigade for NLD Units: OPFOR faction). I've basically refactored the group generation to include more types of groups (Motorized, mechanized, armored, air) and the corresponding icons. Long story short: ALiVE compatible faction out of the box. :)

  • Like 2

Share this post

Link to post
Share on other sites

Nice idea, i will certainly have a look at using this :)

  • Like 1

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now