Lethal Company
You are viewing a potentially older version of this package. View Latest Version
Install

Details

Date Uploaded
2 hours ago
Downloads
4
Size
77KB
Dependency string
Solon-CustomBeehiveSpawns-1.0.0
Custom Beehive Spawns

CUSTOM BEEHIVE SPAWNS

Lethal Company BepInEx Version License

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

CUSTOM BEEHIVE SPAWNS

Author: Solo00n

Beehives on the five moons that never get them — added to the game's own daytime creature list at a percentage you set per moon, with every spawn decision after that left to the game.

WHAT IT DOES

  • Hives on the bee-less moons — Offense, Rend, Dine, Titan and Embrion can have beehives, and so can any modded moon that has none.
  • A percentage per moon — every one of those moons gets its own entry in the config, rolled once per landing off the map seed.
  • Vanilla spawning, untouched — how many hives, at what hour, where they land and what they are worth stay the game's own decision.
  • The vanilla bee moons are left alone — Experimentation, Assurance, Vow, March, Adamance and Artifice are not touched unless you ask, with a separate weight override for those who want one.
  • Modded moons included — the config fills itself in from whatever moons are loaded, matching by name with the catalogue number stripped.
  • Zero is truly zero — a moon set to 0 is left exactly as the game shipped it, nothing added and nothing borrowed.

HOW IT WORKS

A hive is not placed by the scrap generator. The swarm is a daytime creature, like a manticoil, and RedLocustBees.Start spawns the hive next to wherever the swarm landed. So a moon has hives for exactly one reason: bees are in its DaytimeEnemies list. Offense, Rend, Dine, Titan and Embrion are not missing a hive setting — they are missing the bees.

  • On the host, as a moon loads, bees are added to that moon's DaytimeEnemies at the average weight the vanilla bee moons use — read off your own install, not hard-coded, so it stays right if another mod rebalances them.
  • One coin flip against the moon's configured percentage decides whether that entry is in the list for the day. Same map seed, same answer.
  • Everything after the flip is SpawnDaytimeEnemiesOutside doing exactly what it always did.
  • Titan and Dine run no daytime creatures at all — their daytime power budget is zero, so the spawner rejects every candidate before it looks at the list. They are lent the time-of-day curve of a moon that does run them. Their budget is sized to MaxHivesOnWokenMoons rather than copied, because bees are the only daytime creature there and nothing would compete for the slots.
  • No custom network objects and no new prefabs: the swarm reuses the EnemyType asset the game already registers, which is what makes the whole thing netcode-safe.
Eclipsed does not affect hives. The word Eclipsed appears once in the entire game assembly, in a HUD tip. The weather's only mechanical effect is EclipseWeather.OnEnable, which sets minEnemiesToSpawn and minOutsideEnemiesToSpawn — the lower clamp on inside and outside spawn cycles. The daytime spawner clamps against a hard-coded 0 instead, so bees are exactly as common under an eclipse as under clear skies. The number people quote is that weather variable: enemies per cycle, not hives.

What limits hives per landing is the moon's maxDaytimeEnemyPowerCount divided by the swarm's PowerLevel, capped again by its MaxCount. Set DebugMode to see those figures for your install.

MULTIPLAYER (HOST-AUTHORITATIVE)

Only the host needs the mod. Creature lists are local assets that never travel over the network, and only the machine that spawns ever reads them.

Host: edits the moon's daytime list as the moon loads, well before anything spawns. Bees and their hive then reach clients through the game's own netcode — NetworkObject.Spawn and SpawnHiveClientRpc — like any vanilla enemy.
Clients: nothing is changed on them at all. The mod writes their config file so it is complete and editable, and stops there.
Joining a modded-free lobby: a player carrying this mod into somebody else's game changes nothing for anyone, including themselves.
Leaving a lobby: every edit is reverted when the ship scene ends, so the moon assets are back to vanilla for whatever comes next in that session.

