Skip to content

WeatherExtension

juanosarg edited this page Jun 4, 2026 · 1 revision

<- Back

WeatherExtension is a simple def extension that disables a weather from ever popping up randomly

      public bool canRandomlyGenerate = true;

How do I use this code?

This Def Extension is added to the WeatherDef of the weather you want to add it to.

If you aren't sure if the WeatherDef ALREADY has an extension (for example, if you think another mod will add their own), always use XPATH (xml patching) to add an extension, as there is already a PatchOperationAddModExtension to ensure they don't collide.

For example, the hurricane in Vanilla Psycasts Expanded:

<modExtensions>
	<li Class="VEF.Weathers.WeatherExtension">
		<canRandomlyGenerate>false</canRandomlyGenerate>
	</li>
</modExtensions>

Clone this wiki locally