dayZ Street Lights

One thing, not sure if I mentioned this or not...

When I installed the street lights and I log in during daylight hours, no problems. Once it turns night, then the publicvariable thing kicks in. Thought it was worth a mention.
 
The light script won't run in daylight hours, the script loops but won't kick in unless after a set time..
 
Any word on a work-around for the publicvariable #0 kick?

Not trying to be a haunt, just would like this working again before SA drops. If its not fixable let me know and I'll keep it moving...thx.
 
Are you creating the publicvariable on the server or the client ? In other words, where is your fnc_returnLampWS.sqf ?
 
Are you creating the publicvariable on the server or the client ? In other words, where is your fnc_returnLampWS.sqf ?

dayz_mission>lights>fnc_returnLampWS.sqf

That's where it goes right?

Should I be making edits to publicvariable.txt or publicvariableval.txt?
 
Am guessing that is the MpMissions folder, basically you have the default setup where the large file with all the light locations is downloaded to the client. Try packaging it into the server .pbo, instructions on the taviana link from original post. That way the server creates the public variable and the client just reads it, no kick will happen.. Also a much smaller mission file for your clients to download..
 
Thanks for the suggestion Axe. If I run into any more roadblocks I'll give that a whirl.

I found a fix for anyone who is having the same issue as me.

In publicvariable.txt...

I changed this:
5 !="remExField" !="remExFP" !="drn_AskServerDynamicWeatherEventArgs" !="BIS_effects_gepv" !"PVDZ_"

to this:
1 !="remExField" !="remExFP" !="drn_AskServerDynamicWeatherEventArgs" !="BIS_effects_gepv" !"PVDZ_"
 
If that works then the first line filters out publicvariables that are allowed, is what the exclamation mark does, am guessing != means an exact match, ! on it's own may mean a match in the string.

Changing the 5 to a 1 will change the action from kick to log, the log file might fill up with this. I did notice a lot of log entries when testing Taviana, would like to reduce them as, I believe, the logging is a big cause of lag on the servers..

Also try adding !"axeLampReturn" as this is the public variable being created, on the fly, by the client, it holds all of the light locations. Technically it is a publicVariableClient, but the other (axe_server_lampObjs) is run by the server anyway, this second one may be the one causing the issue..

Again, the best solution is to package fnc_returnLampWS.sqf in the server pbo as it reduces the mission file size a lot..
 
5 !="remExField" !="remExFP" !="drn_AskServerDynamicWeatherEventArgs" !="BIS_effects_gepv" !"PVDZ_" !"axe_server_lampObjs"

as well as...

5 !="remExField" !="remExFP" !="drn_AskServerDynamicWeatherEventArgs" !="BIS_effects_gepv" !"PVDZ_" !"axeLampReturn"

...still get the publicvariable #0 kick.
 
I could test by filtering it from logging. Am going to be updating soon. Been deciding on which mod/map to build the new version for. A generator has been a big decider. stick to the change to 1 for now, will investigate. Real life has needed attention, hoping to spend some time on it this weekend..
 
Celle it is, am downloading the client files. Have been using Stapos Lite Installer to build the servers, Celle is my 3rd attempt, Panthera and Lingor I am getting errors. If you have a map you want doing let me know how / where you run it..
could you try out Namalsk?
 
Hi all, hi axeman and greating for this work !

Recently i have stopped definitly playing online (for many reasons) and so I have installed a DayZ SP version (DaiZyFACTIONS SinglePlayer)

