9_7_8-Diversity_v81_Patch icon

Diversity v81 Patch

Makes IntegrityChaos's Diversity 3.1.0 work on v81. A small patch on top of the original; needs Diversity installed.

Last updated 2 hours ago
Total downloads 24
Total rating 0 
Categories Mods Misc BepInEx Monsters Bug Fixes AI Generated
Dependency string 9_7_8-Diversity_v81_Patch-81.0.1
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
IntegrityChaos-Diversity-3.1.0 icon
IntegrityChaos-Diversity

Diversity is a mod that revamps few aspects of the game. Generally the entities itself.

Preferred version: 3.1.0

README

Original mod: Diversity: Remastered by IntegrityChaos. This patch needs it installed. Please support the creator there.

This patch will be taken down immediately if Diversity's creator asks. It exists only so an amazing mod keeps working on newer versions of Lethal Company. All credit for Diversity goes to IntegrityChaos ("Chaos"). If an official update for v81 comes out, use that instead.

Diversity v81 Patch

A small patch that makes Diversity 3.1.0 work on Lethal Company v81. It contains none of Diversity's files: install the original alongside it (the mod manager does this for you).

Why it's needed

On v81, Diversity 3.1.0 does nothing at all:

  1. Its package puts DiversityDungeonGen.dll one folder above the main DLL, but the mod loads it from its own folder. The missing file stops Diversity's setup on its first line, so no monster, setting or patch is ever set up.
  2. With that file found, setup gets further but then fails on v81's changed game code, so ships can't land.

What it does

It's a BepInEx preloader patcher, so it's ready before any mod loads.

  • When BepInEx loads Diversity Remastered.dll, the patch makes the v81 fixes below to a copy in BepInEx/cache/DiversityV81Patch/ and loads that copy instead. The copy is only rebuilt when Diversity's file changes. Diversity's own folder is never written to.
  • When Diversity looks for DiversityDungeonGen.dll, it's pointed at where the file really is.
Where v81 change Fix
Adding the Walker and Watcher to moons SpawnableEnemyWithRarity lost its empty constructor Uses the new (enemy, rarity) constructor
Kills (Bracken, Walker, Watcher, eye, kill zones) PlayerControllerB.KillPlayer gained a last parameter Passes v81's default (false)
Walker, eye and stairs line of sight HasLineOfSightToPosition gained a last parameter Passes v81's default (-1, all layers)
The Void DropAllHeldItemsServerRpc was removed Calls v81's DropAllHeldItemsAndSyncNonexact

Everything else is Diversity exactly as released, with all 37 of its config options (Chaos.Diversity.cfg).

Tested

One player, v81, with only Diversity 3.1.0, its two dependencies and this patch: main menu, new save, land on Experimentation, die, ship leaves, back in orbit. Diversity sets up fully (the Walker is added to every moon). Not tested yet: multiplayer, meeting each monster, the Floppy Reader and disks.

Known: at landing, Netcode logs "Spawning NetworkObjects with nested NetworkObjects is only supported for scene objects". It didn't stop the run, but it may matter with other players.

Building

sh build.sh builds patch/ and the Thunderstore zip into dist/. patcher/ is a separate tool whose check mode lists every game method a DLL uses that the current game doesn't have; use it after the next game update. reference-source/ is Diversity decompiled, for reading only.

Licence

  • This patch's code (patch/, patcher/, build.sh) is GPL-3.0 (see ../LICENSE). It contains none of Diversity.
  • Diversity is IntegrityChaos's, under CC BY-NC-SA 4.0 (LICENSE-Diversity-CC-BY-NC-SA-4.0.txt), and so are reference-source/ (their code, decompiled) and this patch's icon (their icon with a "v81 PATCH" band). The patched copy is made on your own computer and never shared.