Lethal Company
Install with App

Details

Latest version
1.6.0
Last Updated
First Uploaded
Downloads
677
Likes
0
Size
26KB
Dependants
Sneaky Masks

SNEAKY MASKS

Lethal Company BepInEx Version License

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

SNEAKY MASKS

Author: Solo00n

Comedy and Tragedy stop waiting to be used: the mask holds the button for you, and it only kills once it has climbed all the way onto your face.

WHAT IT DOES

  • A mask in your hand arms itself after a hidden delay of 1 to 5 seconds. Nothing is drawn, nothing is played, nothing moves while that delay runs.
  • When it expires the mask takes the use key and holds it down, exactly as if you had decided to raise the mask yourself. Your character lifts it, and the people around you can see that.
  • A protection window of 2 seconds follows, during which the mask is not allowed to start climbing. Putting it away here is always safe.
  • After that the base game takes over untouched: a 65% roll every 5 seconds, and on a hit the mask starts climbing.
  • It can only kill you from your face. The mask latches on about half a second into the climb, and only then does the suffocation that kills start counting. A mask that never latched on cannot attack you at all, however long it was trying.
  • Interrupting a climb before it latches — dropping the mask, or stowing it — cancels it outright, and nothing carries over to the next time. Once it has latched, it is too late; the item is already gone from your hand.
  • Tragedy and Comedy attack at different speeds, so which one you picked up decides how long the suffocation lasts.
  • Every pickup rolls a new delay, so a mask you have carried before tells you nothing about the next one.
  • A mask in a pocket does not stay there. Every 20 to 90 seconds it pulls itself back into your hand, switching away whatever you were holding, and the whole sequence starts from the top. Carrying one becomes a game of noticing.
  • A two-handed item is no protection. If the mask's moment comes while you are carrying one, the heavy thing is knocked to the floor first, and the mask takes the hand after.
  • Half the time it arrives already climbing. A coin flip on every takeover decides whether you get the usual run-up — hidden delay, protection window, rolls — or nothing but the climb itself. Dropping or stowing it still cancels the climb either way.
  • And it gets faster every time. Each takeover makes the next climb quicker than the last. Carry a mask long enough and the climb is over before you have registered that it started — which is the mask killing you outright, by having nothing left for you to react to.
  • Stowing it does not calm it down. Only throwing the mask on the floor puts the escalation back to zero.

HOW IT WORKS

The base game already contains nearly all of this. HauntedMaskItem.Update rolls 65% every 5 seconds while a flag called maskOn is set, and on a hit calls BeginAttachment, which starts the climb. Vanilla only ever sets that flag from ItemActivate — the use key. This mod calls UseItemOnClient, the same entry point your own input uses, so the press is a real press with the animation and networking that come with it, not a flag flipped behind the game's back.

An attack has two parts, and it is worth being clear about which is which. MaskClampToHeadAnimationEvent fires about four tenths of a second in: that is the mask latching on — the head mask is spawned and the item in your hand is destroyed, so this is the moment past which throwing it away is no longer an option. What follows is the attachTimer countdown, five seconds of suffocation, and that is what actually kills you.

The one thing taken from vanilla is a condition. The base game runs that countdown and kills when it expires without ever checking whether the mask got onto your face, so a climb interrupted early still kills once the clock runs out. Here FinishAttaching is refused unless clampedToHead is set, which is what makes "if it is not on your face, it cannot attack you" true. The countdown itself is left as the timer.

Both halves scale together. The mask's speed figure, multiplied by how many times it has had to fetch itself out of your pocket, sets maskAnimator.speed for the latch and divides attachTimer for the suffocation. At 1x that is vanilla's roughly 0.4 s plus 5 s; at 8x it is 0.05 s plus 0.6 s, which is a death with nothing in it to watch.

The takeover uses the game's own slot switching. When a pocketed mask's timer runs out, the mod makes the same calls the utility-slot key makes — SwitchToItemSlot followed by SwitchToSlotServerRpc — so the switch is a real switch that other players see, and EquipItem fires exactly as if you had scrolled to the mask yourself. Before it does, the mod checks every condition the game checks before it lets you scroll: no menu open, no animation playing, not typing, not in the terminal. A two-handed item is handled the way the drop key would handle it, through DiscardHeldObject, and the switch follows once the game has confirmed the throw. Then a coin flip: on heads the mask is flagged to climb on arrival, and the climb is started on the next frame — the mask presses the use key and calls BeginAttachment itself, leaving it in exactly the state a successful vanilla roll leaves it in, only without the wait. The frame of delay is not cosmetic: starting a climb in the same frame the mask is equipped runs it on an animator that has not updated since the mask came out of the pocket, and the seat event can fire immediately.

