baconya-BaconFixer icon

BaconFixer

Fixes for big modpacks: $0 store prices, DunGen load errors, dark interiors, duplicate prefab errors, broken FacilityMeltdown. Adds Game Rules for saves, weather and moon info in the terminal, and Terminal quality. Replaces DunGenReferenceFixer.

By baconya
Last updated 10 hours ago
Total downloads 285
Total rating 1 
Categories Bug Fixes AI Generated Tweaks & Quality Of Life BepInEx Client-side Mods
Dependency string baconya-BaconFixer-1.2.0
Dependants 1 other package depends on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

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

Preferred version: 5.4.2305
mrov-MrovLib-0.4.15 icon
mrov-MrovLib

Common methods for my mods.

Preferred version: 0.4.15

README

BaconFixer

Fixes for big Lethal Company modpacks in one mod, plus Game Rules for your saves, more terminal info and a sharper terminal. Players can use it without everyone in the lobby having it. Its only message of its own is the host's Game Rules day length, which players without BaconFixer ignore.

Mods it fixes

Each entry says what goes wrong, why, and how to see it yourself. Versions are the ones tested on game v81. If a mod has been updated since, its problem may already be gone.

To compare, disable BaconFixer in your mod manager, launch and follow the test, then enable it and repeat. Log lines are in BepInEx/LogOutput.log in your profile.

MrovLib 0.4.15, shown by TerminalFormatter 0.3.9: $0 store prices

  • Affects: LethalLevelLoader unlockables, such as items from Farming and Cooking Mod by MelanieMelicious, and Magic sphere from Wesley's Moons.
  • Why: MrovLib reads the price from the item's info node, which is often $0. BaconFixer uses the real price from the buy node.
  • Test: Host a lobby and type store in the terminal. Without BaconFixer these items show $0. With it they show their real price, and the log has Fixed store price for 'Magic sphere': $140.

loaforcsSoundAPI.LethalCompany 1.0.2: DunGen load errors

  • Why: It still looks for DunGen inside Assembly-CSharp, but the game moved DunGen to DunGen.dll. Its dungeon name condition throws during AudioSource.Play, which interrupts ambient sounds. BaconFixer forwards those types to DunGen.dll in memory, and game files on disk are not changed.
  • Test: Land on a moon. Without BaconFixer the log has RoundManagerPatch::Reporting(). Error: System.TypeLoadException. With it that error is gone, and the log has Forwarding 133 DunGen types from Assembly-CSharp to DunGen.dll.

DunGenReferenceFixer 0.0.1: loading crash

  • Why: Its native hook rewrites a Unity function, MonoManager::GetMonoClassWithAssemblyName, on every call with no lock, so two loading threads can collide and crash the game. BaconFixer's forwarders answer the same lookups, so that mod isn't needed. Remove it if you have it, because BaconFixer can't turn its hook off.
  • Test: This can't be triggered on demand. It was seen once in 51 launches, as an access violation at UnityPlayer.dll+0x7842E0, the function it hooks. If your log has Patched MonoManager::GetMonoClassWithAssemblyName(), the hook is still active.

LethalModDataLib 1.2.2: mod data not registering

  • Affects: Plugins that load after any plugin that failed to load, such as WesleysInteriorShenanigans inside Wesley's Interiors 5.0.19.
  • Why: It loops over every plugin, and a failed plugin aborts the loop, so plugins after it never register their mod data. BaconFixer skips failed plugins and carries on.
  • Test: Launch to the main menu with both installed. Without BaconFixer the log has a NullReferenceException from ModDataAttributeCollector. With it the log has ModDataFix: scanned N plugin(s), skipped 1 that failed to load.

LethalResonance 4.7.8, loaded by loaforcsSoundAPI 2.0.13: sound pack errors

  • Why: Its meltdown.json replaces sounds from FacilityMeltdown. Without that mod installed, SoundAPI logs errors on every launch. BaconFixer stops those errors, and your sounds stay the same.
  • Test: Launch without FacilityMeltdown. Without BaconFixer the log has 2 fail(s) while loading for meltdown.json, and Mapping: '#FacilityMeltdown:warning_voice' has not been found. With it those lines are gone.

Wesley's Interiors 5.0.19 and Wesley's Moons 7.0.18: duplicate prefab errors

  • Why: Several of their bundles ship the same prefab, such as Gastank. Netcode keeps the first copy and logs an error for the others. BaconFixer keeps the same result without the error.
  • Test: Launch to the main menu. Without BaconFixer the log has NetworkPrefab (Gastank) has a duplicate GlobalObjectIdHash source entry value of: 298664861!. With it the log has Skipped duplicate network prefab 'Gastank' (hash 298664861).

TerminalUtils 0.0.18 and WeatherRegistry 0.8.8: terminal stutter

  • Why: They call HarmonyX's AccessTools.TypeByName, which can scan every type in every assembly. BaconFixer caches the results.
  • Test: In a big pack, type moons or store for the first time after launching. Without BaconFixer it stalls for 1-2 seconds the first time. With it there is no stall.

