thedemonmods-Random_Interiors_Normal_Seeds icon

Random Interiors Normal Seeds

Keeps normal positive map seeds with Hibyhii's Random Interiors by synchronizing interior choices separately. Required on every player. In-game testing pending.

Last updated 11 hours ago
Total downloads 7
Total rating 0 
Categories Bug Fixes AI Generated
Dependency string thedemonmods-Random_Interiors_Normal_Seeds-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100
Hibyhii-Random_Interiors-1.0.0 icon
Hibyhii-Random_Interiors

Randomize all Interiors, radomize interiors native to that moon, and use vanilla interior selection wherever you choose.

Preferred version: 1.0.0

README

Random Interiors Normal Seeds 1.0.0

A BepInEx compatibility mod for Hibyhii's Random Interiors. Keep Random Interiors installed.

Install

  1. Close Lethal Company.
  2. In Thunderstore/r2modman, use Settings > Profile > Import local mod and select RandomInteriorsNormalSeeds-1.0.0-thunderstore.zip. If asked for an author, use your own namespace/name.
  3. The resulting file must be BepInEx/plugins/RandomInteriorsNormalSeeds/RandomInteriorsNormalSeeds.dll.
  4. Install the same fix on every player, including the host. Everyone also needs Random Interiors and matching interior mods.
  5. Launch through your normal mod manager. Look for Normal seed compatibility enabled in BepInEx/LogOutput.log.

For manual installation, extract plugins/RandomInteriorsNormalSeeds/RandomInteriorsNormalSeeds.dll from the Thunderstore ZIP and copy it into BepInEx/plugins/RandomInteriorsNormalSeeds/ in the game or profile folder. The older manual-install ZIP can also be installed by merging its BepInEx folder. Do not install duplicate copies of the DLL.

The Thunderstore ZIP includes root-level manifest.json, icon.png (256×256), and README.md. If publishing to Thunderstore, select the AI Generated category; the package was created with AI assistance. It has not been uploaded or published on your behalf.

What it changes

Random Interiors encodes an interior ID in the upper seed bits and sets the sign bit. This produces values near -2.1 billion and discards part of the original seed.

This fix intercepts that encoding and retains the complete positive seed the game generated. It sends the selected interior ID separately using Unity Netcode named messages, ahead of level generation on the reliable fragmented sequenced pipeline. Random Interiors still handles interior configuration, selection, and no-repeat history.

It changes the actual generation seed, not just the loading-screen text. Newly generated seeds keep their original values; a legacy non-positive seed encountered by the host at level generation is replaced with a fresh value from 1 through 99,999,999. It does not rewrite your save files. Layouts will differ from the negative encoded seeds used previously.

Compatibility and test status

Prepared against Hibyhii-Random_Interiors-1.0.0. That download contains a DLL reporting assembly/plugin version 1.0.5. Other mods named Random Interiors are not covered. The fix checks for the required internal methods on startup and removes its patches if startup validation fails.

Build succeeded with zero warnings/errors. Automated checks passed for full positive seed preservation, interior IDs 0–4095, 100,000 random seeds, round-state clearing, invalid inputs, and expected hook names in the downloaded Random Interiors assembly.

An actual Lethal Company session has not been tested. The available compile references are from game version 49; game classes are accessed through reflection to reduce version coupling. Current-game runtime compatibility, multiplayer message ordering, and interactions with other mods still require playtesting.

All players need this fix. An unpatched player still expects the old negative encoded seed, so mixed lobbies can generate different interiors. Matching interior registration/order remains a requirement of Random Interiors itself. Do not combine this with another fix that replaces Random Interiors' seed encoding or networking.

Quick in-game check

Host a fresh lobby with this fix installed on everyone. Land several times with multiple interiors available. Confirm the displayed seeds are positive and vary normally, interiors still randomize, and all players see the same doors/layout/scrap. Check a moon configured for native generation too. If something fails, retain BepInEx/LogOutput.log from both host and client.

To uninstall, close the game and remove RandomInteriorsNormalSeeds.dll.

Build the source

Install the .NET 8 SDK, then run from the source directory:

dotnet build .\RandomInteriorsNormalSeeds.csproj -c Release -p:BepInExCore="C:\path\to\BepInEx\core" -p:GameManaged="C:\path\to\Lethal Company_Data\Managed"
dotnet run --project .\tests\SeedChecks.csproj -c Release -- "C:\path\to\RandomInteriors.dll"

The test DLL argument is optional. Build/test intermediate files go into a sibling workspace work folder. Only distribute the resulting RandomInteriorsNormalSeeds DLL, not the game's or BepInEx's reference assemblies.

Source is provided under the MIT license. Created with AI assistance.