DawnLibExperimental

v1.0.9·Updated 2026-09-22

An experimental release of DawnLib, the modern API for Lethal Company content and all sizes of mods [V81]

About this mod Author’s original text

DawnLib

(was CodeRebirthLib)

DawnLib is a modern API for Lethal Company content and all sizes of mods. It contains:

  • DawnLib API
  • Moons
  • Interiors
  • Weathers
  • Terminal Commands
  • FootstepSurfaces (With gravity control)
  • Enemies
  • Items
  • Map Objects (Inside and Outside hazards)
  • Unlockables (Ship Upgrades and Furniture)
  • Additional Tile Sets (injecting more tilesets to interiors)
  • Dead Bodies
  • Round Loading Steps
  • DuskMod API
  • Ship Creation (In-progress)
  • Achievements
  • Entity Replacements (Enemy, Item, Unlockable and MapObject skin replacements)
  • Vehicles (Highly experimental)
  • Some extra utilities
  • SmartAgentNavigator (completely intelligent NavMeshAgent navigator that uses PathfindingLib to performanently be able to use entrance teleports and fire exits reliably).
  • NetworkAudioSource
  • And more!

DawnLib also categorises (almost) everything in the game with keys, allowing for easy references to existing vanilla content.

If you'd like to support in the development of DawnLib, please consider reaching out to @xuxiaolan on discord, whether through the modding discord, github, or just

pinging on the lethal modding discord, we accept any sort of help, UI, Coders, Artists, etc.

NOTE: Enemies/Items/etc managed through DawnLib are likely _unsupported_ by mods like CentralConfig or LethalQuantities.

This is because of the way DawnLib supports dynamically updating weights and therefore cannot be fixed from DawnLib.

For this, DawnLib has collaborated with the creator @Crafty that made the mod LunarConfig which does super similar functionality and gives the user a lot of control!

DawnLib (All C#)

DawnLib is a hands-off way to register your content. The code to switch from LethalLib to DawnLib is very similar and will require minimal refactoring.

Most registration methods are under the DawnLib static class. When calling DefineXXX you are provided with a builder method that

explains most settings that you can configure.

Example:

public static class MeltdownKeys {

public static readonly NamespacedKey GeigerCounter = NamespacedKey.From("facility_meltdown", "geiger_counter");

}

// In your plugin

DawnLib.DefineItem(MeltdownKeys.GeigerCounter, assets.geigerCounterItemDef, builder => builder.DefineShop(shopBuilder => shopBuilder.OverrideCost(90).OverrideInfoNode(assets.geigerCounterNode)

)

);

LethalContent is an easy way to reference vanilla/modded content:

EnemyType blobEnemyType = LethalContent.Enemies[EnemyKeys.Blob].EnemyType;

It should be noted that the vanilla references will not be in the registry until a while after the lobby is created.

In order to make sure everything is ready, you can listen to a registry's "freeze" event.

OnFreeze will only run once _ever_ (even between lobby reloads)

LethalContent.Enemies.OnFreezeWithContext += (NamespacedKeyResolver resolver) =>

{

// All vanilla content is in and no more modded content can be added.

};

if (LethalContent.Enemies.IsFrozen)

{ // or check that the registry has already been frozen

//...

}

PersistentDataContainer

PersistentDataContainer is an alternative to ES3. You can easily access save data with the.GetPersistentDataContainer() extension method,.GetCurrentContract() or.GetCurrentSave()

void Awake() { // Plugin awake

PersistentDataContainer myContainer = this.GetPersistentDataContainer(); // use this however you want, note that 'this' is required to use the extension method in the Awake function.

// these only return null when not in-game. these also automatically handle resetting the save

PersistentDataContainer? contract = DawnLib.GetCurrentContract(); // resets on: getting fired and save deletion.

PersistentDataContainer? save = DawnLib.GetCurrentSave(); // resets on: ONLY save deletion.

}

Note: If you are going to make a large edit (calling.Set,.GetOrSet, etc multiple times) you should wrap it with using(container.CreateEditContext()). This delays saving data to the disk until all your edits have been compl

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.

Dependencies

Install these first, or the mod will not work:

Evaisa-FixPluginTypesSerializationZaggy1024-PathfindingLibHamunii-AutoHookGenPatchermattymatty-MonkeyInjectionLibraryBepInEx-BepInExPack

File & checksum

Filename
DawnLibExperimental-1.0.9.zip
File size
951.2 KiB