Jump to content

Axeman's new lighting system in 1.0.2.1


vbawol

Recommended Posts

Axeman has graciously added to 1.0.2.1 a very cool new lighting system that actually allows a running generator to light up streetlights, non enter-able houses, and light towers in a radius around the generator.

 

Please test this with players by editing your servers mission init.sqf. Change the following line from:

//Lights
//[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";

To:

//Lights
[] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";

Post your feedback or bugs here, Thanks!

Link to comment
Share on other sites

It would be interesting to see a mix of this and AEG addon (arma electrical grid) so that players can start up power plants/substations to turn on and off entire cities and grids. The generator lights up everything within a 100m radius, which can give away your position at night while refueling, which is a neat dynamic. The lights from the craft-able light poles are unaffected by this lighting system, which is what it should be for, to power on/off the lights in your base.

 

My only issue is its pitch black at night when its enabled. Even with full moon, and clear skies. With out it, the lights are still off but there is ambient lighting from somewhere with same moon and weather settings, making it lighter out and easier to see, but not as well lit as patch 1.0.2, there are no glowing light sources coming from where the light bulbs would be.

 

There should be an option for server managers to choose always on, or this new method to light individual areas. The feed back from the players on my server is that there is no real use for a loud generator giving away your position in lighting everything up in a city when NVGs, glowsticks that can be dropped and put out, are better options. The one use they had for it was to bait new players to the sound like a moth to a light, almost literally :lol:

 

One bug I noticed. After placing the generator, turning it on, then turning it off, the sound stayed. I was able to remove the generator and the sound still played. Also, if I log off while starting to build the generator, and log back on it will still be there, and I can remove it and now have 2, the one that was in my inventory and the one I removed.

 

Tested two ways on all normal gfx settings. Default epoch install, and then with my custom addons, performing same tests to see if there would be any conflict. Results were the same. So my overall summary of feed back is, give server owners an option for all lights on without this system, or no lights with this system (and integrate AEG). In the mean time, how can we re-enable the 1.0.2 lighting system?

Link to comment
Share on other sites

 

There should be an option for server managers to choose always on, or this new method to light individual areas. The feed back from the players on my server is that there is no real use for a loud generator giving away your position in lighting everything up in a city when NVGs, glowsticks that can be dropped and put out, are better options. The one use they had for it was to bait new players to the sound like a moth to a light, almost literally :lol:

 

 

You can always add AxeMan's individual works available on OpenDayZ, I had just actually added his house lights script when I noticed this addition. It is worth noting as Armifer pointed out, on a PvP server anything that gives away your position be it light or sound will get you killed which means very few people will use this. Or use a generator to power lights at their base. 

 

HFB had the line in the ini so it could just be Vilayer with the issue.

Link to comment
Share on other sites

You can always add Axles individual works available on OpenDayZ, I had just actually added his house lights script when I noticed this addition. It is worth noting as Armifer pointed out, on a PvP server anything that gives away your position be it light or sound will get you killed which means very few people will use this. Or use a generator to power lights at their base. 

 

HFB had the line in the ini so it could just be Vilayer with the issue.

Thanks for the suggestion, it could be something to add until there is a decision on the lighting issue. Do you have a direct link? Also, I use a dedicated box so I have full control over the content that I wish to use on the server. My comment about giving server managers the option to use old or new system is in line with the options we already have for full moon, zed count, vehicle count, debris, etc. so that server managers who want to set it and forget it have an option without having to manually customize their server files with addons, as not all want to learn how to do it but just like having a vanilla Epoch server with a few tweak-able options

Link to comment
Share on other sites

Thanks for the feedback, keep it coming.

There are options but they are compiled into the server and client code. I will add options to the init.sqf that then get passed on.

Is a first release for the lights and have been spending most time in optimising the lightpoint creation, is a pain cos the light points are a strange vehicle in that they can only be seen locally so have to be created by the player.

The built in Street lights have been switched off in the config, there's no way to make that a selectable option. You'll see the street light objects being reclassified in the. rpt file as the server loads.

If dark nights are to much of an issue I could easily add a mission script to provide some random lighting for the player that will be compatible with the built in lighting.

The generator sound issue I am not sure about as I only read variables from the generator but will have a look and see if I can provide some feedback.

I like having lights, is why i made the house lights scripts originally.

But, I also like the fear, that hearing them coming for you and not quite being able to see them, brings to the game. am trying to find that balance..

Link to comment
Share on other sites

Armifer, I would recommend using the house lights

http://opendayz.net/threads/dayz-house-lights.12316/

Links to Street and Tower Lights standalone in that thread.

I haven't tested but can't see any real conflicts with adding the standalone version.. Let me know if you have any questions.

 

I added this, and it works great, except I cannot shoot out the lights like we were able to in previous epoch versions.

 

