Hey guys, it's me again with another one of my scripting dilemmas.
I was doing some reading on google when I found a github article that was a little unclear to me.
Here is the link of the article: https://github.com/DayZMod/DayZ/issues/44
Basically, I've had a couple complaints of people crashing into objects that their clients haven't yet rendered. I figured, if I made my server render the objects server-side, this would prevent the problem.
Here are the instructions that were provided in the github link I provided above:
I was able to locate the player_monitor.fsm file, but was unable to figure out exactly what needed to be deleted.
I was able to locate the three "stream" files in DayZCode mentioned above. I can delete those and reupload the DayZCode file no problem.
Finally, I am able to create the new SQF file, and make the changes to server_functions.sqf and server_monitor.sqf.
My two questions are:
1. Wouldn't modifying the DayZ_Code files require my clients to have the same exact version... I.E. requiring them to download something in order to play in our server?
2. What exactly am I supposed to change in the player_monitor? I see a few things referring to streaming, but I can't be sure what to take out.
Also, if someone has another way of doing this, I'm completely open to that, especially if the answer to my first question is yes, and your solution won't require clients having to download our version.
As always, thank you in advance for all helpful and productive comments and any assistance that you may be able to give.
- Rick
I was doing some reading on google when I found a github article that was a little unclear to me.
Here is the link of the article: https://github.com/DayZMod/DayZ/issues/44
Basically, I've had a couple complaints of people crashing into objects that their clients haven't yet rendered. I figured, if I made my server render the objects server-side, this would prevent the problem.
Here are the instructions that were provided in the github link I provided above:
Instead of the client streaming in the roadblocks/wrecks/junk, which sometimes causes a sudden appearance in front of a fast moving vehicle, the server streams it once upon server start, and makes it permanent. I have tested this on my server. It worked great with minimal server performance loss while giving a performance boost to clients. Credit for this goes to isathar at opendayz.net.
private ["_configBase","_tempList"];
- Remove the stream code in player_monitor.fsm
- Remove stream_locationCheck.sqf, stream_locationFill.sqf, & stream_locationDel.sqf
- Create an sqf (we'll call it server_fillLocs.sqf for now) with the following code:
if (isServer) then {
_tempList = ["Chernogorsk","Elektrozavodsk","Balota","Komarovo","Kamenka","Kamyshovo","Prigorodki","Kabanino","Solnichniy","StarySobor","NovySobor","SouthernAirport","NorthernAirport","Berezino","Lopatino","GreenMountain","Zelenogorsk","Nadezhdino","Kozlovka","Mogilevka","Pusta","Bor","Pulkovo","Vyshnoye","Drozhino","Pogorevka","Rogovo","Guglovo","Staroye","Pavlovo","Shakhovka","Sosnovka","Msta","Pustoshka","Dolina","Myshkino","Tulga","Vybor","Polana","Gorka","Orlovets","Grishino","Dubrovka","Nizhnoye","Gvozdno","Petrovka","Khelm","Krasnostav","Olsha"];
for "_j" from 0 to ((count _tempList) - 1) do
{
_configBase = configFile >> "CfgTownGenerator" >> (_tempList select _j);
};Code:for "_i" from 0 to ((count _configBase) - 1) do { private ["_config","_type","_position","_dir","_onFire","_object"]; _config = (_configBase select _i); if (isClass(_config)) then { //filter: _type = getText (_config >> "type"); //if (((getText (_config >> "type")) != "Body1") and ((getText (_config >> "type")) != "Body2")) then { _position = [] + getArray (_config >> "position"); _dir = getNumber (_config >> "direction"); _onFire = getNumber (_config >> "onFire"); _object = _type createVehicle _position; _object setPos _position; _object setDir _dir; _object allowDamage false; //diag_log format["CreateObj: %1 / %2",_type,_position]; /* if (_onFire > 0) then { nul=[_object,_onFire,time,false,false] spawn BIS_Effects_Burn; }; */ //}; }; //sleep 0.1; // for longer load, but better startup performance }; sleep 0.5; //comment the other sleep and uncomment this for faster load but slower startup performance diag_log ("Creating Objects: " + str(_configBase)); };
- Add it it to server_functions.sqf
Code:server_fillLocs = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_fillLocs.sqf";
- Add it to server_monitor.sqf
Code:_id = [] spawn server_fillLocs;
I was able to locate the player_monitor.fsm file, but was unable to figure out exactly what needed to be deleted.
I was able to locate the three "stream" files in DayZCode mentioned above. I can delete those and reupload the DayZCode file no problem.
Finally, I am able to create the new SQF file, and make the changes to server_functions.sqf and server_monitor.sqf.
My two questions are:
1. Wouldn't modifying the DayZ_Code files require my clients to have the same exact version... I.E. requiring them to download something in order to play in our server?
2. What exactly am I supposed to change in the player_monitor? I see a few things referring to streaming, but I can't be sure what to take out.
Also, if someone has another way of doing this, I'm completely open to that, especially if the answer to my first question is yes, and your solution won't require clients having to download our version.
As always, thank you in advance for all helpful and productive comments and any assistance that you may be able to give.
- Rick