Vanilla locks you out of dropping an item while the use key is held. That is fair when it is your finger on the button — a mask never lets go, so the lock is lifted by default. Set PreventDropping to true if you want a mask in the hand to be close to a death sentence.

MULTIPLAYER

This mod is client-side, not host-authoritative. It is safe to run in a lobby where only some players have it.

Everything runs on the client that owns the mask, which is the only client the game runs this logic on in the first place. Nothing extra crosses the network: the press goes out through the game's own ActivateItemRpc, and the attachment through its own AttachServerRpc and AttachClientRpc, so other players see the climb whether or not they have the mod. A player without it simply has vanilla masks, and no state can disagree between machines.

REQUIREMENTS

  • Lethal Company V81
  • BepInEx 5.4.21 or newer

INSTALLATION

Through a mod manager (recommended): install from Thunderstore with r2modman or the Thunderstore app, and the dependency is handled for you.

Manually: install BepInEx, then drop SneakyMasks.dll into

Lethal Company/BepInEx/plugins/

Launch the game once to generate BepInEx/config/Timofey.SneakyMasks.cfg.

CONFIGURATION

Section [General]:

KeyDefaultDescription
EnabledtrueMaster switch. Off returns masks to vanilla entirely.
MinDelay1.0Shortest silent wait, in seconds, before the mask takes the use key.
MaxDelay5.0Longest silent wait. Set equal to MinDelay for a fixed, learnable delay.
ProtectionTime2.0Seconds of guaranteed safety before the mask may start climbing. Replaces vanilla's own 10 seconds.
PreventDroppingfalseWhether the mask holding the key also locks you out of dropping and slot switching.
DebugModefalseLogs each rolled delay, each climb and how long it took, and every kill allowed or refused.

Section [Climb Speed], a multiplier on the whole attack: it speeds up the latch animation and divides the suffocation countdown by the same figure. At 1 that is vanilla's roughly 0.4 s to latch on and 5 s to die. Entries are written for every haunted mask the game knows about, so masks added by other mods appear here too.

KeyDefaultDescription
Tragedy1.6Climbs faster than vanilla. The unforgiving one.
Comedy0.7Climbs slower than vanilla, leaving noticeably more time to react.
The base game runs both masks at the same speed. The split is this mod's doing — set both to 1 to put it back the way the game has it.

Section [Takeover], for masks left in a pocket:

KeyDefaultDescription
EnabledtrueWhether a pocketed mask can pull itself back into your hand. Off leaves pocketed masks alone.
MinDelay20Shortest wait, in seconds, before a pocketed mask tries to come out. Rolled fresh every time it is pocketed.
MaxDelay90Longest wait. Set equal to MinDelay for a fixed interval.
ClimbAtOnceChance50Out of 100, how often a mask that comes out on its own is already climbing as it arrives. 0 never, 100 always.

Section [Escalation], for how a mask wears you down over a long carry:

KeyDefaultDescription
EnabledtrueWhether each takeover makes the next climb faster. Off keeps every climb at the mask's own speed.
SpeedPerTakeover0.5Added to the speed multiplier per takeover. At 0.5: second climb 1.5x the base, third 2x, fifth 3x.
MaxSpeed8Ceiling on the multiplier. 8 is fast enough that the climb reads as instant.
The escalation is counted per mask and survives being pocketed. Only throwing the mask on the floor resets it, so a mask you keep shuffling between slots keeps getting angrier.

COMPATIBILITY

  • Works on every moon, vanilla and modded alike.
  • Modded masks are supported as long as they use the game's own HauntedMaskItem. Each one is given its own climb speed entry, defaulting to vanilla speed.
  • The 65% chance, the 5-second interval, the attach animation itself and the checks that keep masks inert in orbit are all left alone, so mods that touch those keep working.

BUILD

Requires the .NET SDK. Game assemblies come from LethalCompany.GameLibs.Steam, so no local game install is needed to compile.

dotnet build SneakyMasks.csproj -c Release

build-package.ps1 builds Release and assembles the Thunderstore zip into dist/. Set the LC_PLUGINS environment variable to have the built DLL copied straight into your plugins folder.

CREDITS

  • Author: Solo00n
  • Built on BepInEx and HarmonyX, both MIT licensed.
  • Released under the MIT License.

SNEAKY MASKS

Автор: Solo00n