REQUIREMENTS

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

INSTALLATION

  • Mod manager (r2modman / Thunderstore Mod Manager): search for the mod and click Install.
  • Manual: install the BepInEx pack, then drop CustomBeehiveSpawns.dll into BepInEx/plugins/.

CONFIGURATION

File: BepInEx/config/Solon.CustomBeehiveSpawns.cfg (created on first launch).

Two moon lists, because the two kinds of moon need different knobs. Every moon in the game lands in one of them, modded moons included, written the first time the ship loads.

[Chance On Moons With No Bees] — one percentage per moon, rolled once per landing. This is the point of the mod.

ValueMeaning
0Leave the moon exactly as vanilla: bee-free, nothing added, nothing borrowed.
25A hive is on the cards roughly one landing in four. The default for new moons.
50Every other landing.
100Every landing.
Read the percentage as a ceiling, not a promise. A passing roll only puts bees into that day's creature list; the game still decides whether they turn up. On Titan and Dine bees are the only daytime creature, so a passing roll almost always does produce a hive. On Offense, Rend and Embrion they compete with the manticoils, so the real rate comes out somewhat below the number set.

[Weight On Moons That Already Have Bees] — Experimentation, Assurance, Vow, March, Adamance, Artifice. Usually leave alone.

ValueMeaning
-1Keep the moon exactly as the game ships it. The default.
0No bees there at all, and so never a hive.
1200The bees' weight in that moon's daytime draw. Not a percentage: it decides their share of the daytime spawns the moon was going to have anyway, so doubling it takes draws from the manticoils rather than adding hives.

[General]

KeyDefaultDescription
EnabledtrueMaster switch. Off, every moon keeps the creature list the game shipped it with.
DefaultChance25The percentage a bee-less moon is written into the file with the first time it is seen. Set 0 to have the mod do nothing until you say so per moon.
MaxHivesOnWokenMoons1Hive cap for Titan and Dine only, where the mod has to invent the daytime budget. 3 is closer to a busy March. Every other moon ignores it.
ReferenceMoon(empty)Which moon Titan and Dine copy their time-of-day pacing from. Empty picks one automatically.
DebugModefalseAlso logs the moons left alone, their vanilla weights, and the swarm's own power cost and spawn cap.

