C.3 Weathers

Updated 2 days ago

Code

Editor

[DISCLAIMER]
This page assumes you've correctly setup Unity and followed the steps within the first two pages https://thunderstore.io/c/lethal-company/p/TeamXiaolan/DawnLib/wiki/4097-a-unity-setup/
https://thunderstore.io/c/lethal-company/p/TeamXiaolan/DawnLib/wiki/4099-b2-registering-via-unity-editor/
If you have not finished those steps, finish them and come back to this page.

Make a folder for your weather and inside it add a Registry folder.
In the registry folder right click, hover over create -> DawnLib -> Definitions -> DuskWeatherDefinition.
Fill in the fields such as Namespace (code_rebirth), WeatherName (Meteor Shower), Temporary+Permanent GameObjects (the difference is that temporary gameobject is activated while the player is outside the interior only and Permanent is always active, handled by vanilla), SunAnimatorBool (stormy for a stormy look outside) and TerminalColour for how it looks when viewing it on the ship monitor.
Give the weather an integer spawn weight, a scrap value and scrap amount multiplier for how the weather affects scrap generation on loading in.
IsExclude option for weather the exclude/include string list will include or exclude moons from showing up, for more details on that string look into WeatherRegistry's config (this uses WeatherRegistry as a backend so building the package with the ModInformation will add WeatherRegistry as a dependency on the manifest).
Put the DuskWeatherDefinition and all assets related to it in a bundle like meteorshowerassets.
Include this AssetBundle into the list of AssetBundles in your ContentContainer (made during the Unity Setup page).

Done!

[Remember]
You may always contact @xuxiaolan on discord, whether through the lethal modding discord or DMs for more inquires or any difficulties encountered.