[EXAMPLE] NavLights

(BitVenom) #1

Intro

Where HW2C had exactly one NavLightStyle available for use, there are new styles and functionality available in HWR. We’re going to just briefly explain what has been added, some of the new features, and how these are connected to the ships in DAE format. A more exhaustive update will occur once more about other systems has been given a first pass.

Existing Styles & Features

default.navs – default style unless explicitly defined
nav_baynf.navs – bay shader, no flicker
nav_bays.navs – bay shader. Bay shaders do not cast light on the attached ship but will cast light on nearby ships
nav_bridge.navs – a light with a minor flicker for attaching to the bridges of ships
nav_missile.navs – fast flickering light to simulate missile burn
nav_scaffold.navs – used on HW1’s mothership scaffolding
nav_thrust.navs – linked to the thruster of the attached ship

File Contents

Here are a few examples of how the properties inside a .navs file affect its representation in-game…

New default.navs file:

-- sum of values cannot exceed 1
NAVS = {
    climbTime = 0.00,
    topWaitTime = 0.1, -- ramp delay at the top
    decayTime = 0.15,
    bottomWaitTime= 0.75, -- ramp delay at the bottom
    illumSawHz = 0,
    illumSinHz = 0,
}

nav_baynf.navs:

-- sum of values cannot exceed 1
NAVS = {
    climbTime = 0.00,
    topWaitTime = 0.1,
    decayTime = 0.15,
    bottomWaitTime= 0.75,
    illumSawHz = 0,
    illumSinHz = 0,
    noSelfLight=1, -- do not cast light on attached ship
}

nav_bays.navs:

-- sum of values cannot exceed 1
NAVS = {
    climbTime = 0.00,
    topWaitTime = 0.1,
    decayTime = 0.15,
    bottomWaitTime= 0.75,
    illumSawHz = 15731.93, -- set to a number not divisible by common monitor mHz values, speed of the flicker
    illumSawMin = 0.9, -- saw is 0->1->0
    illumSawMax = 1.1,
    illumSinHz = 0.125,
    illumSinMin = 0.95,
    illumSinMax = 1.05,
    illumSinOfs = 0.5, -- shift the phase
    noSelfLight=1,
}

nav_thrust.navs:

-- sum of values cannot exceed 1
NAVS = {
    climbTime = 0.00,
    topWaitTime = 0.1,
    decayTime = 0.15,
    bottomWaitTime= 0.75,
    illumSawHz = 25731.93,
    illumSawMin = 0.8,
    illumSawMax = 1.1,
    noSelfLight=1,
    linkThrust=1, -- scale light brightness to the attached thruster of the ship, a static ship means no light. Full velocity means full brightness.
}

DAE Syntax

To assign the existing .navs, or even ones you might have created, to a NavLight object append _Type[nameofnavsfile] after the NavLight name in the DAE source of your ship.

Example for using the “bays” light to only cast light on nearby ships:

NAVL[NavLight_BigBay]_Type[nav_bays]_Sz[7]_Ph[0]_Fr[0]_Col[0.333333,0.941176,1]_Dist[700]

if this was:

NAVL[NavLight_BigBay]_Sz[7]_Ph[0]_Fr[0]_Col[0.333333,0.941176,1]_Dist[700] 

then it would use the default.navs style, casting light on the attached ship and nearby ships.

7 Likes
[MOD] REARM V2 WIP thread