COMPATIBILITY

  • Works on vanilla and modded moons (LethalLevelLoader, Wesley's Moons and friends) — moons are matched by name with the catalogue number stripped, so a renumbered list does not break an entry, and a moon registered late is seeded the first time it is visited.
  • No custom network objects and no new prefabs — the swarm reuses the EnemyType the game already registers, so there is nothing for another mod to collide with.
  • The vanilla spawner is not patched at all. Mods that rebalance daytime creatures keep working, and their numbers are what the average weight is read from.
  • Bees are identified by the AI component on the prefab, not by name, so a renamed or reskinned swarm is still recognised.

BUILD

dotnet build CustomBeehiveSpawns.csproj -c Release

Output: bin/Release/netstandard2.1/CustomBeehiveSpawns.dll. Game assemblies are referenced via the LethalCompany.GameLibs.Steam NuGet package as compile-only (PrivateAssets="all") — no game files are distributed.

CREDITS

  • Solo00n — author.
  • Built on BepInEx and HarmonyX.
  • Licensed under MIT.

CUSTOM BEEHIVE SPAWNS

Автор: Solo00n

Ульи на тех пяти лунах, где их не бывает — пчёлы дописываются в собственный список дневных существ игры с процентом, который вы задаёте для каждой луны, а всё остальное о спавне остаётся решать игре.

ЧТО ДЕЛАЕТ МОД

  • Ульи на безульевых лунах — Offense, Rend, Dine, Titan и Embrion получают ульи, как и любая модовая луна, где их нет.
  • Процент на каждую луну — у каждой такой луны своя строка в конфиге, бросок один раз за высадку от сида карты.
  • Ванильный спавн не тронут — сколько ульев, в какой час, где именно и почём, решает сама игра.
  • Ванильные пчелиные луны не трогаются — Experimentation, Assurance, Vow, March, Adamance и Artifice остаются как есть, но для желающих есть отдельная настройка веса.
  • Модовые луны тоже — конфиг заполняется по факту загруженных лун, сопоставление по имени без каталожного номера.
  • Ноль — это действительно ноль — луна с 0 остаётся ровно такой, какой её выпустила игра: ничего не добавлено и ничего не одолжено.

КАК ЭТО РАБОТАЕТ

Улей не ставит генератор хлама. Рой — это дневное существо, как мантикойл, и RedLocustBees.Start спавнит улей рядом с тем местом, куда сел рой. Значит, у луны есть ульи ровно по одной причине: пчёлы есть в её списке DaytimeEnemies. У Offense, Rend, Dine, Titan и Embrion не отсутствует настройка ульев — у них отсутствуют пчёлы.

  • На хосте, при загрузке луны, пчёлы дописываются в её DaytimeEnemies со средним весом ванильных пчелиных лун — он читается из вашей же сборки, а не захардкожен, поэтому останется верным, если другой мод их перебалансирует.
  • Один бросок против процента луны решает, будет ли эта запись в списке на текущий день. Тот же сид карты — тот же результат.
  • Всё после броска — это SpawnDaytimeEnemiesOutside, делающий ровно то, что делал всегда.
  • Titan и Dine не запускают дневных существ вообще: их дневной бюджет равен нулю, и спавнер отсеивает любого кандидата ещё до того, как заглянет в список. Им одалживается кривая времени суток у луны, где дневной спавн работает. Бюджет при этом не копируется, а рассчитывается под MaxHivesOnWokenMoons, потому что пчёлы там единственные дневные существа и конкурировать за слоты не с кем.
  • Никаких своих сетевых объектов и новых префабов: рой использует тот же ассет EnemyType, который игра уже регистрирует, — именно это и делает всё безопасным для нетворкинга.
Eclipsed на ульи не влияет. Слово Eclipsed встречается во всей сборке игры один раз — в подсказке на HUD. Весь механический эффект погоды это EclipseWeather.OnEnable, который задаёт minEnemiesToSpawn и minOutsideEnemiesToSpawn — нижнюю границу циклов спавна внутренних и наружных монстров. Дневной спавнер жмётся к захардкоженному 0, поэтому под затмением пчёл ровно столько же, сколько в ясную погоду. Число, которое обычно называют, — это та самая погодная переменная: монстров за цикл, а не ульев.

Количество ульев за высадку ограничивают maxDaytimeEnemyPowerCount луны, делённый на PowerLevel роя, и сверху его MaxCount. Включите DebugMode, чтобы увидеть эти числа в своей сборке.

МУЛЬТИПЛЕЕР (HOST-AUTHORITATIVE)

Мод нужен только хосту. Списки существ — локальные ассеты, они никогда не передаются по сети, и читает их только та машина, которая спавнит.

Хост: правит дневной список луны при её загрузке, задолго до любого спавна. Пчёлы и улей попадают к клиентам через ванильный нетворкинг — NetworkObject.Spawn и SpawnHiveClientRpc — как любой обычный враг.
Клиенты: у них не меняется ничего. Мод пишет им конфиг, чтобы файл был полным и его можно было редактировать, и на этом останавливается.
Заход в чужое лобби: игрок с этим модом в чужой игре не меняет ничего ни для кого, включая себя.
Выход из лобби: все правки откатываются вместе со сценой корабля, так что ассеты лун возвращаются к ванильным для всего, что будет дальше в этой сессии.

ЗАВИСИМОСТИ

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

УСТАНОВКА

  • Через менеджер (r2modman / Thunderstore Mod Manager): найти мод и нажать Install.
  • Вручную: установить BepInEx-пак, затем положить CustomBeehiveSpawns.dll в BepInEx/plugins/.

НАСТРОЙКА

Файл: BepInEx/config/Solon.CustomBeehiveSpawns.cfg (создаётся при первом запуске).

Два списка лун, потому что двум типам лун нужны разные ручки. Каждая луна в игре попадает в один из них, модовые в том числе, и записывается при первой загрузке корабля.

[Chance On Moons With No Bees] — по проценту на луну, бросок раз за высадку. Ради этого мод и существует.

ЗначениеЧто означает
0Оставить луну ровно как в ванилле: без пчёл, ничего не добавлено и ничего не одолжено.
25Улей возможен примерно на каждой четвёртой высадке. Значение по умолчанию для новых лун.
50Каждая вторая высадка.
100Каждая высадка.
Процент — это потолок, а не обещание. Прошедший бросок лишь кладёт пчёл в список существ на этот день, а появятся ли они, решает игра. На Titan и Dine пчёлы — единственные дневные существа, поэтому прошедший бросок почти всегда даёт улей. На Offense, Rend и Embrion они конкурируют с мантикойлами, и реальная частота выходит заметно ниже заданной.

[Weight On Moons That Already Have Bees] — Experimentation, Assurance, Vow, March, Adamance, Artifice. Обычно трогать не нужно.

ЗначениеЧто означает
-1Оставить луну ровно такой, какой её выпустила игра. По умолчанию.
0Пчёл там нет вообще, а значит нет и ульев.
1200Вес пчёл в дневном розыгрыше этой луны. Не процент: он задаёт их долю в тех дневных спавнах, которые луна и так собиралась сделать, поэтому удвоение веса отбирает розыгрыши у мантикойлов, а не добавляет ульи.

[General]

КлючПо умолчаниюОписание
EnabledtrueГлавный выключатель. При false каждая луна сохраняет тот список существ, с которым вышла игра.
DefaultChance25Процент, с которым безульевая луна записывается в файл при первом появлении. Поставьте 0, чтобы мод ничего не делал, пока вы не разрешите это для конкретной луны.
MaxHivesOnWokenMoons1Лимит ульев только для Titan и Dine, где мод вынужден выдумывать дневной бюджет. 3 ближе к оживлённой March. Остальные луны его игнорируют.
ReferenceMoon(пусто)У какой луны Titan и Dine берут темп времени суток. Пусто — выбор автоматический.
DebugModefalseДополнительно пишет в лог оставленные без изменений луны, их ванильные веса и стоимость и лимит спавна самого роя.

СОВМЕСТИМОСТЬ

  • Работает на ванильных и модовых лунах (LethalLevelLoader, Wesley's Moons и прочие) — сопоставление по имени без каталожного номера, поэтому перенумерация списка не ломает запись, а поздно зарегистрированная луна обрабатывается при первом посещении.
  • Ни своих сетевых объектов, ни новых префабов — рой использует уже зарегистрированный игрой EnemyType, так что конфликтовать другому моду не с чем.
  • Ванильный спавнер не патчится вообще. Моды, перебалансирующие дневных существ, продолжают работать, и именно из их чисел читается средний вес.
  • Пчёлы определяются по компоненту ИИ на префабе, а не по имени, поэтому переименованный или перекрашенный рой тоже распознаётся.

СБОРКА

dotnet build CustomBeehiveSpawns.csproj -c Release

Результат: bin/Release/netstandard2.1/CustomBeehiveSpawns.dll. Сборки игры подключены через NuGet-пакет LethalCompany.GameLibs.Steam только для компиляции (PrivateAssets="all") — файлы игры не распространяются.

БЛАГОДАРНОСТИ

  • Solo00n — автор.
  • Построено на BepInEx и HarmonyX.
  • Лицензия MIT.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.