Results 1 to 9 of 9

Thread: SetOvercast still broken? Stuck in the sun ...

  1. #1

    SetOvercast still broken? Stuck in the sun ...

    I am currently doing a mission in which, at some point, you spend the night camping(with a cutscene). The following day, I would like to have a rainy morning, with an overcast of 0.75 .

    I was not able to do anything with this. It seems like you are stuck with the overcast that you have set in the mission editor, which is a very bad limitation. In Arma 2, you would simply call

    0 setforecast 0.75;


    Anyone was able to find a workaround to this defect?

    http://feedback.arma3.com/view.php?id=3567

    I tried the trick reported here in the notes:

    http://community.bistudio.com/wiki/setOvercast

    skipTime -24;
    86400 setOvercast 0.75;
    skipTime 24;

    Does not work …

    Seems like I am stuck with a sunny day for good. I can understand that the new cloud engine might not be able to change the overcast on the spot ... but we should be able to change it in some ways.

  2. #2
    In addition to your code, use command simulWeatherSync

    Code:
    skipTime -24;
    86400 setOvercast 0.75;
    skipTime 24;
    simulWeatherSync;
    http://community.bistudio.com/wiki/simulWeatherSync
    Engima spells E-n-G-I-m-a

  3. #3
    Quote Originally Posted by Engima View Post
    In addition to your code, use command simulWeatherSync

    Code:
    skipTime -24;
    86400 setOvercast 0.75;
    skipTime 24;
    simulWeatherSync;
    http://community.bistudio.com/wiki/simulWeatherSync
    No luck ...

  4. #4
    ^^ you can try to get inspiration from this function:

    PHP Code:
    /*    Simple Day Weather Cycle
        by gamma

        Description:
        - Allows setting a overcast forecast for each half hour of the day
        - Repeats forecast each day
        - May break with time acceleration
        - Initial startup may imply waiting for more than half hour* for first overcast set (works as expected after that)
        * If mission is set to start at 16h15 minutes it will only set the overcast at 17h00 (wait of 45 mins)
                      
    *********************************
    **** LICENSE CC BY-NC-SA 3.0 ****
    Creative Commons Attribution-Non-Commercial-Share Alike 3.0 License
    */

    GAM_DayWeatherCycle = [] spawn {
        
    // LUT with forecasts for each half hour (starts at midnight)
        // 1) example: cycles between full overcast and clear each halfhour
        //_halfHourForecast = [1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,  0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0];
        // 2) example: weather transitions
        
    _halfHourForecast = [1,1,0.9,1,0.8,0.7,0.5,0.66,0.33,0,0,0,0.5,0.65,0.7  5,0.85,0.95,1,0.75,0.85,1,0.9,0.95,1,1,0.75,1,0.95  ,0.8,0.7,0.6,0.4,0.5,0.2,0,0.1,0.2,0,0.1,0.25,0.33  ,0.5,0.66,0.45,0.33,0.25,0.5,0.5];
        while {
    true} do {
            
    _daytime = (round(daytime 2)) / 2// round daytime to each halfhour
            
    _nextchange = (_daytime 0.5); // next half hour
            
    _cycle = (_daytime 2) % 48// current cycle (48 cycles a day)
            
    _setOvercast = (_halfHourForecast select _cycle); // select overcast from LUT
            
    0 setOvercast _setOvercast;
            
    GAM_hintDebugText format [" (cycle %1)\nDaytime: %2\nOvercast: %3%4"_cycle_nextchange_setOvercast 100"%"]; // debug
            
    waitUntil {daytime >= (_nextchange - (60) )}; // wait for minute 29 or 59 before looping (otherwise engine calculates new value for next hour instead of half hour)
        
    };
    };
    GAM_hintDebug = [] spawn // show debugging info
        
    while {true} do {
            
    _daytime = (round(daytime 10)) / 10;
            
    hintSilent format ["Current\nDaytime: %1h\nOvercast: %2%3\n\nForecast%4\n\nTime left: %5m"_daytimeround(overcast 100), "%"GAM_hintDebugTextround((nextWeatherChange 60) * 10) / 10];
            
    sleep 0.25;
        };
    }; 
    Spoiler:

  5. #5
    I think the issue is that there is, for whatever reason, a forced minimum time for setOvercast to complete. It may be as short as 30 minutes, or as long as 90 minutes, I cannot remember. But I think 30. Could be related to Simulcast clouds.
    Fire And Smoke for ArmA2: JTD_FireAndSmoke v0.2

    For better future effects addons, please vote for this ticket.

  6. #6
    Elsewhere i noted that the weather change appears to always land on half hours or full hours (which implies a maximum of 59.99minutes wait from the time setOvercast is used). I never bumped into 90 minutes waits unless i mess something up.

  7. #7
    I have added a note to the defect. Still not working. I have attached a mission to test it as well.

    frag(reporter)
    2013-10-27 19:26


    - Create a new mission set at noon, sunny sky.
    - Create a Alpha Radio trigger with the "On Act Code"
    hint "Overcast 1";skipTime -24; 86400 setOvercast 0.75; skipTime 24;
    - Start the preview. Its beautiful outside.
    - Activate the trigger with 0-0-1.
    - Now you will notice that the time is darker, BUT THERE ARE NOT A SINGLE CLOUD IN THE SKY.
    - If you start the mission with an overcast of 75 directly, you will get a lot of cloud in the sky, but not if you change the overcast value during the game.

    I have attached my little mission if you want to test it out yourself.

    Here is the link to the quick mission.

    https://dl.dropboxusercontent.com/u/...st.Stratis.zip
    Last edited by frag; Oct 28 2013 at 03:34.

  8. #8
    i totally missed the original issue in the op. (i assumed it was the same issue has in the ticket)

    The desync has happened to me too, only when i accelerate the in-game time too much, it even gets more broken when making time go backwards, even if done in smaller time steps than a single big one...

    The light strength of the sun, since it's global, appears to average out the island cloud coverage, which may be the reason for the desyncs in some areas of the map (just speculation). Adjusting the time appears to mess with the cloud generation, by not leaving room for the engine to adapt and update sun light strength values.

    I think the desync issue should earn it's own ticket, and not be mixed with the setOvercast misterious unresponsiveness.

    I don't know of any workaround to force it's syncing, but to prevent it from happening.

    Edit: just tested out your repro. Confirmed, same symptom i got when advancing time too fast.
    also noticed the actual overcast after the radio trigger was > 0.737773 and updating
    nextWeatherChange was reading ~23minutes to go (don't trust it too much this command, i find it not too reliable)

    try not skipping the time the full 24 hours but a value between 23.5 and 23.59 (give a 30-60 minutes headroom for the engine do it's thing), alternatively when {skipTime -24} use 24.5 instead.

    Edit 2:
    i changed your A trigger execute to:
    Code:
    hint "Overcast 1"; skipTime -0.55; 0 setOvercast 1; // used 0.55 to fallback a little before 11h30, since mission is configured for sharp noon
    and added a B trigger with:
    Code:
    skipTime 1.5; // results in cloud coverage
    - had to move code to another trigger since the engine appears to require a small delay before reseting the time back after setOvercast command usage
    - had to advance a full hour (in relation to the initial mission time) to observe cloud coverage and have light strength synced, other values (0.5 and 1.0 for skiptime did not cut it).
    i always use 0 setOvercast x (since "Zero time means immediate change" - wiki, yet the earliest i got was 30 minutes, i assume "0" will translate to "as fast as the engine can", hence my insistence on the 30 minutes steps)
    Last edited by gammadust; Oct 27 2013 at 22:27.

  9. #9
    Master Sergeant sxp2high's Avatar
    Join Date
    Jul 16 2009
    Location
    nearestLocation [(getPos player), "nameCity"];
    Posts
    767
    I noticed that if you go to your video options and change the cloud quality you get them to re-render (instant cloud coverage). So I wonder if there's maybe some command to do this?

Similar Threads

  1. setovercast broken ?
    By [J4F] Thunder666 in forum ARMA 3 - MISSION EDITING & SCRIPTING
    Replies: 7
    Last Post: May 23 2013, 17:32
  2. setOvercast ??
    By tvig0r0us in forum ARMA 3 - MISSION EDITING & SCRIPTING
    Replies: 7
    Last Post: Mar 24 2013, 11:23
  3. On demand weather changes - setOvercast
    By ARJay in forum ARMA 3 - MISSION EDITING & SCRIPTING
    Replies: 0
    Last Post: Mar 11 2013, 04:26
  4. Tactical Sun Glasses should = no sun glare -
    By meade95 in forum ARMA 2 & OA - SUGGESTIONS
    Replies: 4
    Last Post: Dec 6 2011, 05:52
  5. setOvercast: Which init line should I use?
    By Joe98 in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 3
    Last Post: Oct 24 2011, 12:16

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •