Jump to content
ghosttownn

Dayz Night Lighting

Recommended Posts

I found this video and I messaged the guy but failed to get a reply

I was wondering how you turn on the lights? At least the street lamps?

Is this a addon/mod or is this some editing with the mission files?

If anyone knows please let me know

**EDIT**

Also does anyone know why the battleeye extended controls are not working?

I mean I have the scheduler working just fine.. But the admins and the bad words/names filter dont seem to work..

Also now battleye isint verifying GUIDs there just connecting as unverified.

Edited by TheNinja
  • Like 1

Share this post


Link to post
Share on other sites

Im not an Arma vet so don't know exactly, but all I could find was this

http://www.armaholic.com/page.php?id=7137

http://forums.bistudio.com/showthread.php?85283-Night-lighting-effects

Since I saw that vid a few days ago I think its pretty awesome. Lots of suggestions in his YT comments on how it could be a viable option to implement it into DayZ. ( Pobeda Dam could be providing the last of the Electric etc ... )

Share this post


Link to post
Share on other sites

Should be just turning their state to true i guess, but it would take out what makes DayZ DayZ: FEAR!

Share this post


Link to post
Share on other sites

The street lights are on in the SurviveDayZ mod. I actually enjoy sneaking around the big cities at night there cause it looks so eerie and trying to stay out of the lights adds another level to the game. I really hope they bring something like this in for the standalone. :D

Share this post


Link to post
Share on other sites

that is awesome and in night time there would be more people on the server then just 6

Share this post


Link to post
Share on other sites

