Force field


Revision as of 11:43, 14 March 2016 by Quasar (talk | contribs) (Allowing degnin ore deactivation: .. and the flag.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Force fields occur as a plot device and barrier to progress in Strife: Quest for the Sigil at several points in the game. Force fields consist of brightly colored neon green or orange transparent middle textures applied to impassible two-sided linedefs. Their setup requires a number of special components which are discussed below.

Basic force field setup[edit]

A force field line itself consists simply of a two-sided impassible linedef with linedef type 148, "DR Force Field". When triggered by the player, this line special deals 16 damage and imparts a backward thrust of 7.8125 map units per tic on the player's body. It can have any sort of texture applied.

Allowing degnin ore deactivation[edit]

Degnin ore is capable of disabling force fields. When a degnin ore explodes, the ore itself will clear all lines with special 148 and the ML_TWOSIDED flag in its sector of the following:

  • The specials are set to zero.
  • The ML_BLOCKING flag is removed.
  • The middle textures on both sides of the lines are cleared.

Note that this is done without checking that the linedef is actually two-sided; if a one-sided line exists with special 148 and the two-sided flag, the game may crash or suffer memory corruption. Also, two-sided linedefs which are accidentally not flagged with ML_TWOSIDED will be improperly ignored.

In order for this to be fail-proof, as the deactivation of a single force field may require force field lines in multiple sectors to be cleared, a "force field guard" object (DoomEd number 25) can and should be placed on or very near each force field line intended to be deactivated by the ore. This special invisible object can only take damage from degnin ore, and will also clear all force fields in its own sector using the same routine as the ore. Rogue's mappers always utilized the guard object with such force fields.

Remote deactivation[edit]

Two linedef specials exist in the game to remotely disable force fields:

  • 147: "S1 Clear Force Fields" - Clears all force fields in the tagged sector(s) when activated as a switch. This is a one-time activation special.
  • 187: "W1 Clear Force Fields if Quest" - Clears all force fields in the tagged sector(s), if and only if the player possesses the quest flag bit number indicated by the linedef's texture y offset. This is a one-time activation special.

Both of these specials use the same process as degnin ore to clear the force fields, and thus both have the same potential bugs.