# Overlay Definition Ground overlays: the paths, water and floors drawn on top of the terrain's base colour. - - - ## OverlayDefinition.Create ```pascal function TOverlayDefinition.Create(id: Integer; const data: TByteArray): TOverlayDefinition; static; ``` Decodes a ground overlay - the paths, water and floors drawn on top of the underlying terrain colour. An overlay is drawn from whichever it has: a secondary colour, a texture, or its own colour. Both colours are converted to HSL here so the map renderer can pack them into a palette index without redoing the conversion per tile. - - - ## TOverlayDefinitionArray.IndexOf ```pascal function TOverlayDefinitionArray.IndexOf(id: Integer): Integer; ``` The position of `id` in the array, or `-1` if there is no such overlay. Overlay definitions are stored one per id with no gaps, so an id is its own index; this exists to keep that assumption in one place.