LocalFlashlight
Gives the player a flashlight that is very configurable
Date uploaded | a month ago |
Version | 1.5.1 |
Download link | Command293-LocalFlashlight-1.5.1.zip |
Downloads | 4328 |
Dependency string | Command293-LocalFlashlight-1.5.1 |
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.4AinaVT-LethalConfig
Provides an in-game config menu for players to edit their configs, and an API for other mods to use and customize their entries.
Preferred version: 1.4.2README
LocalFlashlight
A Lethal Company mod which adds a flashlight that has a recharging battery, with visual indicators, custom colors, multiple recharge options for the battery, and more!
Mod capabilities
The mod adds a "flashlight" that uses a battery system which can be recharged in different ways depending on what you choose.
It also adds an indicator for the battery that has multiple styles and settings.
The mod also has a plethora of settings, so you can modify almost everything it does.
Installation and configuration
The mod can be installed using the mod manager of your choice, or it can be installed manually by installing BepInEx for the game, downloading the mod manually from the Thunderstore page of the mod or from the Releases tab in the Github repository (you also need to download the dependencies for the mod, which are InputUtils, LethalConfig and TerminalAPI), then extracting the zip file inside the BepInEx/plugins
folder after starting the game once with BepInEx installed.)
Configuration of the mod can be done after starting up the game with the mod enabled through the Config editor (Thunderstore Mod Manager or r2modman) or by opening the command.LocalFlashlight.cfg
file made by the mod in the BepInEx/config
folder.
Alternatively, you could edit the settings with LethalConfig in the game, as it is now one of the mod's dependencies (besides networking, that needs to be set through the config itself, not through LethalConfig).
Mod settings
-
Intensity, range and spot angle of the light can be set to your liking
-
Some battery settings can also be modified
-
The indicator has six different styles (Low battery warning, Bar, Text, Circular Bar, Vertical Bar, All) and four different text info styles (Percentage, Accurate percentage, Time, All)
-
Custom colors can be set for the light and indicator with hex codes
-
The light can also be configurated to have shadows (or not)
-
Option to prioritize in-game flashlights before the local flashlight (when they're in the inventory, or when a helmet light is active) when trying to toggle them. (unfortunately, laser pointers also count as flashlights)
-
Multiple recharge options for the flashlight (with some being a little too good, but they all have their upsides and downsides depending on how you set up the mod)
-
Multiple options for the sounds of your flashlight
-
Networking can be used to play with other people that also have networking enabled, while also being able to see their lights alongside their colors and hearing the sounds they set
Indicator config styles
Indicator styles
- Bar
- Percentage
- Circular bar
- Vertical bar
- Full info
- Low battery warning (can be disabled in config)
Battery recharge options
Recharge options
-
Time: The battery recharges whenever you're not using the flashlight, with different cooldowns before starting to recharge depending if you've used up the entire battery or not. Affected by the recharge multiplier, intended for decently short flashlight battery spans.
-
Shake: The battery ONLY recharges if you shake the flashlight, with it having a short cooldown before you can shake it again; it also takes a bit of stamina to do so. Affected by the recharge multiplier, intended for shorter flashlight battery spans.
-
Dynamo: The battery recharges over time, but only while you're winding it! Slowly builds up more energy (up to 1.5 times the normal drain multiplier), however you walk, run and crouch slower while winding the flashlight, and your stamina does not regenerate as fast as usual. Affected by the recharge multiplier, intended for decently short flashlight battery spans.
-
Ship Recharge: The battery recharges and stays at full battery whenever you're in the ship, as if you were recharging a normal flashlight in the ship (but faster, i guess). Not affected by the recharge multiplier, can ONLY be fully recharged while in the ship and intended for longer flashlight battery spans.
-
Facility Powered: Cuts your light's intensity in half (depending on the configs) if you use it, however it is affected by the facility's power managed via the breaker box, so as long as there is power in the facility, the battery will not deplete. There is no way to recharge it other than turning the power back on, so if the Apparatus is taken, good luck!! Not affected by the recharge multiplier, and cannot be recharged without the facility power being turned on. Intended for long flashlight battery spans.
Custom sounds and how to change them
Custom sounds are located in the mod's /customsounds
folder (BepInEx/plugins/Command293-LocalFlashlight/customsounds), with the already existing files being the mod's default sounds. The sounds can be changed freely (with the only limitation being that the file needs to be in either .ogg
, .wav
or .mp3
format for the custom sound to work), however their file name must stay the same.
Custom sound file names and what they're assigned to
-
lighton_custom: Flashlight turning on
-
lightoff_custom: Flashlight turning off
-
lowtoggle_custom: Flashlight turning off when the battery runs out
-
recharged_custom: Flashlight's fully recharged sound when using the
Time
recharge option -
reloadlight_custom: "Shake" sound when using the
Shake
recharge option -
dynamo_custom: Dynamo use sound when using the
Dynamo
recharge option -
flashDown_custom:
Facility powered
's "power disabled" warning sound -
changepos_custom: Sound when changing the light's position
-
denytoggle_custom: Sound when denying powering the flashlight on
[!IMPORTANT] The mod supports networking, however it is still being worked on and has some bugs, and you will also not be able to join other lobbies that do not have this mod alongside its networking.
The mod's keybinds are in Settings -> Change keybinds
, as this mod uses LCInputUtils to add mouse and controller binds.
If you found a bug, error or encountered something that shouldn't have happened with the mod, then feel free to open a new issue on the Github page or the LC modding discord server to report it.
CHANGELOG
V1.5.1
- Fixed the
Full battery recharge sound toggle
config not working - Fixed a gamebreaking bug that prevented players with the mod from loading the company building (because the mod couldn't find breaker box to determine if the power was on or off)
- Added a config to adjust other players' flashlight volumes (in lobbies with networking enabled, doesn't affect normal flashlights)
V1.5
- Added warning popup when launching the game (or exiting a lobby) with networking enabled
- Fixed networked lights not turning off when their respective player dies
- Added
LobbyCompatibility
as a soft dependency (to check and disable joining other lobbies without the mod and its networking) - Added compatibility with
ReservedItemSlots
(as a soft dependency, only used for thePrioritize in-game flashlights
config to work properly when a flashlight is in a reserved slot) - Laser pointers no longer count as flashlights to the
Prioritize in-game flashlights
config - Recharging the dynamo flashlight is now also heard for other players with networking enabled
- Added settings for the light's position and rotation (with two positions, the "left" and the "right" positions and rotations)
- Added option for enabling custom sounds to the flashlight (requires LCSoundTool to work, it'll default to the in-game flashlight sounds if it isn't installed or enabled)
- Deleted every sound option besides
In-game flashlight
, as custom sounds have been added - Changed some config names and descriptions to make them clearer, (you will probably have to regenerate the config file, by deleting the previous config file and opening the game to generate a new config file, so the configs can register properly)
V1.4.13
- Fixed
Ambient light intensity multiplier
not working as intended - Added audio occlusion to other players' lights when using networking (so you can't fully hear flashlight sounds through walls)
- Fixed noises audible to the world sometimes not working properly when inside the ship while its doors are closed
V1.4.12
- Fixed networking not working at all, alongside the two changes
- Also added
TerminalApi
as a dependency. It will be used in future updates
V1.4.11
- Fixed the flickering when the battery ran out not occuring due to an oversight in the sound playing part of the mod, where it would forget to check for networking before calling the server rpc
V1.4.1
- Fixed battery not being capped at the maximum time if not using Time recharge method
V1.4
- Added
LethalConfig
as a dependency to make setting configs easier for the player (and also other things besides that) - Changed color configs to a hex code instead of three separate configs for red, green and blue values (for the flashlight and the indicator)
- Fixed pretty much all the bugs related to the
Prioritize in-game flashlights
setting - Reworked the
Apparatice
recharge method to function based on the power inside the facility (and renamed it accordingly toFacilityPowered
) - Made some adjustments to the
Dynamo
recharge method (higher total recharge power, though it requires a little time to ramp up) - Made the sound played when recharging the flashlight using the
Dynamo
recharge method ramp up and back down instead of abruptly playing and stopping - Added option to adjust the in-game's natural "dark area light" intensity percentage to make seeing in dark areas dependent on the flashlight (set to the normal ambient light intensity by default)
- Added setting to choose if the flashlight should be fully charged when you enter orbit (default: true)
- Fixed some scraps held by player blocking the light if the
Enable shadows
config was enabled - The flashlight no longer needs to be turned on to change its position and rotation (from left to right and vice-versa)
- Changed some existing sounds in some of the sound options
- Fixed vertical rotation inconsistencies when switching flashlight positions for the first time after joining a game
- Reworked how sounds are loaded to account for other players using different sound options
- Removed config related to enemies hearing sound, and with this change some sounds were changed to no longer be heard by enemies
- Added a way for all players to see eachother's lights using networking. This is still something that's worked on, so it's still an experimental feature.
- Overall code improvements, which should solve some issues with lag (if there were any that I wasn't aware of).
- Made some configs even clearer, and added a few caps to their values
! make sure to regenerate the config file (deleting and generating it again by opening the game), as i'm pretty sure some configs will no longer apply any changes because they've either had their name changed or have been outright deleted.
V1.3.1
- Added flashlight dimming (with config to set at what battery percentage the light should stop dimming)
- Added flashlight flickering when the battery runs out or when ghost girl changes behavior state and flickers every other light (default is set to true)
- Hopefully fixed some bugs related to the "Prioritize flashlights in player inventory" config
- Changed the way the mod's assetbundle is loaded to prevent using up RAM while loading it
- Added 5 frames of leniency before the mod sends an error message if it has errors while trying to find the local player controller
V1.3
- Added config option for various battery recharge methods, each with their upsides and downsides (and some with configs).
- Added full recharge sounds to the flashlight when using the time recharge config
- Added config option for sounds to be heard by enemies (default is set to true)
- Cleaned up code for optimization
- Made most logs debug logs to avoid log spam
- Made it so the error caused by the mod not finding the local player only gets sent once instead of every time per frame
- The HUD no longer shows up if the light doesn't work
- Made
InGameFlashlight
the default sound option for the mod to use - Made configs look cleaner (at least when looking at them with LethalConfig)
- Changed some names for the sound options
- Added keybind to change light position from left to right, and vice versa to prevent the light from being covered by any items currently held (default key: H)
- Added keybind to recharge the flashlight (used for Shake and Dynamo recharge methods) (default key: Q)
V1.2.21
- Fixed light not turning on anymore (with the "Prioritize in-game flashlights" config set to true) if the player dies until they pick up and drop another flashlight
- Changed some position and rotation values of the light
V1.2.2
- Added config option to prioritize flashlights in the player's inventory until their battery is depleted
- Added a third sound option (InGameFlashlight)
- Added more logs
- Changed some config descriptions to be more clear about what they do (i recommend deleting the config file as it might cause some issues if the new configs overlap the old ones)
V1.2.1
- Added
LCInputUtils
as dependency for easier keybind configuration - Added sound options (currently only two of them, Default and ActualFlashlight)
- Updated README file to add installation and configuration, and a small note about the new keybind configurations
V1.2
- Added separate config options for light color and HUD color
- Some settings can now be changed without having to rejoin a lobby (specifically the ones that aren't important, like colors or intensity)
- Added configs for indicator position on the screen (IndicatorPositionX and IndicatorPositionY)
- Added config for battery text options (Percentage, AccuratePercentage, Time, All)
- Added an experimental config to enable light shadows
- Fixed indicator not fading in when using the flashlight at abnormally high battery times
- Fixed bugs related to player death not turning off the flashlight, which resulted in battery loss when dead
- More overall code changes
- Added more logs in case something goes wrong
- Updated README
V1.1
- Made changes to the code so set configs can apply when entering a lobby
- Added two HUD styles (CircularBar, VerticalBar)
- Added some debug logs (LightController made, light toggle)
- Fixed flashlight toggling when pressing the toggle key in the pause menu
- Added battery regen cooldown config
- Volume now updates immediately after config change