Lethal Company - How to write your own mod from scratch!
ฝัง
- เผยแพร่เมื่อ 24 ก.ค. 2024
- In this video we go from 0 code to having a functioning mod in lethal company, no experience needed(but is recommended). We create the project, add our references, find what we want to patch, learn how to patch it, and make a functioning infinite sprint!
Please don't hesitate to reach out if you're running into issues or have questions !
How to setup bepinex with Lethal Company: • How to setup BepInEx w...
LC Modding Wiki: github.com/LethalCompany/Leth...
Modding Discord: / discord
Unofficial LC discord with modding community: / discord
GameMaster mod if you'd like an example to look at: github.com/lawrencea13/Lethal...
Bepinex: github.com/BepInEx/BepInEx - เกม
If opening the exe file with ILSpy doesn't work, go into Lethal Company\Lethal Company_Data\Managed and select Assembly-CSharp.dll
Thanks
Underrated, TY
Love you
thought I was already stuck, very good
I love you
It took me an ENTIRE WEEK to find a tutorial that explained how to change a VARIABLE. How did it take me this long? Great tutorial!
Glad it helped!
This tutorials great for starting to mod and easy to follow, although I'm struggling to figure out how I'd change an entities model, rigging, animation, sfx, and vfx. Could you make a video showing how to entities and assets if you're able to? That would be really helpful; thanks for the tutorial.
Check out the lethal wiki on mod development?
@@edapb5574 thx
I like that you explained things simply but also gave quite a few good examples of best practices, which are essential as your files and folders grow over time
Thanks for the great vid, liked and subbed
Huge thanks for the video, it really helped me figure out the basics of modding in LC!
You don't have a clue on how hard it is to find a modding tutorial, I really appreciate tutorials like these, and I hope you can start doing more of them on more complex things like adding your own scrap or entities!
Great tutorial, used this to make a mod that lets you teleport without dropping items, keep up the good work!
i dont think its a very good idea. It makes the teleporter too OP. but you could maybe make the price higher.
@@totoch07 it's good that the mod is an option for players that want it!
It would be cool if it was an upgrade u can buy to the teleporter!
ezmode@@ethantwolfe
thanks for the tutorial! I wasn't able to find a lot of tutorials to make mods so I led myself up here. so far right now, Im still getting to hang of things and getting stuff setted up.
Thank you very much, I have experience with programming but never gave making mods a go before so I was unsure about where to start!
15:13 That "It's not important" sounded SO OMINOUS lmao
(Also fantastic video. Thank you so much!!)
Thanks for the quick and straight to the point tutorial. Helped a lot 😄
6:13 This is referred to as a "Project". A solution may have many projects within in it, but all projects belong to a solution. Great tutorial, I appreciate the help so far!
Need moar TopLevel Organizers.
I'll add this here, 9:15 those are called Attributes in C# or more generally Decorators, they serve the purpose of adding metadata to first class members of the language (classes, functions, variables and so on) so that other code and tools can use them as data to manage your code.
Also the attribute calls for a string as it's GUID so a namespace/package name like string as you did can work to avoid collisions, but the GUID in C# (or UUID elsewhere) is it's own data type, a 128bit randomly generated integer who's purpose is exactly extremely low collision chance.
It looks like this when represented as a string "6B29FC40-CA47-1067-B31D-00DD010662DA"
Really helpful tutorial. I have now uploaded my first Lethal Company mod on Thunderstore. Thank you!
THANK YOU! This has helped me mod for other games as well. I just happened to start with lethal company.
Used this to make my own mod! Always had an interest for years, but this was a perfect guide to just get something down. If possible, could you give an example of how we would implement another part of the mod that isn't used in the "Update" section - if that makes sense. I'm new to C# but not coding in general, and I'm finding this to be a really fun way to learn. Thanks for this guide!
Thank you for this. This was great introduction!
Thanks for the tutorial, really good intro to modding lethal.
Thanks for the tutorial! Can you do more about many other things like key binding, modify textures...?
Thank you, this video helped a ton with figuring out how to do some modding!
I've used Unity for a while on my own games; 23:00 LateUpdate is called every frame after every other function in Update / FixedUpdate has finished for the frame, kinda like a "last pass" kind of function
(fixedUpdate is similar to update, but runs on a set time based on whatever the unity physics simulation time was set to rather than every frame like Update does)
Oh so it sounds like "fixedUpdate" is the Unity equivalent of Godot's "physics_process". Thanks, that was useful info
This is super helpful - thanks so much!
Amazing upcoming modder bro i know your gonna be big for sure
Working on it, next mod is gonna be huge
Thanks for the video friend! So helpful!
I come from web-developing so it was pretty easy to follow along! I want to patch the spectating camera to be in first- instead of third person mode. But I am struggling to implement a more complex patch. Would you be willing to make a video showing us how to do a little more complex stuff and explain your thought process? Would be awesome! Thanks for your effort!
Absolutely, I am in the process of making a more advanced tutorial, and I will be sure to go more into depth on the though process behind it
I used this to help me get started with modding Content Warning. Thank you!
sweet thank you for posting this, im mega thankful
I'm Currently working on a big mod that basically is wanting to make advanced company available for everyone again, but I have no idea where to start.
What I would like to try and add
*The menus after selecting a file for all the customizations
*Lobby Section: Change the lobby size (4-40), can decide to keep it open, and even allow people to join when landed (Like LateCompany)
*Moons Section: Where you can change the prices, disable/enable weathers,
*Items Section: Where you can tweak scrap value, weight, tools values, Spawn Rates, Discount ranges for tools (store items will be in a separate section on the same page)
*Enemy Section: Here you can tweak and change the spawn weights, what moons they spawn on, or if they even spawn at all (maybe make it so modded monsters can be tweaked here to?)
*Day Section: Choose how long the days are, how many credits you can start with, Global Multipliers (Value, Amount, enemy power), Choose if you want longer deadlines, suit savability (choose if to enable), be able to enable that you can customize xp
*Perks Section: a place where you can edit the unlockable perks like the cost, the percent increase, and if it's even active. uses xp to level up, not credits
*Perks: Sprint Speed, Jump Height and Jump stamina in one (make it a bit more expensive), Sprint stamina, Stamina Regen, Fall damage, damge, weight, weight speed (lowers how much weight affects you with each upgrade), Crit Strike chance, Inventory slots
*Ship perks: Scan Distance, Extra Battery, Extend Deadline discounts, Delivery speed, Save Loot, Travel Discount, Loot Worth (Like from LethalProgression, it increases the amount that the scrap is worth by a percentage with each upgrade)
maybe make it possible to have presets?
i am currently the only one working on this, and have made a post in the LC modding server asking if anyone wants to help, but currently i'm on my own
great guide! thank you so much.
exactly what i was looking thank you
wow, JShlatt's girlfriend got a really deep voice and gained 3000 IQ
( In all seriousness, great video, really helpful, 10 outta 10 )
that one made me chuckle xD
Amazing tutorial! Trying to start modding after making a couple games, i have a question, the moment i play with someone with no plugins mine wont work too?
Fire tutorial. Thanks!
Would love to see a video on making sound mods if ever. I just want to replace the sound when your sanity drops (seeing a dead body or something) with the intro riff to Everlong LMAO
yes please
Just get the sound file into your project access it and play it instead of the other
Please make us a clown shoes purchasable. It makes sounds every step you take and attracts monsters. :D
I did everything as said and even went back into code to fix any issues i was having, I finally got the game to read the patch but the infinite sprint is not working still
Thanks, as a VB classic guy this c# nonsense is confusing AF. Thanks to you I have successfully released a couple of mods, even managed to figure out the transpiler.
Can you make a video about how to add your own 3D models to the game that have their own properties, like a hat or a new piece of Scrap with it's own price and how much inventory space it takes
or can you make a video that changes a 3d model already in the game
Dude, really good video
Hey, I had a question regarding making audio mods for Lethal. Not sure how to convert the mp3 file I want to use into the file that most mods come with. Can't test the mod I wrote in game as I'm not sure if its the code or the fact the audio file is different than all the examples I've used.
Great video!
It all worked great but i cant figure out how to do other things i want to do like making the vow bridge instantly collapse when a player touches it I found the lines of code that calculate it but i have no idea what to do with it all
idk if its possible but id love to have something that would let me swap models ( like taking the front straps off for better shirts)
Very good video! Very useful! And one question, do you know how custom moons with moonapi work? Been looking into it and I from what I can gather I need a assetbundle but I'm not too sure on how to do that.
Yeah so with asset bundles you need to have Unity installed to make one then load the asset bundle into the game (lc_api supports that)
managed to get kinda somewhere after decompiling the game and trying to use experimentation as a test custom moon, map seems to load when setting the ship to go there but if there's any sun source its blindingly bright and without a sun source and even with a flashlight all textures just seem to be black. bleh
I have a question about moon costs, I cannot seem to find it anywhere within the code.
would this method work for replacing something like a in game model or something like that?
Hey man, great tutorial but I have one question
I want to try and create my own piece of scrap that spawns on the higher end moons.
I don't need anything special but I would like a Tip or tutorial on how to do that.
Thank you
At 25:18 , you use a reference to a variable called sprintMeter. I need to reference a variable called num2, which is local to an else clause, in the Update method of HUDManager. Is there any way to reference that variable?
Can you please help how can I create assets for new Items? I have prefab in Unity with model, materials, box colider etc, but how can I add needed components like NetworObject, PhysicsProp etc and Item ScriptableObject, so I could load such asset with harmony and register in game. I tried to load just ordinary asset (prefab with mesh+materials) and manipulate it dynamicly from code using AddComponents and so on, and I even can spawn such items and collide with them, but they don't render at all
I appreciate the guide for sure. had a little trouble with a few steps since you went a bit fast a few times. I want to modify some loot but I can't find any references to any of them. Do you or anyone who surfs by and see this happen to know where I could find em so I could possibly tweak them?
Hey, do you know if it would be possible to change the ship model to make it bigger with the hitboxes all working?
What if i want to change the sprint speed but not stamina isthere a way to do that bc i tried with sprint multiplier and it also multiplied the walking speed
Thanks for the guide!
Tutorial/public speech tip for next video: Exercise to make a pause instead of saying "aaaahm" ;)
Something i definitely need to work on, thank you
@iMinx Do you have/could you make a tutorial on how to create a custom HUD mod for Lethal Company?
you are real one :) thx - thepwner
I have a question I want to make a mod that reskins and changes the audio of the bracken how can I do that?
idk if anyone can help me, i'm creating a mod for walkietalkie's battery to be lower, and the game detects and logs in the console when i press and use the radio, but i think i've got the battery asset wrong because even though i put a 30X multiplier, i think is isn't working
if its alright for you, can you help us how to make a custom character models for the monsters? my brother requested me to change bracken skin into something else
I got error "Couldn't extract exception string from exception of type TypeLoadException (another exception of class 'TypeLoadException' was thrown while processing the stack trace)"
From BepInEx Console
i have a problem where, i do not see a bepinex file. In the place where the BepInex file should be theres a "boomboxcontroller" file
How does one make a model that can be imported to the game? The coding part we have to search what to change but how can we do the "bundle" of information such as model and sounds?
Been trying to find this out for myself tbh
You're a real G
I have a question. Would it be possible to create a mod to greatly reduce the volume of lightning strikes from Weather Stormy?
Hmmmm, I wanted to make a custom moon, but I don't know if I would be able to. I know Unity and C# a bit, but I know nothing about modding. What I wonder are gonna be adding items, map and textures, ennemies. I was thinking of a visualshader as well. I already have a moon name and I know what kind of map I want to use. I'll try to get as much time as I can during school off time to make everything. In the hopes that I can make one.
Saw a comment about someone making one but having troubles with the lights. Hope that I'll be able to overcome that problem. I never finish a game so i thought that a mod mind be easier for me, since I just have to add things and not remake everything from scratch!
Glad to see a fellow UE developer! How long have you been in the community?
I started about a week after the game launched, I recently left due to toxicity, unfortunately.
@@iMinx I personally haven't heard much about toxicity in the Unreal Engine community, Sad to hear. I've been around for a while lol
Assembly-Csharp not appearing 16:00 help me please
it no longer works with just the .exe, check pinned comment
Nice Video!
Amazing tutorial, I just want to ask. This may seem like a stretch, but is it possible to create a mod that will change the hoarding bugs voices into sets of different voices? I want to make it the where there's 5 voices that are randomly given to a hoarding bug and each of those 5 voices will have different voice lines. The voices are gonna be recorded by me and some friends. How likely is that achievable for someone who has never done something like this?
That should be possible, and there would be a few ways to get it done. In my mind, setting up a list of the voices, adding/referencing the sounds for each set and creating a function that assigns each spawned entity a random number corresponding to one of the items in the list
The tutorials that unity has put out are pretty useful for getting a hang of some of the basic concepts
Does anyone have any resources to learn more about this? Why does the Assembly cSharp file even exist, Isn't the game supposed to be compiled? And how does BepinEX work, like how can it change things inside of the game? If anyone has resources where i can read up on this more it would be very appreciated!
Question, how would i change the behavior of the code for example? Like If I wanted to change any weight to be reduced by 1.5 then how would i do that?
Edit: By behavior I meant overriding lines of code.
how would i go about changing the turret mode?
i saw ur post on reddit came to the video and want to ask now how can i add a new item and model im very new to coding and stuff but i want to add a meme character as a scrap item and maybe make it useable so it makes sound effects
Hi, there. This has been very useful to get quick-started on LC modding. However, VS Code version differences are getting in my way. Which exact release/version of VS Code are you using here?
And which vscode extensions, come to think of it? The main problem I'm having is that my solution explorer behaves very differently from yours and doesn't seem to have a way to add a reference.
Problem resolved! An install of VS Code 2019 proved to be more cooperative with the workflow you showed us. I was struggling with getting LC to decompile, but then I saw your comment above. Much obliged! Thanks for making LC modding easier for a newcomer like me! :)
From what it looks like to me, this tutorial shows how to add new code to the game. Let's say I'm trying to completely REPLACE some code from the game, is this possible?
Hi, i am trying to make a gui using ongui but it just doesnt pop up could you like give me a gui example or help me?
good video!
Excellent ! By the way , do you know how to open debug mode? I wanna test something.
9:14, i think they r called decorators for anyone curious
Hi, I'm doing 3D Modeling, and it occurred to me to create a mod, replacing the ship with another one, which will be larger than the original one, but I’m not good at programming. Maybe you can give me a hint?
Is it possible to create such a mod? If yes, then I will be glad to help.
I want to add more content. Is the same thing that you do it on the video?
I am trying to create a mod that translates the texts in this game to Japanese. Where would you think I should access to change the texts?
That was 👌👍☺ It works.
So does it not matter what dotnet SDK version you have? I've seen just about no one has the same version. The wiki says get the latest which is 8.0 and yet only a month ago this guy is using 4.8
I need help, Im using dnspy since ilspy doesnt work on my computer and i cant seem to find the assemblies that are related to lethal company
same problem
9:16 I think these are decorators if I do recall. Im not familiar with C# but I do use python and if it is the same as the @decorator_name you put above functions then Im just assuming it is the same. Hope Im right haha
We call then attributes on c#
how did you get the smaller search bar to appear?
is there a way to swap the model of enemy into something else? I would love to see a guide for that
Let me know if you figure it out or find a guide!
brooo i want to make an uncle ruckus bracken so bad
Been looking for a modding tutorial so I could make custom hoarding bug sounds!!!!!!
what if all i want to do is change a model or sound?
Is there a way to reference a method rather than a variable? Looking to call a method at the end of Update for example.
yes you would call class.methodname, you may need to get a reference to the class in some cases, or you may just be able to call it
can you make a tutorial on how to add a custom scrap to the game?
Using ILSpy For some reason the Assembly-CSharp sub folder is not quite showing, i did install the prerequirements. quite puzzled what could it be
Same here bro. I’m hoping maybe he’ll comment on yours and I’ll get a notification
Nevermind it’s in the pinned comment lol
How would you go about changing the color of the item slot frames? I'd like to change it for specific items if they are in that slot but idk how to change the blue color to anything else since I can't find the code that determines the color of it.
That's because it's not in the code, it's part of the tecture.
Thank you!
Hey i love the video, im looking to make a mod that remove all the yellow railing, has anyone created a mod like that so i don't make something already exists or could some make it
how would I go about modding the current dances in lethal company? I want to put the dougie in so bad but I have 0 modding experience but I am also impatient so id be willing to learn
idk anything about this as well but i'd say find the dance anim in game files and replace that file with an animation of the dance you want (you'd have to find an animation online or animate on yourself probably through blender)
How hard is it to replace the main characters texture? I've made a simple replacement for it by extracting the textures and just messing around, but how would I make that a mod? Is the code simple? Thanks
im struggling with the same issue, i actually couldnt even find the main characters texture i was looking all around for it, for suits the only thing i found was unlockable suits what class did you find it in? I think unlockable suits would be what youre looking for and you set them to unlocked on startup or something like that
have you found out how to do this already?@@mikegiorgianni4416
how do you open that search menu at 17:01 ?
edit: i just found it, its ctr + f
Good Tutorial Thank
How to resolve `Cannot resolve symbol 'GameNetcodeStuff'´
can u make a video on how to make a model swap mod?
How can I add new meshes / textures ?