Jump to content

Donnovan

Member
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    12

Reputation Activity

  1. Like
    Donnovan got a reaction from paddy1223 in Disable BE on Specific Clients   
    Thanks for the interest, it's running nicelly...

    But with only one player (me) the performance hit when activing bots is the same with and without Headless Clients.

    Still need tests with a full server to see if its doable.

    I have that on the Headless Client:

    - DZMS
    - DZAI
    - Buildings

    You guys have interest in the tree implementations?

    The proof that the bots are on the headless client is the freaked precision if i does not make the headless client local.
  2. Like
    Donnovan got a reaction from paddy1223 in Disable BE on Specific Clients   
    paddy,

    And what AI mod you use? WAI ou DZAI?
  3. Like
    Donnovan reacted to Defent in Any good way to optimize a large server?   
    Your min and max bandwith are a bit too tight. Your server has more than 50 slots (50+ is known to be behaving weirdly). 
    This is my current basic.cfg. It's working for me at, 54 players, 10 second vehicle buy time. Around 6220 Network message errors at around 2 hours in. 
    MinBandwidth=1097152; MaxBandwidth=1073741824; MinErrorToSendNear=0.069999997; MinErrorToSend=0.0039999994; MaxCustomFileSize=0; Windowed=0; adapter=-1; 3D_Performance=1; Resolution_Bpp=32; Resolution_W=800; Resolution_H=600; Your server specs can easily hold atleast one full server. 
     
    You could try opening the player_login table and emptying that one if it's like 1-2mbs large. 
     
    You generally want to start with the max bandwith a bit further apart from the min bandwith, like start at 0.06 or so and work down. I have noticed that anything above 0.06 on my servers cause huge amounts of birds and lower than 0.03 causes longer buy time and more desync, atleast for me.
  4. Like
    Donnovan got a reaction from paddy1223 in Disable BE on Specific Clients   
    Thanks for the help,

    I was able to make the necessary BE filters adjusts and now the Headless Cliente is not kicked anymore.

    I will release my Headless Client soon.
  5. Like
    Donnovan got a reaction from TheVampire in DZMS on Headless Clients   
    Thanks ebaydayz,

    Added !="true" to waypointcondition.txt filter,
    Added !="" to waypointstatement.txt filter.

    And no kicks anymore.
  6. Like
    Donnovan got a reaction from Bricktop in Joelma's Time Control   
    If you like my work, please consider a donation:

    $USD

    $EURO

    *** UPDATED THE FILE TIME_CONTROL.SQF IN 2014-10-09 13:00 ***
    *** TIME_CONTROL.SQF WAS CHANGED, THE CHANGED PARTE HAVE ***
    *** THE COMMENT "//LAST CHANGE WAS IN THIS SPAWN" ***

    JOELMA'S TIME CONTROL SYSTEMA

    Default configuration: A day of 2 hours.
    - 60 minutes completely day time (08:00 - 16:00)
    - 36 minutes of sunrise and sunfall (04:00 - 08:00, 16:00 - 20:00)
    - 24 minutes of night (00:00 - 04:00, 20:00 - 24:00)

    CLIENT SIDE: TIME_CONTROL.SQF
    In your mission folder, create the folder custom if it does not exist.
    Create inside the custom folder a txt file called time_control.sqf.
    Put inside time_control.sqf the content bellow:


    donn_sleep = 0.2; donn_multi = 2; drn_fnc_DynamicWeather_SetWeatherLocal = {}; 0 setOvercast 0; 0 setFog 0.05; if (!isDedicated) then { "cad_pvar_server_date" addPublicVariableEventHandler {(_this select 1) call donn_setdate;}; donn_setdate = { private ["_dateSer","_dateCli","_date_diff"]; donn_speed = _this select 1; 0 setOvercast 0; _dateSer = dateToNumber (_this select 0); _dateCli = dateToNumber date; _date_diff = (_dateSer-_dateCli)*12*31*24; if (abs _date_diff > 5/60) then {setDate (_this select 0);}; }; }; [] spawn { //LAST CHANGE WAS IN THIS SPAWN private ["_tm","_tmLen"]; _tm = diag_tickTime; waitUntil {!isNil "donn_speed"}; while {true} do { sleep donn_sleep; _tmLen = diag_TickTime - _tm; _tm = _tm + _tmLen; skipTime ((_tmLen*(donn_speed*donn_multi-1))/3600); }; }; if (!isDedicated) then { [] spawn { for "_x" from 1 to 10 do { "infiSTAR_SetDate" addPublicVariableEventHandler {}; "PVDZE_plr_SetDate" addPublicVariableEventHandler {}; cad_pvar_send_owner = player; publicVariableServer "cad_pvar_send_owner"; sleep 0.5; }; }; }; CLIENT SIDE: INIT.SQF
    Step 1
    On your mission folder, open the file init.sqf.

    Inside it change this:


    //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; To this:
    //Start Dynamic Weather //execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; Step 2At the end of your init.sqf file, add this line:


    call compile preprocessFileLineNumbers "custom\time_control.sqf"; SERVER SIDE: SERVER_FUNCTIONS.SQF
    Now we need to modify files inside dayz_server.pbo.

    At the end of the file init\server_functions.sqf add this code:



    initialSend = false; donn_server_timeSync = server_timeSync; server_timeSync = {if (!initialSend) then {[] call donn_server_timeSync;}; initialSend = true;}; [] spawn { waitUntil {initialSend}; while {true} do { _dayTime = dayTime; //========================TIME FUNCTION============================ if (_dayTime >= 8 && _dayTime <= 16) then {donn_speed = 4.000;}; if (_dayTime > 4 && _dayTime < 8) then {donn_speed = 6.666;}; if (_dayTime > 16 && _dayTime < 20) then {donn_speed = 6.666;}; if (_dayTime <= 4 || _dayTime >= 20) then {donn_speed = 10.000;}; //================================================================= cad_pvar_server_date = [date, donn_speed]; publicVariable "cad_pvar_server_date"; sleep 30; }; }; "cad_pvar_send_owner" addPublicVariableEventHandler { cad_pvar_server_date = [date, donn_speed]; owner (_this select 1) publicVariableClient "cad_pvar_server_date"; }; BATTLEYE FILTER:
    On the BattlEye filter publicvariable.txt search for the line that start with 5 "" and add at the end of it an empty space and than !"cad_pvar_s".
     
    My line is like that after the adition:


    EXTRA:
    To have a 3 hours day, change the line "donn_multi = 2;" in time_control.sqf:


    donn_multi = 1; -> 4 hours day donn_multi = 4/3; -> 3 hours day donn_multi = 2; -> 2 hours day
  7. Like
    Donnovan got a reaction from BetterDeadThanZed in Joelma's Time Control   
    Hi! Main post updated! Please follow all steps!

    Any problem tell me!
  8. Like
    Donnovan reacted to macdog in Working Dayz Epoch Headless Client for Zed Spawn and FSM   
    This is a fairly involved subject and there are various approaches.  I have tried a few and have come to my own conclusion in terms of what works best.
     
    Run everything from the HC.  You can get most function to work, but a pure HC only implementation will not work properly with a lot of functions from the various mission systems.  Especially when it comes to spawning objects into the game, and for those objects to persist.  In some cases you can get around this using anti-hack tweaks but that will weaken your protection.  This method also requires a lot of battleye exceptions, also not good. Run everything from server (ie, normal mission pack install) and use setOwner to assign the AI units to the HC.  Played with this option briefly, but has some known game engine limitation, such as waypoints being lost. Hybrid.  Run most code from HC, and offload certain tasks (such as spawning objects) to the server.  I used this method with reasonable success for some time but ultimately is more complicated and error prone than the next option. Hybrid.  Run the mission system from the server, and execute AI modules from the HC.  This for me has been the most stable method by some margin and allows all typical features to be used.  It requires very few (if any) anti-hack bypasses, all the mission logic runs on the server (which is usually as per the design of the mission pack) and only specific scripts are executed on the HC.  
    With the hyrbid options you do need to build a basic framework to enable the server and HC to work together well.  This is what I have done at a high level:
     
    On the server
    I took Goobers server side HC detection routine and adapted and simplified for my needs.  His code was better in that it could cope with multiple HCs however it did have some bugs.  Since multiple HC is a very niche requirement I decided to re-write it slightly but with the ability to detect only a single HC.  This is not a problem unless you plan to have over 200 AI (maybe more) and also would suggest you are running HCs from various machines (as you can only really run 1 per windows instance easily). I installed and configured a mission pack of choice in the normal way in my server PBO.  Currently for me that is Wicked AI 2.1.x. I then adjusted various elements of the mission logic so that it would check from the presence of an HC (see first point) and only start a mission if a valid HC existed.  Hint, there is more to this than just having an HC connected to the server, you also need to know that the HC has had a chance to precompile the necessary scripts. I then modify all of the scripts that define the functions for spawning AI so that rather than actually doing anything, they parse all the parameters received from the original spawn request in the specific mission file and send it to the HC using <ID> publicVariableClient [spawn parameters] I also do something similar for certain functions such as those that clean up AI when missions end (this bit is more complex, but not that bad actually). You also should setup a routine on the server (mine runs every minute) that counts AI units controlled by the server and immediately deletes them.  This is because if the HC crashes whilst managing AI, the AI will remain and their control passes back to the server, instantly killing you server FPS! On the HC
    First, everything that runs on the HC does so via a specific client side addon (PBO) that I have signed with my own key.  They key is enabled on my server, so in theory anyone could connect to my server and run my addon, but I dont release my signed addon to the public so its a non-issue (unless i get hacked of course.  and by hacked this isnt an arma2 hacked, it would be a "proper" hack (well correct term is crack) of my dedicated server).  This way, the only reference to my HC anywhere in the mission file that all players download is a single statement in the init.sqf that checks for a !hasInterface and runs \z\addons\macdogHC\init.sqf. First thing is to get the HC side of Goobers HC detection/management code installed in the custom HC addon described above working.  This is to let the server know an HC is attached, and I have adapted it for my purposes somewhat. Then I install and configure the mission pack in my custom addon, making sure to set the configuration options that affect AI as I want them in the config file.  Then disable the actual mission system, so when launched (ie, via \z\addons\macdogHC\WAI\init.sqf) doesnt actually start launching missions. I then setup a bunch of publicEventHandlers so that when the server executes a <ID> publicVariableClient spawn_group for example, the HC will run \z\addons\macdogHC\WAI\compile\spawn_group.sqf with the parameters originally specified in the specific mission definition running on the server. I have to do something similar for the mission clean up scripts as I alluded to in the server section above, but this is more selective. And that's it really.  It works very reliably IMO, yes very occasionally Arma2OA.exe can crash, and I don't have a monitoring system in place to detect and relaunch the client.  So if I don't spot it (usually the case now as I have alomst zero time for epoch these days) there are no missions until next restart.  I used to have the HC running as a service which did address this, but the move to steam only has really made running the client in a server like way much more difficult so I have to run the client interactively which is a shame.
     
    I also have animated heli/c130 crashes running of the HC.  They dont suffer from the stutter that you get when you run them server side, and are indistinguishable from player flown aircraft.  I used to have jet crashes run this way, but it meant white listing them in my anti-hack.  I could have edited infistars code to allow the jet crashes but still catch illegal jet spawns, but would require me tinkering every time he released a new version so was just too much effort.
  9. Like
    Donnovan reacted to Goober in Working Dayz Epoch Headless Client for Zed Spawn and FSM   
    What this is:
    1)  Customization at the mission folder level (e.g. \MPMissions\Dayz_Epoch_<number>.<mapname>).  It is changes and additions to mission files that are loaded at server startup and when each client connects.
    2)  It is a method of dynamically tracking connected Headless Clients and maintaining a list of available ones on the server.
    3)  It is changes to the way the player client runs the player_spawnCheck->building_spawnCheck->zombie_generate->zombie_agent.fsm/zombie_loiter chain to make zombies spawn and behave the same  INDEPENDENTLY (no reliance on the variable "player") of which client spawned them.
    4)  It is a way (in theory) of reducing zombie location lag by having all zeds controlled by low latency clients.
    5)  It furthers experimentation in using targetted publicVariableServer and publicVariableClient message semaphores.
    6)  It is TLDR ... (if you got this far .. good for you).
    7)  HC keeps zeds from disappearing just because a player disconnects (doesn't affect 25m radius on player connect)..
     
    What this isn't:
    A)  Well tested.  My test bed is an 8 core computer on which I developed the scripts without BE operational so that I could run my player client and headless client off the same key without Arma throwing a fit.
    B )  This scripting doesn't address the occasional problem of headless clients joining the server and landing in the wrong slot.  This is usually a problem when the HC joins before the server processes mission.sqm.
    C)  This is not hooked into animal spawning so it doesn't offload animal spawning.
    D)  The code does not have the "hint" and "diag_log" lines commented out that I used for development.
    E)  This is not a step by step set of instructions in how to make it work on your server.  I authored it and got it to work on mine using vanilla Dayz-Epoch 1.0.3.1 on the 1.5 Lingor map (the larger one).  If you do not understand function overloading and what instruction to change to make it work with another mod, then this is not for you.
     
    edit 2: (the file attachment is not working, so use this external link instead)
    http://www.mediafire.com/download/zyrzrs05x1um0mn/HC.zip
     
    my server startup options:
    "Expansion\beta\arma2oaserver.exe" -port=2325 -cpuCount=4 "-config=instance_7_Lingor\config.cfg" "-cfg=instance_7_Lingor\basic.cfg" "-profiles=instance_7_Lingor" -name=instance_7_Lingor "-mod=%_ARMA2PATH%;Expansion;ca;Expansion\beta;Expansion\beta\Expansion;@lingor;@DayZ_Epoch;@DayZ_Epoch_Server;"
     
    excerpt from config.cfg:
    requiredBuild = 103718; localclient[]={"127.0.0.1"};   headless client startup:  (sorry, still some steam path stuff here ... but you should get the idea) "%_ARMA2OAPATH%\Expansion\beta\ARMA2OA.exe" -skipIntro -nosplash -showScriptErrors -noPause -client -connect=127.0.0.1 -port=2325 -nosound "-mod=%_ARMA2PATH%;EXPANSION;ca" "-mod=Expansion\beta;Expansion\beta\Expansion" "-mod=@lingor;@dayz_epoch" -cpuCount=2 -name=HeadlessClient -profiles=HeadlessClient   ---------------------------------------------------- least painful way to try to assure the HC goes into the CIV slot 1) start server 2) start player client - connect to lobby of server 3) start headless client --------------------------------------------------- HOW it does it:   1) Server listens (via publicVariableEventHandler) for heartbeats from headless clients and updates and administers list of currently connected HCs. 2) Headless Clients send publlcVariableServer message once every 3 seconds as a heartbeat signal. 3) Player's player_spawnCheck function sends a publicVariableServer to request a zed and loot spawn cycle 4a) Server checks for presence of active HCs... if available, it sends publicVariableClient message to do zed and loot spawn to a random HC. 4b) If no HC in Server's list, then Server sends publicVariableClient message back to player client to do its own zed and loot spawn.   PROPS: Some parts (HCsignals.sqf) inspired by (but not copied from) Unit Caching and Distribution Script by Dylan Plecki (Naught). Of course a lot of the code I mangled is the Dayz-Epoch and by extension all the Dayz code that went before it, but all the changes I wrote myself (not bragging ... this forum category requires original code only)   edit1: p.s. Forgot to mention I also have a pet peeve fixed in the "fixes\player_spawn_2.sqf" file.  It corrects the speed and weight carried effect on hunger.  Without this fix, your hunger would seem to go nuts based on travel speed while in a vehicle.  This makes sure that when you are doing 200kph in a Mi17, you are not starving at the end of your 2 minute heli ride across the map.  The _thirst calculation corrects for vehicle travel so I thought the _hunger calculation needed it also. _hunger = +((((r_player_bloodTotal - r_player_blood) / r_player_bloodTotal) * 5)) * 3; if (!_inVehicle) then { _hunger = _hunger + (_speed + dayz_myLoad) *3; };  
    edit 3:  if you see a file attachment below, it doesn't seem to be working.  Use the link above in the middle of the post.
  10. Like
    Donnovan reacted to macdog in [WIP] Epoch Headless Client EHC v1.1 RC   
    hasInterface
  11. Like
    Donnovan got a reaction from Anarior in Joelma's Time Control   
    HellWalker, i found what was causing the out of sync in the player connection.

    I'm running a new version that works great, but need to do some work on it for a release.

    Thankyou for the feedback, hope this next release comes soon, and hope its final.
  12. Like
    Donnovan reacted to CartoonrBOY in Show off that Batcave!   
    My humble cave. Originally posted for my EvE Online blog, it hasn't changed much over the years. It looks like the apocalypse has happened already...
     

  13. Like
    Donnovan reacted to Mikeeeyy in My Locked Vehicles with God Mode   
    You might want to add a check to make sure there is nobody inside the vehicle. Somebody gets in the car, their friend locks them in it, bam, they're driving around in a god mode car.
  14. Like
    Donnovan reacted to CartoonrBOY in My Locked Vehicles with God Mode   
    I already have this - a version of it which works the same way. It's very useful and comes highly recommended. Vehicles with keys become mobile safes and therefore increase in desirability. Does this also prevent salvaging of locked vehicles? Beans.
  15. Like
    Donnovan got a reaction from CartoonrBOY in My Locked Vehicles with God Mode   
    *** UPDATED WITH A MAJOR BUG FIX IN THE DATE 2014-10-06 1:10 PM
    *** This update will fix the Repair Vehicle working always in all cases
    *** without the need of vehicle parts, wheell, glass, motor or tools

    *** The only file that changed was the file lock_god.sqf.

    Hi,

    Here is My Locked Vehicles with God Mode.

    FEATURES:

    - The Vehicles survives Kamikaze attack!
    - The God Mode not expires when the player exit the server!
    - Can be easily upgraded to plot proximity god mode or anything else!
    - Initial locked Vehicles have God Mode!

    INSTALLATION!

    1) LOCK_GOD.SQF
    Create a file with the name lock_god.sqf, with the content bellow, and put it into a folder called custom inside your mission folder.

    if (isServer) then { "cad_pvar_set_veh" addPublicVariableEventHandler { private ["_veh","_godOn"]; _veh = _this select 1 select 0; _godOn = _this select 1 select 1; if (_godOn) then { _veh allowDamage false; _veh RemoveAllEventHandlers "handleDamage"; _veh addEventHandler ["handleDamage",{0}]; } else { _veh allowDamage true; _veh RemoveAllEventHandlers "handleDamage"; _veh addEventHandler ["handleDamage",{_this call vehicle_handleDamage;}]; }; }; }; local_lockUnlock = { private ["_vehicle","_status"]; _vehicle = _this select 0; _status = _this select 1; if (local _vehicle || isServer) then { if(_status) then { _vehicle setVehicleLock "LOCKED"; if (count (crew _vehicle) == 0) then{ //MIKE POST _vehicle allowDamage false; _vehicle RemoveAllEventHandlers "handleDamage"; _vehicle addEventHandler ["handleDamage",{0}]; cad_pvar_set_veh = [_vehicle,true]; publicVariableServer "cad_pvar_set_veh"; }; //MIKE POST } else { _vehicle setVehicleLock "UNLOCKED"; _vehicle allowDamage true; _vehicle RemoveAllEventHandlers "handleDamage"; _vehicle addEventHandler ["handleDamage",{_this call vehicle_handleDamage;}]; cad_pvar_set_veh = [_vehicle,false]; publicVariableServer "cad_pvar_set_veh"; }; }; };2)INIT.SQFOpen your init.sqf (located in your mission folder) and search for that line:

    call compile preprocessFileLineNumbers "z\addons\dayz_code\init\compiles.sqf"; //Compile regular functionsIf you don't find it, search for the line:
    call compile preprocessFileLineNumbers "dayz_code\init\compiles.sqf"; //Compile regular functionsBellow it, add the line:
    call compile preprocessFileLineNumbers "custom\lock_god.sqf";3) SYSTEM/SERVER_MONITOR.SQF:Now, to make initial locked vehicles invunerable until unlocked, you must modify the server_monitor.sqf server file, located in dayz_server/system/server_monitor.sqf:
    Change that:


    if(_ownerID != "0" && !(_object isKindOf "Bicycle")) then { _object setvehiclelock "locked"; }; To that:
    if(_ownerID != "0" && !(_object isKindOf "Bicycle")) then { _object setvehiclelock "locked"; //LOCK GOD BEGIN _object allowDamage false; _object RemoveAllEventHandlers "handleDamage"; _object addEventHandler ["handleDamage",{0}]; //LOCK GOD END }; 4) BATTLEYE EXCESSION:
    You need to liberate the public variable cad_pvar_set_veh in BattlEye.

    END

    It's done!

    I have done tests with players of my server. But feel free to make your tests so we have sure everything is ok!
  16. Like
    Donnovan got a reaction from Flosstradamus in DaRT 2.0 Released   
    Nice News!

    I will back to it, and abandon Battle Warden! I hope!
  17. Like
    Donnovan reacted to Donnovan in Joelma's Time Control   
    BetterDeadThanZed,

    You is right, there is a bug about:

    - Clouds appears at night with _maxFPS = true.
    - The error correction code have a bug that happens for some minutes when time speed changes.

    Those two are fixed, and i will post it soon.

    The fix for fps problem after night is still a work in progress.
  18. Like
    Donnovan got a reaction from Rocu in [Release] Gebriel Safe Zones Maybe   
    **[RELEASED ON 01 SEPTEMBER]**
    **[uPDATED ON 02 SEPTEMBER]**

    Rocu,

    I have not tested, but this is the [Mission Folder]/custom/safezone.sqf file compatible with NoxSicarus Admin Tools:

    With that change, Gebriel Safe Zones will not disable Admin Tools God Mode if it is on.

    New/Modified lines have one of those 2 comments:

    //ADDED FOR ADMIN TOOLS COMPATIBILITY
    //MODIFIED FOR ADMIN TOOLS COMPATIBILITY
     

    //Gebriel Safezones //By Donnovan from Brazil don_incar = 0; don_firedEH_1 = nil; don_godon_1 = 0; inSafeZone = false; if (isNil "godMode") then {godMode = false;}; //ADDED FOR ADMIN TOOLS COMPATIBILITY [] spawn { private ["_runOneTime","_canbuild","_don_passengers","_don_veh_crew","_don_player_veh","_don_veh_driver"]; waitUntil {!(isNil "canbuild")}; _runOneTime = false; _canbuild = canbuild; while {true} do { waitUntil {!((_canbuild && canbuild) || (!_canbuild && !canbuild)) || !_runOneTime}; _canbuild = canbuild; if (!canbuild) then { player_zombieCheck = {}; fnc_usec_damageHandler = {}; fnc_usec_unconscious = {}; player allowDamage false; player removeAllEventHandlers "handleDamage"; don_godon_1 = 1; inSafeZone = true; sleep 0.025; [] spawn { private ["_myHdEh"]; while {!canbuild} do { _myHdEh = player addEventHandler ["handleDamage", {0}]; sleep 0.02; player removeEventHandler ["handleDamage",_myHdEh]; }; }; if (isNil "don_firedEH_1") then { don_firedEH_1 = 0; sleep 0.025; don_firedEH_1 = player addEventHandler ["Fired",{ cutText ["Can't fire with godon.","PLAIN DOWN", 2]; deleteVehicle (_this select 6); }]; }; }; if (canbuild && _runOneTime) then { [] spawn { for "_x" from 1 to 30 do { if (_x >= 6) then {cutText [format ["%1 seconds to godoff and shoton.", 31-_x], "PLAIN DOWN"];}; sleep 1; if (!canbuild) exitWith {}; if (_x == 30) then { //MODIFIED FOR ADMIN TOOLS COMPATIBILITY cutText ["Godoff and Shoton!", "PLAIN DOWN"]; if (!godMode) then { player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf"; fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf"; fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf"; player allowDamage true; player removeAllEventHandlers "handleDamage"; player addEventHandler ["handleDamage", {_this select 2}]; }; player removeEventHandler ["Fired", don_firedEH_1]; don_firedEH_1 = nil; don_godon_1 = 0; inSafeZone = false; }; }; }; }; if (!canbuild && don_incar == 1) then { _don_player_veh = don_player_veh; don_veh_crew = crew _don_player_veh; _don_veh_driver = driver _don_player_veh; _don_player_veh allowDamage false; _don_player_veh removeAllEventHandlers "handleDamage"; _don_player_veh addEventHandler ["handleDamage", {0}]; _don_player_veh removeAllEventHandlers "Fired"; _don_player_veh addEventHandler ["Fired",{deleteVehicle (_this select 6);}]; //PASSENGERS NAMES _don_passengers = ""; {if (Alive _x) then {_don_passengers = _don_passengers + format [" %1",name _x];};} forEach don_veh_crew; _don_veh_crew = []; {if (Alive _x) then {_don_veh_crew = _don_veh_crew + [getPlayerUID _x];};} forEach don_veh_crew; //ASSING OWNERS if (player == _don_veh_driver) then { _don_player_veh setVariable ["don_ownerity_code", format ["%1_%2", getPlayerUID player, round diag_tickTime], true]; _don_player_veh setVariable ["don_crew", _don_veh_crew, true]; //CHANGE _don_player_veh setVariable ["don_passengers", _don_passengers, true]; }; }; if (canbuild && don_incar == 1) then { _don_player_veh = don_player_veh; _don_veh_driver = driver _don_player_veh; [_don_player_veh] spawn { for "_x" from 1 to 15 do { sleep 1; if (!canbuild) exitWith {}; if (_x == 15) then { (_this select 0) allowDamage true; (_this select 0) removeAllEventHandlers "handleDamage"; (_this select 0) addEventHandler ["handleDamage", {_this select 2}]; (_this select 0) removeAllEventHandlers "Fired"; }; }; }; //DISASSING OWNERS if (player == _don_veh_driver) then { _don_player_veh setVariable ["don_ownerity_code", nil, true]; _don_player_veh setVariable ["don_crew", nil, true]; _don_player_veh setVariable ["don_passengers", nil, true]; }; }; _runOneTime = true; }; }; [] spawn { private ["_don_veh_crew","_wait_time","_last_mark","_max_time"]; while {true} do { _max_time = 480; waitUntil {sleep 0.0625; vehicle player != player}; don_player_veh = vehicle player; don_incar = 1; if (!canbuild) then { //VEHICLE OWNERITY CHECK _don_veh_crew = don_player_veh getVariable ["don_crew", nil]; if (isNil "_don_veh_crew") then {_don_veh_crew = [getPlayerUID player];}; if !(getPlayerUID player in _don_veh_crew) then { call compile format ['if (isNil "don_%1") then {don_%1 = diag_tickTime;}; _last_mark = don_%1;', don_player_veh getVariable ["don_ownerity_code", 0]]; _wait_time = diag_tickTime - _last_mark; if (_wait_time < _max_time) then { player action ["getOut", don_player_veh]; [objNull, player, rSAY, "error1"] call RE; cuttext [format ["Owners:%1. %2 seconds to liberate.", don_player_veh getVariable ["don_passengers","Owners not found"], round (_max_time - _wait_time)], "PLAIN DOWN"]; cad_pvar_smessage = [format ["%1 is messing with your vehicle! %2 seconds to liberate!", name player, round (_max_time - _wait_time)], _don_veh_crew]; publicVariable "cad_pvar_smessage"; } else { call compile format ['don_%1 = nil;', don_player_veh getVariable ["don_ownerity_code", 0]]; //DISASSING OWNERS don_player_veh setVariable ["don_ownerity_code", nil, true]; don_player_veh setVariable ["don_crew", nil, true]; don_player_veh setVariable ["don_passengers", nil, true]; cuttext [format ["Vehicle is now free for all!"], "PLAIN DOWN"]; cad_pvar_smessage = [format ["One of your safe vehicle is now free and player %1 is in it!", name player], _don_veh_crew]; publicVariable "cad_pvar_smessage"; }; }; don_player_veh allowDamage false; don_player_veh removeAllEventHandlers "handleDamage"; don_player_veh addEventHandler ["handleDamage", {0}]; don_player_veh removeAllEventHandlers "Fired"; don_player_veh addEventHandler ["Fired",{deleteVehicle (_this select 6);}]; }; if (canbuild) then { don_player_veh allowDamage true; don_player_veh removeAllEventHandlers "handleDamage"; don_player_veh addEventHandler ["handleDamage", {_this select 2}]; don_player_veh removeAllEventHandlers "Fired"; //DISASSING OWNERS if (player == driver don_player_veh) then { don_player_veh setVariable ["don_ownerity_code", nil, true]; don_player_veh setVariable ["don_crew", nil, true]; don_player_veh setVariable ["don_passengers", nil, true]; }; }; waitUntil {sleep 0.0625; vehicle player == player}; don_incar = 0; don_player_veh = nil; }; }; //Thanks Maca for the Remote Message idea "cad_pvar_smessage" addPublicVariableEventHandler { private ["_message", "_receivers"]; _message = (_this select 1) select 0; _receivers = (_this select 1) select 1; if (getPlayerUID player in _receivers) then {cutText [_message, "PLAIN DOWN"];}; };
  19. Like
    Donnovan got a reaction from theduke in Joelma's Time Control   
    If you like my work, please consider a donation:

    $USD

    $EURO

    *** UPDATED THE FILE TIME_CONTROL.SQF IN 2014-10-09 13:00 ***
    *** TIME_CONTROL.SQF WAS CHANGED, THE CHANGED PARTE HAVE ***
    *** THE COMMENT "//LAST CHANGE WAS IN THIS SPAWN" ***

    JOELMA'S TIME CONTROL SYSTEMA

    Default configuration: A day of 2 hours.
    - 60 minutes completely day time (08:00 - 16:00)
    - 36 minutes of sunrise and sunfall (04:00 - 08:00, 16:00 - 20:00)
    - 24 minutes of night (00:00 - 04:00, 20:00 - 24:00)

    CLIENT SIDE: TIME_CONTROL.SQF
    In your mission folder, create the folder custom if it does not exist.
    Create inside the custom folder a txt file called time_control.sqf.
    Put inside time_control.sqf the content bellow:


    donn_sleep = 0.2; donn_multi = 2; drn_fnc_DynamicWeather_SetWeatherLocal = {}; 0 setOvercast 0; 0 setFog 0.05; if (!isDedicated) then { "cad_pvar_server_date" addPublicVariableEventHandler {(_this select 1) call donn_setdate;}; donn_setdate = { private ["_dateSer","_dateCli","_date_diff"]; donn_speed = _this select 1; 0 setOvercast 0; _dateSer = dateToNumber (_this select 0); _dateCli = dateToNumber date; _date_diff = (_dateSer-_dateCli)*12*31*24; if (abs _date_diff > 5/60) then {setDate (_this select 0);}; }; }; [] spawn { //LAST CHANGE WAS IN THIS SPAWN private ["_tm","_tmLen"]; _tm = diag_tickTime; waitUntil {!isNil "donn_speed"}; while {true} do { sleep donn_sleep; _tmLen = diag_TickTime - _tm; _tm = _tm + _tmLen; skipTime ((_tmLen*(donn_speed*donn_multi-1))/3600); }; }; if (!isDedicated) then { [] spawn { for "_x" from 1 to 10 do { "infiSTAR_SetDate" addPublicVariableEventHandler {}; "PVDZE_plr_SetDate" addPublicVariableEventHandler {}; cad_pvar_send_owner = player; publicVariableServer "cad_pvar_send_owner"; sleep 0.5; }; }; }; CLIENT SIDE: INIT.SQF
    Step 1
    On your mission folder, open the file init.sqf.

    Inside it change this:


    //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; To this:
    //Start Dynamic Weather //execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; Step 2At the end of your init.sqf file, add this line:


    call compile preprocessFileLineNumbers "custom\time_control.sqf"; SERVER SIDE: SERVER_FUNCTIONS.SQF
    Now we need to modify files inside dayz_server.pbo.

    At the end of the file init\server_functions.sqf add this code:



    initialSend = false; donn_server_timeSync = server_timeSync; server_timeSync = {if (!initialSend) then {[] call donn_server_timeSync;}; initialSend = true;}; [] spawn { waitUntil {initialSend}; while {true} do { _dayTime = dayTime; //========================TIME FUNCTION============================ if (_dayTime >= 8 && _dayTime <= 16) then {donn_speed = 4.000;}; if (_dayTime > 4 && _dayTime < 8) then {donn_speed = 6.666;}; if (_dayTime > 16 && _dayTime < 20) then {donn_speed = 6.666;}; if (_dayTime <= 4 || _dayTime >= 20) then {donn_speed = 10.000;}; //================================================================= cad_pvar_server_date = [date, donn_speed]; publicVariable "cad_pvar_server_date"; sleep 30; }; }; "cad_pvar_send_owner" addPublicVariableEventHandler { cad_pvar_server_date = [date, donn_speed]; owner (_this select 1) publicVariableClient "cad_pvar_server_date"; }; BATTLEYE FILTER:
    On the BattlEye filter publicvariable.txt search for the line that start with 5 "" and add at the end of it an empty space and than !"cad_pvar_s".
     
    My line is like that after the adition:


    EXTRA:
    To have a 3 hours day, change the line "donn_multi = 2;" in time_control.sqf:


    donn_multi = 1; -> 4 hours day donn_multi = 4/3; -> 3 hours day donn_multi = 2; -> 2 hours day
  20. Like
    Donnovan got a reaction from 31_D!4b10 in Joelma's Time Control   
    If you like my work, please consider a donation:

    $USD

    $EURO

    *** UPDATED THE FILE TIME_CONTROL.SQF IN 2014-10-09 13:00 ***
    *** TIME_CONTROL.SQF WAS CHANGED, THE CHANGED PARTE HAVE ***
    *** THE COMMENT "//LAST CHANGE WAS IN THIS SPAWN" ***

    JOELMA'S TIME CONTROL SYSTEMA

    Default configuration: A day of 2 hours.
    - 60 minutes completely day time (08:00 - 16:00)
    - 36 minutes of sunrise and sunfall (04:00 - 08:00, 16:00 - 20:00)
    - 24 minutes of night (00:00 - 04:00, 20:00 - 24:00)

    CLIENT SIDE: TIME_CONTROL.SQF
    In your mission folder, create the folder custom if it does not exist.
    Create inside the custom folder a txt file called time_control.sqf.
    Put inside time_control.sqf the content bellow:


    donn_sleep = 0.2; donn_multi = 2; drn_fnc_DynamicWeather_SetWeatherLocal = {}; 0 setOvercast 0; 0 setFog 0.05; if (!isDedicated) then { "cad_pvar_server_date" addPublicVariableEventHandler {(_this select 1) call donn_setdate;}; donn_setdate = { private ["_dateSer","_dateCli","_date_diff"]; donn_speed = _this select 1; 0 setOvercast 0; _dateSer = dateToNumber (_this select 0); _dateCli = dateToNumber date; _date_diff = (_dateSer-_dateCli)*12*31*24; if (abs _date_diff > 5/60) then {setDate (_this select 0);}; }; }; [] spawn { //LAST CHANGE WAS IN THIS SPAWN private ["_tm","_tmLen"]; _tm = diag_tickTime; waitUntil {!isNil "donn_speed"}; while {true} do { sleep donn_sleep; _tmLen = diag_TickTime - _tm; _tm = _tm + _tmLen; skipTime ((_tmLen*(donn_speed*donn_multi-1))/3600); }; }; if (!isDedicated) then { [] spawn { for "_x" from 1 to 10 do { "infiSTAR_SetDate" addPublicVariableEventHandler {}; "PVDZE_plr_SetDate" addPublicVariableEventHandler {}; cad_pvar_send_owner = player; publicVariableServer "cad_pvar_send_owner"; sleep 0.5; }; }; }; CLIENT SIDE: INIT.SQF
    Step 1
    On your mission folder, open the file init.sqf.

    Inside it change this:


    //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; To this:
    //Start Dynamic Weather //execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; Step 2At the end of your init.sqf file, add this line:


    call compile preprocessFileLineNumbers "custom\time_control.sqf"; SERVER SIDE: SERVER_FUNCTIONS.SQF
    Now we need to modify files inside dayz_server.pbo.

    At the end of the file init\server_functions.sqf add this code:



    initialSend = false; donn_server_timeSync = server_timeSync; server_timeSync = {if (!initialSend) then {[] call donn_server_timeSync;}; initialSend = true;}; [] spawn { waitUntil {initialSend}; while {true} do { _dayTime = dayTime; //========================TIME FUNCTION============================ if (_dayTime >= 8 && _dayTime <= 16) then {donn_speed = 4.000;}; if (_dayTime > 4 && _dayTime < 8) then {donn_speed = 6.666;}; if (_dayTime > 16 && _dayTime < 20) then {donn_speed = 6.666;}; if (_dayTime <= 4 || _dayTime >= 20) then {donn_speed = 10.000;}; //================================================================= cad_pvar_server_date = [date, donn_speed]; publicVariable "cad_pvar_server_date"; sleep 30; }; }; "cad_pvar_send_owner" addPublicVariableEventHandler { cad_pvar_server_date = [date, donn_speed]; owner (_this select 1) publicVariableClient "cad_pvar_server_date"; }; BATTLEYE FILTER:
    On the BattlEye filter publicvariable.txt search for the line that start with 5 "" and add at the end of it an empty space and than !"cad_pvar_s".
     
    My line is like that after the adition:


    EXTRA:
    To have a 3 hours day, change the line "donn_multi = 2;" in time_control.sqf:


    donn_multi = 1; -> 4 hours day donn_multi = 4/3; -> 3 hours day donn_multi = 2; -> 2 hours day
  21. Like
    Donnovan reacted to Rocu in [Release] Gebriel Safe Zones Maybe   
    Is this script compatible with NoxSicarius' Admin Tools? Specifically with it's god mode function. Most safe zone scripts don't get a long with that, was wondering if this is any different.
  22. Like
    Donnovan got a reaction from unrealPANDA in Joelma's Time Control   
    If you like my work, please consider a donation:

    $USD

    $EURO

    *** UPDATED THE FILE TIME_CONTROL.SQF IN 2014-10-09 13:00 ***
    *** TIME_CONTROL.SQF WAS CHANGED, THE CHANGED PARTE HAVE ***
    *** THE COMMENT "//LAST CHANGE WAS IN THIS SPAWN" ***

    JOELMA'S TIME CONTROL SYSTEMA

    Default configuration: A day of 2 hours.
    - 60 minutes completely day time (08:00 - 16:00)
    - 36 minutes of sunrise and sunfall (04:00 - 08:00, 16:00 - 20:00)
    - 24 minutes of night (00:00 - 04:00, 20:00 - 24:00)

    CLIENT SIDE: TIME_CONTROL.SQF
    In your mission folder, create the folder custom if it does not exist.
    Create inside the custom folder a txt file called time_control.sqf.
    Put inside time_control.sqf the content bellow:


    donn_sleep = 0.2; donn_multi = 2; drn_fnc_DynamicWeather_SetWeatherLocal = {}; 0 setOvercast 0; 0 setFog 0.05; if (!isDedicated) then { "cad_pvar_server_date" addPublicVariableEventHandler {(_this select 1) call donn_setdate;}; donn_setdate = { private ["_dateSer","_dateCli","_date_diff"]; donn_speed = _this select 1; 0 setOvercast 0; _dateSer = dateToNumber (_this select 0); _dateCli = dateToNumber date; _date_diff = (_dateSer-_dateCli)*12*31*24; if (abs _date_diff > 5/60) then {setDate (_this select 0);}; }; }; [] spawn { //LAST CHANGE WAS IN THIS SPAWN private ["_tm","_tmLen"]; _tm = diag_tickTime; waitUntil {!isNil "donn_speed"}; while {true} do { sleep donn_sleep; _tmLen = diag_TickTime - _tm; _tm = _tm + _tmLen; skipTime ((_tmLen*(donn_speed*donn_multi-1))/3600); }; }; if (!isDedicated) then { [] spawn { for "_x" from 1 to 10 do { "infiSTAR_SetDate" addPublicVariableEventHandler {}; "PVDZE_plr_SetDate" addPublicVariableEventHandler {}; cad_pvar_send_owner = player; publicVariableServer "cad_pvar_send_owner"; sleep 0.5; }; }; }; CLIENT SIDE: INIT.SQF
    Step 1
    On your mission folder, open the file init.sqf.

    Inside it change this:


    //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; To this:
    //Start Dynamic Weather //execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; Step 2At the end of your init.sqf file, add this line:


    call compile preprocessFileLineNumbers "custom\time_control.sqf"; SERVER SIDE: SERVER_FUNCTIONS.SQF
    Now we need to modify files inside dayz_server.pbo.

    At the end of the file init\server_functions.sqf add this code:



    initialSend = false; donn_server_timeSync = server_timeSync; server_timeSync = {if (!initialSend) then {[] call donn_server_timeSync;}; initialSend = true;}; [] spawn { waitUntil {initialSend}; while {true} do { _dayTime = dayTime; //========================TIME FUNCTION============================ if (_dayTime >= 8 && _dayTime <= 16) then {donn_speed = 4.000;}; if (_dayTime > 4 && _dayTime < 8) then {donn_speed = 6.666;}; if (_dayTime > 16 && _dayTime < 20) then {donn_speed = 6.666;}; if (_dayTime <= 4 || _dayTime >= 20) then {donn_speed = 10.000;}; //================================================================= cad_pvar_server_date = [date, donn_speed]; publicVariable "cad_pvar_server_date"; sleep 30; }; }; "cad_pvar_send_owner" addPublicVariableEventHandler { cad_pvar_server_date = [date, donn_speed]; owner (_this select 1) publicVariableClient "cad_pvar_server_date"; }; BATTLEYE FILTER:
    On the BattlEye filter publicvariable.txt search for the line that start with 5 "" and add at the end of it an empty space and than !"cad_pvar_s".
     
    My line is like that after the adition:


    EXTRA:
    To have a 3 hours day, change the line "donn_multi = 2;" in time_control.sqf:


    donn_multi = 1; -> 4 hours day donn_multi = 4/3; -> 3 hours day donn_multi = 2; -> 2 hours day
  23. Like
    Donnovan got a reaction from ToejaM in Joelma's Time Control   
    Distribution will be allways like that:

    50% of the time between 08:00 to 16:00
    30% of the time on sunrise 04:00 to 08:00 + sunfall 16:00 to 20:00
    20% of the time at night 20:00 to 04:00

    If you guys want other distribution, tell me and i do it. I will make a custom Time Function:

    //========================TIME FUNCTION============================ if (_dayTime >= 8 && _dayTime <= 16) then {donn_speed = 4.000;}; if (_dayTime > 4 && _dayTime < 8) then {donn_speed = 6.666;}; if (_dayTime > 16 && _dayTime < 20) then {donn_speed = 6.666;}; if (_dayTime <= 4 || _dayTime >= 20) then {donn_speed = 10.000;}; //=================================================================This function is in the server file init/server_functions.sqf.
    ToejaM, UKCPirate

    May be you need a new Time Function.

    About server start time set in hiveExt.ini, it can be anything you want.

    EXTRA: TO USE DYNAMIC WHEATHER

    Step 1: Does not comment this line in init.sqf (the instalation instructions tell you to do that):

    //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf";Step 2: Comment those lines in time_control.sqf:
    Change this:

    0 setOvercast 0.3; 0 setFog 0.1; setWind [0.3, 0.4, true];To this:
    //0 setOvercast 0.3; //0 setFog 0.1; //setWind [0.3, 0.4, true];
  24. Like
    Donnovan reacted to BetterDeadThanZed in Joelma's Time Control   
    I'm working the next three days so on Sunday maybe I'll test it out on one of my servers and see how well it works.
  25. Like
    Donnovan got a reaction from UKCPirate in Joelma's Time Control   
    If you like my work, please consider a donation:

    $USD

    $EURO

    *** UPDATED THE FILE TIME_CONTROL.SQF IN 2014-10-09 13:00 ***
    *** TIME_CONTROL.SQF WAS CHANGED, THE CHANGED PARTE HAVE ***
    *** THE COMMENT "//LAST CHANGE WAS IN THIS SPAWN" ***

    JOELMA'S TIME CONTROL SYSTEMA

    Default configuration: A day of 2 hours.
    - 60 minutes completely day time (08:00 - 16:00)
    - 36 minutes of sunrise and sunfall (04:00 - 08:00, 16:00 - 20:00)
    - 24 minutes of night (00:00 - 04:00, 20:00 - 24:00)

    CLIENT SIDE: TIME_CONTROL.SQF
    In your mission folder, create the folder custom if it does not exist.
    Create inside the custom folder a txt file called time_control.sqf.
    Put inside time_control.sqf the content bellow:


    donn_sleep = 0.2; donn_multi = 2; drn_fnc_DynamicWeather_SetWeatherLocal = {}; 0 setOvercast 0; 0 setFog 0.05; if (!isDedicated) then { "cad_pvar_server_date" addPublicVariableEventHandler {(_this select 1) call donn_setdate;}; donn_setdate = { private ["_dateSer","_dateCli","_date_diff"]; donn_speed = _this select 1; 0 setOvercast 0; _dateSer = dateToNumber (_this select 0); _dateCli = dateToNumber date; _date_diff = (_dateSer-_dateCli)*12*31*24; if (abs _date_diff > 5/60) then {setDate (_this select 0);}; }; }; [] spawn { //LAST CHANGE WAS IN THIS SPAWN private ["_tm","_tmLen"]; _tm = diag_tickTime; waitUntil {!isNil "donn_speed"}; while {true} do { sleep donn_sleep; _tmLen = diag_TickTime - _tm; _tm = _tm + _tmLen; skipTime ((_tmLen*(donn_speed*donn_multi-1))/3600); }; }; if (!isDedicated) then { [] spawn { for "_x" from 1 to 10 do { "infiSTAR_SetDate" addPublicVariableEventHandler {}; "PVDZE_plr_SetDate" addPublicVariableEventHandler {}; cad_pvar_send_owner = player; publicVariableServer "cad_pvar_send_owner"; sleep 0.5; }; }; }; CLIENT SIDE: INIT.SQF
    Step 1
    On your mission folder, open the file init.sqf.

    Inside it change this:


    //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; To this:
    //Start Dynamic Weather //execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; Step 2At the end of your init.sqf file, add this line:


    call compile preprocessFileLineNumbers "custom\time_control.sqf"; SERVER SIDE: SERVER_FUNCTIONS.SQF
    Now we need to modify files inside dayz_server.pbo.

    At the end of the file init\server_functions.sqf add this code:



    initialSend = false; donn_server_timeSync = server_timeSync; server_timeSync = {if (!initialSend) then {[] call donn_server_timeSync;}; initialSend = true;}; [] spawn { waitUntil {initialSend}; while {true} do { _dayTime = dayTime; //========================TIME FUNCTION============================ if (_dayTime >= 8 && _dayTime <= 16) then {donn_speed = 4.000;}; if (_dayTime > 4 && _dayTime < 8) then {donn_speed = 6.666;}; if (_dayTime > 16 && _dayTime < 20) then {donn_speed = 6.666;}; if (_dayTime <= 4 || _dayTime >= 20) then {donn_speed = 10.000;}; //================================================================= cad_pvar_server_date = [date, donn_speed]; publicVariable "cad_pvar_server_date"; sleep 30; }; }; "cad_pvar_send_owner" addPublicVariableEventHandler { cad_pvar_server_date = [date, donn_speed]; owner (_this select 1) publicVariableClient "cad_pvar_server_date"; }; BATTLEYE FILTER:
    On the BattlEye filter publicvariable.txt search for the line that start with 5 "" and add at the end of it an empty space and than !"cad_pvar_s".
     
    My line is like that after the adition:


    EXTRA:
    To have a 3 hours day, change the line "donn_multi = 2;" in time_control.sqf:


    donn_multi = 1; -> 4 hours day donn_multi = 4/3; -> 3 hours day donn_multi = 2; -> 2 hours day
×
×
  • Create New...