WeatherRegistry
A mod for controlling the game's weather system: scrap multipliers, weather chances, blacklisting and more!
模組介紹 作者原文
WeatherRegistry
A mod for Lethal Company allowing you to control the game's weather system.
Features
- A system for registering custom weathers and weather effects
- Weight-based weather selection system
- Weather-to-weather transition weights for creating weather progression patterns
- Level-based weather filtering system
- Scrap value/amount multipliers based on active weather
- Editor support for creating new weathers
- Multiple weather selection algorithms (Registry weighted, Vanilla, and Hybrid)
- Hot-reloadable configuration system that applies changes after completing the current day
- Terminal commands for forecasting and changing weather conditions
- and many more!
Editor components
WeatherRegistry provides Unity Editor components to help mod developers create custom weather systems:
- WeatherDefinition: Create new weathers without writing code, offering the same capabilities as code-based weather creation
- ImprovedWeatherEffect: Create custom weather effects with WeatherRegistry
- EffectOverride: Design custom weather effect overrides directly in the Unity Editor
- Visual tools for configuring weather properties, effects, and transitions
Terminal Commands
WeatherRegistry supports terminal commands for managing and debugging weathers:
- weather forecast for viewing probabilites of weathers
- weather change for changing the current weather (host only)
Weight-based weather selection system
WeatherRegistry uses a priority-based weight system instead of vanilla's hardcoded weather selection. Each weather can have multiple weight configurations, and the algorithm selects which one to use based on availability (checked in order):
- Level-specific weight: Weight assigned to a specific moon (e.g., "Experimentation@200")
- Weather-to-weather weight: Weight based on the previous day's weather (e.g., if yesterday was Foggy, today's Rainy weather uses its "after Foggy" weight)
- Default weight: Fallback weight used when no specific conditions match
Example: If you want Rainy weather to be:
- Common on Experimentation (weight: 200)
- Very likely after Foggy weather (weight: 150)
- Rare otherwise (default weight: 25)
The algorithm automatically uses the most specific applicable weight during selection.
For developers
Install the mod from Nuget:
To install the mod in Unity Editor, add WeatherRegistry and MrovLib dlls to your project. To create a new weather, create a new WeatherDefinition object. For more information, check out the "Creating and bundling weathers" guide (WIP).
License
This project is licensed under GNU Lesser General Public License v3.0.
Credits
Thank you to everyone who contributed to this project, reported bugs and suggestions! Special thanks to:
- Generic and s1ckboy for helping me test editor addons and providing feedback
- XuXiaolan for helping me test the mod on various occasions
- Beanie, Monty, Kenji, Autumnis for helping me playtest the mod _a lot of times_
- Zigzag for sending me multiple detailed bug reports
and to everyone submitting their bug reports and testing the releases!
Code used in this project is based on the following works:
- LethalCompanyTemplate (licensed under MIT License)
- LethalLib (licensed under MIT License)
- LethalLevelLoader (licensed under MIT License)
- LC-SimpleWeatherDisplay (licensed under MIT License)
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: