ZetaArcade-WeatherInjector icon

WeatherInjector

Addon for WeatherRegistry to overwrite what vanilla weathers are registered on moons

Last updated 19 hours ago
Total downloads 12
Total rating 0 
Categories Tools Client-side Server-side Weather Tweaks & Quality Of Life
Dependency string ZetaArcade-WeatherInjector-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

mrov-WeatherRegistry-0.7.5 icon
mrov-WeatherRegistry

A mod for controlling the game's weather system.

Preferred version: 0.7.5
mrov-MrovLib-0.3.8 icon
mrov-MrovLib

Common methods for my mods.

Preferred version: 0.3.8

README

WeatherInjector

WARNING, this mod was made explicitly for use within my own modpack since i wanted to overwrite what weathers are registered to some vanilla moons for balancing purposes. By messing with this tool yourself, you acknowledge you're able to add vanilla weather to moons may not support them properly (Both vanilla and modded), which can break the balance or just straight up not work. If you would like a modded moon to support a vanilla weather that it currently does not, contact the moon dev and ask them about it!

How it works

Whilst WeatherRegistry lets you whitelist/blacklist weathers from moons, this only works if the weather is REGISTERED to the moon. All modded weathers are registered to every moon, so it is not an issue for them. But some vanilla weathers are not registered on some moons (E.g. Flooded isn't registered on Titan, Rainy isn't registered on Wesley's Gratar moon), meaning no amount of WeatherReg config stuff you do will allow them to spawn. This tool bypasses that. Its a beefed up version of my other mod Dusted, allowing for more weathers to be injected than just DustClouds.

For each vanilla weather (Except Eclipsed, as that seems to already be registered on every moon) you can specify a list of moon names in the config, along with a pair of weather variables.

What are "weather variables"? Well, as Mrov (Creator of WeatherRegistry) kindly explained to me once:

those are two magic numbers that determine some variables about the weathers: -foggy uses a radom fog density value between val1 and val2 -stormy uses val1 to determine how frequently it should strike -flooded makes water rise from val1 to val2 -eclipsed spawns val1 amount of enemies when you land on the moon

As such, val1 is handled in the first config entry for the weather, and val2 is specified below. E.g. if you wanted to add Foggy to Artifice, with a fog range between 1 and 8, then in the first config entry you would put Artifice@1, and then in the second you would put Artifice@8. These special values cannot usually be edited by anyone except the moon devs or other mods. This allows for some really interesting stuff, like changing how many enemies initially spawn during Eclipsed, or changing the direction a moon will flood!

Disclaimers

I have NO idea what happens if you Register a weather to a moon that already supports it. I would like to think it overrides it, like you could re-register flooded onto a moon to change the height/direction it floods, but that's purely speculation. Additionally, much like my other mod DustClouds, weather registering doesn't happen until after WeatherRegistry has initialized. In other words, the weathers wont be registered onto the moons by Day 1 of the save file, but will appear from Day 2 onwards. This mod likely requires both clients and host to have it, along with identical configs.

Also, because of the scuffed way how i made the config, you need to make sure the moon names + order match between both entries. Like if you do Vow@1;Assurance@1, and then Assurance@2,Vow@2, then when it grabs Vow from the first config entry, its just gonna look for the first moon's value in the 2nd entry, meaning it will take Assurance's "2". To do this correctly, the 2nd entry would need to be Vow@2;Assurance@2, so it matches the order of the first. If you copy + paste the entries from the 1st into the 2nd and then edit the values, then this is trivial as it would have the same order anyways.

Future Plans?

Assuming you can overwrite existing registered weathers with this tool, i might add Eclipsed support so you can mess with the initial spawn number of enemies. I may also tidy up the config and find a neater way to do it, i put this together kinda lazily just for personal use.

Credits

  • Mrov, for writing the intial code for Dusted which i used as a basis for this mod.