I'm actually working on this, with mixed success. It seems the street lamp/light models have their brightness turned to '0' and ambient light '0,0,0' (R,G,B ), in the config.bin file of one of the .pbo's (don't remember off the top of my head I have the list at home). You have to identify all the lights in an area, set the brightness to between 0-1 and the ambientlight so some color you like, and turn on the light or put it on 'AUTO' which will automatically turn lights on/off at dusk/dawn.

When I get some actual code/script that works with the client Dayz files, I'll post them (unlesss someone beats me to it). There are also other lights in the game, light the flashing stop lights, train signal lights, etc. From what I can determine, They've all been setup in a config.bin file to not be on and/or have no brightness or ambient light. I can easily fix that by using a custom config.bin file, but it wouldn't be compatible with the public server client files. Just like the "Allow all things in the game" file I have, I don't like using them on public servers since it requires a players to download another version of dayz. Someone suggested I should just abandon the public files and make my own version, but I think there are enough bad versions of DayZ floating around that the community doesn't need another one.

But yes, this is something I am working on for the StormSeekers Operations Server. One idea I had was to make it a mission for players to fix the power plant and power grids to the major cities. I like the idea of getting players involved in shaping and interacting with the game world. Currently our server has several customizations and none of them require players to change their files from the public version.

Edited by Calinthor

Share this post


Link to post
Share on other sites

MESSAGE

I really like your idea and I would be willing to help you with this! And your idea with getting the players involved is what I was thinking!

Now the problem is... Does this mean all clients will need to download the new files that you are editing or is there a way to edit server files and have say the street lamps on for players but they wont need to install anything?

I know this stuff is a little tricky! If you want Pm or post on here!

Share this post


Link to post
Share on other sites

I can get it to work with modified files, but I don't want to have to resort to that. It will just take some testing to find out how to bypass the "Default DayZ" behavior. I prefer to not have players use modified files, even it if means I have to re-compile client files on serverside (I can explain this if anyone wants to know how to do this. I use it for a few things, like letting people pitch tents ANYWHERE...even in buildings & water).

One idea I had was placing generators (you've seen them in game already they are blue/green) on the map (with custom name) and adding code for "addaction 'repair generator'" when a player with scrap metal was close. After it's fully repaired, it would turn on certain lights in the city. Also if someone destroyed it, it would darken those same lights. It's not complicated code, just time consuming. BTW, streetlights can be shot out, but come back after a server restart.

Share this post


Link to post
Share on other sites

Well please let me know what you have got working!!

It would be really nice to have the lights working on server files only...

I dont want to force my playerbase to install more files.

Share this post


Link to post
Share on other sites

Moderate success. I have building lights animating, just not the buildings you can enter. It makes it look like the city is alive. I even played with delaying the lights coming on, so it looks like people are inside turning lights on. Would be easy to add a random timer to have them turn on & off at random intervals.

Share this post


Link to post
Share on other sites

Wow dude thats awesome!

Now for what you have done so far.. Does that still mean the clients need to download the new file?

Share this post


Link to post
Share on other sites

I'd love to get this going on our private hive server as well, we are just transferring to a VPS where we have full control of everything. Is there a way I could get in contact with ya outside of these forums?

Share this post


Link to post
Share on other sites

Nope. I try to keep it so that the ANYONE with the official DayZ files/folder can play on my server (StormSeekers <shameless plug>).

More success. I have animated lights on buildings that can't be entered, and will have custom colored lighting inside buildings you can enter. I'm thinking a yellow/red (like candlelight) color light for houses/churches, white/bluish (Neon lights) for stores and office buildings, and a white/orange light for the firestation. I still haven't got the streetlights to work with the official dayz files, but they are easy to turn on/off with Chernarus map non-dayz.

for non-dayz maps this turns on all street lights within 2000m radius (you can use 'ON' 'OFF' or 'AUTO'):


{_x switchLight "AUTO";} forEach ((getPos vehicle player) nearObjects ["StreetLamp",2000]);

Edited: Actually, after double checking, I had type the command wrong in the script file... this might work on DayZ

After some more testing, I'll post code for the buildings (non enterable and enterable), and if I can get the streetlights to work, I'll post that too.

I'll keep working on it though. These are the models used.


class CfgNonAIVehicles {
access = ReadAndWrite;

class StreetLamp {
scope = private;
model = "";
destrType = "DestructTree";
simulation = "thing";
};

class Land_lampa_sidl : StreetLamp {
scope = protected;
model = "\ca\buildings\Misc\lampa_sidl";
};

class Land_lampa_sidl_2 : StreetLamp {
scope = protected;
model = "\ca\buildings\Misc\lampa_sidl_2";
};

class Land_lampa_sidl_3 : StreetLamp {
scope = protected;
model = "\ca\buildings\Misc\lampa_sidl_3";
};

class Land_lampa_ind : StreetLamp {
scope = protected;
model = "\ca\buildings\Misc\lampa_ind";
};

class Land_lampa_ind_zebr : StreetLamp {
scope = protected;
model = "\ca\buildings\Misc\lampa_ind_zebr";
};
};

Share this post


Link to post
Share on other sites

Wow man looking good so far!

That really does look awesome on how just simple lighting changes so much

Share this post


Link to post
Share on other sites

I have the code working for building animated lights (non enterable) and the code working for enterable buildings but need to tweak the colors and intensity. I need to test dayz streetlights and find out what I can make work the the client files (distributed dayz files)

Unfortunately, my Server has a hardware failure (CPU Coolant pump died), so my test server is going to be stuck running the game for awhile.

Here's the code I executed in the above video. Feel free to use it anyway you want. I'd like to hear back on success/failures. You can make a logic object on the mission map and put any code in the init and play around with it.


{_x switchLight "OFF";} forEach ((getPos vehicle player) nearObjects ["StreetLamp",2000]);


{_x switchLight "AUTO";} forEach ((getPos vehicle player) nearObjects ["StreetLamp",2000]);

lights_on_bld.sqf:



// Turns on Window lights of buildings that can't be entereed within 2000 meters
_objHouse = nearestObjects [player, ["House"], 2000];
{
for "_i" from 1 to 5 do {
_x animate [format ["Lights_%1",_i],1];
};
} forEach _objHouse;


// Creates a light source in an enterable building (General store) within 2000 meters
_objEntHouse = nearestObjects [player, ["Land_A_GeneralStore_01"], 2000];
{
_lp = "#lightpoint" createVehicle [0,0,0];
_lp setLightColor [0.2, 0.1, 0.3]; // Set its colour
_lp setLightBrightness 0.1; // Set its brightness
_lp lightAttachObject [_x, [1,1,1]]; // Position it within house
} forEach _objEntHouse;
//Other enterable building codes can be found at http://picacid.com/arma2/loot_en.html (Use list of Structure names)

Share this post


Link to post
Share on other sites

I messed around with that code. It's nice to have the building windows light up, but no matter what you set the distance to they seem to have a limited range. Also they don't emit any light to the environment so it's more of a cosmetic effect.

The enterable building code works great for some buildings, but I can't get it to work with any of the military buildings. I have also spent countless hours trying to figure out a way to attach these light sources to the street lights as a temporary fix, but no luck.

Share this post


Link to post
Share on other sites

you have to remember most streetlamps are empty classes or banned in dayz_anim by rocket.

You could use rMod which makes all lights work with scripts.. but this is a seperate mod.

Basically all lights don't work because rocket banned the class, a bit like vehicles and to undo it requires a client side change, or like i said rmod.

You can light up some things but for the important parts - you need to work around the dayz configs.

Also on a full server you really don't want a code checking how close you are to a building and which ones to light up all the time, will not be an overall smooth experience.

Edited by MessHall

Share this post


Link to post
Share on other sites

My server actually does use rmod and even with the switchlight script the street lights won't turn on. Unless there is more to it than that?

Share this post


Link to post
Share on other sites

I need some help with the code above. Is anyone able to tell me stey-by-step how i have to insert the code to get working building lights ?

I have created a lights.sqf within my mission-file and started it execVM "lights.sqf"; in the init.sqf, but this doesnt work.

Thanks a lot.

Share this post


Link to post
Share on other sites

Should be just turning their state to true i guess, but it would take out what makes DayZ DayZ: FEAR!

Fear of bandits and skiddies you mean...?

Share this post


Link to post
Share on other sites

has anyone had any luck getting this to work on a server? I have rmod but no luck..... Anyone that can give a short tutorial it would be really appreciated and it looks like im not the only one having problems getting this to work.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×