Sector

From ZDoom Wiki
(Redirected from SECTORS)
Jump to navigation Jump to search
DoomWiki.org
For more information on this article, visit the Sector page on the Doom Wiki.

A sector is an enclosed area made up of lines in the map. Sectors are referenced by the sidedefs linked to the enclosing linedefs. Sectors must be closed areas, as in all sidedefs that reference them must make up one or more closed shapes. Note that having unclosed sectors is possible, and can be used for a few special effects, but can cause unpredictable results, including crashes, if used incorrectly.

A sector does not need to enclose only one area of the map. To avoid redundancy, two separate areas of the map can be defined by one sector, thus copying all the properties of one area to the other. However, the engine treats these separate shapes as the same sector. For instance, sounds entering one area of the sector will be heard by enemies in the other. This can be used intentionally to allow sounds generated in one area of the map to alert enemies in another, unconnected area. If two doors are the same sector, using Door_Raise on either door will cause both to open.

Specification

Bytes Data type Description Notes
0-1 LE 16-bit signed Floor height
2-3 LE 16-bit signed Ceiling height
4-11 8-bit array Floor texture
12-19 8-bit array Ceiling texture
20-21 LE 16-bit signed Light level Vanilla Doom rounded the light level to the nearest multiple of 8, ZDoom shows unique light levels for all values
22-23 LE 16-bit unsigned Sector special
24-25 LE 16-bit unsigned Sector tag For use with Action specials that refer to a sector by its tag


UDMF properties

The Universal Doom Map Format allows to set a number of properties on sectors. Unless otherwise specified, default values for integers and floats is 0, and false for booleans. They include:

Name Type Description
xpanningfloor float X texture offset of floor texture, Default = 0.0.
ypanningfloor float Y texture offset of floor texture, Default = 0.0.
xpanningceiling float X texture offset of ceiling texture, Default = 0.0.
ypanningceiling float Y texture offset of ceiling texture, Default = 0.0.
xscalefloor float X texture scale of floor texture, Default = 1.0.
yscalefloor float Y texture scale of floor texture, Default = 1.0.
xscaleceiling float X texture scale of ceiling texture, Default = 1.0.
yscaleceiling float Y texture scale of ceiling texture, Default = 1.0.
rotationfloor float Rotation of floor texture in degrees, Default = 0.0.
rotationceiling float Rotation of ceiling texture in degrees, Default = 0.0.
ceilingplane_a float Define the plane equation for the sector's ceiling.
Default is a horizontal plane at 'heightceiling'.
'heightceiling' will still be used to calculate texture alignment.
The plane equation will only be used if all 4 values are given.
ceilingplane_b float
ceilingplane_c float
ceilingplane_d float
floorplane_a float Define the plane equation for the sector's floor.
Default is a horizontal plane at 'heightfloor'.
'heightfloor' will still be used to calculate texture alignment.
The plane equation will only be used if all 4 values are given.
floorplane_b float
floorplane_c float
floorplane_d float
lightfloor integer The floor's light level. Default is 0.
lightceiling integer The ceiling's light level. Default is 0.
lightfloorabsolute bool true = 'lightfloor' is an absolute value. Default is relative to the owning sector's light level.
lightceilingabsolute bool true = 'lightceiling' is an absolute value. Default is relative to the owning sector's light level.
alphafloor float translucency of floor plane (only has meaning with Sector_SetPortal) Default is 1.0.
alphaceiling float translucency of ceiling plane (only has meaning with Sector_SetPortal) Default is 1.0.
renderstylefloor string floor plane renderstyle (only has meaning with Sector_SetPortal), can be "translucent" or "add", default is "translucent".OpenGL.png (OpenGL only: not supported by ZDoom)
renderstyleceiling string ceiling plane renderstyle (only has meaning with Sector_SetPortal), can be "translucent" or "add", default is "translucent". OpenGL.png (OpenGL only: not supported by ZDoom)
gravity float Sector's gravity. Default is 1.0.
lightcolor integer Sector's light color as RRGGBB value, default = 0xffffff. Removes the need for ColorSetter thing.
fadecolor integer Sector's fog color as RRGGBB value, default = 0x000000. Removes the need for FadeSetter thing.
desaturation float Color desaturation factor. 0 = none, 1 = full, default = 0. Removes the need for ColorSetter thing.
silent bool Actors in this sector make no sound,
nofallingdamage bool Falling damage is disabled in this sector
dropactors bool Actors drop with instantly moving floors
norespawn bool Players cannot respawn in this sector
soundsequence string The sound sequence to play when this sector moves. Placing a sound sequence thing in the sector will override this property.
hidden bool if true this sector will not be drawn on the textured automap.
waterzone bool Sector is under water and swimmable. Removes the need for using WaterZone things.
moreids string Additional sector tags, specified as a space-separated list of numbers, e.g., "2 666 1003 4505".
damageamount integer Amount of damage inflicted by this sector. Default = 0. If this is 0, all other damage properties will be ignored. Setting damage through these properties will override any damage set through sector specials. Setting this to a negative value will create a healing sector.
damagetype string Damage type for sector damage, Default = "None" (generic damage).
damageinterval integer Interval in tics between damage application. Default = 32.
leakiness integer Probability of leaking through radiation suit (0 = never, 256 = always). Default = 0.
damageterraineffect bool If true, a terrain splash is spawned at the end of each damage interval. Default = false.
damagehazard bool If true, the damage model is changed to Strife's delayed damage for the given sector. Default = false.
floorterrain string Sets the terrain for the sector's floor. Default is to use the flat texture's terrain definition.
ceilingterrain string Sets the terrain for the sector's ceiling. Default is to use the flat texture's terrain definition.
portal_ceil_alpha float Translucency of ceiling portal. The default value of 0 means "not visible".
portal_ceil_blocksound bool Ceiling portal blocks sound.
portal_ceil_disabled bool Ceiling portal is disabled.
portal_ceil_nopass bool Ceiling portal blocks movement if set to true.
portal_ceil_norender bool Ceiling portal is not rendered.
portal_ceil_overlaytype string Defines translucency style. It can either be "translucent" (default) or "additive".
portal_floor_alpha float Translucency of floor portal. The default value of 0 means "not visible".
portal_floor_blocksound bool Floor portal blocks sound.
portal_floor_disabled bool Floor portal is disabled.
portal_floor_nopass bool Floor portal blocks movement if set to true.
portal_floor_norender bool Floor portal is not rendered.
portal_floor_overlaytype string Defines translucency style. It can either be "translucent" (default) or "additive".
noattack bool If true, monsters in the sector do not attack.