BetterFog
BetterFog is a Mod Plugin used on the game Lethal Company to provide thousands of custom fog presets with modifiable densities and colors, with graphical interface and custom keybind!
Date uploaded | a week ago |
Version | 3.3.4 |
Download link | ironthumb-BetterFog-3.3.4.zip |
Downloads | 3128 |
Dependency string | ironthumb-BetterFog-3.3.4 |
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.2100Rune580-LethalCompany_InputUtils
API/Library for creating Unity InputActions with in-game re-binding support. Provides an alternative UI that allows for supporting mods to have in-game re-bindable keybinds.
Preferred version: 0.7.7README
BetterFog
BetterFog is a Mod Plugin that can be used on the game Lethal Company. If you have played the game, you may know how foggy weather is detrimental and even downright unplayable in essentially any other moon than Experimentation and Titan. BetterFog mod solves that issue by creating a preset list of fog options that can have custom densities, colors, and lighting settings. With this, there are virtually thousands of variations of custom fog presets possible. Plus, there is a graphical user interface (GUI) available when pressing F1 on your keyboard that allows for live modification of presets in game. Client-side.
Why Use This Mod?
- Feature rich configurable settings with changeable hotkeys
- Not binary with No Fog and All Fog - You can set the density and colors to any level!
- Thousands of potential fog presets. Set your game to fit your mood.
- Fog density can adapt to different moons/weathers, or just specified moons/weathers by blacklisting the others. The atmosphere can be augmented to your liking.
- Reduces eye strain. Are you in a dark room? Squinting to see through super thick fog two inches away from the screen? Darken the fog colors & decrease fog density to relieve some headache.
- No fog not only removes all fog, including ground fog clouds, smoke, and pipe fog (not including animations)
- Vanilla mode available in settings. No need to exit and disable the mod.
- Client side - you don't need the host or anyone else to have the mode for it to work (but they should still get it ;D)
- Works on custom moons! If it is too easy or hard to see on a custom moon, settings can be applied just as they are to vanilla moons.
- Works on custom weathers!
- Good for modpacks: you can lock in whatever settings you want by setting a default preset and disabling hotkeys in the config to add some style to your modpack.
Instructions
- If you are manually setting up the mod, place BetterFog.dll in "Program Files (x86)/Steam/steamapps/common/Lethal Company/BepInEx/plugins/BetterFog.dll". The fogsettingsgui file should also be included under "Program Files (x86)/Steam/steamapps/common/Lethal Company/BepInEx/plugins/Assets/FogAssetBundnle/fogsettingsgui".
- Manage presets in the config file. Settings can be tweaked for fog density and color.
- Hotkey 'n' is used to switch between presets in-game. LeftStickPress should be the button for controller, but this has not been tested yet. Keybinds are adjustable in the config file!
- Press F1 on your keyboard (changeable in config) to access GUI which allows for live modification of presets in lobbies. Note that these modified settings do not carry over if you restart the game; you must modify the config file presets to do this.
- To use density scaling for custom moons you will need to add the full name of the moon and scale to the MoonScales list. Otherwise a warning log will appear indicating that the <full name of moon> was not found in records.
- "Auto Sync" Preset/Mode Settings: Automatically apply presets and modes to moons and weathers.
- On the left of = enter a moon and/or weather name, and on the right enter a single preset or mode name.
- Entering a preset name on the right automatically sets the mode to "Better Fog".
- To have a condition that requires both a moon and weather, enter "&" in between entries. This will override single entries if both moon and weather are present.
- If a preset name is the same as a mode name, the mode will be set to "Better Fog" and that preset will be applied.
- Warning: If you create different conditions that conflict (such as none=mist,68 Artifice=No Fog and you land on Art with no weather), the leftmost condition will apply. For that reason, put double conditions with the most specific condition first, and single condition last.
- Example: "7 Dine&eclipsed=Orange Fog,61 March=Light Fog,7 Dine=Heavy Fog,eclipsed=Red Fog,8 Titan=Heavy Fog,none=Mist,none&8 Titan=No Fog"
- Please report any bugs to me as they are found. I want to help!
What is "Weather Scale"?
"Weather Scale" or "Density Scale" is essentially a toggle option that when set to true multiplies the fog density value to another value based on the moon and weather type. For example, Rend, being naturally more foggy even without weather, might have a multiplier of 0.3, while Offense with no fog may have a multiplier of 0.9. A larger value means more space between fog particles which also means thinner fog. These values can be changed in the config file. When weather scaling is disabled the fog stays static according to the preset it is on, or in other words the fog will not change based on weather or moon.
"Weather Scaled Enabled by Default" in the config file is a convenience option to enable the Weather Scale on the booting up of the game. When disabled, Weather Scale will be disabled by default and must be enabled via the GUI or hotkey.
Notes
- Starting at v3.3.0, you must disable the GUI keybind to disable the GUI. There is no longer a config option that states to disable the GUI.
- For Exclude Enemy Fog, this works best if you enable it by default. If the Better Fog is applied
Default Values Reference
It's recommended to set the mode to Vanilla if you want a most accurate Vanilla simulation. For reference here are the default "Better Fog" mode values that somewhat simulate vanilla fog. You should be able to see these in the config file descriptions as well.
[Fog Presets]
Preset 0 = PresetName=Default,Density=250,Red Hue=0.441,Green Hue=0.459,Blue Hue=0.5,No Fog=False
[Weather and Moon Density Scales]
MoonScales = 71 Gordion=1,41 Experimentation=0.95,220 Assurance=0.9,56 Vow=0.8,21 Offense=0.9,61 March=0.75,20 Adamance=0.75,85 Rend=0.285,7 Dine=0.325,8 Titan=0.285,68 Artifice=0.9,5 Embrion=0.85,44 Liquidation=0.85
WeatherScales = none=1,rainy=0.75,stormy=0.5,foggy=0.45,eclipsed=0.77,dust clouds=0.8,flooded=0.765
Prerequisites
Known Bugs
- "LC Simplified Chinese Localization" By NarkiriFox in combination with this mod causes text to lose their texture and become unreadable. This affects a very small group of players. To mitigate, set "Enable Settings Hotkey" to false and graphics will not be loaded in. This also disabled in-game settings, but text displays correctly.
To-Dos
- New modes
Screenshots
![ | ||
---|---|---|
Settings GUI | Default Fog | Heavy Fog |
No Fog | Vanilla Fog | Red Fog |
Orange Fog | Pink Fog | Blue Fog |
Questions?
You may post questions in the Lethal Company Modding discord server: https://discord.com/channels/1168655651455639582/1280288943857733632
Credits
- mrov for some code suggestions on finding fog objects.
- mrov for WeatherRegistry
- Rune580 for LethalCompany InputUtils
- DarthFigo for a code suggestion on finding enemy fog to exclude.
CHANGELOG
v3.3.4
- Mode and auto preset hotkeys now disable while in terminal, quick menu, and main menu.
- Lowered the default density for red fog slightly.
- Player can have any Clock & Region format (control panel) and decimal values in settings will show correctly.
v3.3.3
- Added new checkbox option and configuration for automatically triggered presets and modes based on weather and moons (dubbed "Auto Sync").
- Added Auto Sync hotkey configuration.
- Added indicators for the detected weather and moon in the GUI settings.
- Code reorganization, restructuring, and optimizations.
- Moons and weather names entered in config file are no longer case sensitive.
- Fixed bug where weather is not accurate when loading save file.
- Mitigation added for bug where text textures do not load when "LC Simplified Chinese Localization" By NarkiriFox is used in combination with this mod.
- Leave "Settings Hotkey" blank and graphics will not be loaded in. This also disables in-game GUI settings, but text will display correctly.
- Inverted fog density so that fog gets thickest when slider goes right. Hard stop between 0-15000.
- Dropdowns, inputs, and sliders have interaction disabled when they have no effect (eg. presets when no fog is enabled and modes when autosync is enabled).
- Removed config entries to enable/disable hotkeys for simplification. To disable a hotkey, leave the entry blank.
- Improved the "Exclude Enemies" setting to apply vanilla settings more effectively while in-game.
v3.3.0
- Updated GUI to be a separate window opened with F1 key (can be changed)
- Added more settings to the GUI with more space
- Fixed issue where the density scaling would not update when first loading in the lobby
- Fixed issue where if you go from No Fog mode to Vanilla, the Better Fog settings are applied
v3.2.11
- Split the DensityScale blacklist into separate lists for WeatherScale and MoonScale.
v3.2.10
- Exclusion for weathers and moons from WeatherScale option added in the config. Simply add the full name of the moon or weather to temporarily disable density scaling on.
- Option to disable better fog settings on enemy fog (enabled by default)
- Vanilla mode added.
- Hotkeys are disabled when typing in chat.
- Decreased logging with verbose option added.
v3.2.9
- Made a few new patches that fix more issues where game overrides BetterFog settings. In particular, the shack on Rend should no longer switch to vanilla fog when exiting
v3.2.8
- Fixed bug where changing presets in config file would not update in game.
- Fixed bug where on first opening the settings GUI, the correct preset data would not show.
- Cleaned up some code.
- Added a next mode hotkey, disabled by default. Enable it in config file.
- Identified a bug where when leaving the cabin in Rend, the game overrides BetterFog settings and reverts to Vanilla fog. I am currently trying to determine the cause of this issue.
v3.2.7
- Client players were not able to see fog update when landing ship. This has been fixed.
- When entering settings from main menu, the settings GUI would open and then not close. This has been fixed.
v3.2.6
- Fixed bug where Weather Scale checkbox would not check by default.
- Added better description for Enable Weather Scale Default option in config file.
v3.2.5
Some general fixes and small updates
- Introducing modes. There is now a dropdown for different modes. Currently there is just default(static) and No Fog. More to come!
- No Fog mode has been reworked to better remove all fog.
- The blue preset was fixed to actually be blue.
- Added settings refreshes for when the player teleports and when switching spectators.
v3.2.4
It took a while to find but I finally was able to knock out this conflicting code in the game. It was trying to change audio and fog levels based on player position and would override my mod's settings.
- Added a patch that stops vanilla fog from changing density when moving. This was especially noticeable on Rend.
v3.2.3
- Added hotkeys along with config entries for enabling GUI and toggling Weather Scale.
v3.2.2
Some good bug fixes and features were added to this update.
- Moons now affect weather scaling. For example the fog is thicker on Rend than it would be on Offense. Note that weather scaling applies after moon scaling.
- Changed config options to use a comma-separated format for moon scaling, weather scaling, and presets. You may need to remove config file and let refresh automatically for the new settings to kick in.
- Hotkeys don't work while typing in the terminal
- Fixed a bug where the fog would not refresh when landing if the weather was clear
- Fixed a bug where the WeatherScale checkbox would not enable even if the config said to do so
- Added a keybind to refresh the fog settings for the current preset. Current setting is 'r' and this can be disabled in the config
- Fixed an issue where the next preset hotkey would skip a preset and move 2 instead of 1
- Other minor bug fixes
v3.2.1
- Fixed issue joining games and changing levels (hopefully) :)
v3.2.0
Larger update: A new feature has been added, dubbed "Weather Scale" which gives the player the ability to choose whether they want the fog to change based on whether without interaction, along with other tweaks.
- Weather Scale feature and checkbox added. The default value can be set in config file.
- Alpha settings and slider removed. This settings was not appearing to do anything useful.
- GUI reorganized.
v3.1.7
- Made GUI update according to default preset selected in config on startup. Default preset name config wasn't working before either.
- Added a fog settings refresh when entering or exiting the dungeon.
- Added a short 2 second timer that refreshes the fog settings while the ship lands.
- Small code optimizations.
- New config option to apply fog to exclusion zone.
- New config option to enable no fog by default.
v3.1.6
- Added config option to disable hot key. Also made the GUI disappear when opening settings screen in pause menu.
v3.1.5
- Added customizable key bind for next preset. The default is "n", but it can be changed in the config file.
v3.1.3
Small update that fixes an issue where the Asset Bundle could not be located when running through Thunderstore mod manager. The code was looking for the correct path within the plugins folder, but thunderstore apparently has a slightly different method of saving and compiling files locally.
- Fix that allows players to see the GUI when running mod in Thunderstore mod manager.
v3.1.0
Huge updates made to BetterFog allowing for the user to manage their fog settings while in game! Colors and density can be easily modified using the sliders in the pause screen. 'n' remains to be the hotkey for changing the fog preset, but a dropdown is also available in the pause menu to do this. Please provide feedback on any encountered bugs and recommended presets.
- Created and initialized a custom Asset Bundle to be used for graphical user interface (GUI)
- Custom text and shader were added to make the text look integrated into the game well.
- Included in the bundle are a dropdown for presets, sliders for color and density, text labeling, and a checkbox to remove all fog.
- "Anisotropy" was removed from the configuration and replaced with "NoFog" value. This is just a True/False Boolean value.
- Changed some code structure and organization and changed logging.
v2.1.0
This is the first working release of BetterFog mod for Lethal Company. It needs further play testing and tuning on the default presets. Please provide feedback on any encountered bugs and recommended presets.
- Big overhaul removing several GameObjects and components to simplify code.
- Now using LocalVolumetricFog instead of Volume, VolumeProfile, and Fog types.
- Fog effects now are visible on all moons.
- General code cleanup. = Renamed from FogRemover.dll to BetterFog.dll