Комедия и Трагедия больше не ждут, пока их применят: маска сама зажимает кнопку, и убивает только тогда, когда доползла до вашего лица полностью.

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

  • Маска в руке взводится после скрытой задержки от 1 до 5 секунд. Пока идёт задержка, не появляется ничего: ни индикатора, ни звука, ни движения.
  • Когда задержка истекает, маска забирает кнопку использования и держит её — ровно так, как если бы вы сами решили поднести маску к лицу. Персонаж поднимает её, и это видят окружающие.
  • Дальше идёт защитное окно в 2 секунды, в течение которого маске запрещено начинать натягиваться. Убрать её здесь безопасно всегда.
  • После этого работает нетронутая ванильная логика: проверка 65% каждые 5 секунд, и при успехе маска начинает натягиваться.
  • Убить она может только с вашего лица. Маска цепляется примерно через полсекунды после начала подъёма, и только тогда начинается удушение, которое и убивает. Маска, которая не зацепилась, атаковать не может вообще, сколько бы ни тянулась.
  • Прерванный подъём до момента зацепления — выбросить маску или убрать в слот — отменяется полностью, и ничего не переносится на следующий раз. После зацепления поздно: предмет уже исчез из рук.
  • Трагедия и Комедия атакуют с разной скоростью, поэтому то, какая маска попалась, решает, сколько длится удушение.
  • Каждое взятие в руку заново разыгрывает задержку, так что прошлый опыт с маской ничего не говорит о следующей.
  • Маска в кармане там не остаётся. Раз в 20–90 секунд она сама вытаскивает себя в руку, убирая то, что вы держали, и вся последовательность начинается сначала. Носить её с собой — игра на внимательность.
  • Двуручный предмет не защита. Если момент маски настал, пока вы его несёте, тяжёлая вещь сначала выбивается на пол, а потом маска занимает руку.
  • В половине случаев она приходит уже натягиваясь. При каждом захвате бросается монетка: либо вы получаете обычный разбег — скрытую задержку, защитное окно, броски, — либо ничего, кроме самого подъёма. Выбросить или убрать маску по-прежнему отменяет подъём в обоих случаях.
  • И с каждым разом она быстрее. Каждый захват делает следующее натягивание быстрее предыдущего. Проносите маску достаточно долго — и подъём закончится раньше, чем вы поймёте, что он начался: это и есть мгновенное убийство, просто реагировать уже не на что.
  • Убирание в карман её не успокаивает. Обнуляет нарастание только выброс маски на землю.

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

Почти всё это уже есть в самой игре. HauntedMaskItem.Update проверяет 65% каждые 5 секунд, пока выставлен флаг maskOn, и при успехе вызывает BeginAttachment, который запускает натягивание. Ваниль выставляет этот флаг единственным способом — из ItemActivate, то есть с зажатой кнопки. Мод вызывает UseItemOnClient, ту же точку входа, что и ваш собственный ввод, поэтому нажатие настоящее, со всей анимацией и сетевой синхронизацией, а не подменённый втихую флаг.

Атака состоит из двух частей, и стоит различать их. MaskClampToHeadAnimationEvent срабатывает примерно через четыре десятых секунды после начала: это момент зацепления — создаётся головная маска, а предмет в руке уничтожается, и с этой секунды выбросить его уже нельзя. Дальше идёт отсчёт attachTimer, пять секунд удушения, и убивает именно он.

Единственное, что отобрано у ванили, — это условие. Игра ведёт отсчёт и убивает по его истечении, вообще не проверяя, попала ли маска на лицо: прерванный подъём всё равно убьёт, когда часы дотикают. Здесь FinishAttaching отклоняется, пока не выставлен clampedToHead, — это и делает правдой «не на лице — не атакует». Сам отсчёт остаётся таймером.

Обе половины масштабируются вместе. Показатель скорости маски, помноженный на число раз, когда ей пришлось доставать себя из вашего кармана, задаёт maskAnimator.speed для зацепления и делит attachTimer для удушения. На 1x это ванильные ~0.4 с плюс 5 с; на 8x — 0.05 с плюс 0.6 с, то есть смерть, в которой уже не на что смотреть.

Захват использует штатное переключение слотов. Когда у маски в кармане истекает таймер, мод делает те же вызовы, что и клавиша utility-слота, — SwitchToItemSlot, а затем SwitchToSlotServerRpc, — поэтому переключение настоящее, его видят другие игроки, а EquipItem срабатывает ровно так, как если бы вы сами прокрутили до маски. Перед этим мод проверяет всё, что проверяет игра, прежде чем разрешить прокрутку: не открыто меню, не идёт анимация, вы не печатаете, не сидите в терминале. Двуручный предмет обрабатывается так же, как это сделала бы клавиша сброса, — через DiscardHeldObject, — а переключение следует после того, как игра подтвердит бросок. Затем монетка: при орле маска помечается на подъём по прибытии, а сам подъём запускается следующим кадром — маска зажимает кнопку использования и вызывает BeginAttachment, оставаясь ровно в том состоянии, в котором её оставляет успешный ванильный бросок, только без ожидания. Кадр отсрочки здесь не косметика: запуск подъёма в том же кадре, в котором маска экипирована, работает по аниматору, не обновлявшемуся с момента выхода из кармана, и событие посадки может сработать мгновенно.

