Mapping wiki › Nile colour actions

πŸŒ… Colour actions in Nile

Change the colours during a match: the sky goes red when the last flag falls, a storm rolls in, night turns green. Nile 1.6 TEST6 has an action for every colour, plus Color Fade so changes fade in instead of snapping.

The actions

They are in the General action group, after Fog Color and the other environment actions. Each one writes one line into your map's .wac script.

Nile actionWritesValuesWhat it changes
Fog Colorfogcolor(R,G,B)0-127the distance haze
Horizon Colorskyfog(R,G,B)0-127the sky band behind distant things
Sun Colorsun(R,G,B)0-255sun / moon light
Sky Light Colorsky(R,G,B)0-255light from above
Ground Light Colorground(R,G,B)0-255bounce light from below
Lightning Colorlightning(R,G,B)0-255tint of lightning flashes
Color Fadecolorfade(seconds)secondshow long the next colour changes take

Fog Color and Horizon Color are at half strength: 127 is already full. For a red haze you want to see as 220,40,40, enter 110,20,20.

Using them in an event

  1. Make (or open) the event that should change the colours, with its trigger (for example "area captured" or a timer).
  2. Add Color Fade first if you want a fade, for example 10 seconds.
  3. Add the colour actions you want, for example Fog Color 110 20 20 and Horizon Color 110 20 20.
  4. Save and build the map as usual.

In the script that comes out as:

colorfade(10)
fogcolor(110,20,20)
skyfog(110,20,20)

Put Color Fade before the colours. It sets the fade time for every colour change that comes after it, until another Color Fade changes it. A Color Fade placed after the colours does nothing for those colours.

Going back to the map's own colours

Give a colour any value above 255, for example Fog Color 999 999 999. That colour lets go and goes back to the map's own: the colour you set in MED Map Colours if there is one, otherwise the normal day/night colour. Do it for each colour you changed.

Going back snaps instead of fading. That is a known limit of the DLL, noted for a later version.

Who sees it

The script runs on the server. With the FMJ onHook DLL on the server and the players, the server sends every change to every player, and anyone who joins later gets the current colours within 30 seconds. Without the DLL the actions do nothing (no error, the map just keeps its normal colours). More in who sees the colours.

Wind

The Wind Speed action now says kph: "Set Wind to N kph over N seconds". The FMJ DLL's wind work is on hold, so treat wind as experimental for now.

Tested so far

Nile TEST6 loads the new actions, and every line they write compiles in Joint Ops' own script compiler. Adding them to an event in Nile and playing the map has not been reported yet: if you try it, post how it went in #nile-requests.