Jump to content

[Release] Random weather script for MP

Recommended Posts

Here is a small tool allowing to change the weather + time randomly for a server with a mission rotation.

After the ending of a mission, the script will create a new mission file with different weather parameters automatically. 
Source code with instructions: https://github.com/Super-truite/il2_random_weather_script


Executable: https://github.com/Super-truite/il2_random_weather_script/releases/download/1.0/random_weather.zip


Allow log files in il2:

Make sure gamelog=1 in your startup.cfg file

Mission files organization

The Dogfight folder should not contain the .Mission file as it would be downloaded by players by default which is not optimal (slower download speed). Instead the raw mission files should be in another folder. In my case: "C:\Program Files (x86)\1C Game Studios\IL-2 Sturmovik Great Battles\data\Multiplayer\raw_missions" You have an example of working Multiplayer folder in the project on github. To test the system, you can copy paste it in your data folder and run the script.

Configuring the script

Change the paths to your il2 installation and to your dogfight and raw mission folder in the config.ini file that is present in the dist folder. (for developers, use the config.ini at the root of the project source code directory)

Launch the script

In the dist folder, click on random_weather.exe. A command prompt will appear, then right click on the header of the command prompt and click on properties, then uncheck 'Quick Edit Mode', otherwise the process might pause.


I might add some options to have more control on the randomness of the weather for the user.




Edited by super-truite
  • Like 1
  • Upvote 2
Link to post
Share on other sites
  • 2 weeks later...
3 minutes ago, super-truite said:

no, 0 to 1. the str()[0:3] is just used for some formating of the number. If I find time I will make the weather parameters more easy to change. 


Another question, I have installed python with il2stats from Vaal (not anaconda) how to use you script with it?

Link to post
Share on other sites

you just have to install the packages needed. The best way would be in a virtual environment but if you do not use python for other stuff than il2, you can just open a terminal and do: 


pip install regex numpy

then you can launch the script in the same terminal :

python random_weather.py


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...