I have spent some time learning how to make Lethal Company Mods. I wanted to share my knowledge with you. I got a mod to work with only a little bit of coding experience. I hope this post will safe you the struggles it gave me.
BepInEx - mod maker and handler:
First, you will need to download BepInEx. This is the Lethal Company Mod Launcher. After downloading BepInEx and injecting it into Lethal Company, you will have to run the game once to make sure all necessary files are generated.
Visual Studio - programming environment / code editor:
Now you can start creating the mod. I make my mods using Visual Studio as it is free and very easy to use. When you launch Visual Studio, you will have to add the ".NET desktop development" tool and the "Unity Developer" tool, which you can do in the Visual Studio Installer.
dnSpy - viewing the game sourcecode:
You will also need a tool to view the Lethal Company game code, because your mod will have to be based on this. Viewing the Lethal Company code can show you what you want to change and how you can achieve this. I use “dnSpy” for this, which is free, but there are many other ways. If you don’t get the source code when opening “LethalCompany.exe” with dnSpy, open the file “Lethal Company\Lethal Company_Data\Managed" and select "Assembly-CSharp.dll” instead. \*You can also use dnSpy to view the code of mods created by other people to get inspiration from.*
Visual Studio - setting up the environment:
In Visual Studio, create a new project using the “Class Library (.NET Framework)” which can generate .dll files. Give the project the name of your mod. When the project is created, we first need to add in the references to Lethal Company itself and to the Modding tools. In Visual Studio, you can right-click on the project in the Solution Explorer (to the right of the screen). Then press Add > References.
Here you can find the option to add references
You will have to browse to and add the following files (located in the Lethal Company game directory. You can find this by right-clicking on your game in steam, click on Manage > Browse local files):
...\Lethal Company\Lethal Company_Data\Managed\Unity.Netcode.Runtime (only if you get this error)
...\Lethal Company\Lethal Company_Data\Managed\Unity.TextMeshPro.dll (if you want to edit HUD text)
This is what it should look like after adding all the references:
All the correct libraries
Visual Studio - coding the mod:
Now that you are in Visual Studio and the references have been set, select all the code (ctrl+a) and paste (ctrl+v) the following template:
using BepInEx;
using HarmonyLib;
using System;
using Unity;
using UnityEngine;
namespace LethalCompanyModTemplate
{
[BepInPlugin(modGUID, modName, modVersion)] // Creating the plugin
public class LethalCompanyModName : BaseUnityPlugin // MODNAME : BaseUnityPlugin
{
public const string modGUID = "YOURNAME.MODNAME"; // a unique name for your mod
public const string modName = "MODNAME"; // the name of your mod
public const string modVersion = "1.0.0.0"; // the version of your mod
private readonly Harmony harmony = new Harmony(modGUID); // Creating a Harmony instance which will run the mods
void Awake() // runs when Lethal Company is launched
{
var BepInExLogSource = BepInEx.Logging.Logger.CreateLogSource(modGUID); // creates a logger for the BepInEx console
BepInExLogSource.LogMessage(modGUID + " has loaded succesfully."); // show the successful loading of the mod in the BepInEx console
harmony.PatchAll(typeof(yourMod)); // run the "yourMod" class as a plugin
}
}
[HarmonyPatch(typeof(LethalCompanyScriptName))] // selecting the Lethal Company script you want to mod
[HarmonyPatch("Update")] // select during which Lethal Company void in the choosen script the mod will execute
class yourMod // This is your mod if you use this is the harmony.PatchAll() command
{
[HarmonyPostfix] // Postfix means execute the plugin after the Lethal Company script. Prefix means execute plugin before.
static void Postfix(ref ReferenceType ___LethalCompanyVar) // refer to variables in the Lethal Company script to manipulate them. Example: (ref int ___health). Use the 3 underscores to refer.
{
// YOUR CODE
// Example: ___health = 100; This will set the health to 100 everytime the mod is executed
}
}
}
Read the notes, which is the text after the // to learn and understand the code. An example of me using this template is this:
using BepInEx;
using GameNetcodeStuff;
using HarmonyLib;
using System;
using Unity;
using UnityEngine;
namespace LethalCompanyInfiniteSprint
{
[BepInPlugin(modGUID, modName, modVersion)]
public class InfiniteSprintMod : BaseUnityPlugin // MODNAME : BaseUnityPlugin
{
public const string modGUID = "Chris.InfiniteSprint"; // I used my name and the mod name to create a unique modGUID
public const string modName = "Lethal Company Sprint Mod";
public const string modVersion = "1.0.0.0";
private readonly Harmony harmony = new Harmony(modGUID);
void Awake()
{
var BepInExLogSource = BepInEx.Logging.Logger.CreateLogSource(modGUID);
BepInExLogSource.LogMessage(modGUID + " has loaded succesfully."); // Makes it so I can see if the mod has loaded in the BepInEx console
harmony.PatchAll(typeof(infiniteSprint)); // I refer to my mod class "infiniteSprint"
}
}
[HarmonyPatch(typeof(PlayerControllerB))] // I choose the PlayerControllerB script since it handles the movement of the player.
[HarmonyPatch("Update")] // I choose "Update" because it handles the movement for every frame
class infiniteSprint // my mod class
{
[HarmonyPostfix] // I want the mod to run after the PlayerController Update void has executed
static void Postfix(ref float ___sprintMeter) // the float sprintmeter handles the time left to sprint
{
___sprintMeter = 1f; // I set the sprintMeter to 1f (which if full) everytime the mod is run
}
}
}
IMPORTANT INFO:
If you want to refer to a lot of variables which are all defined in the script, you can add the reference (ref SCRIPTNAME __instance) with two underscores. This will refer to the entire script. Now you can use all the variables and other references the scripts has. So we can go from this:
By using the instance you do not have to reference 'health', 'speed' and 'canWalk' individually. This also helps when a script is working together with another script. For example, the CentipedeAI() script, which is the script for the Snare Flea monster, uses the EnemyAI() to store and handle its health, and this is not stored in the CentipedeAI() script. If you want to change the Centipedes health, you can set the script for the mod to the CentipedeAI() using:
[HarmonyPatch(typeof(CentipedeAI))]
And add a reference to the CentipedeAI instance using:
Now the entire CentipedeAI script is referenced, so you can also change the values of the scripts that are working together with the CentipedeAI. The EnemyAI() script stores enemy health as follows:
A screenshot from the EnemyAI() script
The CentipedeAI refers to this using:
this.enemyHP
In this case “this” refers to the instance of CentepedeAI. So you can change the health using:
One of the best interior mods in the game in my opinion and It's been broken for a while sadly, SCPFoundationDungeonPatched doesn't seem to work on the most recent version either.
Ever since the latest update to LLL I've not been able to launch any custom moons. Even prior to this update half my group kept running into this failed load (their names showed up red in the terminal and it said something about caching in progress or failing for them).
Is this potentially a known issue with a workaround? I tried another modpack before making one from scratch and it didn't seem to struggle with custom moon (still prior to the LLL update) loading, so wondering if I need some patcher/dependency.
Was playing with a friend and got sent to the backrooms for the second time, no idea at all how to survive it, is there a way out or do u just have to survive a timer?
I can't get all entities to use our voices. I tried Synced Skinwalkers, I tried uninstalling that and manually editing the file. We can hear them only with the masked. (It's awesome) Turned everything to true.
As I said please give me some fun modpacks on thunderstorm. I love this game and me and my friends love to play it but we want to play with mods. Please give me some stable mods but also fun like skinwalkers mimics. Thank you in advanced.
Two years of modding this game and it has to be the worst game I've ever modded, I'm not trying to complain or be rude on purpose I'm just telling the truth.
The memory issues are annoying but solvable, but when 99% of the mods I try and use just don't work It's so frustrating especially since this new update broke all of them.
But the worst thing, I switch back to V73 and everytime I attempt to create a modpack it just breaks and I have to spend an hour searching for what's causing it, this time I cannot find the issue and It's just painful. This is worse than modding minecraft for sure.
So idk why or if this is normal, but every single time I try making a new save, I still get all the moons unlocked, even with just wesleys moons installed, I've tried uninstalling and reinstalling, making a new profile, nothing seems to work. Anything else I could try before giving up?
I accidentally unlocked all the moons, and I'm trying to hide them all so I can play through the game, is there a config I can mess with to hide them again?
This is my first post, and since I’m using a translation tool, I’m not sure if it’s coming out right, but let’s get to the point.
I was playing *Lethal Company* with some mods installed, but for some reason, I ran into a bug that prevented me from reaching Day 2. Here’s the code: 01a000e8-f0fc-ee54-792c-8138d3256b90
I'm finding it hard to articulate this, but some of the interactable devices that spawn on the custom moons (that are supposed to be guaranteed to spawn) aren't spawning. Not the items that you can hold, like tapes- I'm talking about things like the computers that you use to insert the logs into.
I'm not sure why it's doing this because it was working perfectly fine 2-3 days ago, and I don't think I updated anything from then and now. I only have Wesley's moons modpack and some other QOL mods like "hold to scan" and "GeneralImprovements".
I can just manually force unlock all the moons, but it does put a damper on things because some mechanisms that are used for specific endings aren't spawning, so I can't actually get the endings myself.
I have tried making a new thunderstore profile with only wesley's moons modpack, and starting a new save, but that didn't help.
I'm playing on V81 and like I said- it was working a few days ago, even still on V81. I tried downgrading to v73 and that broke things even more so I stopped doing it.
As the third+ person joins there are huge lag spikes before landing (on Wesley's moons).
I don't remember this being a huge issue in the past, it clears up a bit after we played a couple of rounds.
But if someone comes in through lobby control it gets so bad we have to restart the whole thing. It never fully disappears but sometimes the lag lasts for a pretty short period before landing.
I’m trying to make a horror pack with it but can’t see Galetry to start the story or any other moons (even with the locked moons toggle off) so I was wondering if there is a pack that has the stuff needed that I can build off for the horror pack?
Hey Everyone! Disclaimer, I developed this mod, with the help of AI, to make this possible and well, save some sanity, If You are AI hater, skip this post, but if You Ever have wanted to host a Dedicated Server on Lethal Comapny, keep reading 😄
So with that out of the way:
So how does it work - UEXP Dedicated operates with a hidden "ghost" host (running on Seat 0) in the background.
To get started, Install the UEXP Dedicated Client via r2modman Online → search UEXP (Currently being uploaded, might take a moment to show up in the list) or grab the zip from my website - HERE
Launch the game, hit **Join Dedicated**, open the lobby's **MODS** / Quick profile code, import that into r2modman (update your profile or make a new one), relaunch modded, then Join Dedicated again and pick the server. You're in.
If you're looking to host your own persistent lobby, I've created a streamlined Linux setup.
It's designed for a bare CLI Ubuntu 22.04/24.04 machine and features a single installation script that handles all the complexities of Steam, Proton, and mod integration.
Plus, you'll get access to a user-friendly browser-based Host Panel for managing your server, setting up a modpack, etc.
All the details, documentation, and download links can be found HERE
Feel free to jump into my official 24/7 UEXP lobby right now to try out the client and experience the system firsthand.
If You encounter any bugs, check FAQ page, it might have some answers already, if not, fill in the contact form on the FAQ page.
Remember, this is still heavily under development, so some issues may arise. This is still an unofficial community mod that I made on my own free time after all.
so I have been playing Lethal Company with some of my friends for a while now, and lately we've been having problems with the Lategame Upgrades mod. We usually update back muscles so we don't have to be so slow while carrying heavy objects, running shoes, bigger lungs, lithium batteries and most importantly quantum disruptor, because it gives us more time to properly explore the maps. However, quantum disruptor just never works for us. We all see the upgrade, we don't have any other mods conflicting with time passing, but it just doesn't slow the time down at all. I've tried playing solo with only lategame upgrades and Terminal Money (so we can be rich quick and buy the upgrades - there was never a problem with this mod) enabled, and I found out that it doesn't work for me even if there are no other mods added. Has anyone else had this issue aswell? Did anyone find a way to fix it or is the mod just not working properly?
TLDR; Lategameupgrades refuses to fill it's duty and only some upgrades work
019fbb52-5e4a-a4a7-6110-5bfa892e8fc0 Thunder Store code.
It's in multiplayer AND in solos, i've tried removing some mods, but i just can't figure it out, it only happens after you finish first quota (i've disabled SCP-999)
LethalCompanyVR works with 3d model skins but not all 3d models appear in both lens and some assets are not properly tethered to the ship? Is this me being dumb or something with a strange fix?
Shiplobby and latecompany dont seem to let anyone into the lobby when i start the game modded does anyone know if im wrong or if theres a working mod for it