Also since 1.0.2 the full moon setting in init.sqf hasnt been working, even when set to true. Our sever is static time, so it was not a big deal to change it to a date with a full moon, which is what the setting in the init does anyway (6-6-12). The problem is, the moon still doesnt come out until an hour after it should, so I disabled the full moon setting in the init, and the moon comes out when it should but it is no where near as bright as it used to be in the previous patch.

 

The level of lighting Im trying to achieve is so NVGs are not needed, but you can see without raising gamma in powered cities, and have it slightly dark in the woods. It was perfect in previous patches, but now with the full moon issue, and the lighting issue gamma changing is needed.

 

I think ill have to go back to using CEG or AEG, because players loved fighting with bandits to enable/disabling lights in cities by taking out the power grid or bringing it online. I'm sure it can work with your generator lighting, so players can still individually power sections of cities. They also loved shooting out lights, to darken an area to make it easier to hide. Also, it would be a huge bonus to be able to turn on and off light poles in our bases with these generators.

 

Just to clarify another statement, I don't see the sound of generators as an issue, I like the fact they are noisy, as they should be, it would be neat to have them attract zeds constantly, if they do not already do this! Just some players didn't see the value in it being a bandit, but for survivors and heroes or anyone who wants to fill up a vehicle quickly they needs one. We use a custom auto-refuel to allow un-powered refill at a super slow rate, so that it makes players seek out a generator to get the faster fill rate with the epoch system. When bandits hear the generator going, they spring into action stealing the vehicles and PvP ensues. Its a perfect system.

 

 

Also, thanks for your hard work on this axeman!

Link to comment
Share on other sites

Something is causing the full moon to just never show it self any more. I cant get it on default epoch, or on my test box with addons. Tried various dates, tried using the override. When first logging in, there is a split second when loading in, before the screen goes black, I can see the world around me. The moon is brightly lit up and it is easy to see in the world. After fully loading and location and days alive displayed on bottom of screen, there is no moon, and all objects are dark and its near impossible to see.

 

Nothing changed in CfgWorlds.hpp from previous versions, the date is the same in server monitor, and the only file that changed  was the server_cleanup.fsm timesync, where it checks for the full moon set to true or not, but this shouldn't affect it at all as long as the server is set to true in the init.sqf. I'm going to do some testing, and see whats up. If anyone else has a full moon showing or not, please share your info.

Link to comment
Share on other sites

Am not sure which lights could be shot out, are these the light poles ? Steetlights weren't destructible as far as I was aware. I believe it may be possible to make them shootable, have had an attempt at doing this when reclassifying the streetlight objects..

 

Am not sure what has happened with the full moon lights, it does seem a lot darker since the recent patch.

 

I have just put a pull request in for a big update on the lights. Options for the server admins will be available in the mission init.sqf, including permanent lights and the ability to increase the range, amongst other things.

 

The AEG mod certainly has some interesting additions, not sure if it will work with the current dayZ setup, I have seen a couple of private servers that claim to have it running but have yet to witness the lights coming on. Is something I could make compatible with my lights version if the demand was there and it was something that fits in with Epoch..

 

Have also started adding options to switch off lights at each house as a player action, am hoping to have that in for the next patch.

 

There currently is a feature where if a second generator is placed, but not running, it tries to draw the power from a running generator nearby. The lights that are in range of both generators become very unreliable switching on and off periodically. Not sure if I should fix this, so the running generator takes priority, or leave it as it could create some interesting effects / gameplay..?

Link to comment
Share on other sites

Am not sure which lights could be shot out, are these the light poles ? Steetlights weren't destructible as far as I was aware. I believe it may be possible to make them shootable, have had an attempt at doing this when reclassifying the streetlight objects..

 

Am not sure what has happened with the full moon lights, it does seem a lot darker since the recent patch.

 

I have just put a pull request in for a big update on the lights. Options for the server admins will be available in the mission init.sqf, including permanent lights and the ability to increase the range, amongst other things.

 

The AEG mod certainly has some interesting additions, not sure if it will work with the current dayZ setup, I have seen a couple of private servers that claim to have it running but have yet to witness the lights coming on. Is something I could make compatible with my lights version if the demand was there and it was something that fits in with Epoch..

 

Have also started adding options to switch off lights at each house as a player action, am hoping to have that in for the next patch.

 

There currently is a feature where if a second generator is placed, but not running, it tries to draw the power from a running generator nearby. The lights that are in range of both generators become very unreliable switching on and off periodically. Not sure if I should fix this, so the running generator takes priority, or leave it as it could create some interesting effects / gameplay..?

 

