-
Notifications
You must be signed in to change notification settings - Fork 0
Content Builder
Kamil "Enderek0" K edited this page Sep 7, 2025
·
2 revisions
This tool is used to automatically build a certain (user-defined) filestructure of your sourcemod (but also pretty much everything else that could use this).
- config - Path to the config file used to specify the tree structure.
-
-h,--help- Show this help message and exit -
-v,--verbose- Specify if the program should print out more information. -
-y,--yes- Skip the confirmation dialog and immediately proceed to copy the files. -
-nl,--nolog- Don't create log files. -
-dr,--dryrun- Perform a dry run - don't actually copy the files, only print out the filestructure. -
-nt,--notree- Skip performing the file tree calculations. Saves memory and time if you are certain the config is correct, as this won't show you the filestructure before exporting.--yesautomatically sets this to true. -
-wd WD,--working_dir WD- Override the working directory of the program (or set it, if it's not in the config). -
-t THREADS,--threads THREADS- Maximum amount of threads this program can use. Default value is half of available threads.
This is a configuration file for the script. It defines what to export, what to not export, how to export, etc. Keys and values are case-insensitive, except for Paths, which are case-sensitive on Linux. The structure is as follows
filemanifest.json
"Config name" { // Set by the user, can be custom
<base_options> // Base configuration options, see the "Base Functionality" page for more info
"Export Dir" "export_out/"
"Export" {
<export_block> // See down below
}
}
- Directory where the program will export to.
- Relative to the working directory of course.
- Unless skip dialog is specified, a confirmation dialog will appear just before exporting, printing some of the filestructure to confirm it is what you want.
- This is a list of
<export_block>s (explained below). - These blocks have an order! Meaning that they will get exported one by one, not all merged together.
- The order is from top to bottom.
- You can use that order for example to override specific files, for example gameinfo.txt which may be need to be different in the released build.
This is the actual block that contains most of the export information. Some paramaters are optional, but to some degree (explained below).
{
"Relative Path" "game/"
"Path" "game/mymod"
"Export all" true
"Blacklist" {
"file" "blacklisted_file.extension"
"file" "README.md"
"dir" "somefolder"
"regex" "*.vmx"
}
"Whitelist": {
"file" "README.md"
}
}
For the sake of explanation let's assume our mod filestructure is:
MyMod
├───deploy
│ ├───Build
│ └───buildscript
└───game
├───mymod
└───other_stuff
└───portal2_assets
- This specifies the directory which will be exported.
- The path itself is relative to working directory.
- This specifies how to relate the
export dirtopath. - This path itself is relative to working directory.
- Given the example above, after the export the
mymodfolder will be copied over toBuild, like so:
- Given the example above, after the export the
MyMod
├───deploy
│ ├───Build
| | └───mymod <===== HERE
│ └───buildscript
└───game <== Relative to
├───mymod
└───other_stuff
└───portal2_assets
- If the
pathwould begame/other_stuff, then
MyMod
├───deploy
│ ├───Build
| | └───other_stuff <=== HERE
| | └───portal2_assets
│ └───buildscript
└───game <== Relative to
├───mymod
└───other_stuff
└───portal2_assets
- If
pathisgame/other_stuffandrelative pathisgame/other_stuff
MyMod
├───deploy
│ ├───Build
| | └───portal2_assets <=== HERE
│ └───buildscript
└───game
├───mymod
└───other_stuff <== Relative to
└───portal2_assets
- Makes the program detect ALL of the files in
path(recursively). - Optional (defaults to True)
- Accepted values and their translations (case insensitive):
- '0': False,
- 'no': False,
- 'false': False,
- 'n': False,
- 'f': False,
- '1': True,
- 'yes': True,
- 'true': True,
- 'y': True,
- 't': True,
- Specifies files that need to be exported.
- Supports 3 targets (check below).
- If
Export Allis set tofalseand whitelist is not specified, an error will occur (the program won't know what files to include)
- Specifies files that won't be included in the export.
- Supports 3 targets (check below).
As a tip, check the export block structure above.
"file" "filepath"
- This targets specific files. The path of the file is resolved as:
{workingdir}/{path}/<filepath>, where:-
{workingdir}is the working directory -
{path}is thepathparameter specified in this export block -
<filepath>is the actual path in thefilekeyvalue
-
"dir": "directory"
- This targets folders and the subfolders of this folder. The path is resolved the same as in the file target explained above.
- As seen above you can also target folders within folders, given the example above the program will completely omit
tempandsomefolder
- As seen above you can also target folders within folders, given the example above the program will completely omit
"regex" "*.vmx"
"regex" "something/**/*.jpg"
- This targets files matching the specified regular expression. A simple usage is to target filetypes:
*.filetype.
If you have any questions about this program, you can always open an issue.