Chameleon 2.4.6 with Wesley's Interiors 5.0.19: Spooky Manor windows

  • Why: Spooky Manor is built from the manor's tiles, including its fake windows, but Chameleon only sets windows up in the vanilla manor. In Spooky Manor they always show the default pasture view and stay on when the power goes out. BaconFixer runs Chameleon's window setup there too, so they follow its window lists and PowerOffWindows.
  • Test: Land on a moon with a different window list, such as Rend, when Spooky Manor generates, and find a room with windows. Without BaconFixer they show the default view. With it they show that moon's view, and the log has Cached window tile instance.

Chameleon 2.4.6: door lights and snow on modded moons

  • Why: The light behind the entrance doors only has colours for vanilla moons. Some moons also use the snow flag for sand footprints, such as Etern, so Chameleon treats them as snowy. BaconFixer picks the door light's colour from the moon's cave type in Chameleon's lists, and doesn't count a moon with desert or mesa caves as snowy.
  • Test: Land on a modded moon in clear weather that's in one of Chameleon's cave lists, such as an ice moon, and look at the light behind the main entrance door. Without BaconFixer every modded moon has the same default colour. With it the colour follows the moon, such as grey on ice moons.

Chameleon 2.4.6 with Wesley's Interiors 5.0.19: Atlantean Citadel's caves

  • Why: Atlantean Citadel's cave sections use the mineshaft's rock, but Chameleon only restyles rock in mineshafts, so they look the same on every moon. BaconFixer runs Chameleon's cave setup there too, so they follow its cave lists. Pieces that mix that rock with another material keep their look, because Chameleon only changes a piece's main material.
  • Test: Land on a moon with its own cave list, such as Berunah, when Atlantean Citadel generates, and find a cave section. Without BaconFixer the rock looks the same as on any other moon. With it the rock follows the moon, such as desert rock on Berunah.

ImmersiveEntrance 1.1.3 with Wesley's Moons 7.0.18: no door portals on modded moons

  • Why: ImmersiveEntrance was tuned on vanilla moons. It looks for the plane behind the outside door in a few set places, and most modded moons keep it beside the door, so it drops the portals on both sides. Many modded entrances are also turned around from their door. The mod places its screen from the entrance, then moves it to the nearest wall and floor, so the screen can face away from you, sit too high or show beside the door. BaconFixer also looks beside the door for the plane, and on modded moons and interiors it fits the screen to the door itself. Vanilla moons, and doors the mod's author placed by hand, keep the mod's own placement.
  • Test: Land on a modded moon such as Repress and hold E on the main entrance. Without BaconFixer you can't see through the door, and the log has Failed to spawn main entrance door portal. With it you can see through from both sides, and the log has Successfully linked main entrance portals.

DawnLib 0.9.27 with DestroyItemInSlotFix 1.0.0: items destroyed wrongly

  • Affects: Anything that destroys an item in a slot you aren't holding, such as GeneralImprovements' UnlockDoorsFromInventory.
  • Why: Both mods fix the same function, and DestroyItemInSlotFix changes the code DawnLib looks for, so DawnLib's fix stops halfway. That leaves the carry weight step reading the item in your hands instead of the one being destroyed. It takes off the wrong weight, or throws an error if your hands are empty. BaconFixer removes DestroyItemInSlotFix's patch, because DawnLib's covers the same thing, so DawnLib's fix can finish.
  • Test: With UnlockDoorsFromInventory on and your hands empty, click a locked door with a key in your inventory. Without BaconFixer the door opens, the log has a NullReferenceException from DestroyItemInSlot, and the key stays in its slot with no icon. With it the key is used up, and the log has DestroyItemFix.

FacilityMeltdown 2.7.5 with Mirage 1.29.1: meltdown never starts

  • Why: When the apparatus is pulled, FacilityMeltdown picks the enemies that can spawn. For an enemy DawnLib doesn't know, such as Mirage's copy of the Masked, it warns that the enemy won't spawn, then reads the enemy's DawnLib info anyway. That error stops the meltdown. BaconFixer leaves that enemy out, as the warning says.
  • Test: Land on a moon and pull the apparatus. Without BaconFixer the log has a NullReferenceException from MeltdownHandler, later MeltdownHandler was disabled without starting a meltdown, and no explosion comes. With it the log has Spawning a ... during the meltdown sequence, and the explosion comes when the timer ends.

Base game v81, EnemyAI: error spam from enemies off the nav mesh

  • Affects: Mostly Red Locust Bees, which logged 819 of these errors in one round.
  • Why: When an enemy is off the nav mesh, the game skips moving it and logs an error on every AI tick. BaconFixer skips the same step without the error, and logs once per enemy type.
  • Test: This depends on where an enemy spawns. Without BaconFixer the log repeats Agent 'Red Locust Bees' #0: Agent not on nav mesh when trying to set destination. With it the log has one OffNavMeshLogFix line for that enemy.

