Coder Social home page Coder Social logo

dayz-lighting's Introduction

dayZ House, Illuminant Tower and Street Lighting by axeman.

This addon is designed for usage with dayZ Epoch as it includes a generator requirement. However, this can probably be used on other dayZ mode simply by disabling the generator requirement (not tested).

This version is currently at a further / final test stage. The aim is to remove lag issues from creating too many light sources / vehicles and to add in more stringent management of the lights created.

What This Does: This addon is run entirely clientside, this is a requirement of the engine as light sources are local only. It will light up the windows of nearby houses and create an ambient light source to light the surrounding area. Street lights can be disabled. Illuminant towers will create a strong light source with 4 light points.

House Lights: It looks for houses that have windows that can be lit using the house animationSources Lights_1 / lights_2 etc. The script manages already lit houses to reduce constant looping and too many instances of #lightpoint on each house.

Street Lights: As it is designed for Epoch, this current version, when set to true, will leave the street lights on. When set to false will loop through nearby objects and switch off any sreetlights found.

Tower Lights: Will create four #lightpoint objects aligned to match the light tower model.

Usage / Installation

Add to your init.sqf (within your mpmission folder) the following:

if (!isDedicated) then { //Lights DZE_RequireGenerator = false; DZE_StreetLights = true; DZE_HouseLights = true; DZE_TowerLights = true; DZE_LightChance = 42; [] execVM "lights\local_lights_init.sqf"; };

Parameters

DZE_RequireGenerator : Require a running Epoch generator, in the vicinity, to allow lighting of houses and towers. The generator logic hasn't really changed in this version.

DZE_StreetLights : Set to false to switch off street lights within a specified range of the player.

DZE_HouseLights : Set to true to light up houses around the player.

DZE_TowerLights : Set to true to light up Illuminant Towers around the player.

DZE_LightChance : Adds a percentage chance for houses to be lit. Allows an element of control for the server host to reduce the number of lit houses.

Debugging

There are many lines of debug code, commented out, throughout the addon. Use the tools folder to enable logging to your .rpt file from the client.

Requirements

This new code has been tested locally and has been released for server owners to try out and to provide feedback. You must be comfortable with running custom scripts and diagnosing any issues that may arise from adding custom scripts to your server.

dayz-lighting's People

Contributors

andgregor avatar

Stargazers

ZoD1Ac_Tv avatar  avatar

Watchers

James Cloos avatar  avatar Leo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.