Streetlights used to be able to be shot out in the previous patch, I'm talking 1.0.1.5, and I haven't tested with the custom lights in 1.0.2.1, only with your lighting addon which you posted on open dayz.net.  As for the full moon lights, all my research leads to an issue with something in dayz 1.7.7.1, as many other servers are reporting this. I edited my server cleanup time sync section to match previous patched versions and it had no effect, so there is something some where conflicting with it. Its reporting the proper time in the RPT, I can log in and see the moon while loading, but when fully loaded it's gone.

 

As for AEG, I have it working fully, and have been able to get it to work with epoch. Lights do come one when they are supposed to, and can be shut off by the power stations/substations. You can destroy the lights as well. I feel it does fit with epoch, as if society is trying to rebuilt, fixing infrastructure would be something survivors would do, and of course power hungry and blood thirsty bandits would want to control these precious resources if it could give them some kind of benefit. For example, maybe if a base was built near some power lines it could 'draw' the power to their nearby base without needing a generator if the power-plant was online.

 

Im excited to hear that there will be options for the init.sqf! The one thing that makes epoch surpass many other dayz mods is the range of control it gives the server owners by just editing a line in the init.sqf, if they are not code savvy nor want to bother with it. Also that's a great idea to be able to shut off house lights, and the flickering of failing generators sounds cool. If you fixed it and made it do that deliberately, say if they were not maintained or took damage, or there was a random chance for a power surge with some sound effects, it could really be some interesting game play :)

 

*EDIT*

When I encounter a 'bug' I first test and reproduce it on vanilla epoch to make sure its not a custom addon. If it is a addon conflict, then add back each addon piece by piece until the bug can be reproduced. I always check every file vs the original in dayz_code and server release files and use vanilla files until i need to merge where necessary. I also will run vanilla dayz to see if I can reproduce it there, and then check whichever file that might have the conflict vs the epoch version of that file. So after many hours of testing, I have noticed this simple bit of info below, I am unsure why this occurs.

 

Hiveext.ini settings for full moon lighting as suggested on opendayz.net, also these settings worked for a very bright night on patch 1.0.1.5

[Date]
;Possible values: Local, Static
Type = Static
;If using Static type, the year/month/date to set the date
Year = 2013
Month = 8
Date = 10

[Time]
;Possible values: Local, Custom, Static
;You cannot use Static on OFFICIAL Hive, it will just revert to Local
;Type = Custom
Type = Static
;If using Custom type, offset from UTC in hours (can be negative as well)
;Offset = 0
;If using Static type (Hour value always the same on every server start), the value (0-24) to set the Hour to
Hour = 19

With full moon set to false it does not read the date from the hive.ext, its reading current date, but time is correct.

	Line 1192: 14:17:26 "HIVE: Local Time set to [2013,9,8,19,17]"
	Line 1462: 14:23:07 "TIME SYNC: Local Time set to [2013,9,8,19,23]"
	Line 1462: 14:23:07 "TIME SYNC: Local Time set to [2013,9,8,19,23]"

With full moon set to true it reads the date, but there is no full moon in game, it is dark but there is some slight ambient lighting.

    Line 1677: 14:40:39 "HIVE: Local Time set to [2012,6,6,19,40]"
    Line 1951: 14:46:21 "TIME SYNC: Local Time set to [2012,6,6,19,46]"
    Line 1951: 14:46:21 "TIME SYNC: Local Time set to [2012,6,6,19,46]"

*2nd Edit*

Using various dates, even the one suggested by yourself axeman, the result is always the same. Something is forcing the time sync to change to the local date when the player loads, regardless of using full moon set to true, or a custom date in the hiveext.ini file. Here are some screenshots to compare what I'm talking about:

 

1st Shot while loading in, before player can move, screen is fading in from black.

http://imageshack.us/a/img41/5365/9a1v.jpg

2nd shot, loaded in, moon is gone but ambient lighting stays for a little bit. No moon in the sky.

http://imageshack.us/a/img818/4665/6q9h.jpg

3rd shot, it appears time sync kicks in and ambient light is gone. No moon in the sky. It's pitch black

http://imageshack.us/a/img545/4863/f28s.jpg

 

This images are on vanilla epoch only running axemans street lights from opendayz.net. Same results when enabling/disabling full moon nights, changing static full moon dates. The moon just doesn't want to stay.

Link to comment
Share on other sites

Thanks for the feedback. Latest update is in the pipeline. Shootable street lights are back, I have reverted them to the original Arma street lights, not as pretty but can be shot :)

 

A split of generator requirement and some randomness to the whole lighting system.

 

One second you may be lit, and are scoping the zed running toward you, the next 'click' - no lightee :)

 

 giving nothing more away..

Link to comment
Share on other sites

I am having the same issue with full moon lights on my test server. I have tried setting Local Date, then Local Time in hiveext.ini.

 

Then I changed the local 'physical' time on my server, a bit concerned here as I lost all of my gear, I was editing my character_data manually so it may have been that as I did make a mistake. My client time was out of sync also.

 

