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.
DangerGift
Opening a Present has a chance to unleash a monster or a live trap instead of loot. Host-synced and highly configurable.
| Last updated | 2 hours ago |
| Total downloads | 5 |
| Total rating | 0 |
| Categories | Mods Server-side |
| Dependency string | Solon-DangerGift-1.0.0 |
| Dependants | 0 other packages depend on this package |
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.2100AudioKnight-StarlancerAIFix
Automatically assigns interior/exterior AI for enemies based on their spawn location and adjusts certain behaviors so that they act appropriately. Part of my Starlancer Series!
Preferred version: 3.13.2TRizzle-NavMeshInCompanyRedux
[V81] Enables the use of AI pathfinding and navigation in the Company Building allowing the spawning of Enemies.
Preferred version: 1.2.2README
DangerGift
Author: Solo00n
Opening a Present is a gamble: instead of loot, it can burst open to reveal a hostile monster or a live trap.
Language / Язык: English first, Русский ниже.
English
What it does
- Booby-trapped presents — only Presents are affected; every other item is untouched. On opening, a chance decides whether it gives normal loot or something dangerous.
- Monsters or traps — a triggered present spawns a small monster or a live trap (Landmine by default; Turrets and Spike traps are opt-in) instead of its loot.
- A beat of suspense — the box opens empty first, then after a short configurable delay the monster or trap appears, so there is a moment to react.
- Any monster on any moon — the monster pool is built from every loaded enemy, so the same moon no longer keeps handing you the one enemy it happens to list; the pick is genuinely random.
- Inside / outside aware — outdoor monsters won't be dropped into the facility and vice-versa, with options to relax or fully ignore that rule.
- Allow / block lists for monsters, plus per-type toggles for traps, so you decide exactly what can appear.
- Open-only-on-the-moon rule — an optional setting that only lets presents be opened while landed on a moon and standing outside the ship.
- Per-moon ignore list and separate monster / trap chances for fine control.
How it works
- A server-side hook on the present-opening routine runs the roll once, on the host.
- On a hit it suppresses the vanilla loot and opens the box with the game's own "empty present" routine, so the box plays its normal particles and sound and is cleanly removed from the opener's hand for everyone, then spawns the entity at the present's position after the delay.
- Monsters spawn through the game's own enemy-spawn method; traps through the standard networked spawn. No custom network objects, so no NetcodePatcher is needed.
- The monster pool comes from every loaded enemy filtered by the allow/block list, so any allowed monster can appear on any moon.
Multiplayer (host-authoritative)
Only the host rolls and spawns; clients never decide on their own, so everyone sees one authoritative result. Monsters and traps are spawned server-side and replicate to all clients, and the box is opened through the game's own networked routine so it disappears from the opener's hand for everyone. The host must have the mod; install it on everyone so the whole lobby shares the same config.
Requirements
- BepInEx 5.4.21+
- Lethal Company V81
- StarlancerAIFix by AudioKnight — keeps spawned enemy AI behaving correctly.
- NavMeshInCompanyRedux by TRizzle — provides navmesh so spawned monsters can path where presents are opened.
- Optional: LethalConfig for editing settings in-game.
Installation
- Mod manager (r2modman / Thunderstore Mod Manager): search for the mod and click Install; the dependencies are pulled in automatically.
- Manual: install the BepInEx pack and the required dependencies, then drop DangerGift.dll into BepInEx/plugins.
Configuration
File: BepInEx/config/Timofey.DangerGift.cfg (created on first launch). Every setting can also be edited live in the LethalConfig menu.
| Key | Default | Description |
|---|---|---|
| Enabled | true | Master switch for the whole mod. |
| SpawnChance | 0.15 | Base chance (0.0–1.0) that opening a present spawns a monster/trap instead of loot. |
| PreventOpeningOnShip | false | If true, presents can only be opened while landed on a moon and standing outside the ship. |
| SpawnMonsters / SpawnTraps | true / true | Allow presents to spawn monsters / traps. |
| MonstersSpawnChance / TrapsSpawnChance | -1 / -1 | Separate chances. -1 uses the general SpawnChance. |
| SpawnDelay | 0.7 | Seconds between opening the present and the entity appearing. |
| IsAllowlist | true | If true, only monsters in the allow-list spawn; if false, all except the block-list. |
| EnemyAllowlist | Manticoil, ... | Internal enemy names allowed when IsAllowlist is true. |
| EnemyBlocklist | (empty) | Enemy names to never spawn (used when IsAllowlist is false). |
| AllowOutsideSpawnInside / AllowInsideSpawnOutside | false / false | Relax the inside/outside rule in one direction. |
| IgnoreInsideOutsideRule | false | If true, both indoor and outdoor monsters can spawn anywhere. |
| SpawnMines / SpawnTurrets / SpawnSpikeTraps | true / false / false | Which traps a present may spawn. |
| MoonsToIgnore | (empty) | Moon names where the mod does nothing. |
| EnableLogging | false | Verbose logging, including a one-time dump of every loaded enemy name. |
Compatibility
- In-game configuration via LethalConfig (auto-detected, optional — no hard dependency).
- Uses the game's own present-opening routine and vanilla networked spawns — low conflict risk.
- Works on vanilla and modded moons, including LethalLevelLoader custom moons.
- Only touches Presents, so it coexists with mods that change other items.
Credits
- Solo00n — author.
- Built on BepInEx and HarmonyX.
- Depends on StarlancerAIFix (AudioKnight) and NavMeshInCompanyRedux (TRizzle).
- Licensed under MIT.
Русский
Что делает мод
- Подарки с сюрпризом — затрагиваются только подарки, остальные предметы не меняются. При открытии шанс решает, будет ли обычный лут или что-то опасное.
- Монстры или ловушки — сработавший подарок вместо лута спавнит мелкого монстра или боевую ловушку (по умолчанию мина; турели и шипы включаются отдельно).
- Момент напряжения — сначала коробка открывается пустой, а через короткую настраиваемую задержку появляется монстр или ловушка, так что есть миг на реакцию.
- Любой монстр на любой луне — пул монстров строится из всех загруженных врагов, поэтому луна больше не выдаёт одного и того же врага; выбор по-настоящему случаен.
- Учёт улицы/здания — уличных монстров не выбросит внутри здания и наоборот, с опциями ослабить или полностью отключить это правило.
- Белые / чёрные списки для монстров, плюс переключатели по типам ловушек.
- Правило «только на луне» — опция, позволяющая открывать подарки только на луне и вне корабля.
- Список игнорируемых лун и отдельные шансы для монстров и ловушек.
Как это работает
- Серверный перехват процедуры открытия подарка делает бросок один раз, на хосте.
- При срабатывании лут подавляется, а коробка открывается собственной «пустой» процедурой игры: обычные партиклы и звук, корректное удаление из руки у всех, после чего на месте подарка через задержку появляется сущность.
- Монстры спавнятся штатным методом спавна врагов игры, ловушки — стандартным сетевым спавном. Своих сетевых объектов нет, NetcodePatcher не нужен.
- Пул монстров берётся из всех загруженных врагов с фильтром по спискам, поэтому любой разрешённый монстр может появиться на любой луне.
Мультиплеер (host-authoritative)
Бросок и спавн делает только хост; клиенты сами ничего не решают, поэтому у всех один авторитетный результат. Монстры и ловушки спавнятся на сервере и реплицируются всем клиентам, а коробка открывается штатной сетевой процедурой, так что исчезает из руки у всех. Мод обязателен у хоста; ставьте всем, чтобы у всего лобби был общий конфиг.
Зависимости
- BepInEx 5.4.21+
- Lethal Company V81
- StarlancerAIFix от AudioKnight — чтобы ИИ заспавненных врагов вёл себя корректно.
- NavMeshInCompanyRedux от TRizzle — даёт navmesh, чтобы монстры могли ходить там, где открыт подарок.
- Опционально: LethalConfig для настройки в игре.
Установка
- Через менеджер (r2modman / Thunderstore Mod Manager): найти мод и нажать Install; зависимости подтянутся автоматически.
- Вручную: установить BepInEx-пак и обязательные зависимости, затем положить DangerGift.dll в BepInEx/plugins.
Настройка
Файл: BepInEx/config/Timofey.DangerGift.cfg (создаётся при первом запуске). Все параметры также правятся вживую в меню LethalConfig.
| Ключ | По умолчанию | Описание |
|---|---|---|
| Enabled | true | Главный выключатель мода. |
| SpawnChance | 0.15 | Базовый шанс (0.0–1.0), что открытие подарка выдаст монстра/ловушку вместо лута. |
| PreventOpeningOnShip | false | Если true, подарки открываются только на луне и вне корабля. |
| SpawnMonsters / SpawnTraps | true / true | Разрешить подаркам спавнить монстров / ловушки. |
| MonstersSpawnChance / TrapsSpawnChance | -1 / -1 | Отдельные шансы. -1 использует общий SpawnChance. |
| SpawnDelay | 0.7 | Секунд между открытием подарка и появлением сущности. |
| IsAllowlist | true | Если true — спавнятся только монстры из белого списка; иначе все, кроме чёрного. |
| EnemyAllowlist | Manticoil, ... | Внутренние имена врагов, разрешённые при IsAllowlist = true. |
| EnemyBlocklist | (пусто) | Имена врагов, которых не спавнить (при IsAllowlist = false). |
| AllowOutsideSpawnInside / AllowInsideSpawnOutside | false / false | Ослабить правило улица/здание в одну сторону. |
| IgnoreInsideOutsideRule | false | Если true — и внутренние, и уличные монстры могут появиться где угодно. |
| SpawnMines / SpawnTurrets / SpawnSpikeTraps | true / false / false | Какие ловушки может выдать подарок. |
| MoonsToIgnore | (пусто) | Имена лун, где мод ничего не делает. |
| EnableLogging | false | Подробные логи, включая однократный вывод всех имён врагов. |
Совместимость
- Настройка в игре через LethalConfig (определяется автоматически, необязателен).
- Использует штатную процедуру открытия подарков и ванильные сетевые спавны — низкий риск конфликтов.
- Работает на ванильных и модовых лунах, включая кастомные луны LethalLevelLoader.
- Трогает только подарки, поэтому уживается с модами, меняющими другие предметы.
Благодарности
- Solo00n — автор.
- Построено на BepInEx и HarmonyX.
- Зависит от StarlancerAIFix (AudioKnight) и NavMeshInCompanyRedux (TRizzle).
- Лицензия MIT.