User Guide
Quick Reference
Modding
Development
User Guide
Quick Reference
Modding
Development
A Sector Type definition specifies the properties of a generalized sector type, for use with the XG system. XG is a complex topic, with many core concepts which the mod author must be familiar with in order to use the system effectively. See the reference guide for further information.
The focus of this article is to detail how these properties are exposed to mod authors and the specifics of the syntax.
Sounds can be played for ambient effect in sectors with this type. Ambient sounds are played at the interval specified (which, is (possibly randomly) calculated according to the minimum and maximum interval range) and will appear to emanate from the middle of all sector(s) with this type.
All angles are specified in degrees of a anticlockwise system where 0=east, 90=north, 180=west and 270=south. All floating-point values are accepted (even negative ones) though they'll be cycled into a normalized range automatically.
Each sector type may specify up to four different chains; ceiling, floor, inside and ticker. All chains are defined in the same way, however their behavior differs according to the chain type. See the sector type chain documentation in the XG reference guide for more information.
These flags determine how the relevant chain will behave, both how and when they are triggered. There are _a and _d variations, which specify whether the behavior is effective when the chain is activated or deactivated, accordingly.
Note: Both versions of a flag cannot be used at once by the same chain.
Name(_a/_d) | Description |
---|---|
any | Any mobj cause a chain event to be sent. |
missile | Mobjs that have the MF_MISSILE flag cause a chain event to be sent. |
monster | Mobjs that have the MF_COUNTKILL flag cause a chain event to be sent. |
other | Non-player mobjs cause a chain event to be sent. |
player | Player mobjs cause a chain event to be sent. player_a will send an activating event and player_d a deactivating event. |
ticker | Use only with the Ticker_chain. Chain events will be sent based on the game ticker, up to 35 times per second. The chain's start time, end time and chain min/max intervals can be used to configure how often the ticker sends the chain events. |
Provide the means to automatically set specific properties of a sector to a dynamically resolved value as described by a function expression. See the XG function documentation for a detailed description of function expressions.
Set the intensity of the ambient light or color to the value of the function expression. Ambient light functions support random evaluation intervals. For example, the intensity of the ambient light might be randomized to create an “electrical-fault like” effect.
Set the height of the plane to the value of the function expression. Plane height functions support relative offsets and scale factors as well as random evaluation intervals. For example, the height of a floor plane might be oscillated to create a “wave like” effect.
Sector Type { ID = 0 Comment = "" Flags = flag1 | flag2 Friction = 0.0 Gravity = 0.0 Act tag = 0 Ambient sound = "" Ambient min interval = 0.0 Ambient max interval = 0.0 Wind angle = 0.0 Wind speed = 0.0 Vertical wind = 0.0 Ceiling texmove angle = 0.0 Ceiling texmove speed = 0.0 Floor texmove angle = 0.0 Floor texmove speed = 0.0 Ceiling chain = 0 Ceiling chain flags = flag1 | flag2 Ceiling chain start time = 0.0 Ceiling chain end time = 0.0 Ceiling chain min interval = 0.0 Ceiling chain max interval = 0.0 Ceiling chain count = 0 Floor chain = 0 Floor chain flags = flag1 | flag2 Floor chain start time = 0.0 Floor chain end time = 0.0 Floor chain min interval = 0.0 Floor chain max interval = 0.0 Floor chain count = 0 Inside chain = 0 Inside chain flags = flag1 | flag2 Inside chain start time = 0.0 Inside chain end time = 0.0 Inside chain min interval = 0.0 Inside chain max interval = 0.0 Inside chain count = 0 Ticker chain = 0 Ticker chain flags = flag1 | flag2 Ticker chain start time = 0.0 Ticker chain end time = 0.0 Ticker chain min interval = 0.0 Ticker chain max interval = 0.0 Ticker chain count = 0 Ceiling fn = "" Ceiling fn scale = 0.0 Ceiling fn offset = 0.0 Ceiling fn min tics = 0 Ceiling fn max tics = 0 Floor fn = "" Floor fn scale = 0.0 Floor fn offset = 0.0 Floor fn min tics = 0 Floor fn max tics = 0 }
A unique identifying number (integer) for the sector type. Map editors use the id to refer to this sector type. Valid IDs are in the range 1…65535
Intended for a textual description of what the sector type does and used as a development aid for mod authors. Doomsday itself does not use this string for anything presently.
Name | Description |
---|---|
crush | The sector will crush things that don't fit inside it after moving a plane with Functions. |
friction | The custom friction set with Friction is used inside the sector. |
gravity | The custom gravity set with Gravity is used inside the sector. |
tagtexmove | Texture movement angle for both the ceiling and floor planes is determined by finding the first line that belongs to the sector and has the line tag number specified with Act tag. Textures will scroll in the direction of the line. |
ceilingwind | Wind only affects mobjs that are touching the ceiling. |
floorwind | Wind only affects mobjs that are touching the floor. |
tagwind | Wind direction is determined by finding the first line that belongs to the sector and has the line tag number specified with Act tag. Wind will blow in the direction of the line. |
windany | Wind affects all mobjs inside the sector. |
windmissile | Wind affects all mobjs with the MF_MISSILE flag inside the sector. |
windmonster | Wind affects all mobjs with the MF_COUNTKILL flag inside the sector. |
windother | Wind affects all non-player mobjs inside the sector. |
windplayer | Wind affects all player mobjs inside the sector. |
Friction inside the sector. Only used if the friction flag is set, otherwise the default friction for the map is used instead.
Gravity inside the sector. Only used if the gravity flag is set, otherwise the default gravity for the map is used instead.
Activation tag number for the sector type. Several types can have the same activation tag. This number can be used in sector references (with for instance lsref_act_tagged). All signed 32-bit integer values are accepted.
ID of the sound to be played in sectors with this type. See Ambient_sounds
Minimum interval in playing the ambient sound of the sector, in seconds.
Maximum interval in playing the ambient sound of the sector, in seconds.
See Behavior_flags
Number of seconds measured from the beginning of the level to the moment when the chain begins operating.
Number of seconds measured from the beginning of the level to the moment when the chain stops operating. If this is equal to or less than zero, the chain will continue operating indefinitely.
Minimum interval, in seconds, between two consecutive chain events. The real interval is a random number between the minimum and maximum intervals.
Maximum interval, in seconds, between two consecutive chain events.
Number of times the chain can be processed successfully. When the chain counter becomes zero, the chain will stop operating. Negative values mean the chain counter is disabled and it will continue to work until the chain end time passes.
See Behavior_flags
Number of seconds measured from the beginning of the level to the moment when the chain begins operating.
Number of seconds measured from the beginning of the level to the moment when the chain stops operating. If this is equal to or less than zero, the chain will continue operating indefinitely.
Minimum interval, in seconds, between two consecutive chain events. The real interval is a random number between the minimum and maximum intervals.
Maximum interval, in seconds, between two consecutive chain events.
Number of times the chain can be processed successfully. When the chain counter becomes zero, the chain will stop operating. Negative values mean the chain counter is disabled and it will continue to work until the chain end time passes.
See Behavior_flags
Number of seconds measured from the beginning of the level to the moment when the chain begins operating.
Number of seconds measured from the beginning of the level to the moment when the chain stops operating. If this is equal to or less than zero, the chain will continue operating indefinitely.
Minimum interval, in seconds, between two consecutive chain events. The real interval is a random number between the minimum and maximum intervals.
Maximum interval, in seconds, between two consecutive chain events.
Number of times the chain can be processed successfully. When the chain counter becomes zero, the chain will stop operating. Negative values mean the chain counter is disabled and it will continue to work until the chain end time passes.
See Behavior_flags
Number of seconds measured from the beginning of the level to the moment when the chain begins operating.
Number of seconds measured from the beginning of the level to the moment when the chain stops operating. If this is equal to or less than zero, the chain will continue operating indefinitely.
Minimum interval, in seconds, between two consecutive chain events. The real interval is a random number between the minimum and maximum intervals.
Maximum interval, in seconds, between two consecutive chain events.
Number of times the chain can be processed successfully. When the chain counter becomes zero, the chain will stop operating. Negative values mean the chain counter is disabled and it will continue to work until the chain end time passes.
The function expression string. See Ambient_light_functions
Minimum number of tics between evaluation steps. The real number of tics is a random number between the minimum and maximum tics.
Maximum number of tics between evaluation steps. The real number of tics is a random number between the minimum and maximum tics.
The function expression string. See Ambient_light_functions
Minimum number of tics between evaluation steps. The real number of tics is a random number between the minimum and maximum tics.
Maximum number of tics between evaluation steps. The real number of tics is a random number between the minimum and maximum tics.
The function expression string. See Ambient_light_functions
Minimum number of tics between evaluation steps. The real number of tics is a random number between the minimum and maximum tics.
Maximum number of tics between evaluation steps. The real number of tics is a random number between the minimum and maximum tics.
The function expression string. See Ambient_light_functions
Minimum number of tics between evaluation steps. The real number of tics is a random number between the minimum and maximum tics.
Maximum number of tics between evaluation steps. The real number of tics is a random number between the minimum and maximum tics.
The function expression string. See Plane_height_functions
This number will be added to the value of the function. This is a fixed offset unlike the dynamic offset that can be set with the function expression string.
The value of the function (usually between 0 and 1) will be multiplied with this factor.
Minimum number of tics between evaluation steps. The real number of tics is a random number between the minimum and maximum tics.
Minimum/maximum number of tics between evaluation steps. The real number of tics is a random number between the minimum and maximum tics.
The function expression string. See Plane_height_functions
This number will be added to the value of the function. This is a fixed offset unlike the dynamic offset that can be set with the function expression string.
The value of the function (usually between 0 and 1) will be multiplied with this factor.
Minimum number of tics between evaluation steps. The real number of tics is a random number between the minimum and maximum tics.
Maximum number of tics between evaluation steps. The real number of tics is a random number between the minimum and maximum tics.
Direction for floor texture scrolling in degrees. This is not used if the tagtexmove flag is set.
Speed of floor texture scrolling as map units per game tic (35 Hz). The speed of 2 would scroll the texture 70 units per second.
Direction for ceiling texture scrolling in degrees. This is not used if the tagtexmove flag is set.
Speed of ceiling texture scrolling as map units per game tic (35 Hz). The speed of 2 would scroll the texture 70 units per second.
Direction of wind inside the sector in degrees. This is not used if the tagwind flag is set.
Horizontal wind speed. The unit for wind speed is units/tic2 (see Wind).
Vertical wind speed. Positive speed lifts things upward, negative one pushes them down. The unit for wind speed is units/tic2 (see Wind).
Sector Type { ID = 5002; Comment = "Immediately trigger line type 6101"; Ticker chain = 6101; Ticker chain count = 1; }
A chain event be will sent once, immediately, to the line type 6101.
Sector Type { ID = 5001; Comment = "Scroll along tag 9999"; Flags = tagtexmove | tagwind | windplayer; Act tag = 9999; Floor texmove speed = 1.8; Wind speed = 0.16875; }
The sector has a scrolling floor and wind that affects player mobjs. Wind will blow and the floor material will scroll, in the direction that sector line with the act tag 9999 is pointing. Material scrolling and wind speed are synchronized. This gives the appearance that the floor is moving and will move the player with it.