Base game v81, RoundManager: dark interiors

  • Why: An interior can destroy a light after the game has built its light list. The loop that switches lights then throws, so later lights keep their old state and part of the building can stay dark. BaconFixer removes destroyed lights from the list before each step.
  • Test: This needs an interior that destroys a light, and most don't. Without BaconFixer the log has a NullReferenceException with RoundManager+<turnOnLights> in its stack. With it that error is gone.

Game Rules

Click a save file on the host screen and a Game Rules window opens for it. A bar with EDIT RULES stays on the host screen. Each of the 3 save files keeps its own rules, in BepInEx/config/baconfixer.gamesetup.cfg. The challenge file isn't affected, and only the host's rules count.

Preset Credits First quota Quota growth Days per quota Day length Enemies
Easy 150 100 75% 4 +20% 75%
Normal 60 130 100% 3 +0% 100%
Hard 30 200 150% 3 -10% 125%

Normal leaves the game's values alone. Changing any value makes the file Custom, and you can also change scrap amount and scrap value, on top of weather bonuses.

  • Day length runs from -50% to +200% and shows the result in minutes. A normal day is 11.7 minutes from landing to midnight, and a moon with its own clock speed is listed in the window with its time. The clock runs slower or faster, so the ship still leaves at the same clock time, and enemies still arrive by clock time.
  • Saves already started: day length, scrap and enemies apply right away, and quota growth and days from the next quota. Starting credits and quota only apply if the crew gets fired.

Terminal additions

These need WeatherRegistry. The moons list also needs TerminalUtils, and moon pages need TerminalFormatter.

  • Moons list: weather shows its bonuses, such as Eclipsed value+35% items+15%. value is what scrap sells for, and items is how much spawns. A bonus of 0% is left out. The buying rate at the top also names Galetry when Wesley's Moons is installed, because it has a desk that buys scrap too.
  • SORT BONUS: lists the best-paying moons first, and SORT NONE puts the order back.
  • Moon pages: type a moon's name to see these lines, in colour:
    • SCRAP BONUS: the weather's bonus.
    • SELLS SCRAP: the buying rate, on moons with a desk that buys scrap.
    • LOOT: an estimate such as about $710 (16 items), from the moon's scrap table and the bonus. It's left out where no interior generates, such as The Company.
    • INTERIOR: the odds of every interior, with anything under 1% grouped as others. It's also left out where no interior generates, and needs LethalLevelLoader.
    • DAY LENGTH: real minutes from landing to midnight on that moon.
    • DANGER: what the weather does.
  • OTHER: this page now mentions the above.
  • WeatherTweaks: a combined weather gets a danger line for each of its weathers, and long names are shortened in the moons list, such as Eclip+Flood. On a moon where WeatherTweaks hides the weather, BaconFixer shows no bonus or danger, and SORT BONUS counts it as no bonus, so nothing gives it away.

Terminal quality

A Terminal quality dropdown in the game's Settings, in both the main menu and the pause menu. While you use the terminal, the game draws your view into its own small texture, which is why the text looks rough. It saves right away, without Confirm, in BepInEx/config/baconfixer.cfg.

  • Normal: the game's own size, 970x580. This is the default.
  • High: 1.5 times that.
  • Max: your screen's height.

Higher settings cost frames, but only while the terminal is open.

Limits

Fixes for other mods check that those mods are installed, and skip themselves if they are not.

When the host changes day length, players without BaconFixer run the game's normal clock, so theirs drifts between the game's own time syncs.

LOOT is an estimate. A mod that changes a moon's scrap when you land, such as ButteRyBalance on vanilla moons, can make it read high or low.

ImmersiveEntrance still has no portals in a few places. Art Gallery's door is set against the room's solid wall and fades in and out with distance, so there's no doorway to see through. Galetry has no main entrance, and some moons, such as Duckstroid-14 and Acidir, have an older door. The doors still work normally, and the mod logs Failed to link main entrance portals.

Different prefabs that share a hash still spawn as the first one registered, because a real fix needs every player's game to agree. BaconFixer logs a warning for these, such as Network hash 3155849242 is shared by 'GASteelDoorMapModel' and 'SteelDoorMapModel2'.

Two log messages remain. DawnLib can log Couldn't match DestroyItemInSlot while loading, before BaconFixer has removed the patch that causes it. WesleysInteriorShenanigans, inside Wesley's Interiors, warns that it could not be instantiated. It was built for an older game version and stays off on purpose.

Feedback

Found a bug, or know a mod BaconFixer should fix or support? Message me on Discord: bac_kun.

AI disclosure

The code and this README were generated with Claude Code, Anthropic's AI coding agent. The author directed the work and tested the mod in game.