Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
C.3 Weathers
Updated 6 months agoCode
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@xuxiaolanon discord, whether through the lethal modding discord or DMs for more inquires or any difficulties encountered.
Pages
- A. Unity Setup
- B.1 Registering Content via Code
- B.2 Registering via Unity Editor
- C.3 Weathers
- C.4 Enemies
- C.5 Inside/Outside Hazards
- C.6 Ship Upgrades/Decors
- C.7 Items
- C.8 Additional TileSets
- C.9 Terminal Commands
- C.A.1 Footsteps
- C. Interiors
- C. Moons
- D.1 Achievements
- D.2 Vehicles
- D.3 Entity Replacements
- E.1 DawnLib SourceGenerator
- F.1 Utility Scripts
- F.2 Unity Editor Tricks
- . Interiors Code Setup
- . Interiors Editor Setup
- . Moons Code Setup
- . Moons Editor Setup