A generic project template for The Long Dark mods.
The main goal of this project is to make it as easy and smooth as possible to get into modding for TLD by automatically configuring a number of settings and parameters required to start. In addition, it provides tools for new and existing modders to help development and testing.
See CHANGELOG.md for notable changes between versions.
- Build extensions from TLDBuildExtensions
- Auto-detection of the TLD install directory.
- Automatic configuration of reference paths and references for the project.
- Custom targets for the build process:
- Build AssetBundle files build
- Zip the ModComponent directory
- Copy mod DLL and ModComponent files to the TLD Mods for faster debugging and tests
- Custom run target for Visual Studio to start the game directly from the IDE.
- Comes with the configured Unity project ModComponent_TemplateProject made by @ds5678.
- Directory structure for ModComponent files in
Distributable
- Comes with a starting implementation and an example ModSettings file.
- Preconfigured
.gitignore
files for Unity and Visual Studio. - Git LFS tracking:
- Textures:
.jpg
,.png
,.bmp
- 3D Models:
.fbx
,.blend
- Unity:
.unity3d
- ModComponent:
.zip
,.modcomponent
- Textures:
The Long Dark must be installed (Epic or Steam) as well as MelonLoader.
Depending on what your mod is about, you will also need:
- Visual Studio (or Jetbrains Rider) for mods which need to patch game functions
- Unity Editor for creating models and textures for custom items
- A simple text editor for tweaking loot tables or adding blueprints
To start creating a new mod:
- Download the latest release and unzip somewhere, fork the project or click on 'Use this template' on GitHub.
- Remove unnecessary files and folders for your mod
ModComponent
folder if you do not need custom items. If you plan to use Visual Studio, remove the project from there first before deleting the folder.ModComponent\Unity
folder if you do not plan on adding custom prefabsModComponent\Distributable
folder if you do not plan on adding items, blueprints, or tweaking loot tables.
Code
folder if you do not need custom game code. If you plan to use Visual Studio, remove the project from there first before deleting the folder.
- Open
TLDModTemplate.sln
in Visual Studio. Reference paths and assemblies references should be found automatically. If not found, check Customization. - Rename the solution and restart Visual Studio. Update the values in
BuildInfo.cs
. - Check Usage for more information on using and customizing this template.
- [Optional but recommended] Initialize a git repository and publish on GitHub. See GitHub - Get started.
Additional resources:
- TLD Modding discord
- ModComponent documentation for creating custom items.
- ModComponent tutorial by @stmSantana.
- MelonLoader wiki for help in patching game functions.
Check out TLDBuildExtensions for build extensions.
To customize project parameters such as the path to the TLD directory or the
path to the Unity Editor, set values in the Directory.Build.props
file.
See TLDBuildExtensions#customization for more information.
See Unity README.
@ds5678 for the ModComponent_TemplateProject and the Mod development tutorial.
All modders and members of the TLD Modding Discord.
Hinterland for a great game.