CustomStoryLogs

版本 v1.6.0·更新於 2026-04-07

Allows the addition of custom story logs.

模組介紹 作者原文

CustomStoryLogs

A Mod Library for use with Lethal Company.

Allows you to add custom story logs to the terminal, and in world interactables to unlock them.

This is my first mod intended for use by other people as a library, so the code is inconsistent and messy. Any feed back and help is very welcome!

Logs can be added with code, or through a text/json file created with my Log Builder tool!

Any questions or issues please post them in the CustomStoryLogs Discord Channel! on the Lethal Company Modding Discord.

Guides

In Game Placement Tool

To start using this tool, you will first need to enable it in the config as it is off by default.

Press Alt + L to activate/deactivate the tool, and Alt + K to activate/deactivate edit mode.

Using the in game tool you can easily get the values for the position and rotation of wherever you want to place your log.

With the edit mode, you can tweak the values, and export them to one of six json files for easy copying.

Using the Log Builder

Fill out all the box in the Log Builder, add as many logs as you need.

Once you have everything filled out, click export to generate the json data (it will give you something similar to the below example), and then click copy text.

{

"username": "Yorimor",

"modname": "ExampleLog",

"version": "1.2.3",

"logs": {

"0": {

"name": "Example - May 12",

"text": "This is an example log, created with the log builder!\n\n:D",

"moon": "71 Gordion",

"position": {

"X": "-28",

"Y": "-2",

"Z": "-15"

},

"rotation": {

"X": "0",

"Y": "0",

"Z": "0"

}

}

}

}

In your own mods files create the following folders /BepInEx/plugins/CustomStoryLogs/logs.

Please see my Example Mod as an example of this.

In the logs folder create a new.txt or.json file (name it anything you like) and paste the json data into the file and save it.

And that's it! My mod will automatically load the logs and place them in game for you!

Add Logs With Code

Add a story log:

// public static int RegisterCustomLog(string modGUID, string logName, string text, bool unlocked=false, bool hidden=false)

int myLogID = CustomStoryLogs.CustomStoryLogs.RegisterCustomLog(YOUR_MOD_GUID, "Log Name - May 09", "test log\n\n:)");

The function returns an integer which is used to uniquely identify the new log. It is created from a hash of your mods GUID and the first word in the log name.

The first word in the log name is also used as the keyword for opening the log, e.g. to open Bridge collapse - Mar 19 you would type view bridge.

The log ID is used below to create an interactable pickup in world. Alternatively you can call CustomStoryLogs.CustomStoryLogs.UnlockStoryLogOnServer(logID) to unlock the log through code instead of a pickup.

You can also define if the log is already unlocked or hidden the terminal list.

Add an interactable:

// public static void RegisterCustomLogCollectable(string modGUID, int logID, string planetName, Vector3 position, Vector3 rotation, int modelID=0)

CustomStoryLogs.CustomStoryLogs.RegisterCustomLogCollectable(YOUR_MOD_GUID, myLogID, "71 Gordion", new Vector3(-28,-2,-15), Vector3.zero);

This spawns the interactable on the Company moon just in front of the ship. Interactable objects are removed when leaving the moon.

Planet name checks for the moons display name and scene name.

Adding Custom Models

You can register a prefab as a new model, and use it for collectables. Any custom models will require a CollisionBox component to be attached, as this will be used for the interaction.

Follow the asset bundling guide on lethal.wiki to make and load your own assets

// public static int RegisterCustomLogModel(GameObject customModel)

int modelID = CustomStoryLogs.CustomStoryLogs.RegisterCustomLogModel(myModel);

// Then use this ID for any of the collectables you want to use the new model

CustomStoryLogs.CustomStoryLogs.RegisterCustomLogCollectable(YOUR_MOD_GUID, "71 Gordion", new Vector3(-28,-2,-15), Vector3.zero, modelID);

Log Unlocked Events

There are two e

安裝與使用 安裝:BepInEx 外掛

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

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

前置依賴

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

BepInEx-BepInExPackEvaisa-LethalLibxilophor-LethalNetworkAPI

檔案與校驗

檔案名稱
CustomStoryLogs-1.6.0.zip
檔案大小
707.8 KiB