Skip to content

ModuleWaterfallFX

Chris Adderley edited this page Jan 9, 2021 · 11 revisions

This page goes over the steps you need to create a new Waterfall effect

1. Enable the ingame editor

Go to the GameData/Waterfall/WaterfallSettings.cfg file and look for ShowEffectEditor = false. Change this to ShowEffectEditor = true.

2. Add the Module to your part

Adding a ModuleWaterfallFX module to a part starts the process of creating an effect. Without this the ingame editor will not show up. You'll need to add the module to the engine you want to work with. You can do this either by directly including it in the part config file, or by using a ModuleManager patch. This is not covered in this guide as it is basic config editing.

There is typically a one to one relationship between nodes and engines - you require one node per engine module on the part. The example below shows the minimum you need to get started, which is the module with a few fields.

  MODULE
  {
    name = ModuleWaterfallFX
    // This is a custom name and should be unique in the config. 
    // It will also be used for UI display
    moduleID = ionFX
    // This links the effects to a given ModuleEngines. 
    // If not found or not specified, it will use the first one it finds
    engineID = basicEngine
  }

All the fields listed above are mandatory. Without them the effects will not work. Pay careful attention to the engineID field - it should correspond to the EngineID field in the ModuleEngines module.

3. Add Controllers

Once you have set up the basic module, you will need to add Controllers, which provide inputs to control the effects. This is detailed in Controllers.

You can create controllers using the ingame editor and copy them into the file, but you can also write them - they aren't that complicated.

4. Add Effects

Once the basic configuration is completed, you can start adding EFFECT nodes, which actually create and animate effects. This is detailed in Effects.

Typically you will generate effects using the ingame editor and copy them into the file, but you can write them if you're a masochist.

