Lethal Company
Install

Details

Last Updated
First Uploaded
Downloads
181
Likes
0
Size
21KB
Dependency string
Solon-Exhausted_Batteries-1.1.0
Dependants

Exhausted Batteries

Author: Solo00n

Flexible, host-authoritative control over the battery of every item in Lethal Company: capacity, starting charge, the ship charging station, lightning, and flashlight dimming.

Language / Язык: English · Русский

English

What it does

  • Store-bought battery items arrive fully discharged.
  • Change battery capacity with a global multiplier, per-item multipliers, or both (per-item wins over global).
  • Per-item multipliers are auto-discovered into the config as you meet items in-game, including modded ones.
  • The ship charging station gets a limited number of uses, shown as a counter in its hover text, e.g. Charge item : [E] [3].
  • The charging-station counter is a single shared pool for the whole lobby, refreshed on take-off, with optional carry-over of unused charges and an optional explode-when-empty.
  • Lightning can charge items it strikes; a bolt intercepted by the ship's lightning rod can add a charge to the station.
  • Flashlights dim as their battery drains (optional).
  • Russian localization, auto-detected alongside RTLC.

How it works

Capacity is scaled through the item's run-time (batteryUsage), and the starting charge is set on spawn. The charging-station limit, the take-off refresh, lightning-to-items, lightning-to-the-ship (via the roof lightning rod / ship power surge), and flashlight dimming each hook a single game method. There is no batteryCharge field in Lethal Company: charge lives in insertedBattery (0..1) and the "capacity" is the item's run-time, which the multiplier scales.

Multiplayer (host-authoritative)

On connect, clients receive the host's config over the network and only apply effects while synced, or while they are the host. A client cannot give itself an advantage in someone else's lobby. The charging-station counter is one shared, host-owned pool, so co-op players draw from the same charges. Only Unity Netcode named messages are used, never a custom NetworkObject, so it cannot crash lobbies. Language and VerboseLogging stay local. Everyone should install the mod; the host's config is what the whole lobby plays with.

Requirements

  • Lethal Company (V81)
  • BepInEx 5.4.21+ (BepInExPack)

Installation

  • Mod manager (recommended): install through r2modman, Thunderstore Mod Manager, or Gale. Dependencies are pulled automatically.
  • Manual: install BepInEx, then place ExhaustedBatteries.dll into Lethal Company/BepInEx/plugins/.

Launch the game once to generate BepInEx/config/ExhaustedBatteries.cfg, then edit it.

Configuration

[General]

Key Default Description
GlobalMultiplier 1.0 Battery-capacity multiplier for all battery items.
EnableIndividualMultipliers false Enable per-item multipliers from [IndividualMultipliers] and [ModdedItems].
SpawnStoreItemsDischarged true Store-bought battery items arrive fully discharged.
InitialChargeMultiplier 1.0 Multiplier for the initial charge of non-discharged items (loot). Clamped 0..1.
VerboseLogging false Verbose logging to the BepInEx console.

[ChargingStation]

Key Default Description
MaxCharges 0 Max uses of the ship charging station. 0 = unlimited.
ResetChargesEachDay true Refresh the counter each day, on ship take-off. false = total for the session.
CarryOverUnusedCharges false Unused charges carry over and add to the next day's allotment.
ExplodeWhenEmpty false Using an empty charging station makes it explode.

[Lightning]

Key Default Description
LightningChargesItems false A bolt that strikes a battery item fully charges it.
LightningChargesStation false A bolt into the ship's lightning rod adds 1 charge to the station.

[Flashlight]

Key Default Description
EnableFlashlightDimming false Flashlights dim as their battery drains.
DimStartCharge 1.0 Charge fraction at/above which brightness is full (1.0 = dim across the whole range).
MinBrightness 0.15 Brightness fraction at an empty battery.

[Localization]

Key Default Description
Language Auto In-game message language: Auto, English or Russian.

[IndividualMultipliers] / [ModdedItems]

Key Default Description
item name -1 Per-item capacity multiplier. -1 = inherit GlobalMultiplier. Auto-populated.

Integrations / Compatibility

  • Works with vanilla and modded battery items automatically (matched by name or class).
  • Mapper (restoremapper) and Geigercounter (facilitymeltdown) are pre-declared in the config.
  • RTLC and other Russian localization mods are auto-detected for the Russian language.

Credits

  • Author: Solo00n
  • Built with BepInEx and HarmonyX.
  • Flashlight dimming inspired by FadingFlashlights.

Русский

