You are viewing a potentially older version of this package. View all versions.
baconya-BaconFixer-1.2.0 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
Date uploaded a week ago
Version 1.2.0
Download link baconya-BaconFixer-1.2.0.zip
Downloads 204
Dependency string baconya-BaconFixer-1.2.0

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

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.

CHANGELOG

Changelog

2.3.0

  • Any mod: particle effects no longer fill the log with Sub-emitters may not use stop actions. The Stop action will not be executed. Unity never runs those stop actions, so BaconFixer turns them off. Rain did it most: Wesley's Weathers' Hurricane and Forsaken and the Sub Systems interior logged it 3,835 times in one landing, and none with the fix.
  • New logo.

2.2.1

  • BloodVFX: a blown-apart player's head goes into a normal hotbar slot instead of the utility slot, where switching away made it seem to vanish. The ship teleporter beams that player's head up to the pad, as it does with a body.
  • A type a mod looks up before the mod that has it loads is found once that mod loads. Before, it stayed not found for the whole session.
  • SolidLib: outside music plays again. SolidLib's music patch read a value the game made private in v81, so it threw each time and no outside music played on any moon.
  • A keybind with no key active right now, such as one set to a device that isn't plugged in, no longer stops the settings from refreshing when the Escape menu closes.
  • ImmersiveVisor: hitting an enemy with no eye, such as Surfaced's Urchin, no longer throws. Its blood splat on the visor needs the enemy's eye, so every hit those enemies took, by a player or another monster, failed partway with an "Unhandled RPC exception".

2.2.0

  • One press of W or S in Lategame Upgrades' store, and in other Interactive Terminal API menus, now moves the cursor one line. It used to move twice when the key was down a little over 0.1 s, so on the store's first menu the cursor landed back where it started. Holding the key still scrolls, after a short pause.

2.1.0

  • Icon images that mods ship for RuntimeIcons no longer keep a second copy in RAM. With RuntimeIcons_BetterRotations' 797 icons, the game uses about 270 MB less RAM. The icons look the same.

2.0.0

  • BaconFixer is now only fixes, and works in any pack. Game Rules moved to BaconGameRules, and the terminal extras and Terminal quality moved to BaconTerminal. Install those to keep them. Their settings carry over.
  • BaconFixer no longer requires any other mod. Each fix checks for the mods it fixes and turns itself off without them.
  • Chameleon's manor windows and mineshaft caves now work in any interior built from those parts, not only Spooky Manor and Atlantean Citadel.
  • Sound packs with sounds for mods you don't have now load their other sounds. This works for any pack, not only LethalResonance's FacilityMeltdown sounds.
  • Fixed a crash, mostly when quitting, caused by mods that make sound clips on several threads at once, such as loaforcsSoundAPI with LethalResonance. Those sounds now load one at a time, which adds a few seconds to startup.
  • Modded scrap without a scan node now gets one, so you can scan it, such as the glasses from Farming and Cooking.
  • The DawnLib and DestroyItemInSlotFix fix now applies whatever order those mods load in.

1.2.1

  • Installing BaconFixer now also installs TerminalFormatter, TerminalUtils, WeatherRegistry and LethalLevelLoader, so every terminal extra and the whole Game Rules window work right away.
  • If you turn any of these off, BaconFixer still runs and leaves out only what needs that mod. The README lists what each one adds.
  • Moon pages now work without WeatherRegistry, with dangers for the game's own weathers.
  • The OTHER page only lists the extras you have, and the Game Rules window says when its moon clock list needs LethalLevelLoader.

1.2.0

  • Fixed a clash between DawnLib and DestroyItemInSlotFix. A key used from your inventory with GeneralImprovements stayed in its slot with no icon, and destroying an item in another slot took off the wrong carry weight.
  • ImmersiveEntrance's door portals now work on modded moons and interiors, with the screen fitted to each door. Art Gallery and a few moons with older doors still have none.
  • Atlantean Citadel's caves now follow Chameleon's cave lists.
  • The moons page now says Galetry buys scrap too, and moon pages for places that buy scrap show the buying rate.
  • Moon pages no longer show loot and interior odds for places that generate no interior, such as The Company.

1.1.1

  • Moon pages now list the odds of every interior, with anything under 1% grouped as others. They only showed the top 3 before.
  • Added this changelog.

1.1.0

  • Added Game Rules: click a save file on the host screen to set its difficulty, credits, quota, quota growth, days per quota, day length, scrap and enemies.
  • Added a Terminal quality setting to the game's Settings menus.
  • Added SORT BONUS to the terminal, and LOOT, INTERIOR and DAY LENGTH lines in colour on moon pages. The OTHER page now mentions these.
  • Weather bonuses now read value+35% items+15%.
  • Added WeatherTweaks support: combined weathers get a danger line for each weather, long names are shortened in the moons list, and hidden weather stays hidden.
  • Fixed FacilityMeltdown not starting when Mirage is installed.
  • Fixed Chameleon's door lights and snow checks on modded moons.
  • Stopped the error spam from enemies off the nav mesh, mostly Red Locust Bees.
  • Removed the timer that closed a game frozen on quit, because Thunderstore flagged it. A frozen game now has to be closed by hand.

1.0.2

  • Fixed Spooky Manor's windows with Chameleon.
  • Added a timer that closes the game if it's still running 15 seconds after you quit.
  • The README now lists each mod it fixes, why, and how to test it.
  • Added a Discord name for feedback.

1.0.1

  • Stopped LethalResonance's sound pack errors when FacilityMeltdown isn't installed.
  • Removed freeze reports.

1.0.0

  • First release: fixes for $0 store prices, DunGen load errors, dark interiors, duplicate network prefabs, mod data not registering and terminal stutter, plus weather bonuses and dangers in the terminal.