New Lights Editor

New Lights Editor is a based on console commands in-game light/godrays editor, avaible in . This editor can configure on the fly most properties of new lights and godrays with instant results in game; you can also add new ones to see how they look at your level. Initially, it was planned to implement the editor via VGUI, but because VGUI is not easy to work with, Kim made lightscript.cfg, which can be executed once to bind various console commands to keys on the keyboard to make the process much easier.
==Usage==
Before New Lights Editor usage, make a copy of your config.cfg file (for example config_copy.cfg), because New Light Editor rewrites some bindings. With a copy of the file, you will be able to restore all your binds quickly.
To activate New Lights Editor, at first, open the console (usually this is bind), than enter in the console (it is also recommended to enter , this to have full access to the commands). After this, you will be automatically moved in , with this, some bindings will rewratted, and you'll see the message in the console.
File:LightScript1.jpg|The message.
So, the New Lights Editor editor is now activated and you may already noticed orange box around entity that is under your crosshair.
File:LightScriptBox.jpg|The orange box.
This is bounding box, usually uses by game engine to tell when model can be seen by player to draw or not draw it (for performance). You also can see the lines which shows direction of entity, they are always located in origin.
In this case, both things shows you entity that you are targeting, so, technically you can select and edit any entity, but most commands will not produce any results. The only two entities you should interact with is and (might work as well, but you can't select it).
To edit your new light source, move your crosshair at it. You'll note this white box and lines which shows direction of it, bounding box as well.
File:LightScript2.jpg|This is how it looks like with point light.
File:LightScript5.jpg|This is how it looks like with spot light.
Press to select it (to deselect it, press again). Now you can see sphere instead of white box. In case of point light, the lines will be disabled (you don't really need them at all), in case of spot light, they will stay. The color of sphere will match color of selected light source.
File:LightScript3.jpg|This is how it looks like with point light.
File:LightScript6.jpg|This is how it looks like with spot light.
Now you can change light properties. In totalm you can change 18 different properties. There are 9 buttons in total, one button for every two property, you switch between them by pressing on it.
To select one of the properties you want to change, press one of these buttons: to or to on numpad. See below for what each does. To get full list of binds - press on numpad.
File:LightScriptSel.jpg|This message appear when you select property.
After property selection, you can increase or decrease property value. Use mouse wheel up to increase, or on numpad. Use mouse wheel down to decrease, or on numpad. The resulting value will be displayed in the console.
File:LightScriptValu.jpg|This message appear when you change value.
Once you have decided on the values, manually write them in Hammer. If you have lost some value, you can get full information about selected light source, press or on numpad.
File:LightScriptInfo.jpg|Example with the spot light in .
In addition to editing an existing lights, you can also add new ones. Press (or on numpad), then press . This will cause white light source with no shadows to appear under your crosshair.
File:LightScriptCreate.jpg|Example.
To delete light source, press , or on numpad.
To disable New Lights Editor, enter in the console .
==Keypad List==
This is full list of bind/commands.
* or on numpad - Intensity / Range.
* or on numpad - Inner Angle /Outer Angle.
* or on numpad - Angle FallOff / Shadow Radius.
* or on numpad - NearZ / Shadow Bias Depth.
* or on numpad - Shadow Bias Slope / Normal Bias.
* or on numpad - Light Styles / Specular Multiplier.
* or on numpad - Godray Density / Godray Weight.
* or on numpad - Godray Distfactor / Godray Radius.
* or on numpad - Godray Exposure.
* - select/deselect light.
* or on numpad - increase value of selected property.
* or on numpad - decrease value of selected property.
* or on numpad - shows all values of selected light.
* on numpad - shows all keypad binds.
* or on numpad - removes any entity your crosshair is pointed at.
* or on numpad - inserts newLight_Spot/newLight_Point.
* - place light source where your crosshair is pointed.
==Unused Commands==
Some commands are unsed. You still can use them via console when your light source is selected.
* - sets light color value (RGB).
* - sets shadow color value (RGB).
* - sets light source position in world (XYZ).
* - sets godrays inner color (RGB).
* - sets godrays outer color (RGB).
* - sets godrays rays color (RGB).
* - sets godrays type (0 - normal, 1 - fancy).
* - sets world space render state (0 - disabled, 1 - enabled).
* - sets size of disk from fancy godrays (float).
* - sets distortion scale of disk from fancy godrays (float).
* - sets amount of fancy rays in frame (float).
* - sets rotating speed of fancy rays (float).
* - sets inner size of fancy godrays (float).
* - sets inner distortion size of fancy godrays (float).
* - sets size of disk hole for fancy godrays (float).
* - sets distortion scale of disk hole for fancy godrays (float).
== See also ==
* - similar editor, but for xog.
* - new point light.
* - new spot light.
* - godrays in sky.
* - entity that changes properties of lighting.
* - entity that changes properties of godrays.