CraftingLibrary

版本 v1.0.3·更新於 2026-09-14

A crafting library for Lethal Company. Scrap lying in the ship becomes other items, from recipes written in plain text or registered by other mods. Ships no recipes of its own.

模組介紹 作者原文

Maco's Crafting Library

A crafting library for Lethal Company. Scrap lying in the ship becomes other items, from

recipes written in plain text or registered by other mods. Ships no recipes of its own: the

CRAFT command it adds to the ship terminal is an empty menu until something fills it. No

dependencies beyond BepInEx.

The command

| Typed | Does |

|---|---|

| CRAFT | Opens the recipe list. |

| CRAFT 2 | Opens it at page 2. |

| CRAFT rail slugger | Builds one straight away. A unique prefix is enough. |

W/S move, A/D page, Enter opens a build screen for the selected recipe, Backspace

steps back and returns the keyboard. Buildable recipes sort to the top, then those closest to

complete. Circles count stock twice over: beside the name, one per ingredient covered, so ●●○○

is two of four; beside an ingredient, one per unit needed, so ●○ Saw Blade is one of two.

[Terminal] Cursor Controls swaps the screen for a printed list if another mod contests the

keyboard.

Ingredients

An item is available only if it is loose in the ship: not held, pocketed, bagged, in an enemy's

grip or mid-grab on the host. Membership is decided against the ship's collider rather than the

isInShipRoom flag the game never replicates, so client and host counts agree. A craft takes the

cheapest copies first and spawns the product among the parts before destroying any, so a failed

spawn costs nothing. It is refused once the ship is leaving and the haul is being counted.

Anything a recipe wants reads [INGREDIENT] when scanned, and placing one on the Company counter

warns which recipe wanted it without blocking the sale. Both are local, cosmetic, configurable,

and apply only where the recipe's product is installed.

Recipes

Every.txt file in BepInEx/config/CraftingLibrary/ is read, one recipe per line. recipes.txt

is created there on first launch with the format in its header.

comments start with #

Rail Slugger = Laser pointer, Rusted Pick Head x2, Ruby Crystal

Oxidizer = Chemical jug x2, Hand Drill | value=0 | info=Hold to spray flame.

Stun grenade x2 = Big bolt, Metal sheet x2

Names match the game's itemName, capitalisation ignored. x2 on a part is how many it

consumes, on the product it is the yield. value=N stamps the product's scrap value, value=0

makes it worth nothing so nobody sells it, and omitting it rolls the item's own range. info= is

one line shown on the build screen.

Files are re-read on every lobby load, so edit and rejoin to test. They load alphabetically after

every plugin has registered its own, and the last recipe naming a product wins, which is how you

override one a mod shipped. A name no installed mod registered is reported in LogOutput.log and

skipped.

Multiplayer

Everyone needs it installed, and the host resolves every request against its own book, so an

edited file on a client changes nothing. Grab a part while somebody is on the build screen and

their Build becomes Back within a second; a request already in flight is refused with nothing

consumed.

For mod authors

Ship a.txt file, which needs no reference to this assembly, or reference CraftingLibrary.dll

and register from your Awake:

RecipeBook.Add("Rail Slugger", "Laser pointer", "Rusted Pick Head x2", "Ruby Crystal");

Add(Recipe) also takes a yield, value, source and description; Remove, All, Consumers and

Revision are public too. Code recipes persist across lobbies, and a recipe file can override one

by naming the same product. Add MACO-CraftingLibrary to your manifest.

Settings live in Maco.CraftingLibrary.cfg: the command word, the terminal's front-page entry,

the driven screen, width and height overrides for the box, both warnings and verbose logging. The

mod patches Terminal.ParsePlayerSentence as a prefix and passes everything else through. Built

against Lethal Company v81.

Why it exists

I wanted some of the items in my own modpack crafted out of scrap instead of bought, and needed

something generic to do it with. Splitting it out in case anyone else wants the same

安裝與使用 安裝:BepInEx 外掛

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

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

前置依賴

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

BepInEx-BepInExPack

檔案與校驗

檔案名稱
CraftingLibrary-1.0.3.zip
檔案大小
71.1 KiB