piffaroni 13 Posted November 22, 2013 Can someone PLEASE tell me how to stop the animals from spawning? they are lagging the server! Share this post Link to post Share on other sites
hogscraper 328 Posted November 22, 2013 Depends on who your provider is. If you have a decent database editor through them you should be able to edit that to keep anything from spawning on your server. 1 Share this post Link to post Share on other sites
piffaroni 13 Posted November 22, 2013 Depends on who your provider is. If you have a decent database editor through them you should be able to edit that to keep anything from spawning on your server.i dont have a provider i have my own dedicated box... to much politics with providers.... anyways, I really would like to make loot and animals stop spawning, do you know how? Share this post Link to post Share on other sites
-Se7eN- 874 Posted November 22, 2013 Databases dont handle teh animals any way. ok so im just going to assume you know the basics of adding custom scripts and shit. there is two ways that i THINK would do it. 1:In your init.sqf there is a line that says :call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; Change it so that its being called from your server instead of the clients directory (for example)call compile preprocessFileLineNumbers "customshizzle\variables.sqf"; Once this is done go ahead and make a folder called "customshizzle" in your mission, and make "variables.sqf" in there, (incase you dont know how to do this, just copy the code from this paste bin and put it in (1.8.0.3))http://pastebin.com/StXGxALe Once this is done try and run the server to make sure nothing has messed up, bare in mind im being pretty vaig in this assuming you already know a little about what im talking about. If all is good go back into this variables.sqf file and edit line 496 dayz_maxGlobalAnimals = 100; Change it too : dayz_maxGlobalAnimals = 0; I actually wont write the other method as this should work, if not please let me know, and if you are confused on some of the things i have said also, let me know. its 2:30 am so im a little tired. As an ending note, animals are probably one of the less laggy things in dayz, vehicles, dead bodies, AI, custom scripts and others things of that sort are your main causes, be sure to restart your server every 3 hours for optimal performance. Share this post Link to post Share on other sites
piffaroni 13 Posted November 22, 2013 Databases dont handle teh animals any way. ok so im just going to assume you know the basics of adding custom scripts and shit. there is two ways that i THINK would do it. 1:In your init.sqf there is a line that says :call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; Change it so that its being called from your server instead of the clients directory (for example)call compile preprocessFileLineNumbers "customshizzle\variables.sqf"; Once this is done go ahead and make a folder called "customshizzle" in your mission, and make "variables.sqf" in there, (incase you dont know how to do this, just copy the code from this paste bin and put it in (1.8.0.3))http://pastebin.com/StXGxALe Once this is done try and run the server to make sure nothing has messed up, bare in mind im being pretty vaig in this assuming you already know a little about what im talking about. If all is good go back into this variables.sqf file and edit line 496 dayz_maxGlobalAnimals = 100; Change it too : dayz_maxGlobalAnimals = 0; I actually wont write the other method as this should work, if not please let me know, and if you are confused on some of the things i have said also, let me know. its 2:30 am so im a little tired. As an ending note, animals are probably one of the less laggy things in dayz, vehicles, dead bodies, AI, custom scripts and others things of that sort are your main causes, be sure to restart your server every 3 hours for optimal performance.yes we do restart every 3 hours, but its very hard to even get a steady 75 players all the time. to much lag and dysnc. is there a way to delete dead bodies after a certain ammount of time? Share this post Link to post Share on other sites
AmberHelios 2071 Posted November 22, 2013 yeah you include custom code in the server functions to remove dead bodys after a set ammount of time something along the lines of this should do it cleanup.sqfif (isServer) then { [] spawn { waitUntil {!(isNil "sm_done")}; _lastDeadCheck = diag_tickTime; _allDead = [];while {true} do { if ((diag_tickTime - _lastDeadCheck) > 2400) then { _lastDeadCheck = diag_tickTime; private ["_modeldex","_myGroupX"]; { _modeldex = typeOf _x; _myGroupX = group _x; _x removeAllMPEventHandlers "mpkilled"; _x removeAllMPEventHandlers "mphit"; _x removeAllMPEventHandlers "mprespawn"; _x removeAllEventHandlers "FiredNear"; _x removeAllEventHandlers "HandleDamage"; _x removeAllEventHandlers "Killed"; _x removeAllEventHandlers "Fired"; _x removeAllEventHandlers "GetOut"; _x removeAllEventHandlers "Local"; clearVehicleInit _x; deleteVehicle _x; deleteGroup _myGroupX; _x = nil; } forEach _allDead; _allDead = [] + allDead; }; { if (count units _x==0) then { deleteGroup _x; _x = nil; }; } forEach allGroups; { _myGroupX = group _x; _x removeAllMPEventHandlers "mpkilled"; _x removeAllMPEventHandlers "mphit"; _x removeAllMPEventHandlers "mprespawn"; _x removeAllEventHandlers "FiredNear"; _x removeAllEventHandlers "HandleDamage"; _x removeAllEventHandlers "Killed"; _x removeAllEventHandlers "Fired"; _x removeAllEventHandlers "GetOut"; _x removeAllEventHandlers "Local"; clearVehicleInit _x; deleteVehicle _x; deleteGroup _myGroupX; _x = nil; } forEach entities "Seagull"; sleep 5; }; };};change the _lastDeadCheck) > 2400 to whatever time you require put that in your init folder of your server pbo and at the bottom of server_functions put #include "cleanup.sqf";at the bottom and repack this should remove dead bodies and clean groups should work 4 Share this post Link to post Share on other sites
piffaroni 13 Posted November 26, 2013 yeah you include custom code in the server functions to remove dead bodys after a set ammount of time something along the lines of this should do it cleanup.sqfif (isServer) then { [] spawn { waitUntil {!(isNil "sm_done")}; _lastDeadCheck = diag_tickTime; _allDead = [];while {true} do { if ((diag_tickTime - _lastDeadCheck) > 2400) then { _lastDeadCheck = diag_tickTime; private ["_modeldex","_myGroupX"]; { _modeldex = typeOf _x; _myGroupX = group _x; _x removeAllMPEventHandlers "mpkilled"; _x removeAllMPEventHandlers "mphit"; _x removeAllMPEventHandlers "mprespawn"; _x removeAllEventHandlers "FiredNear"; _x removeAllEventHandlers "HandleDamage"; _x removeAllEventHandlers "Killed"; _x removeAllEventHandlers "Fired"; _x removeAllEventHandlers "GetOut"; _x removeAllEventHandlers "Local"; clearVehicleInit _x; deleteVehicle _x; deleteGroup _myGroupX; _x = nil; } forEach _allDead; _allDead = [] + allDead; }; { if (count units _x==0) then { deleteGroup _x; _x = nil; }; } forEach allGroups; { _myGroupX = group _x; _x removeAllMPEventHandlers "mpkilled"; _x removeAllMPEventHandlers "mphit"; _x removeAllMPEventHandlers "mprespawn"; _x removeAllEventHandlers "FiredNear"; _x removeAllEventHandlers "HandleDamage"; _x removeAllEventHandlers "Killed"; _x removeAllEventHandlers "Fired"; _x removeAllEventHandlers "GetOut"; _x removeAllEventHandlers "Local"; clearVehicleInit _x; deleteVehicle _x; deleteGroup _myGroupX; _x = nil; } forEach entities "Seagull"; sleep 5; }; };};change the _lastDeadCheck) > 2400 to whatever time you require put that in your init folder of your server pbo and at the bottom of server_functions put #include "cleanup.sqf";at the bottom and repack this should remove dead bodies and clean groups should work it didnt work Share this post Link to post Share on other sites
hogscraper 328 Posted November 26, 2013 Databases dont handle teh animals any way. I had a server with Dayz.st and could use their control panel to delete goats if I wanted. Every instance of everything could be deleted or modified. You just remove the definition for it and it wouldn't spawn. Share this post Link to post Share on other sites