I tried to add your scripts to have street lights but without succes :(
I use "PBOmanager" to decompile .pbo files

Arma 2 Operation Arrowhead/Missions/DaiZyFactions22.chernarus/init.sqf

Do you think if it's the right file to modify?
Or i need to modify another file ? where iam wrong ?

Do you have a way to install your script on a SP version ?
Is it possible to activate street lights only (without interior houses lights)

Thanks in avance
 
I can not say that I have tried on single player. No reason why it shouldn't work. That mission folder looks ok, again not tried it. Yes, street and house lights can be run separately..
 
Thanks for quick reply axeman

Maybe I should show you my init.sqf file in my "Missions" folder it seems to be different for servers...

Code:
/*
if ((Player getVariable "SpareTime") > 0) then {...
*/
 
EAST setFriend [RESISTANCE, 0];
WEST setFriend [RESISTANCE, 0];
WEST setFriend [EAST, 0];
EAST setFriend [WEST, 0];
 
private ["_plyr","_kilr"];
 
isServer = false;
BIS_Effects_Burn = compile preprocessFileLineNumbers "\ca\Data\ParticleEffects\SCRIPTS\destruction\burn.sqf";
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";             
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf";             
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf"; 
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
call compile preprocessFileLineNumbers "fixes\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early)
call compile preprocessFileLineNumbers "compiles.sqf"; //Compile regular functions
call compile preprocessFileLineNumbers "fixes\functions.sqf"; //KK
 
player_spawn_2            = compile preprocessFileLineNumbers "fixes\player_spawn_2.sqf"; //KK
player_tentPitch        = compile preprocessFileLineNumbers "fixes\tent_pitch.sqf"; //KK
 
//uNkn0wnn
call compile preprocessFileLineNumbers "scripts\init\daizy_functions.sqf";
call compile preprocessFileLineNumbers "scripts\mission\mission_functions.sqf";
 
//Radio Cheat Menu
_nul = [] execVM "monitor.sqf";
 
//HUDfix
_nul = [] execVM "reloadHUD.sqf";
 
//Modified scripts
player_spawnCheck = compile preprocessFileLineNumbers "custom\player_spawnCheck.sqf";
player_switchModel    = compile preprocessFileLineNumbers "fixes\player_switchModel.sqf";
 
//DayZ Factions
_nul = [] execVM "Dayz_Factions\init.sqf";
 
//GeneralCarver's Vehicle Flip Script
_nul = [] execVM "scripts\gc_veh_flip\action_manager.sqf";
 
_nul = [] execVM "DMZ_delete.sqf";  // start the cleanup script.
 
//Refuel Vehicle Script
_nul = [] execVM "Scripts\kh_actions.sqf";
_nul = [] execVM "Scripts\kh_vehicle_refuel.sqf";
 
//DynamicWeatherEffects v2.00 by Engima
_nul = [] execVM "scripts\DynamicWeatherEffects.sqf";
 
//  Add this in for Base Building 1.2 Make sure it is last to be added before progressLoadingScreen 1.0 and after the last "call compile preprocessFileLineNumbers"
call compile preprocessFileLineNumbers "dayz_code\init\variables.sqf"; //Initializes custom variables
call compile preprocessFileLineNumbers "dayz_code\init\compiles.sqf"; //Compile custom compiles
call compile preprocessFileLineNumbers "dayz_code\init\settings.sqf"; //Initialize custom clientside settings
 
isServer = true;
 
allowConnection = true;
dayz_preloadFinished = true;
enableRadio true;
 
server_gutObject = {};
server_onPlayerConnect = {};
server_onPlayerDisconnect = {};
server_playerDied = {};
 
server_playerLogin = {
    _playerObj = player;
    _clientID = owner _playerObj;
    // dayzPlayerLogin = [_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer];
    dayzPlayerLogin = ["42",[],[],[0,0,0],true,dayz_versionNo,typeOf player,true,false];
    _clientID publicVariableClient "dayzPlayerLogin";
};
 
 
 
server_playerSetup = {
        _playerObj = player;
        _clientID = owner _playerObj;
        _position = getPosATL _playerObj;
 
    waitUntil {
        _mkr = format["spawn%1",round(random 4)];
        _position = ([(getMarkerPos _mkr),0,1500,10,0,2000,1] call BIS_fnc_findSafePos);
        _validPos = ((_position select 0) != 0);
        _validPos
    };
 
    _position set [2,0];
    _playerObj setPosATL _position;
 
    // dayzPlayerLogin2 = [_worldspace,_state];
    dayzPlayerLogin2 = [[0,_position],[],true];
    _clientID publicVariableClient "dayzPlayerLogin2";
};
 
server_playerStat = {};
server_playerSync = {};
server_publishObject = {};
server_routinePlayerCheck = {};
server_townDeZombify = {};
server_townZombify = {};
server_updateObject = {};
server_updatePlayer = {};
zombie_findOwner = {};
dayz_clientPreload = true;
 
    0 fadeSound 0;
    0 cutText [(localize "STR_AUTHENTICATING"), "BLACK FADED",60];
 
    _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
        sleep .2;
 
      call fnc_onLoad;
      call fnc_onPlayerLoad;
      // _nul = [] execVM "debug.sqf";
    diag_log ("Done with DaiZy mission init.sqf");
     
};
};

Also Ive forgot to say I recompile my .pbo file before test (I allways launch a new game each times)
 
-added the lines for "init.sqf"
-created folder "lights" in same place of init.sqf file
-added your 2 scripts "fnc_returnLampWS.sqf" and "street_lights.sqf"
-recompiled pbo
-new game

I have tried again and again .... it doesnt work :(
 
It may be that when the light locations are returned a public variable client is used. Am guessing this would only work on multi player. Not at pc. will look when back.
 
Thanks in advance axeman !

Also I found this :
http://forums.bistudio.com/showthread.php?134139-TPW-HOUSELIGHTS-automatic-house-light-addon

In fact this script is already inside "DaizyFactionsSP" mod but by default not activated IDK why...
I managed to reactivate this script by adding
Code:
_nul = [] execVM "scripts\fn_enterableLights.sqf";
in my init.sqf file
The script work fine on my game so it's a good new for me :)

So I'am wondering if it is possible to modify this script to affect street lights only ??

Ive also found this: (it seems to be ID for a few lights)

StreetLamp
Land_PowLines_Conc2L_EP1
Land_Lamp_Street1_EP1
Land_Lamp_Street2_EP1
Land_Lamp_Small_EP1
Land_Lampa_Ind_EP1
Land_NavigLight

I tried this code:
Code:
{_x switchLight "auto"} forEach ((getPos LightSwitch) nearObjects ["Land_Lamp_Street1_EP1",2000]);
but it doesnt work
 
Hello Axe, how can I do this for Fallujah? What Changes do I need to make and file cause I can't seem to find the fnc_returnLampWS.sqf for Fallujah also I think the _mapSW _mapNE would need to be changed as well. Thanks so much for your help and cheers for all this incredible work.
 
Back
Top