Jump to content

Ho do I randomize wind direction on a multiplayer mission?


Recommended Posts

Posted

I'm looking to ( 1) have a program to randomize wind direction and/or (2) use a command line to quickly change the weather in the mission files and briefings.   I know this has been discussed in the past here but I can no longer find this  thread.   Does anybody have any advice on how to best accomplish this?   I'm trying to achieve what  @=LG=Kathon  does on the TAW server with regular changes in windspeed between missions (and weather too).

 

I see the wind parameters in the .mission file and the briefing in the language files. If I directly manipulate the .mission file  How does this affect the .msnbin file?  Or in other words, if a .mission file is present, does the player read this file or always the .msnbin file if it is also present?  I assume there is no easy way to manipulate the .msnbin file since it is binary but I'm afraid changing the .mission file will have no effect.

 

Posted (edited)

By default the .Mission file is launched. But not ideal because it's longer to download for players.

 

I want to develop randomized weather soon for my server. If you can wait I can give you what I will develop. But if you need it faster here is what I plan to do:

1) create a script in any language that change randomly the weather parameters in the Options {} part of the .Mission file (in your case the WindLayers

2) create a script that monitors when the mission ends. Not sure what is the best way to do it. I might do it by monitoring the log files.

3) when mission ends another mission will launch if you set a rotation. It could be a copy of the same mission file (you can add several mission in the same .sds file) . Then you can launch the first script

4) compile the new mission file to .msnbin (I think I saw a tool to do that somewhere). If not you can go with the .Mission file but it will be longer to download for players. The .mission file should not be in the same folder or it will be used by default by the server

 

edit: some info about .Mission vs .msnbin: https://forum.il2sturmovik.com/topic/53743-deploying-missions-msbin-or-mission-files/?tab=comments#comment-818166

 

edit2: didn't know it was already in the games files! 

 

Edited by super-truite
  • Upvote 1
Posted

No to highjack this thread but - will this work in single mission?

Posted

not sure if the logs work the same way as in mp, but should be possible to hack something

Posted

Thanks for the information, super-truite!  You have given me a lot of information and some tools to work with.  My only question at this time is how you detect when a mission finishes?

 

Posted

it's the function line 48 of my code: I detect when the mission log file contains a 'AType:7' (it is the code associated to mission end). I use a script written by @Murleen (link in the readme) to parse the log files.

  • Upvote 1
Posted (edited)

there are some issues during the final conversion. I will solve it during the week end. I guess it is a matter of relative paths baked into to .msnbin file that is causing issues. 

 

 

edit: in fact it seems fixed. Github updated. Not satisfied though because I made some copy pasta madness to make the msnbin conversion work and I realize I do not understand at all how those briefing/list/.Mission/.msnbin interact with each others ?

Edited by super-truite
Posted

I created a topic in the tools sub-forum for future reference: 

 

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...