Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
CraftingLibrary
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.
By MACO
| Date uploaded | 2 days ago |
| Version | 1.0.3 |
| Download link | MACO-CraftingLibrary-1.0.3.zip |
| Downloads | 30 |
| Dependency string | MACO-CraftingLibrary-1.0.3 |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2305README
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 thing.
Made with AI
All of the code in this mod was written by Claude (Anthropic's AI, through Claude Code), directed and play-tested by me. It ships no items, models or recipes of its own: everything it shows is built at runtime out of the game's own objects and whatever recipes are installed.
CHANGELOG
Changelog
1.0.3
- The craft list fills the screen. Every page is now drawn to the full height the terminal has, so the last page - the one with the leftover three recipes on it - is a full frame rather than a stub floating in the middle of the screen.
- Pages are packed by line count rather than by a fixed number of rows. A page spends its lines on one row per recipe plus the block of ingredients under the cursor, and that block only has to be as tall as the tallest recipe on that page. It was being sized for the tallest recipe in the whole book, so every page paid for the longest ingredient list somewhere in the middle of it. A page of short recipes now carries more of them.
1.0.2
- The craft list no longer runs to a different number of pages each session. How many lines the terminal can show is measured from its text viewport, once per lobby, and a viewport only reports its real size once the canvas has laid the terminal out. Measure before that and it comes back a fraction of its height: two lobbies of one session measured the same screen at six lines and at sixteen, and whichever landed first was kept for the whole lobby - the same eighteen recipes spread over two pages one session and six the next. The viewport is now read on every page, and the measurement redone whenever it comes back taller, so it settles on the real screen instead of on whatever was ready first.
1.0.1
- Crafting is refused while the ship is leaving. The day's haul is counted about two seconds after the doors shut, so parts consumed in that window were scrap about to be paid for and a product spawned there counted as new scrap nobody found. Either way the number on the screen stopped matching what was collected. The refusal says so rather than doing nothing. Landing is untouched - the level's totals are recomputed when its scrap spawns, and being shut in the ship for twenty seconds is a reasonable time to build something.
- The package description and the README now open on the same sentence, which says what the mod does to the ship rather than which command does it.
1.0.0
First release.
- A
CRAFTcommand at the ship terminal. Items sitting in the ship are consumed and another item is spawned in their place. - Recipes are plain text in
BepInEx/config/CraftingLibrary/recipes.txt, or registered by another mod throughRecipeBook.Add. Nothing is included: this is a library. - A cursor-driven list in the style of Lategame Upgrades - W/S to move, A/D to page, Enter to
choose - with a build screen before anything is consumed.
Terminal / Cursor Controlsturns it off for a plain printed list. - Scanning an ingredient marks it
[INGREDIENT], and putting one on the Company counter says which recipe wants it. Neither blocks anything. - Only the host's recipes decide what can be built, and the host re-checks the ship before it consumes anything, so a part grabbed while a craft is in flight refuses the craft instead of vanishing out of somebody's hands.
- A crafted item's value and the round's collected-scrap total are sent to every client, because the game does not replicate either by itself.
- No dependencies beyond BepInEx.