Linedef type 259

From SRB2 Wiki
Jump to: navigation, search
Warning icon.png
This article or section should contain one or more images. Please spruce up the article by adding an image.

Linedef type 259, Custom FOF, is a special type of floor over floor block which can be configured to have any combination of the properties possessed by other types of FOFs, e.g., whether it casts a shadow, whether it crumbles, and so on. This is useful in circumstances where none of the other FOF linedef types have the specific combination of properties required in a given situation.


To use this effect, create a control sector outside of your map, set one of its linedefs to have linedef type 259, and tag it to the desired target sector(s) within the map. The controlling linedef must be double-sided, so you should also create another sector which shares the controlling linedef with the control sector.

The flats (if the flags are set to render floor and ceiling), floor height, and ceiling height of the FOF are determined by the flats, floor height, and ceiling height of the control sector, and the sidedefs of the FOF's walls (if the flags are set to render sides) are determined by the sidedef of the controlling linedef.

The light level of the control sector will determine the brightness of the shadow cast by the FOF (if the flags are set to cast a shadow). If the light level of the control sector is lower than that of the target sector, then it will cast a dark shadow. If the light level of the control sector is higher than that of the target sector, then the FOF will illuminate the area below it. If the light level of the control sector is equal to that of the target sector, then the FOF will not affect the light of the area below it.

The properties of FOFs created with this linedef type are specified by the value of the control linedef's upper texture on its back sidedef. Rather than specifying an actual texture, the value is a combination of one or more of the following flags:

Flag name Value (Hex) Description
FF_EXISTS 1 The FOF "exists" in-level. This should always be set, to check for validity – otherwise, the FOF will not be visible or tangible, and will not have any special effects.
FF_BLOCKPLAYER 2 The FOF is solid to the player, but nothing else.
FF_BLOCKOTHERS 4 The FOF is solid to everything but players.
FF_SOLID 6 (FF_BLOCKPLAYER + FF_BLOCKOTHERS) The FOF is solid to everything. The Slope Skew flag makes the FOF block only the player, while No Midtexture Skew makes the FOF block all Objects except the player.
FF_RENDERSIDES 8 The FOF's sides are rendered.
FF_RENDERPLANES 10 The FOF's floor and ceiling are rendered.
FF_RENDERALL 18 (FF_RENDERSIDES + FF_RENDERPLANES) The FOF's sides, floor, and ceiling are all rendered.
FF_SWIMMABLE 20 The FOF is a water block.
FF_NOSHADE 40 The FOF does not cast a shadow; the light level and colormaps of the control sector do not affect lighting in the target sector.
FF_CUTSOLIDS 80 Any opaque pixels obscured by the FOF are not drawn. Not recommended for use with translucent or invisible FOFs.
FF_CUTEXTRA 100 Any translucent pixels obscured by the FOF are not drawn.
FF_CUTLEVEL 180 (FF_CUTSOLIDS + FF_CUTEXTRAS) Any pixels (opaque or translucent) obscured by the FOF are not drawn. Should normally be set for opaque FOFs.
FF_CUTSPRITES 200 The FOF splits sprites. Necessary when certain effects, such as colormaps, need to be applied to only part of the sprites in the region of the FOF.
FF_BOTHPLANES 400 The FOF always renders both floor and ceiling.
FF_EXTRA 800 The FOF can be obscured by other FOFs with the FF_CUTEXTRA flag set.
FF_TRANSLUCENT 1000 The FOF is see-through, with its translucency set by the number symbol (#) followed by a three-digit number combination between 000 and 255 in its front side upper texture (128 is the default value).
FF_FOG 2000 The FOF acts like a fog block.
FF_INVERTPLANES 4000 The FOF reverses the normal rules by which the floor and ceiling planes affect visibility.
FF_ALLSIDES 8000 The inside and outside sides of the FOF are both rendered.
FF_INVERTSIDES 10000 Only the inside sides of the FOF are rendered.
FF_DOUBLESHADOW 20000 The area below the FOF is not affected by the light level and colormap of the FOF.
FF_FLOATBOB 40000 The FOF floats on water and bobs when stepped on.
FF_NORETURN 80000 Used with FF_CRUMBLE to prevent the FOF from reappearing in its original location once it has crumbled.
FF_CRUMBLE 100000 The FOF will fall two seconds after being stepped on.
200000 If combined with FF_BUSTUP, the FOF shatters when hit from below. If combined with FF_SWIMMABLE, the FOF acts like goo water.
FF_MARIO 400000 The FOF behaves like a Mario item block.
FF_BUSTUP 800000 The FOF crumbles when hit by a spinning character, or walked through by Knuckles. The Solid Midtexture flag allows the FOF to be shattered by a pushable Object. The Repeat Midtexture flag makes the FOF activate a linedef executor when it is shattered, using the control linedef's length to determine the tag of the linedef executor to activate.
FF_QUICKSAND 1000000 The FOF behaves like a quicksand block.
FF_PLATFORM 2000000 The FOF is intangible from below.
FF_REVERSEPLATFORM 4000000 The FOF is intangible from above.
FF_INTANGABLEFLATS 6000000 (FF_PLATFORM + FF_REVERSEPLATFORM) The FOF's floor and ceiling are intangible, but its sides are still solid.
FF_SHATTER 8000000 Used with FF_BUSTUP. The FOF will shatter when anyone touches it.
FF_SPINBUST 10000000 Used with FF_BUSTUP. The FOF will crumble only when spun into from above.
FF_ONLYKNUX 20000000 Used with FF_BUSTUP. The FOF will shatter only when a skin whose ability S_SKIN value is set to CA_GLIDEANDCLIMB tries to break it. FF_SHATTER takes precedence over this.
FF_RIPPLE 40000000 The FOF's floor and ceiling will have a "ripple" effect, distorting both their flats and – if visible – the view displayed behind them. Note that this visual effect is exclusive to the Software renderer; this flag does nothing in OpenGL.
FF_COLORMAPONLY 80000000 The FOF only copies the colormap from the control sector, and not the light level.

In most (but not all) cases, a typical custom FOF should at least have FF_EXISTS, FF_RENDERALL, and FF_CUTLEVEL.

The flags can be combined by performing a bitwise OR operation. The Windows Calculator applet can do this in its "programmer" mode (or "scientific" mode, for Windows XP and older). For example, to calculate the value required to set the FF_EXISTS and FF_FOG flags, switch into hexadecimal mode using the radio buttons at the top-left, enter 1, click Or, enter 2000 and click =.


Example WAD: ex_ld259_customfof.wad
  • This example WAD can be played in any gametype. It uses MAP01, replacing Greenflower Zone Act 1.
  • This sample contains multiple custom FOFs, each of which demonstrates unique combinations of properties that cannot be achieved with standard FOFs.
  • The leftmost FOF is a quicksand water FOF.
  • The second FOF from the left is a spin-bustable Mario block that is intangible from above.
  • The third FOF from the left is invisible and tangible from the sides, but only for the player. Note that the fences are middle textures added to the target sector; they are not part of the FOF.
  • The rightmost FOF is an invisible shatter block.
  Linedef typesFloor over floor [view]
Solid, Opaque, ShadowcastingSolid, Opaque, Non-ShadowcastingSolid, TranslucentSolid, Sides OnlySolid, No SidesSolid, InvisibleIntangible from Bottom, OpaqueIntangible from Bottom, TranslucentIntangible from Bottom, Translucent, No SidesIntangible from Top, OpaqueIntangible from Top, TranslucentIntangible from Top, Translucent, No SidesOnly Tangible from Sides
Water, OpaqueWater, TranslucentWater, Opaque, No SidesWater, Translucent, No SidesGoo Water, TranslucentGoo Water, Translucent, No SidesIntangible, OpaqueIntangible, TranslucentIntangible, Sides OnlyIntangible, Invisible
Air BobbingAir Bobbing (Adjustable)Reverse Air Bobbing (Adjustable)Floating, BobbingRising Platform, Solid, Opaque, ShadowcastingRising Platform, Solid, Opaque, Non-ShadowcastingRising Platform, Solid, TranslucentRising Platform, Solid, InvisibleRising Platform, Intangible from Bottom, OpaqueRising Platform, Intangible from Bottom, Translucent
Crumbling, RespawnCrumbling, No RespawnCrumbling, Respawn, Intangible from BottomCrumbling, No Respawn, Intangible from BottomCrumbling, Respawn, Intangible from Bottom, TranslucentCrumbling, No Respawn, Intangible from Bottom, TranslucentCrumbling, Respawn, Floating, BobbingCrumbling, No Respawn, Floating, BobbingCrumbling, Respawn, FloatingCrumbling, No Respawn, FloatingCrumbling, Respawn, Air Bobbing
Light BlockHalf Light BlockFog BlockMario BlockThwomp BlockShatter BlockShatter Block, TranslucentBustable BlockSpin-Bustable BlockSpin-Bustable Block, TranslucentQuicksandLaserCustom FOF