I use whistler's Mission Pro Combo mod, which alters Mission.class. Here's my quick attack on its createClouds() method, but yet to try out. I've deconstructed the formulae (blocked off with /* */ characters bracketing the unwanted code) for the assignment of FogHaze and FogLow, and made simpler listings for easy changes for each and every of the 6 weather types (0 = clear to 6 = thunder) weather type.
Note that for FogHaze 4 is none, and 1 is the densest. For FogLow I *think* 4 is deepest and 1 is shallowest.
public static void createClouds(int i, float f) {
if (i < 0)
i = 0;
if (i > 6)
i = 6;
if (cur() != null) {
cur().curCloudsType = i;
cur().curCloudsHeight = f;
}
if (!Config.isUSE_RENDER()) {
Main main = Main.cur();
if (main.clouds != null)
main.clouds.destroy();
main.clouds
= new EffClouds(World.cur().diffCur.NewCloudsRender, i, f);
} else {
Main3D main3d = Main3D.cur3D();
Camera3D camera3d = (Camera3D) Actor.getByName("camera");
if (main3d.clouds != null)
main3d.clouds.destroy();
main3d.clouds
= new EffClouds(World.cur().diffCur.NewCloudsRender, i, f);
if (i > 5) {
try {
if (main3d.zip != null)
main3d.zip.destroy();
main3d.zip = new Zip(f);
} catch (Exception exception) {
System.out.println("Zip load error: " + exception);
}
}
/* int i_28_ = 5 - i;
if (i == 6)
i_28_ = 1;
if (i_28_ > 4)
i_28_ = 4; */
int i_28_ = i;
if (i == 0)
i_28_ = 3; //was 4 = none
if (i == 1)
i_28_ = 3; //was 4 = none
if (i == 2)
i_28_ = 3;
if (i == 3)
i_28_ = 2;
if (i == 4)
i_28_ = 0;
if (i == 5)
i_28_ = 1;
if (i == 6)
i_28_ = 1;
RenderContext.cfgLandFogHaze.set(i_28_);
RenderContext.cfgLandFogHaze.apply();
RenderContext.cfgLandFogHaze.reset();
RenderContext.cfgLandFogLow.set(0);
RenderContext.cfgLandFogLow.apply();
RenderContext.cfgLandFogLow.reset();
if (Actor.isValid(main3d.spritesFog))
main3d.spritesFog.destroy();
main3d.spritesFog
= new SpritesFog(camera3d, 0.7F, 7000.0F, 7500.0F);
}
}
public static void setCloudsType(int i) {
if (i < 0)
i = 0;
if (i > 6)
i = 6;
if (cur() != null)
cur().curCloudsType = i;
if (Main.cur().clouds != null)
Main.cur().clouds.setType(i);
/* int i_29_ = 5 - i;
if (i == 6)
i_29_ = 1;
if (i_29_ > 4)
i_29_ = 4; */
int i_29_ = i;
if (i == 0)
i_29_ = 3; //was 4 = deepest?
if (i == 1)
i_29_ = 3; //was 4 = deepest?
if (i == 2)
i_29_ = 3;
if (i == 3)
i_29_ = 2;
if (i == 4)
i_29_ = 0;
if (i == 5)
i_29_ = 1;
if (i == 6)
i_29_ = 1;
RenderContext.cfgLandFogHaze.set(i_29_);
RenderContext.cfgLandFogHaze.apply();
RenderContext.cfgLandFogHaze.reset();
RenderContext.cfgLandFogLow.set(0);
RenderContext.cfgLandFogLow.apply();
RenderContext.cfgLandFogLow.reset();
}
I'll report back after a test...