Skip to content
/ TLDModTemplate Public template

A generic project template for The Long Dark mods.

License

Notifications You must be signed in to change notification settings

Kardyne/TLDModTemplate

Repository files navigation

The Long Dark Mod Template

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.

Main features

Prerequisites

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

Quick start

New mod

To start creating a new mod:

  1. Download the latest release and unzip somewhere, fork the project or click on 'Use this template' on GitHub.
  2. 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 prefabs
      • ModComponent\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.
  3. Open TLDModTemplate.sln in Visual Studio. Reference paths and assemblies references should be found automatically. If not found, check Customization.
  4. Rename the solution and restart Visual Studio. Update the values in BuildInfo.cs.
  5. Check Usage for more information on using and customizing this template.
  6. [Optional but recommended] Initialize a git repository and publish on GitHub. See GitHub - Get started.

Additional resources:

Existing mod

Check out TLDBuildExtensions for build extensions.

Usage

Customization

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.

Unity

See Unity README.

Thanks

@ds5678 for the ModComponent_TemplateProject and the Mod development tutorial.

All modders and members of the TLD Modding Discord.

Hinterland for a great game.