build.txt - tModLoader/tModLoader GitHub Wiki


This Guide has been updated to 1.4. If you need to view the old 1.3 version of this wiki page, click here


About

You can create a build.txt file in the top level of your mod's source directory to give it build properties. These properties are used during the building process of your mod and include information about the mod. Properties in this file may remind you of .ini files, where every key has a name and value, delimited by an equals (=) sign.

property = value
otherProperty = value1, value2, value3

Note: Capitalization matters in this file! Bad capitalization will lead to errors during the build process.

White spaces do not matter. However, each property must be on its own line, list items must be separated by commas, and property names must be on the left side of the equals sign.

Available properties

Property Description Default
displayName The name used when the mod is displayed
author The author used when the mod is displayed
version The version used when the mod is displayed.
Must be 2 to 4 numbers separated by periods.
The value must be in the following format: <major>.<minor>.<build>.<revision> (e.g. 1.2.3.4)
dllReferences A list of dll references the mod has aside from the dlls of other mods.
Name references by their file name without the extension.
You must place the dll files in a lib/ folder in the top level of your mod source.
modReferences A list of other mods that the mod depends on.
Name mods by their file name without the extension. See Expert Cross Mod Content to learn how to properly use this.
weakReferences A list of mods that the mod will build against and can natively interact with, but don't necessarily have to be enabled. Basically optional modReferences, but require the modder to be a little more careful in programming to avoid binding errors. See Expert Cross Mod Content to learn how to properly use this.
noCompile Whether the mod should compile source code when being built or use a .dll file pre-compiled by the mod maker. By default this will be false if you do not include this property. The precompiled dll file must be named "ModName.dll", where ModName is your mod's name. false
homepage A link to the home website of the mod. This will be listed alongside the steam workshop page in the More Info menu.
hideCode If true, the unpacked mod that results from using the extract mod option will not include .dll files (compiled code), .pdb files (help with error messages) or .xml files (documentation). These files are essential to allowing cross-mod functionality so this option shouldn't be true if you intend to allow mods to properly interop with your mod. false
hideResources If true, the unpacked mod that results from using the extract mod option will not include resource files, such as .png files and .wav files. Use this if you would like to have your sounds and images freely available to other modders to view. If you use includeSource, this will also include those .cs files. false
includeSource If true, the unpacked mod that results from using the extract mod option will include .cs files, provided hideResources is still false. Use this if you would like to share your code freely. If you are truly interested in community support for your mod, consider using GitHub to allow others to contribute code to your mod. false
buildIgnore A list of file patterns to ignore during the build and packaging processes. To exclude a single file, simply write the filename: Template.psd, Items/TestItem.cs. To exclude a folder, write FolderName/*. build.txt, files and folders beginning with ., bin/*, obj/*, and Thumbs.db are excluded by default. If includeSource is false, .csproj, .cs, and .sln files will also be excluded.
side The ModSide that controls how this mod is synced between client and server. See ModSide for more information. Both
sortAfter A list of other mods that this mod will be forced to load after. The last mod in the list alphabetically is the one this mod will be loaded after.
Only affects loading if this mod would normally be loaded before those other mods.
Automatically happens with mods listed in the modReferences list.
Name mods by their file name without the extension.
sortBefore A list of other mods that this mod will be forced to load before. This property can be considered the opposite of the sortAfter property.
Name mods by their file name without the extension.
playableOnPreview If false, the mod will refuse to load on a preview version of tModLoader if loaded from the workshop. This can be used for mods that want to avoid bug reports from preview users or want to publish to preview without spoiling new content. Most mods shouldn't need to use this. true
translationMod If true, this mod will be treated as a mod providing translations for another mod. The mods listed in modReferences are the mods this mod translates. The Contributing Localization wiki page explains this in more depth. Translation mods will have their localization files automatically updated with localization entries from the translated mod when they are loaded together, enabling translation mod authors to easily update translations to the latest update. This will also cause a special icon to be shown in the Mods menu and adds a custom workshop tag to allow users to more easily find translation mods. false
⚠️ **GitHub.com Fallback** ⚠️