vbawol/DayZ-Epoch — pull request #557 by andgregor (2013-09-26 01:24:22+00:00)
Title: Lights and Ore

Light changes: Auto detect dawn and dusk (can be overridden with settings), removed all waitUntils and spawns. House light brightness now based on distance of house from player, this makes distant houses and surrounding area viewable. Out of range lightpoints are cleaned up after use (working now). Removed unnecessary files. Some settings removed and set in code. Randomness tidied up. Flicker speed of failing streetlight increased to speed up process. init commented out.

Mining Ore: Ore can be mined from rocks found in the map naturally. A sledgehammer is required, amount given is based on size of rock bounding box and 2d distance from rock, between 1 and 12.

Crafting Scrap Metal: From the ore scrap metal can be crafted. Requires 4 pieces of ore, a fire nearby and one bottle of water. Empty water bottle returned.

Currently using empty tin can model and texture to represent ore on the ground and in inventory.

Wiki.

Lights Settings:

//Lights - Without Generator Requirement
[0,0,true,true,false,58,180,440,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";

//Lights - With Generator Requirement
[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";

1) Start hour (24 hour)

2) Finish Hour (24 hour)

If defaults of zero are used lights will automatically come on 30mins before sundown and go off 30mins after sunrise.

3) Do House Lights ?

4) Do Tower Lights ?

5) Require a generator for house and tower lights ? A running generator will always apply 100% reliability to lights within it's range.

6) Percentage chance of random light failure, including street lights. 100 = 100% reliability.

7) Trigger range. Street lights will be randomly failed at this range. Lights will be lit at this distance from a generator when required.

8) Player range. Lights will be lit at just under this distance from the player if they are on. Lightpoints around this distance will be cleaned up after use.

9) RGB value for house and street lights.

10) Generator class. Requires variable of GeneratorRunning to be true for lights to be triggered.

11) Sleep time. script will pause for this long on each loop. Will delay lights being triggered or randomly failed.