# About Compiler Configurations

Compiler configurations are required to use script compilers and nodebuilders from the editor.
Compiler configurations are loaded from *.cfg files placed in the "Compilers" directory or it's subdirectories.

## Script compiler configurations:

Typical script compiler configuration consists from a single block:

### "Compilers" block:

Defines what files a compiler uses. The setting named "program" defines what .exe to run. The "interface" setting defines what interal interface to use for processing and error feedback (currenttly the only valid value is "AccCompiler"). All others are the required files (the setting names do not matter).

Example:

    compilers
    {
    	zdoom_acc
    	{
    		interface = "AccCompiler";
    		program = "acc.exe";
    		zcommon = "zcommon.acs";
    		zdefs = "zdefs.acs";
    		zspecial = "zspecial.acs";
    		zwvars = "zwvars.acs";
    	}
    }

## Nodebuilder configurations:

Typical nodebuilder configuration consists from two blocks:

### "Compilers" block:

Defines what files a compiler uses.
The setting named "program" defines what .exe to run.
The "interface" setting defines what interal interface to use for processing and error feedback (currenttly the only valid value is "NodesCompiler").

Example:

    compilers
    {
    	zdbsp
    	{
    		interface = "NodesCompiler";
    		program = "zdbsp.exe";
    	}
    }

### "Nodebuilders" block:

Defines various presets for the nodebuilder defined in "compilers" block (you can then pick which ones of these to use in the Game Configurations Window). NOTE: Nodebuilder configuration key names defined here must be unique for all nodebuilders! It's recommended to start the key name with the name of the compiler, followed by underscore and a specific name. The "compiler" setting must refer to an existing compiler, but it does not have to be a compiler defined in the same configuration file.
"parameters" setting supports the following wildcards:

- "%FI" - input file path.
- "%FO" - output file path.

Example:

    nodebuilders
    {
    	zdbsp_normal
    	{
    		title = "ZDBSP - Normal (no reject)"; // name to display in the Game Configurations Window
    		compiler = "zdbsp"; // must match a nodebuilder block name defined in a "compiler" block
    		parameters = "-c -o%FO %FI"; // command line parameters
    	}
    }