Space Engineers

Space Engineers

Not enough ratings
Official Modding Guide: Automatic Weather System
By Jakaria and 2 collaborators
This is the official guide for modding the automatic weather system in Space Engineers.
   
Award
Favorite
Favorited
Unfavorite
1. Software
Creating weather systems requires a text editor to edit the definitions. I recommend Notepad++.
Get Notepad++ [notepad-plus-plus.org]
2. Example Mod
You can download an example mod here, open the Triton.sbc and use the find function (Ctrl-F) to find "Weather"
You should see this:
3. Weather Frequency
Each planet has its own frequency of weather. It is determined by the <WeatherFrequencyMin> and <WeatherFrequencyMax> variables. Every time the planets "weather counter" reaches a random range selected, the counter will reset and create at all players on said planet. There is also a <GlobalWeather> variable, this determines if the weather created will encompass the entire planet instead of localized weather. It's a good alternative for small moons that all use a single biome, they do not use voxels.
<WeatherFrequencyMin>20</WeatherFrequencyMin> <WeatherFrequencyMax>180</WeatherFrequencyMax> <GlobalWeather>false</GlobalWeather>
All counting values are in time spans of seconds, in the example above this means a weather will be created every 20-180 seconds if there is not one already existing at the player's position.
4. Weather Generators
In each planet definition, there is a list called "WeatherGenerators", this is where you will define which voxel will create what weather effect. A WeatherGenerator contains a Voxel's MaterialTypeName and a list of possible weathers for that voxel.
<WeatherGenerators> <WeatherGenerator> abc </WeatherGenerator> <WeatherGenerator> xyz </WeatherGenerator> <WeatherGenerators>
4.1 Inside the Generator
A weather generator needs a voxel's MaterialTypeName to function, the MaterialTypeName is used instead of the voxel's SubTypeId to help prevent excessively long text files. You can think of MaterialTypeName's as a "group" for the voxel.
<WeatherGenerator> <Voxel>Snow</Voxel> <Weathers> <Weather> abc </Weather> <Weather> xyz </Weather> </Weathers> </WeatherGenerator>
4.2 Inside the Generator 2
Now that we've established what voxel we want to create weather, we need to define what weathers it will make! Each WeatherGenerator contains a list of what voxels it wants to create. It contains the Name, Weight, MinLength, MaxLength, and Offset.

The Name variable is used to create the weather, give it the name of a weather you want to make such as FogLight, or RainHeavy. You can enter the game and run /weatherlist to see all possible ones in that world.
The Weight variable is what it sounds like, it is a weight for the weather when it is being selected with RNG. A weather effect with a larger weight will be picked more often than ones with less.
The MinLength and MaxLength variables are for telling how long you want the weather to last, in seconds. It similarly selects a random range when the weather is being created.
The Offset variable is used when the weather's position is being generated, if this value is 2000, it will generate (2000 + radius) meters away from the player.
<WeatherFrequencyMin>20</WeatherFrequencyMin> <WeatherFrequencyMax>180</WeatherFrequencyMax> <WeatherGenerators> <WeatherGenerator> <Voxel>Snow</Voxel> <Weathers> <Weather> <Name>SnowLight</Name> <Weight>3</Weight> <MinLength>300</MinLength> <MaxLength>1200</MaxLength> <SpawnOffset>1000</SpawnOffset> </Weather> <Weather> <Name>SnowHeavy</Name> <Weight>1</Weight> <MinLength>300</MinLength> <MaxLength>2400</MaxLength> <SpawnOffset>1000</SpawnOffset> </Weather> </Weathers> </WeatherGenerator> <WeatherGenerator> <Voxel>Ice</Voxel> <Weathers> <Weather> <Name>FogLight</Name> <Weight>1</Weight> <MinLength>300</MinLength> <MaxLength>900</MaxLength> <SpawnOffset>1000</SpawnOffset> </Weather> <Weather> <Name>FogHeavy</Name> <Weight>1</Weight> <MinLength>300</MinLength> <MaxLength>900</MaxLength> <SpawnOffset>1000</SpawnOffset> </Weather> <Weather> <Name>SnowHeavy</Name> <Weight>1</Weight> <MinLength>300</MinLength> <MaxLength>2400</MaxLength> <SpawnOffset>1000</SpawnOffset> </Weather> </Weathers> </WeatherGenerator> </WeatherGenerators>
This is what a complete weather system may look like for a planet with only snow and ice on the surface.
5. Closure
Thanks for reading this guide, I hope it helps you create a good weather system for your custom planet. If you'd like to create custom weather effects, see the guide linked below.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2130397635
23 Comments
Maverick 18 Mar @ 8:41pm 
This guide was really great, but I still had many issues and questions, specifically for section 4.1 regarding voxels, MaterialTypeName, and SubTypeId. I made a clarification guide for those still having issues trying to get their weather working. I couldn't fit it here in the comments.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3447506508
Wildust 26 Aug, 2023 @ 9:56am 
Well, i'm probably stupid, but i can't even find the right file in my case.
I'd like to add an automatic weather system for a custom planet that has none. I can see every vanilla planet files (i.e : pertham.sbc) but in my mod's folder, i can't find it. The closest thing would be SpicePlanetGeneratorDefinitions.sbc, but there's no line inside about weather. And i'm really not sure i should paste something in there...
Can someone tell me how to get the proper file, please ?
Cthulhu 25 Jun, 2023 @ 2:46am 
the fastest guide in the west
ARK7 18 Mar, 2021 @ 6:51am 
2 questions, (modding)

1. Is it possible to change a planet’s weather on a different sbc file then the planet’s data file?

2. Is it possible to have a planet that it would default to when a different one is not in the area? (Instead of a ‘clear’ weather being on the planet, you could have light rain that would occasionally become heavy rain.)
Look_around_cutie ^^ 23 Feb, 2021 @ 11:23am 
can i spawn weather globally somehow?
Jakaria  [author] 3 Dec, 2020 @ 6:48pm 
there is also now ElectricStorm
Mike Dude 9 Aug, 2020 @ 4:46pm 
I saw the new snow, I like it! Can you explain more on the offset and radius? The weather appears to follow some sort of path, is this true?
Jakaria  [author] 7 Aug, 2020 @ 12:19pm 
there is a new MarSnow for y'all to mess about with. :)
Galeocerdo7 8 Jul, 2020 @ 10:18am 
Any guidance on using weather conditions for programmable block functions? Such as turning on decoys during thunderstorms
t2hk 2 Jul, 2020 @ 9:16am 
And yes, I do have automatic weather on.