Change Weather - KonradHeinser/EBSGFramework GitHub Wiki
This ability comp allows you to make abilities that instantly change the weather when it's done casting. It also has an option that disables the ability if the weather is already active, which is set to true by default. This is what the comp looks like:
<comps>
<li Class="EBSGFramework.CompProperties_AbilityChangeWeather">
<newWeather>Rain</newWeather> <!--WeatherDef's defName-->
<noCastIfAlreadyActive>True</noCastIfAlreadyActive>
</li>
</comps>
This example combines this comp with the Ability Validator to make an ability that causes it to start raining if it isn't already raining a lot. All vanilla weathers with rain use 1 as the rainRate, but some modded ones may not, so I'm using 0.5 to catch that possibility
<AbilityDef>
<defName>StartRain</defName>
<label>start rain</label>
<targetRequired>False</targetRequired>
<cooldownTicksRange>60000</cooldownTicksRange>
<iconPath>Things/Mote/SpeechSymbols/Speech</iconPath>
<category>Psychic</category>
<hostile>false</hostile>
<verbProperties>
<verbClass>Verb_CastAbility</verbClass>
<range>0.9</range>
<warmupTime>5</warmupTime>
<requireLineOfSight>False</requireLineOfSight>
<targetParams>
<canTargetSelf>True</canTargetSelf>
</targetParams>
</verbProperties>
<comps>
<li Class="EBSGFramework.CompProperties_AbilityChangeWeather">
<newWeather>Rain</newWeather>
</li>
<li Class="EBSGFramework.CompProperties_AbilityAbilityValidator">
<maximumRainRate>0.5</maximumRainRate>
</li>
</comps>
</AbilityDef>