Что делает

  • Купленные в магазине предметы с батареей прилетают полностью разряженными.
  • Меняет ёмкость батареи глобальным множителем, индивидуальными множителями или обоими (индивидуальный важнее глобального).
  • Индивидуальные множители создаются автоматически в конфиге по мере появления предметов, включая модовые.
  • Зарядная станция получает ограниченное число использований со счётчиком в hover-тексте, напр. Charge item : [E] [3].
  • Счётчик станции — единый общий пул на всё лобби, обновляется при взлёте, с опциями переноса неиспользованных зарядов и взрыва при пустой станции.
  • Молния заряжает предметы, в которые бьёт; удар в громоотвод корабля может добавить заряд станции.
  • Фонарики тускнеют по мере разряда (опционально).
  • Русская локализация, автоопределение вместе с RTLC.

Как работает

Ёмкость масштабируется через время работы предмета (batteryUsage), начальный заряд задаётся при спавне. Лимит станции, обновление при взлёте, молния в предметы, молния в корабль (через громоотвод на крыше / скачок питания) и затухание фонарика — каждая фича вешается на один метод игры. В Lethal Company нет поля batteryCharge: заряд хранится в insertedBattery (0..1), а «ёмкость» — это время работы предмета, которое масштабирует множитель.

Мультиплеер (авторитет хоста)

При подключении клиент получает конфиг хоста по сети и применяет эффекты только при синхронизации либо когда сам является хостом. Клиент не может дать себе преимущество в чужом лобби. Счётчик станции — единый пул, которым владеет хост, поэтому в кооперативе все берут заряды из общего запаса. Используются только named messages Unity Netcode, без своего NetworkObject, поэтому лобби не крашится. Language и VerboseLogging остаются локальными. Мод желательно поставить всем; лобби играет по конфигу хоста.

Требования

  • Lethal Company (V81)
  • BepInEx 5.4.21+ (BepInExPack)

Установка

  • Через менеджер (рекомендуется): установи через r2modman, Thunderstore Mod Manager или Gale. Зависимости подтянутся сами.
  • Вручную: установи BepInEx, затем положи ExhaustedBatteries.dll в Lethal Company/BepInEx/plugins/.

Запусти игру один раз, чтобы создался BepInEx/config/ExhaustedBatteries.cfg, затем настрой его.

Настройка

[General]

Ключ По умолчанию Описание
GlobalMultiplier 1.0 Множитель ёмкости для всех предметов с батареей.
EnableIndividualMultipliers false Включить индивидуальные множители из [IndividualMultipliers] и [ModdedItems].
SpawnStoreItemsDischarged true Покупные предметы с батареей прилетают разряженными.
InitialChargeMultiplier 1.0 Множитель начального заряда для НЕразряжаемых предметов (лут). 0..1.
VerboseLogging false Подробный лог в консоль BepInEx.

[ChargingStation]

Ключ По умолчанию Описание
MaxCharges 0 Максимум использований станции. 0 = без лимита.
ResetChargesEachDay true Обновлять счётчик каждый день при взлёте. false = лимит на всю сессию.
CarryOverUnusedCharges false Неиспользованные заряды переносятся на следующий день.
ExplodeWhenEmpty false Попытка зарядить на пустой станции вызывает взрыв.

[Lightning]

Ключ По умолчанию Описание
LightningChargesItems false Удар молнии в предмет с батареей полностью заряжает его.
LightningChargesStation false Удар в громоотвод корабля добавляет 1 заряд станции.

[Flashlight]

Ключ По умолчанию Описание
EnableFlashlightDimming false Фонарики тускнеют по мере разряда.
DimStartCharge 1.0 Заряд, выше которого яркость полная (1.0 = затухание по всему диапазону).
MinBrightness 0.15 Доля яркости при пустой батарее.

[Localization]

Ключ По умолчанию Описание
Language Auto Язык сообщений мода: Auto, English или Russian.

[IndividualMultipliers] / [ModdedItems]

Ключ По умолчанию Описание
имя предмета -1 Индивидуальный множитель. -1 = взять GlobalMultiplier. Заполняется автоматически.

Совместимость

  • Работает с ванильными и модовыми предметами автоматически (по имени или классу).
  • Mapper (restoremapper) и Geigercounter (facilitymeltdown) заранее объявлены в конфиге.
  • RTLC и другие русификаторы определяются автоматически для русского языка.

Авторы

  • Автор: Solo00n
  • Собрано на BepInEx и HarmonyX.
  • Затухание фонарика вдохновлено FadingFlashlights.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.