Loadstone
Reduces stuttering during level loading
Date uploaded | 20 hours ago |
Version | 0.1.18 |
Download link | AdiBTW-Loadstone-0.1.18.zip |
Downloads | 5307 |
Dependency string | AdiBTW-Loadstone-0.1.18 |
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.2100README
Loadstone
Reduces the stuttering experienced while loading levels, and will reduce or entirely remove the amount of time that the voicechat is unable to function for.
Warning
This mod is still in early development, and as such might be incompatible with other mods, and could potentially cause crashes. If any issue of this sort happens, please submit an issue report to the mod's github page.
Compatibility
This mod aims to be fully compatible with vanilla, and to have compatibility with as many other mods as possible. The following mods should run without errors:
- BiggerLobby
- MoreCompany
- LethalExpansion
- LethalExpansionCore
- LethalLevelLoader
This is not a comprehensive list, but rather, those mods should work without issue, and if they don't I will see to it that they work as soon as possible. Other popular mods like Skinwalkers, Ship Loot, HelmetCams, Mimics, Reserved Slot, Lethal Things, and more should also work just fine, but less commonly used mods aren't guaranteed to be compatible. If there's a mod compatibility issue, check the current issues to see if the issue has already been reported, and if not, feel free to report the issue. (It's very helpful if you can provide game logs and a mod list, as well as a profile code so that I can test and fix the issue as quickly as possible)
Configuring
This mod provides a few config options that can be used to customize exactly how loading happens. The default config is optimized to allow voicechat to work for the entire time spent loading in, while spending as little time actually loading as possible. If loading fails in some capacity, the provided config options should hopefully allow for the issue to be resolved.
All config options can be modified in-game without restarting through LethalConfig if it is installed.
- Async Dungeon Module
- Toggles Loadstone's forced async level generation. This is on by default, and if turned off will cause stuttering as the level generates. The vanilla game sets async generation to be off by default, and as such, most issues with level loading should be able to be fixed by disabling this option. The mod still improves performance in other places, but a lot of the performance uplift does come from this one option.
- Requires the Status Change Fix module to be enabled
- Async Gen Wait Time
- This config option tells the game's map generator how long it's allowed to spend each frame generating the level. Increasing this will reduce your framerate while loading, but allow for faster load times, while decreasing it will increase your framerate while loading, at the cost of longer load times. I hope to eventually convert the level generator to be truly asynchronous so that map generation can happen at full speed without compromising framerates, but that will require a deep rework of existing systems.
- Async Navmesh Module
- Enables Loadstone's async navmesh module. This module configures the game to generate the navmesh used for AI pathing in the background on multiple threads, rather than pausing the game until the calculations are done
- Dungeon Realization Module
- Enables Loadstone's dungeon realization module, which allows the dungeon to be spawned in across multiple frames to reduce lag
- Requires the Async Dungone module to be enabled
- Screen Darkening Module
- Affects the game's screen darkening effect on level gen. Can be configured between the vanilla mode (darken), a popup message, or disabled entirely, with a log message containing the level seed instead
- Status Change Fix Module
- This module fixes an oversight in LC's implementation of the dungeon completion callback which prevented it from ever being run correctly
- DunGen Optimization Module
- Optimizes the internal workings of DunGen, the tool that LC uses to generate facility layouts
- Object Pooling Module
- A highly experimental feature to cache object spawns and re-use them as needed, rather than deleting and respawning them. May cause a slight increase in ram usage, but may also heavily reduce load times
- Currently known to cause errors when used with CullCompany
- LocalPerformanceReporting
- Creates performance reports in the logs every time the ship lands to assist in debugging performance related issues
- LCSoundTool
- Should Loading Music Play
- Enable this if you wish to have music play while levels load in
- Loading Music Fade Time
- Determines how long it will take for the music to fully fade out once the level finishes loading. The default value of 15 seconds is intended to make the music fade out the moment you land on the ground
- Loading Music Volume
- How loud the loading music should be
- Should Loading Music Play
Other
If you've read this far and this mod has been helpful to you, I'd like to ask you to consider donating. Keeping this mod up to date and making improvements takes a lot of time, and any support will help ensure I can keep supporting the mod into the future. My ko-fi can be found here if you would like to donate
CHANGELOG
v0.1.18
- Revert v0.1.15
- Instead, mods should use
Loadstone.IsNightly()
to check whether the nightly or main version is in use
- Instead, mods should use
v0.1.17
- Added a new event system to the dungen optimizations
- This will allow mods which modify dungen's generation algorithm to notify Loadstone of the tileset changes made
- This feature will improve compatibility with ScarletDevilMansion, and may be used by other mods later on as well
v0.1.16
- Fixed loading music only being heard by the host
- Thanks to @zetaarcade for reporting this issue
- Fixed an error in the Dungen Optimizations which would cause errors with certain interiors
- Thanks to @tolian for reporting this issue
v0.1.15
- Gave Nightly a different GUID
v0.1.14
- Fixed an issue where an invalid tag cache would cause no return value, resulting in undefined behaviour
- Possible fix for #19
v0.1.13
- Improved tag caching invalidation
- Updated tag cache miss message and reduced its severity
- Reduced the log severity of conflict detections to Warning
v0.1.12
- Ported many new features from v0.1.8-v0.1.12 to the main branch
- Improvements to the internal codebase
- Improvements to the DunGenOptimizations module
- Reduced unnecessary indexing for tag caching
- Added performance report logging
- This feature is off by default
- Made performance stats module toggleable
v0.1.11
- Fixed a Null Reference Exception with the new performance stats module
v0.1.10
- Fixed an Incompatibility with HarmonyXTranspilerFix
v0.1.9
- Modified how logging is done internally to improve consistency
- Added a slight optimization to tag caching
- Added performance report logging
- This will be output into the bepinex log file. If you're having performance issues, please send the performance report data, or the log as a whole to help me learn where the issues are coming from
v0.1.8
- Fixed Nightly using the wrong audio file path
v0.1.7
- Fixed the issues from v0.1.5. The dungeon should now generate identically between modded and unmodded clients
- Updated main to v0.1.7
v0.1.6
- Downgraded main branch to 0.0.9 due to unexpected issues
v0.1.5
- Ported many features from nightly to main!
- Code reorganization
- Introduces modules internally, which reflects newly added toggles to disable modules if needed
- Improved Navmesh Async Generation
- The dungeon itself will now generate its navmesh asynchronously
- Removed inefficient object searches from LC's code
- Added the DunGen optimization module, which contains new optimizations to improve DunGen's performance
- Code reorganization
- Nightly only features
- Object pooling still remains nightly only due to a number of bugs
- Improved DunGen Optimization Module compatibility
- Should fix issues with SDM and other modded interiors
- Waiting music will now load as soon as you join a ship, rather than during level generation, so as to be less intrusive
v0.1.4
- The Dungeon Realization module now works with Object Pooling
- Dungeon Realization now applies the Object Pooling patches to itself if it detects Object Pooling is enabled
v0.1.3
- Added the DunGen Optimizations module
- Improves particularly slow parts of DunGen's level generation algorithm. This module will be getting more updates and improvements in the future
- Updated Object Pooling
- Object Pooling is still experimental due to compatibility issues with other mods
- Object Pooling has received improvements to which objects it is able to pool
- Most tiles can now be pooled properly without issues
- Previously, tiles would be deleted due to DunGen regenerating the level from scratch when an error occurred
- Now, DunGen will properly release tiles when regenerating the level, substantially increasing performance
- Object Pooling has been updated to work better with NetworkObjects
v0.1.2
- Added experimental object pooling
- Currently expected to be quite buggy, and so is off by default
- Has potential to greatly improve load times, but may also increase ram usage slightly, especially with many modded interiors
- Changed how async dungeon loading works to hopefully improve load times by default for slower PCs
v0.1.1
- Fixed nightly branch using the wrong audio clip name
- Improved navmesh async generation
- The dungeon will now be generated asynchronously, as opposed to just the surface
- Updated the logger names for nightly
- Patched out some inefficient and unnecessary object searches
v0.1.0
- Heavy internal code reorganization
- This will make adding and modifying features much easier in the future
- Module toggles
- Every feature is now a self contained module that can be turned on and off with its own config option
- Module toggles currently will not work properly without a game restart
- First nightly build of Loadstone released
- Nightly builds can be found on thunderstore at https://thunderstore.io/c/lethal-company/p/AdiBTW/LoadstoneNightly/
v0.0.9
- Improvements to async navmesh generation
- The game should now properly distribute navmesh generation over multiple frames
- Removed Async Gen Wait Time and Post-Load Start Delay
- These two options didn't significantly improve performance, and caused issues in certain edge cases, resulting in partially loaded moons without functional entrances or lighting
v0.0.8
- Removed unsorted search patches
- These patches didn't cover nearly every case in the game, and the overall performance impact is small enough to be disregarded for this mod, in favor of better compatibility with other mods and future updates
- Added seed pop-up config
v0.0.7
- Added the random seed pop-up as an on-screen overlay
v0.0.6
- Converted the audio file from wav to ogg to save on file space. Fixes #4
v0.0.5
- Implemented a conflict detection system to warn of potential mod conflicts
v0.0.4
- Implemented optional loading music via LCSoundTool
- To enable the loading music, you'll need to install LCSoundTool and enable it in the config
- If you wish to override the loaing music, you can use CustomSounds and override "LoadstoneLoading" with whatever you wish to replace it with
v0.0.3
- Changed the default value of Async Gen Wait Time to be 30ms instead of 100ms
- Testing has shown that this has negligible impact on loading times, but should increase smoothness during loading dramatically
- Fixed config naming
- The old config should be ported automatically, and will automatically apply the above wait-time change if the previous default of 100ms is detected
- Changed the package description
- More README modifications
v0.0.2
- Fixed some mistakes in the README
- Added more verbose debugging during patching
- Fixed #1, where a partial failure of one patch was occurring when using the automatic HarmonyX backend
v0.0.1
- Fixed README formatting