Jump to content

[Guide] Modify Server Temperature with Snowstorm


NetShark

Recommended Posts

Modify Server Temperature with Snowstorm

 
Hello Epoch Forums,
This is my first post and I hope I wrote it on the right area.

 

This is just a way to achieve this, or at least the way I did it. Im sure there should be other ways to get this same effect so you should look at this guide as a suggested way.
 

What's this?

 This post is meant to help everyone to modify a dayz epoch server temperature for any reason and add a snowstorm(optional). This process should work on all "Normal Dayz Epoch Maps", if you have an additional mod with a different map, then this guide might not work.
 

Why would I change this?

 Well, this is just a personal decision. In my case, I wanted to give to introduce my server to the christmas spirit. So I decided to use a third part script to add snow and modify the server temperature to create that immersing effect during this season.
 

Disclaimer

1. I didn't create any new script. And the scripts mention below are just a suggestion, so you are free to choose another one.
2. Before changing anything, create backups. Specially if this change will be during christmas season only and after that you'll need to go back.
3. Try all these modificactions on a local server first. I do not recommend to try this guide on your actual server, because this might need a lot of restarts until you get the desired effect. I can suggest a good guide on how to create a dayz epoch local server
 
 

Process

This guide has 2 parts, first I added a snow script, so that my server will have a great permanent snowstorm. After adding the snow script, then I modified the server temperature to create the immersing effect. If you don't want to add the snowstorm script you can skip that part and go directly to the temperature process.
 
SnowStorm
Install a Snowstorm Script. I used a Snowstorm Script created by GaspArt. You can go and check the installation process in his I wont explain how to install that script because everything is well explained there. Also if you have any problem with that, go and ask him in his post.
 
Modifing Server Temperature
What we're going to do now is bring all the needed files to our Mission PBO so we can modify them without problems.

1. Go to your dayz_code.pbo file, open it and extract the file compiles.sqf that is inside a folder called init.
2. Put that file inside your Mission PBO in a folder called custom. If you already have a folder with that name you can use it.
3. Open the init.sqf file that is in the root of your Mission PBO, and find the line:

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";

Modify that line this way:

call compile preprocessFileLineNumbers "custom\compiles.sqf";

NOTE: You could also comment out the original line and add the one I suggest.
 
4. Go to your dayz_code.pbo file, open it and extract the file variables.sqf that is inside a folder called init.
5. Put that file inside your Mission PBO in the same custom folder you created.
6. Open the init.sqf file that is in the root of your Mission PBO, and find the line:

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";

Modify the line this way:

call compile preprocessFileLineNumbers "custom\variables.sqf";

NOTE: You could also comment out the original line and add the one I suggest.
 
7. Go to your dayz_code.pbo file, open it and extract the file fn_temperatur.sqf that is inside a folder called compile.
8. Put that file inside your Mission PBO in the same custom folder you created.
9. Open the compiles.sqf you moved to your custom folder inside your Mission PBO, and find the line:

player_temp_calculation    =        compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_temperatur.sqf";

Modify the line this way:

player_temp_calculation    = compile preprocessFileLineNumbers "custom\fn_temperatur.sqf";

 
Adjusting Temperature
Now it's time to adjust the server temperature. First off, I want to say that the temperatures I used are for an Artic Environment. I will add some statistics  so you can adjust the temperature according to your likings.
 
1. Go to the file variables.sqf you have in your custom folder inside your Mission PBO, and find this:

dayz_temperatur        =     36;        //TeeChange
dayz_temperaturnormal  =     36;        //TeeChange
dayz_temperaturmax     =     42;        //TeeChange
dayz_temperaturmin     =     27;        //TeeChang

Modify those lines this way:

dayz_temperatur       =     25;        //Default 36
dayz_temperaturnormal =     25;        //Default 36
dayz_temperaturmax    =     40;        //Default 42
dayz_temperaturmin    =     10;        //Default 27

2. Go to the fn_temperatur.sqf file you have in your custom folder inside your Mission PBO, and find this:

_vehicle_factor     =   4;
_moving_factor      =   7;
_fire_factor        =   15;   
_building_factor    =   7;
_sun_factor         =   4; 

_water_factor       =   -8;
_rain_factor        =   -3;
_night_factor       =   -1.5;
_wind_factor        =   -1;

Modify those lines this way:

_vehicle_factor   =   30;
_moving_factor    =   15;
_fire_factor      =   300;
_building_factor  =   35;
_sun_factor       =   -20;
    
_water_factor     =   -100;
_rain_factor      =   -80;
_night_factor     =   -30;
_wind_factor      =   -20;

Statistics (minutes:seconds)
Out in the sun = From the highest to the lowest temperature 5:20
At night = From the highest to the lowest temperature 3:20
In the water = From the highest to the lowest temperature 0:15
Inside a Vehicle = From the lowest to the highest temperature 5:20
Inside a Building = From the lowest to the highest temperature 3:00
 
Important Info:
a. The _fire_factor is crucial, it should be always higher than _rain_factor + _night_factor + _wind_factor absolute values. In my case I decided to add a very high value.
b. _building_factor and _vehicle_factor should always be higher than _night_factor or _sun_factor. Otherwise you'll be cold even inside a building or a car at night.
c. Be careful with the _rain_factor, it can multiply the _wind_factor and _sun_factor effect.
 
Adjusting Heatpacks
Since you have modified the server temperature, Heatpacks will not have the same warming effect they were used to have. So that's why I decide to adjust them so the can be useful in my Artic Environment.
1. Go to your dayz_code.pbo file, open it and extract the file player_useMeds.sqf that is inside a folder called actions.
2. Put that file inside your Mission PBO in the same custom folder you created.
3. Open the compiles.sqf you moved to your custom folder inside your Mission PBO, and find the line:

player_useMeds =            compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_useMeds.sqf";

Modify the line this way:

player_useMeds = compile preprocessFileLineNumbers "custom\player_useMeds.sqf";

 
4. Open the player_useMeds.sqf you just moved to your custom folder inside your Mission PBO, and look for the next line around line 29:

dayz_temperatur = (dayz_temperatur + 5) min dayz_temperaturmax;

Modify the line this way:

dayz_temperatur = (dayz_temperatur + 30) min dayz_temperaturmax;

NOTE: What I did was modify the 5 for a 30 to adjust its warming effect. You could adjust it also according to your likings.
 
 
 
 
 
I hope this post can be useful for someone, Im not an expert on this but I had to spend some time testing and searching until I understood it. Then I decided to share it so anyone can give to his server a very nice christmas look. :)
 

Special Thanks to jahangir13 who gave me a hand on this.

 

Best Regards,

 

NetShark

Link to comment
Share on other sites

  • 7 months later...
  • 6 months later...

Hi, Im sorry, I've been out of my server for a long time.

About the problem of 0 temperature, I'd recommend to check if you don't have other script that interacts with the wheater.

An important thing is that the temperature drops according to the height. If the player spawns in a Halo Mode, a 0 temperature will be absolutely normal. In this case, keep in mind that the weather I configured was a very wild one, so it'll be better not to use it if the players you have are mostly new at epoch. If your spawn is on a parachute try to get to the ground fast and get warm. You can also add to the spawn inventory heatpacks.

I hope that helps.

Have a nice day.

Link to comment
Share on other sites

  • 1 year later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...