Ваниль запрещает выбрасывать предмет, пока зажата кнопка использования. Это честно, когда кнопку держит игрок, — маска не отпустит никогда, поэтому запрет по умолчанию снимается. Поставьте PreventDropping в true, если хотите, чтобы маска в руке была почти приговором.

МУЛЬТИПЛЕЕР

Мод клиентский, не host-authoritative. Его безопасно запускать в лобби, где он установлен не у всех.

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

ТРЕБОВАНИЯ

  • Lethal Company V81
  • BepInEx 5.4.21 или новее

УСТАНОВКА

Через менеджер модов (рекомендуется): установите с Thunderstore через r2modman или приложение Thunderstore — зависимости подтянутся сами.

Вручную: установите BepInEx, затем положите SneakyMasks.dll в

Lethal Company/BepInEx/plugins/

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

НАСТРОЙКА

Секция [General]:

КлючПо умолчаниюОписание
EnabledtrueОбщий выключатель. При false маски полностью возвращаются к ванильному поведению.
MinDelay1.0Минимальная скрытая задержка в секундах, прежде чем маска заберёт кнопку.
MaxDelay5.0Максимальная задержка. Приравняйте к MinDelay для фиксированной, предсказуемой паузы.
ProtectionTime2.0Секунды гарантированной безопасности до начала натягивания. Заменяет ванильные 10 секунд.
PreventDroppingfalseБлокирует ли зажатая маской кнопка выбрасывание предмета и переключение слотов.
DebugModefalseПишет в консоль каждую разыгранную задержку, каждое натягивание с его длительностью и каждое разрешённое или отклонённое убийство.

Секция [Climb Speed] — множитель для всей атаки целиком: ускоряет анимацию зацепления и на ту же величину делит отсчёт удушения. При 1 это ванильные ~0.4 с до зацепления и 5 с до смерти. Записи создаются для всех masked-масок, которые знает игра, поэтому маски из других модов тоже появятся здесь.

КлючПо умолчаниюОписание
Tragedy1.6Натягивается быстрее ванили. Непрощающая маска.
Comedy0.7Натягивается медленнее ванили, заметно больше времени на реакцию.
В самой игре обе маски идут с одинаковой скоростью. Разделение — инициатива этого мода: поставьте обеим 1, чтобы вернуть как в оригинале.

Секция [Takeover] — для масок, оставленных в кармане:

КлючПо умолчаниюОписание
EnabledtrueМожет ли маска из кармана сама вытащить себя в руку. При false маски в кармане не трогаются.
MinDelay20Минимальное ожидание в секундах, прежде чем маска попробует выбраться. Разыгрывается заново при каждом убирании в карман.
MaxDelay90Максимальное ожидание. Приравняйте к MinDelay для фиксированного интервала.
ClimbAtOnceChance50Из 100 — как часто маска, вышедшая сама, приходит уже натягиваясь. 0 — никогда, 100 — всегда.

Секция [Escalation] — как маска изматывает вас за долгую переноску:

КлючПо умолчаниюОписание
EnabledtrueДелает ли каждый захват следующее натягивание быстрее. При false все подъёмы идут со скоростью самой маски.
SpeedPerTakeover0.5Прибавка к множителю за каждый захват. При 0.5: второй подъём 1.5x от базы, третий 2x, пятый 3x.
MaxSpeed8Потолок множителя. 8 — уже достаточно быстро, чтобы подъём читался как мгновенный.
Нарастание считается для каждой маски отдельно и переживает убирание в карман. Сбрасывает его только выброс маски на землю — так что маска, которую вы просто перекладываете между слотами, продолжает злиться.

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

  • Работает на всех лунах, ванильных и модовых.
  • Маски из других модов поддерживаются, если используют штатный HauntedMaskItem. Каждая получает собственную запись скорости со значением ванильной скорости по умолчанию.
  • Шанс 65%, интервал 5 секунд, сама анимация натягивания и проверки, удерживающие маски неактивными на орбите, не тронуты, поэтому моды, работающие с ними, продолжают работать.

СБОРКА

Нужен .NET SDK. Сборки игры берутся из LethalCompany.GameLibs.Steam, поэтому установленная игра для компиляции не требуется.

dotnet build SneakyMasks.csproj -c Release

build-package.ps1 собирает Release и упаковывает архив для Thunderstore в dist/. Переменная окружения LC_PLUGINS заставит копировать собранный DLL сразу в папку плагинов.

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

  • Автор: Solo00n
  • Построен на BepInEx и HarmonyX, оба под лицензией MIT.
  • Распространяется под лицензией MIT.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.