Help: How do i randomize the weather?

Another way:
Harder is config level entity; change properites weather_choice .

Here empty and classic level entity.


I want add new weather weather_poor_a with rain end other objects.
So… Click to + and then choose object and write weather_poor_a.


It’s empty. So we need fill it. Main thing that we should add - weight.
So… Click to +, then choose real and write weight. Set weight from 0.0 to 1.0.
After that we should add entities list. Yeah. Click to +, choose array and write entities.

Okay. Soon we will able add rain/snow and lightnings. But right now we need click to + and select object.
When new entity is created then again click to +:

We need select text and write template.
In template write object name camera_rain_heavy_template (for rain).

Well… Now we need to create another objects. For that go back to array entities and click plus.

Well… I think here i can stop.
Yeah… You can config these objects in weather choice, but it’s will so hard for me to tell how.
I think better to do it in scene.blk.

I saved changes and restarted my level:


You can see another weather and rain too.

2 Likes

Incredibly good explained, and it worked for me with the rain! :slight_smile: but still there is one last thing…
how could i change the properties of the weather like “sun_brightness” in the editor itself? (in the text doccument i cant get it to work…)

2 Likes

Could you tell me that one last thing please?

For that you should create copy of weather object (Create weather_poor_a).
Then press +, select object and print components:


After that again ckick to +, choose real and print sky_atmosphere__sun_brightness.

After restart it will looks like (because 0 sun_brightness):

1 Like

Or maybe it’s not failed lol.
sun_brightness = 0 looks like nothing changes. Heh.

1 Like


Oh damn. It had another name. Heh.

1 Like

So i can change sun brightnress, planet scale, moon brightness (properties) with this method but only if i got a different weather without rain?

(p.s. does weight mean the chance of the weather spawning?)

Yeah. It’s chance.

Maybe. But let me check it first. Maybe you not need to create additional weather objects.

1 Like

But generated objects will not save changes?

Don’t look here. It’s just screenshot about sun_brightness name.
Weather generates by your settings. Yeah. If you will change it in editor after generate… changes will not saved.

Editor is interesting.
No. You can use duplicates.

1 Like

I edited last post* (i’m answer to it).
It works and show how to add components (object settings).

1 Like

Okay i will wait for you :slight_smile:

I meant that i’ll update a bit this post:

1 Like

this was still difficult to understand but i somehow managed to get it to work!!! Thank you so much like always… big big warm thankyou! :slight_smile:

1 Like

Thank you for all the help with mods Devenddar!

1 Like

Do I have to do this in the BLK file or is it all in the editor?

You can do it in editor, but maybe better to do it in scene.blk.
Because currently time you can’t set properties with p2/p3/p4/color data types.
Some example for level entity with weather:

entity{
  _template:t="level"
  level__blk:t="content/enlisted/levels/normandy_beach_fortified_1x1.blk"
  level__day:i=6
  level__year:i=1944
  level__timeOfDay:r=4.5
  level__timeRange:p2=3, 21
  level__patchNavMeshPath:t="%ugm/patch_nav_mesh.bin"

  "level__weatherChoice:object"{
    "weather_sunny_ver0:object"{
      weight:r=0.00025

      "entities:array"{
        "entities:object"{
          template:t="weather_clear_a"
        }
      }
    }

    "weather_poor:object"{
      weight:r=0.25

      "entities:array"{
        "entities:object"{
          template:t="weather_poor_a"
        }
      }
    }

    "weather_poor_foggy_0:object"{
      weight:r=0.55

      "entities:array"{
        "entities:object"{
          template:t="weather_poor_a"

          "components:object"{
            sky_atmosphere__atmosphere_scale:r=1
            sky_atmosphere__average_ground_albedo:r=0.1
            sky_atmosphere__moon_brightness:r=0.25
            sky_atmosphere__sun_brightness:r=0.33
            sky_atmosphere__mie2_scale:p2=175, 175
          }
        }
      }
    }

    "weather_poor_rainy_3:object"{
      level__maxNightLuminance:r=1.45
      weight:r=0.10

      "entities:array"{
        "entities:object"{
          template:t="weather_poor_a"

          "components:object"{
            sky_atmosphere__atmosphere_scale:r=1
            sky_atmosphere__average_ground_albedo:r=0.1
            sky_atmosphere__moon_brightness:r=0.25
            sky_atmosphere__sun_brightness:r=0.33
            sky_atmosphere__mie2_scale:p2=175, 750
          }
        }

        "entities:object"{
          template:t="camera_rain_heavy_template"

          "components:object"{
            drop_splashes__distance:r=250
            drop_splashes__spriteSplashScale:r=3.75
            drop_splashes__splashesCountRate:r=19500
            far_rain__density:r=30.0
            far_rain__maxDensity:r=50.0
            rain_ripples__size:r=0.075
            wetness__strength:r=0.45
          }
        }

        "entities:object"{
          template:t="lightning_animchar_manager"
        }

        "entities:object"{
          template:t="lightning_volumetric"
        }

        "entities:object"{
          template:t="lightning_panorama"
        }
      }
    }

    "weather_old:object"{
      weight:r=0.25

      "entities:array"{
        "entities:object"{
          template:t="weather_poor_a"

          "components:object"{
            sky_atmosphere__atmosphere_scale:r=1
            sky_atmosphere__average_ground_albedo:r=0.75
            sky_atmosphere__moon_brightness:r=0.25
            sky_atmosphere__sun_brightness:r=0.33
            sky_atmosphere__mie2_scale:p2=250, 750
          }
        }

        "entities:object"{
          template:t="camera_rain_light_template"

          "components:object"{
            drop_splashes__distance:r=250
            drop_splashes__spriteSplashScale:r=3.75
            drop_splashes__splashesCountRate:r=17500
            far_rain__density:r=25.5
            far_rain__maxDensity:r=45.0
            rain_ripples__size:r=0.075
            wetness__strength:r=0.33
          }
        }
      }
    }
  }

  "level__timeVec:array"{
    level__timeVec:r=11.0
    level__timeVec:r=11.5
    level__timeVec:r=12.5
    level__timeVec:r=13.0
    level__timeVec:r=13.5
    level__timeVec:r=14.5
    level__timeVec:r=15.0
  }
}

If you don’t want see any error messages then… for example… change weather_sunny_ver0 to real weather weather_clear_a.

1 Like

Do not choose any weather in “level”
Instead, manually choose and edit weather in editor (type singleton), and it will be saved even after restart
Of course, DEA has another useful solution

1 Like

It will appears on map if you set 0.0 in weight for all weather that writen in level__weatherChoice.

1 Like