Then changed my client PC's time, still no full moon lights. Interestingly after the previous error I was sent to debug where there was a full moon high in the sky ?

 

Still trying things out as I keep restarting my test server testing latest tweaks to the lighting..

 

Ok, the last two restarts and I have full moon nights. I have no clue how this happened. I have Static on both time and date in hiveext.ini. My local time was after about 22:15..

Link to comment
Share on other sites

Looking at the server code all that 

dayz_fullMoonNights = true;

does is force the date to 6/6/2012 ,and passes the current time on.

 

I have found with doing this manually in hiveext.ini that I still had to wait an hour for the moon to come up..

 

According to dayz.st the best date is 31/08/2012..

 

Try disabling dayz_fullMoonNights (by setting to false) and trying that other date in hiveext.ini ?

Link to comment
Share on other sites

I have tried that, and instead its even darker, as there is no ambient light. I checked the RPT, and with my manual date in my hiveext.ini, time sync overrides it to local date and time of the server. Meaning, in my hiveext.ini it says 8/31/12 for the date. In the RPT after time sync it says the date is 9/15/13. It's like it is being ignored for some reason.

 

I have noticed in debug there is the full moon too, thats because we are being loaded onto our place holder AI while all info is being taken from the database, and then when we spawn the player monitors and server clean up kick in, thus changing the date and time from time sync to the local time, with no moon.

Link to comment
Share on other sites

http://opendayz.net/threads/how-to-setup-full-moon-nights.165/page-2

As per that thread there are changes made to the server_monitor files. Do you have anything custom in those files ?

Who do you host with ? The other option is that there is a custom hive being used.

Looking at your previous post it looks like the setting in init.sqf is working as the local date is 6/6/2012. does the moon come up after an hour ?

Link to comment
Share on other sites

yeah I read that thread a while back when the issue first showed up, but we use a dedicated box with full control. The file im testing this with is default epoch server monitor file, with default epoch hive files. Its basically a copy and paste of the released 1.0.2.1 files, with only your custom lighting scripts added and removed to test the full moon. Your scripts have nothing to do with this bug, I am 99% certain of this. In all the reading and research on this bug, everyone seems to be pointing this to something in dayz 1.7.7.1 code. A part of it which may or may not have been added to epoch code might be the cause, or something edited in epoch since the last update from 1.0.1.5. I noticed this issue first in 1.0.2, and my immediate reaction was something sending info to server cleanup fsm, or something inside it is conflicting. But after reading through it countless times, it all looks correct, which leads me to believe something with a hive file is screwy.

Link to comment
Share on other sites

On the full moon nights I can't say that i have ever seen the moon come straight up at sundown but surely there must be a date that a full moon is in the sky all night..

In researching have found this setting: server longitude, also a lat setting. Is designed for the browser but am wondering if the game engine uses it. Knowing how accurate the arma engine is am tempted to try a North Pole setting and see if I get a 6 month night :)

To clear up another question about lighting giving away player positions, this shouldn't be possible as the house and tower lights are only visible locally, on your own pc. The next version will create lights up to the viewable distance of your player anyway.

There may be some syncing of house lights when very close to another player but this is speculation from testing..

Streetlights now may be another matter, as they are global so the random failure may give a hint. would be interested in some feedback on this. I can fix that if it is an issue. But if another player is in range you will trigger the random light failure yourself, so it shouldn't be obvious..

Have had some good results in testing the latest version. I have house light brightness set based on the distance from your player (am about to go digging in the arma code for some hints). This compensates for the way arma handles light and distant towns are like light at the end of the tunnel now but keep nearby houses dimly lit..

As usual, Any feedback or requests will be gratefully received.

Link to comment
Share on other sites

As for the full moon issue, if its just popping into the sky after an hour from sun down, then it has to be a time sync issue. When full moon was working in 1.0.1.5, we could see the moon in the daylight, as a white textured sphere, we could see all the craters and detail on it, on the blue sky to deep blue to purple sunset. When it got darker, it would start to glow, more intensely as time passed. That's how the moon should show up, and gradually light up normally. Every possible setting has not brought it back like it used to be, after using 2 years worth of full moon dates, and suggested dates on various forum posts.

 

Also liking the dimly lit lights in the distance, I assume it draws lighting in a range less than the fog distance? Does it still light up even if covered by fog and not seen by the player causing their gfx card to still render it even when its not seen? Just curious for players with older cards, how it would affect them. Maybe if someone has a spare older PC that can play arma they can join and check it out? Not even sure if this would be an issue at all.

Link to comment
Share on other sites

If the moon is in the sky in day then this is going to be date related. We need to find that perfect date.

Fog will hide the lights, the lightpoint may be crafted but I suspect that arma will hide anything that isn't viewable.

Have been testing up to 1 km and am yet to find a point where i can see that far :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...