LC API V50

版本 v3.4.14·更新於 2025-11-20

Multipurpose modding API for Lethal Company V73

模組介紹 作者原文

LC-API

The definitive Lethal Company modding API. Includes some very useful features to make modding life easier.

Note

This is a repackage of the original LC_API.

For Developers

If you want to use the API in your plugin, add the LC_API.dll as a project reference!

Contributing

If you wish to contribute to this project, you will need unity netcode weaver

to implement custom networking properly. Follow their instructions to get NetcodeWeaver set-up for patching Lethal Company mods

and keep note of the filepath where you chose to install it.

Once you have forked and cloned the repository, you will need to create a file in the solution folder called LC-API.csproj.user

to set paths to build dependencies. Here's a template for that file's contents:

F:/SteamLibrary/steamapps/common/Lethal Company

$(APPDATA)/r2modmanPlus-local/LethalCompany/profiles/Test LC API

$(SolutionDir)NetcodeWeaver

It is vital that you change the NETCODE_PATCHER_DIR property to the location of your local NetcodeWeaver installation.

Ensure your Assembly CSharp is set Publicize="true" in the.csproj file to ensure it gets publicized.

Once you have completed these steps, you will be able to properly build the solution.

Making a PR

Your pull request should target the dev branch. This is because the main branch is reserved for tested features that are ready for release. Basically if someone were to clone the repo, they should be able to build main and use it without any fear of broken things.

The dev branch, however, may contain untested features and is used to build release candidates. Before releases, the dev branch will be frozen and tested for issues, when it passes its testing then it will be merged into main and a release will be made. Pre-releases may come from the dev branch for release candidates and testing. These will be generally stable, but may still contain broken features before testing is done.

Pull requests targeting the main branch will not be merged in most circumstances. Most merges to main will be directly from the frozen dev branch after testing.

Features

AssetBundle loading - Put asset bundles in BepInEx > Bundles and load them using BundleAPI.BundleLoader.GetLoadedAsset

ServerAPI - Utilities relating to the network and server. This includes:

ModdedServer - Automatically alerts other users when you host a server that your server is modded.

It also lets mod authors make their mods put users in special matchmaking where they can only play with other modded users

Networking - Easily send data across the network to sync data between clients

Installation

R2ModMan or Manager (highly recommended)

R2ModMan

  • Go page
  • Click Install with Mod Manager

Manager

(if the above doesn't work for you, open up the App to do the following)

  • Click Get mods/Online (whatever it happens to be called)
  • Search for LC API
  • Download it

Manual

  • Go page
  • Click Manual Download
  • Unzip files
  • Navigate to 2018-LC_API-VERSION/BepinEx/plugins and copy the contents
  • Find your BepinEx installation's plugin folder, by default it would be in steamapps: steamapps\common\Lethal Company\BepInEx\plugins
  • Create a folder titled 2018-LC_API
  • Paste the contents into that folder

DO NOT PLACE THE BUNDLES FOLDER IN THE PREMADE BepinEx/Bundles FOLDER! It must be in the 2018-LC_API folder.

If you did all of this correctly, it should load properly.

The resulting file structure should look like this:

BepinEx

├───Bundles

├───cache

├───config

├───core

├───patchers

└───plugins

└───2018-LC_API

├───Bundles

│ └───networking

└───LC_API.dll

TODO

  • Picking up and dropping item events
  • Including Player.StartGrabbingItem, Player.GrabbingItem, Player.GrabbedItem, Player.DroppingItem, and Player.DroppedItem
  • The present-tense versions are cancellable, StartGrabbingItem, GrabbingItem and DroppingItem.
  • StartGrabbingItem exists for items that take time to pickup.
  • Using item events

-

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack

檔案與校驗

檔案名稱
LC_API_V50-3.4.14.zip
檔案大小
121.3 KiB