Here's what a completed config might look like.

  MODULE
  {
    name = ModuleWaterfallFX
    // This is a custom name and should be unique in the config
    moduleID = ionFX
    // This links the effects to a given ModuleEngines. If not found or not specified, it will use the first one it finds
    engineID = basicEngine

    // List out all controllers we want available
    // This controller scales with atmosphere depth
    CONTROLLER
    {
      name = atmosphereDepth
      linkedTo = atmosphere_density
    }
    // This controller scales with effective throttle
    CONTROLLER
    {
      name = throttle
      linkedTo = throttle
    }
    EFFECT
    {
      name = mainEffect
      parentName = thrustTransform
      MODEL
      {
        path = Waterfall/FX/fx-simple-plume-ion
        positionOffset = 0,0,-0.0399999991
        rotationOffset = 0,1,0
        MATERIAL
        {
          transform = CylMesh
          shader = Waterfall/Additive
          TEXTURE
          {
            textureSlotName = _MainTex
            texturePath = Waterfall/FX/fx-ion-noise
            textureScale = 1,1
            textureOffset = 0,0
          }
          FLOAT
          {
            floatName = _TintFalloff
            value = 0
          }
          FLOAT
          {
            floatName = _Falloff
            value = 3
          }
          FLOAT
          {
            floatName = _Fresnel
            value = 3
          }
          FLOAT
          {
            floatName = _FresnelInvert
            value = 0
          }
          FLOAT
          {
            floatName = _Noise
            value = 0.5
          }
          FLOAT
          {
            floatName = _Brightness
            value = 0.100000001
          }
          FLOAT
          {
            floatName = _SpeedX
            value = 0
          }
          FLOAT
          {
            floatName = _SpeedY
            value = 8
          }
          FLOAT
          {
            floatName = _TileX
            value = 1
          }
          FLOAT
          {
            floatName = _TileY
            value = 1
          }
          COLOR
          {
            colorName = _StartTint
            colorValue = 0,1,0.655179501,0.582910895
          }
          COLOR
          {
            colorName = _EndTint
            colorValue = 1,1,1,1
          }
        }
        MATERIAL
        {
          transform = CylMeshOuter
          shader = Waterfall/Additive
          TEXTURE
          {
            textureSlotName = _MainTex
            texturePath = Waterfall/FX/fx-ion-noise
            textureScale = 1,1
            textureOffset = 0,0
          }
          FLOAT
          {
            floatName = _TintFalloff
            value = 0
          }
          FLOAT
          {
            floatName = _Falloff
            value = 1.5
          }
          FLOAT
          {
            floatName = _Fresnel
            value = 5
          }
          FLOAT
          {
            floatName = _FresnelInvert
            value = 0
          }
          FLOAT
          {
            floatName = _Noise
            value = 0.800000012
          }
          FLOAT
          {
            floatName = _Brightness
            value = 0.200000003
          }
          FLOAT
          {
            floatName = _SpeedX
            value = 0
          }
          FLOAT
          {
            floatName = _SpeedY
            value = 50
          }
          FLOAT
          {
            floatName = _TileX
            value = 4
          }
          FLOAT
          {
            floatName = _TileY
            value = 0.100000001
          }
          COLOR
          {
            colorName = _StartTint
            colorValue = 0,0.753699601,1,1
          }
          COLOR
          {
            colorName = _EndTint
            colorValue = 1,1,1,1
          }
        }
        MATERIAL
        {
          transform = PlaneMesh
          shader = Waterfall/Additive
          TEXTURE
          {
            textureSlotName = _MainTex
            texturePath = Waterfall/FX/fx-ion-noise
            textureScale = 1,1
            textureOffset = 0,0
          }
          FLOAT
          {
            floatName = _TintFalloff
            value = 0
          }
          FLOAT
          {
            floatName = _Falloff
            value = 3
          }
          FLOAT
          {
            floatName = _Fresnel
            value = 5
          }
          FLOAT
          {
            floatName = _FresnelInvert
            value = 3
          }
          FLOAT
          {
            floatName = _Noise
            value = 0
          }
          FLOAT
          {
            floatName = _Brightness
            value = 0.600000024
          }
          FLOAT
          {
            floatName = _SpeedX
            value = 0
          }
          FLOAT
          {
            floatName = _SpeedY
            value = 1
          }
          FLOAT
          {
            floatName = _TileX
            value = 1
          }
          FLOAT
          {
            floatName = _TileY
            value = 1
          }
          COLOR
          {
            colorName = _StartTint
            colorValue = 0,0.614129484,1,1
          }
          COLOR
          {
            colorName = _EndTint
            colorValue = 1,1,1,1
          }
        }
      }
      SCALEMODIFIER
      {
        name = throttleScale
        controllerName = throttle
        transformName = CylMesh
        combinationType = REPLACE
        useRandomness = False
        randomnessController = random
        randomnessScale = 1
        xCurve
        {
          key = 0 0.45 0 0
          key = 1 0.45 0 0
        }
        yCurve
        {
          key = 0 0.6 0 0
          key = 1 1 0 0
        }
        zCurve
        {
          key = 0 0.45 0 0
          key = 1 0.45 0 0
        }
      }
      FLOATMODIFIER
      {
        name = inner
        controllerName = throttle
        transformName = CylMesh
        combinationType = REPLACE
        useRandomness = False
        randomnessController = random
        randomnessScale = 1
        floatName = _Brightness
        floatCurve
        {
          key = 0 0 0 0
          key = 1 0.1 0 0
        }
      }
      FLOATMODIFIER
      {
        name = outer
        controllerName = throttle
        transformName = CylMeshOuter
        combinationType = REPLACE
        useRandomness = False
        randomnessController = random
        randomnessScale = 1
        floatName = _Brightness
        floatCurve
        {
          key = 0 0 0 0
          key = 1 0.2 0 0
        }
      }
      SCALEMODIFIER
      {
        name = globalScale
        controllerName = throttle
        transformName = Waterfall/FX/fx-simple-plume-ion(Clone)
        combinationType = REPLACE
        useRandomness = False
        randomnessController = random
        randomnessScale = 1
        xCurve
        {
          key = 0 0.4 0 0
        }
        yCurve
        {
          key = 0 1 0 0
        }
        zCurve
        {
          key = 0 0.4 0 0
        }
      }
      FLOATMODIFIER
      {
        name = tGlow3
        controllerName = throttle
        transformName = PlaneMesh
        combinationType = REPLACE
        useRandomness = False
        randomnessController = random
        randomnessScale = 1
        floatName = _Brightness
        floatCurve
        {
          key = 0 0 0 0
          key = 1 0.9 0 0
        }
      }
    }

  }