Kazudra wrote:Any way this can work with Mapinfo or something like that?
In /weather/weatherhandler.zs, around line 341, here's a brute-force method to set the weather to particular settings depending on the map:
Code: Select all
rs = RainAndSnow(Actor.Spawn("RainAndSnow", (0,0,0), ALLOW_REPLACE));
if (rs)
{
rs.SetPlayerID();
if (level.levelNum == 1)
rs.SetWeather(WT_RAIN, IT_HEAVY);
if (level.levelNum <= 4)
rs.SetWeather(WT_SNOW, IT_LIGHT);
if (level.levelNum >= 14)
rs.SetWeather(WT_NONE, curIntensity);
if (level.levelNum >= 5 && level.levelNum <= 13)
rs.SetWeather(WT_SNOW, IT_NORMAL);
}
(PLEASE DO NOT USE AS IS)
Not super experienced in ZScript/C# yet, but as a result, this should be very readable, but to break it down:
The first 'if' checks if the map number is 1. If the map is map01, it will start a heavy storm.
The second will make all maps that are equal to or greater than map04 have a light snow.
The third does the opposite, all maps that are less than or equal to 14 will have clear weather.
Finally, the fourth is useful for a specific range of maps, checking first if the level number is higher than or equal to 5, then if it's less than or equal to 13. So map05 to map13 will have normal intensity, snowy weather.
With the examples provided, you should be able to copy/paste one of these, and replace the weather type, intensity and map range as needed. The only other tweaks would be removing the keyconf file if you want a quick and dirty way to remove the player's ability to change the weather and intensity.
Remember to credit the author of this mod! As for me, this is just pseudocode, so feel free to use it without giving credit.