[Tutorial] Wie ändert man das Server-Wetter oder: "Was bedeuten die Wetterwerte in init.c?"

  • Übersetzung: toDo


    Falls jemand schneller mit der Übersetzung ist, würde ich den Post löschen und wir rücken die Übersetzung in einen neuen Post.

    Sobald ich etwas Zeit finde, würde ich die Übersetzung machen. Kann aber bis zum WE dauern...




    Original:


    An update on Section D

    I figured it made no sense that it was a starting value. Because otherwise on every server it would start raining at some point with the default values, which it clearly doesn't. I think it's the value of intensity that that weather has on that server boot. Because for example, if you get weather.GetRain().Set( Math.RandomFloatInclusive(0.0, 0.2), 0, 0); to return 0 to you at start. You will never get rain in that session. This would also explain how the weather is usually the same around the whole server session, because it only marginally goes up and down over long periods of time.

    *******************

    Hey guys, just thought I'd share the knowledge a little. I am not 100% sure on any of my findings, this is all based on testing and messing around. Feel free to correct me on any point or add to the information.

    If you want you can copy and paste the whole thing over into your init.c and replace the default code, the // means it's a comment, so your server will ignore those lines as code.

    Warning, some values simply don't look right in the game. Any fog higher than say .5 is just a wall of light blue at a certain distance. Any questions? Feel free to comment, as always.

    The values are currently set to the default settings that you get when you download the server files.


    //Section A - Overall limits


    weather.GetOvercast().SetLimits( 0.0 , 1.0 );

    //limits of clouds at any point in time. Valued between 0.0 and 1.0.

    //( 1.0 , 1.0 ); max cloud all the time

    //( 0.0 , 0.0 ); no clouds ever

    //( 0.0 , 1.0 ); between no clouds and max clouds

    //( 0.5 , 0.5 ); always half clouds

    //you have to test with clouds on highest in video settings to test well

    weather.GetRain().SetLimits( 0.0 , 1.0 );

    weather.GetFog().SetLimits( 0.0 , 0.25 );



    //Section B - Change limits


    weather.GetOvercast().SetForecastChangeLimits( 0.0, 0.2 );

    //limits of how much clouds change over time

    //( 1.0 , 1.0 ); clouds change 1.0 or -1.0 within time limits from Section C

    //( 0.0 , 0.0 ); clouds never change

    //( 0.0 , 1.0 ); clouds change between -1.0 and 1.0 within time limits from Section C

    //( 0.5 , 0.5 ); clouds change -0.5 or 0.5 within time limits from Section C

    //values can never go outside of limits set in Section A

    weather.GetRain().SetForecastChangeLimits( 0.0, 0.1 );

    weather.GetFog().SetForecastChangeLimits( 0.15, 0.45 );



    //Section C - Time limits


    weather.GetOvercast().SetForecastTimeLimits( 1800 , 1800 );

    //limits how long it takes for clouds to change in seconds

    //( 1800 , 1800 ); clouds take 1800 seconds to change by a value set in Section B

    //( 1 , 1800 ); clouds take between 1 and 1800 seconds to change by a value set in Section B

    //( 1 , 1 ); clouds take 1 second to change by a value set in Section B

    weather.GetRain().SetForecastTimeLimits( 600 , 600 );

    weather.GetFog().SetForecastTimeLimits( 1800 , 1800 );



    //Section D - Session weather intensity values


    weather.GetOvercast().Set( Math.RandomFloatInclusive(0.0, 0.3), 0, 0);

    //when the server starts it's session the intensity of clouds is equal to a number with a 6-7 decimal precision within 0.0 and 0.3

    //you can change Math.RandomFloatInclusive(0.0, 0.3) to just a value

    //for example: weather.GetOvercast().Set( 0.5, 0, 0);

    //the server session's cloud intensity will be 0.5 on that session. It's still subject to change over time because of Section B and C, but the lower this value, the less of an impact the values in Section A B and C have

    weather.GetRain().Set( Math.RandomFloatInclusive(0.0, 0.2), 0, 0);

    weather.GetFog().Set( Math.RandomFloatInclusive(0.0, 0.1), 0, 0);



    //Section E - Wind settings


    weather.SetWindMaximumSpeed(15);

    //Maximum windspeed ever

    weather.SetWindFunctionParams(0.1, 0.3, 50);

    //I think the values mean that wind changes within a factors 0.1 and 0.3 of the maximum value over a certain period

    //(1.0, 1.0, 50) makes the wind 15 all the time

    //needs some further testing because wind doesn't seem to always be insane

    //(0.0, 0.0, 50) makes it wind speed 0 all the time

    //this seems to be consistently no wind

    //Again not 100% sure, especially the value 50 is difficult to see any difference when testing

    //I don’t see any difference between 50 or 1 for example

    //With lower wind speeds comes slower getting wet and drying up

    //With 0 wind speed consistently, drying up takes a very long time




    Quelle: https://old.reddit.com/r/dayz/…e_your_server_weather_or/



    Gruss [moon]