Difference between revisions of "Modding:Constants"

From DoomRL Wiki

Jump to: navigation, search
(Created page with 994 rc info)
 
 
(18 intermediate revisions by 5 users not shown)
Line 70: Line 70:
 
==== StatusEffect ====
 
==== StatusEffect ====
  
[[Modding:Affect|Affects]] specify one of these status effects that will apply a color scheme to all the tiles on the HUD.
+
[[Modding:Affects|Affects]] specify one of these status effects that will apply a color scheme to all the tiles on the HUD.
  
 
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"
 
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"
Line 76: Line 76:
 
|-
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|STATUSNORMAL
 
|style="vertical-align:top; padding-right: 2ex;"|STATUSNORMAL
 +
|No affects
 
|- style="background: #333;"
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|STATUSINVERT
 
|style="vertical-align:top; padding-right: 2ex;"|STATUSINVERT
 +
|Berserk (sic!)
 
|-
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|STATUSRED
 
|style="vertical-align:top; padding-right: 2ex;"|STATUSRED
 +
|Invincibility (sic!)
 
|- style="background: #333;"
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|STATUSGREEN
 
|style="vertical-align:top; padding-right: 2ex;"|STATUSGREEN
 +
|Environsuit
 +
|-
 +
|style="vertical-align:top; padding-right: 2ex;"|STATUSBLUE
 +
|Light-Amp Goggle effect
 +
|- style="background: #333;"
 +
|style="vertical-align:top; padding-right: 2ex;"|STATUSMAGENTA
 +
|Unused
 +
|-
 +
|style="vertical-align:top; padding-right: 2ex;"|STATUSYELLOW
 +
|Unused
 +
|- style="background: #333;"
 +
|style="vertical-align:top; padding-right: 2ex;"|STATUSGRAY
 +
|Unused
 +
|-
 +
|style="vertical-align:top; padding-right: 2ex;"|STATUSWHITE
 +
|Unused
 
|}
 
|}
  
Line 91: Line 110:
 
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TDamageType'''
 
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TDamageType'''
 
|-
 
|-
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_BULLET
+
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_BULLET <!-- 0 -->
 +
|- style="background: #333;"
 +
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_MELEE <!-- 1 -->
 +
|-
 +
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_SHARPNEL [sic] <!-- 2 -->
 
|- style="background: #333;"
 
|- style="background: #333;"
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_MELEE
+
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_ACID <!-- 3 -->
 
|-
 
|-
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_SHARPNEL [sic]
+
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_FIRE <!-- 4 -->
 
|- style="background: #333;"
 
|- style="background: #333;"
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_FIRE
+
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_PLASMA <!-- 5 -->
 
|-
 
|-
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_PLASMA
+
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_SPLASMA <!-- 6 -->
 
|- style="background: #333;"
 
|- style="background: #333;"
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_IGNOREARMOR
+
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_IGNOREARMOR <!-- 7 -->
 
|}
 
|}
  
Line 119: Line 142:
 
|- style="background: #333;"
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|ALT_SINGLE
 
|style="vertical-align:top; padding-right: 2ex;"|ALT_SINGLE
|-
 
|style="vertical-align:top; padding-right: 2ex;"|ALT_WHIRLWIND
 
 
|}
 
|}
  
Line 165: Line 186:
 
|style="vertical-align:top; padding-right: 2ex;"|EFRANDOMCONTENT
 
|style="vertical-align:top; padding-right: 2ex;"|EFRANDOMCONTENT
 
|Transmutes some cells in the explosion to the explosion's content cell; the rules is to transmute when damage is greater than 20.
 
|Transmutes some cells in the explosion to the explosion's content cell; the rules is to transmute when damage is greater than 20.
 +
|-
 +
|style="vertical-align:top; padding-right: 2ex;"|EFNODISTANCEDROP
 +
|
 
|}
 
|}
  
====LightFlag====
+
====Level Flag====
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"
+
{{Template:Level_Flags}}
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TLightFlag'''
+
 
|-
+
====Light Flag====
|style="vertical-align:top; padding-right: 2ex;"|LFEXPLORED
+
{{Template:Light_Flags}}
|This flag is set for explored cells. It can be modified to create computer map-like effects or Angel of Darkness-like effects.
+
|- style="background: #333;"
+
|style="vertical-align:top; padding-right: 2ex;"|LFVISIBLE
+
|This flag is set for cells in the player's current LOS. This flag is automatically recalculated on every player action. It may be useful to manually modify this flag if LOS needs to be updated more often.
+
|-
+
|style="vertical-align:top; padding-right: 2ex;"|LFLIGHTED
+
|This flag is always set on the same cells as LFVISIBLE; both flags must be set for a cell to be visible.
+
|- style="background: #333;"
+
|style="vertical-align:top; padding-right: 2ex;"|LFDAMAGE
+
|This is a book-keeping flag for shotgun area-of-effect. Cells are set with this flag if they are calculated as in the shotgun blast but haven't yet been processed.
+
|-
+
|style="vertical-align:top; padding-right: 2ex;"|LFFRESH
+
|This is a book-keeping flag for explosions. New corpses are set with this flag to keep them from being immediately destroyed. This flag can be set to make any cell indestructible, but it may be cleared by the engine.
+
|- style="background: #333;"
+
|style="vertical-align:top; padding-right: 2ex;"|LFNOSPAWN
+
|Cells with this flag are counted as non-empty by the EF_NOSPAWN empty flag.
+
|}
+
  
 
== Constants ==
 
== Constants ==
Line 204: Line 211:
 
|style="vertical-align:top; padding-right: 2ex;"|MAXDEPTH || 26
 
|style="vertical-align:top; padding-right: 2ex;"|MAXDEPTH || 26
 
|-
 
|-
|style="vertical-align:top; padding-right: 2ex;"|MAXAFFECT || 5
+
|style="vertical-align:top; padding-right: 2ex;"|MAXAFFECT || 12
 
|- style="background: #333;"
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|MAX_INV_SIZE || 22
 
|style="vertical-align:top; padding-right: 2ex;"|MAX_INV_SIZE || 22
Line 306: Line 313:
  
 
==== Colors ====
 
==== Colors ====
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"
+
Usually, it is possible to specify a foreground color and a background color. Since DoomRL uses 4 bit color, the lowest 4 bits determine the foreground color, and the next 4 bits determine the background color (zero is black). Occasionally, one of these may conflict with one of the special color constants.  See [[Modding:Color]] for details.
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Colors'''
+
 
|-
+
Also, note that the exact color the end-user sees may depend on his system settings.
|style="vertical-align:top; padding-right: 2ex;"|BLACK
+
For the basic 16 colors, the valkyrie string coloring escape is noted.
|- style="background: #333;"
+
{{Template:Color}}
|style="vertical-align:top; padding-right: 2ex;"|BLUE
+
{{Template:Special_Color}}
|-
+
|style="vertical-align:top; padding-right: 2ex;"|GREEN
+
|- style="background: #333;"
+
|style="vertical-align:top; padding-right: 2ex;"|CYAN
+
|-
+
|style="vertical-align:top; padding-right: 2ex;"|RED
+
|- style="background: #333;"
+
|style="vertical-align:top; padding-right: 2ex;"|MAGENTA
+
|-
+
|style="vertical-align:top; padding-right: 2ex;"|BROWN
+
|- style="background: #333;"
+
|style="vertical-align:top; padding-right: 2ex;"|LIGHTGRAY
+
|-
+
|style="vertical-align:top; padding-right: 2ex;"|DARKGRAY
+
|- style="background: #333;"
+
|style="vertical-align:top; padding-right: 2ex;"|LIGHTBLUE
+
|-
+
|style="vertical-align:top; padding-right: 2ex;"|LIGHTGREEN
+
|- style="background: #333;"
+
|style="vertical-align:top; padding-right: 2ex;"|LIGHTCYAN
+
|-
+
|style="vertical-align:top; padding-right: 2ex;"|LIGHTRED
+
|- style="background: #333;"
+
|style="vertical-align:top; padding-right: 2ex;"|LIGHTMAGENTA
+
|-
+
|style="vertical-align:top; padding-right: 2ex;"|YELLOW
+
|- style="background: #333;"
+
|style="vertical-align:top; padding-right: 2ex;"|WHITE
+
|-
+
|style="vertical-align:top; padding-right: 2ex;"|MULTIBLUE
+
|- style="background: #333;"
+
|style="vertical-align:top; padding-right: 2ex;"|MULTIYELLOW
+
|-
+
|style="vertical-align:top; padding-right: 2ex;"|MULTIPORTAL
+
|- style="background: #333;"
+
|style="vertical-align:top; padding-right: 2ex;"|COLOR_WATER
+
|-
+
|style="vertical-align:top; padding-right: 2ex;"|COLOR_ACID
+
|- style="background: #333;"
+
|style="vertical-align:top; padding-right: 2ex;"|COLOR_LAVA
+
|}
+
  
 
== Flags ==
 
== Flags ==
 +
 +
==== Item Flags ====
 +
{{Template:Item_Flags}}
 +
 +
==== Being Flags ====
 +
{{Template:Being_Flags}}
 +
 +
Some flags have no effect on non-player beings.  Most trait flags are that way.
 +
 +
==== Cell Flags ====
 +
{{Template:Cell_Flags}}
  
 
==== Generic Flags ====
 
==== Generic Flags ====
Line 362: Line 339:
 
|style="vertical-align:top; padding-right: 2ex;"|F_OVERLAY
 
|style="vertical-align:top; padding-right: 2ex;"|F_OVERLAY
 
|This flag is related to the graphical version.
 
|This flag is related to the graphical version.
|}
 
 
==== Cell Flags ====
 
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"
 
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Cell Flags'''
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|CF_BLOCKMOVE
 
|Cells with this flag block movement and projectiles.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|CF_BLOCKLOS
 
|Cells with this flag block vision.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|CF_CORPSE
 
|This flag is set for autogenerated corpses. Only cells with this flag can be ressurected. The being created by resurrection can be specified by setting the cell's effect parameter to 100 + being.id. Note that the "corpse" cell does not have this flag. To include this cell, use Level.is_corpse.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|CF_NOCHANGE
 
|Currently, this flag is only checked by the map powerups. The map powerups reveal cells with this flag (as well as CF_BLOCKMOVE cells).
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|CF_NORUN
 
|The run command (not the run tactic) will stop the player before he steps on a cell with this flag.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|CF_PUSHABLE
 
|Cells with this flag can be pushed (like barrels in DoomRL). Pushing is mostly hard-coded.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|CF_FRAGILE
 
|Cells with this flag can be destroyed by any damage type (assuming they have HP or armor) whereas cells cannot usually be damaged by bullet, melee, shrapnel, or piercing damage.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|CF_HAZARD
 
|This flag should be set for cells that are dangerous to step on. The AI will usually avoid these tiles. This flag is also used with the EF_NOHARM empty flag.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|CF_OVERLAY
 
|This flag is related to the graphical version.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|CF_MULTISPRITE
 
|This flag is related to the graphical version.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|CF_STICKWALL
 
|This flag is related to the graphical version.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|CF_LIQUID
 
|This flag is used to mark liquid cells (water, acid, lava). Currently, it is only checked by Level.flood which will flood over CELLSET_FLOORS cells and CF_LIQUID cells.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|CF_OPENABLE
 
|This flag indicates that the cell can be opened. What happens when the cells is opened is determined by the cell's OnAct hook.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|CF_CLOSABLE
 
|As CF_OPENABLE, but for the close command.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|CF_RUNSTOP
 
|Cells with this flag will stop the player's run when the player is orthogonally adjacent. Contrast with CF_NORUN.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|CF_NUKABLE
 
|Cells with this flag will be destroyed be a nuke even if they are normally not destructible.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|CF_CRITICAL
 
|Cells with this flag should usually not be altered or destroyed be the game. It is currently only checked by the flooding level event. Stairs have this flag.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|CF_HIGHLIGHT
 
|This flag determines whether the light or dark color variant is used when a StatusEffect overlay is being applied.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|CF_BLOODY
 
|When a being walks on one of these cells, its feet won't become less bloody. (See CF_BLOODY.)
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|CF_VBLOODY
 
|When a being walks on one of these cells, its feet will become bloody and it will temporarily leave a trail of blood.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|CF_STAIRS
 
|Stairs are marked with this flag. (New stairs cells should include this.)
 
|}
 
 
==== Being Flags ====
 
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"
 
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Being Flags'''
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_BOSS
 
|Killing this monster will cause the same message as killing the cyberdemon as well as the cyberdemon explosion and ending the game. This automatically sets BF_HUNTING as well. Also provides knockback immunity and prevents the being from taking damage on its own turn.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_ENVIROSAFE
 
|Beings with this flag are immune to damage from acid and lava tiles. (New hazardous tiles will have to check for this flag to respect it.)
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_CHARGE
 
|This is a flag for the AI. Beings with this flag are willing to walk through hazardous cells to reach the player. (This applies to the default AI, and the direct_seek method.)
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_OPENDOORS
 
|This is a flag for the default AI. Beings with this flag will open doors.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_NODROP
 
|Beings with this flag will not drop their inventory or equipment when they die.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_NOEXP
 
|Beings with this flag will not award experience to the player.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_QUICKSWAP
 
|Gives the benefits of the Juggler trait.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_DISTANCE
 
|This is a flag for the default AI. Beings with this flag will not try to approach the player (but the will still do melee attacks if they end up next to the player).
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_HUNTING
 
|This is a flag for the default AI. Beings with this flag will search out the player even if he is not in their line of sight.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_RETALITATE
 
|This is a flag for the default AI that will cause to hunt the player as BF_HUNTING, but will randomly expire if the player is not within line of sight. This flag is set when beings are attacked regardless of the AI, but it isn't used by the lua AIs.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_BACKPACK
 
|Gives the ammo-stacking benefits of the [[Backpack]] powerup.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_JC
 
|When used with BF_BOSS, changes the explosion to blue and changes the message to indicate that JC was killed instead of the cyberdemon.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_UNIQUENAME
 
|This flag makes the game treat the being's name as a proper noun.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_IMPATIENT
 
|This flag causes packs to be automatically used when picked up as [[Challenge Modes#Angel of Impatience|Angel of Impatience]].
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_NOHEAL
 
|This is a marker flag that stops healing effects from working as in [[Challenge Modes#Angel of Masochism|Angel of Masochism]]. New sources of healing will have to check for this flag in order to respect it.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_SHOTTYMAN
 
|Gives the benefits of the [[Traits#Shottyman|Shottyman]] trait.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_BERSERKER
 
|Gives the benefits of the [[Traits#Berserker|Berserker]] trait.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_DARKNESS
 
|For the player, stops exploration from being recorded as in [[Angel of Darkness]].
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_DUALGUN
 
|Gives the benefits of the dualgunner trait.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_POWERSENSE
 
|For the player, shows the locations of all powerups (as the first level of the [[Traits#Intuition|Intuition]] trait).
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_BEINGSENSE
 
|For the player, shows the locations of enemies (as the second level of the Intuition trait).
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_LEVERSENSE1
 
|For the player, gives partial information about levers (as the first level of the Intuition trait).
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_LEVERSENSE2
 
|For the player, shows the exact effect of levers (as the second level of the Intuition trait).
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_NOMELEE
 
|This flag stops the being from doing any type of melee attack.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_ENTERBOSS1
 
|This is a flag for the player that helps determine which victory message to use in the mortem.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_KILLBOSS1
 
|This is a flag for the player that helps determine which victory message to use in the mortem.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_ENTERBOSS2
 
|This is a flag for the player that helps determine which victory message to use in the mortem.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_KILLBOSS2
 
|This is a flag for the player that helps determine which victory message to use in the mortem.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_CLEAVE
 
|Gives the benefits of the [[Traits#Blademaster|Blademaster]] trait.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_MAXDAMAGE
 
|Beings with this flag always roll maximum damage as in [[Challenge Modes#Angel of Max Carnage|Angel of Max Carnage]].
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_SESSILE
 
|Beings with this flag cannot move.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_VAMPYRE
 
|Gives the benefits of the [[Traits#Vampyre|Vampyre]] trait.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_REGENERATE
 
|Beings with this flag regenerate one health per second if they have less than 20 health remaining.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_ARMYDEAD
 
|Gives the benefits of the [[Traits#Army of the Dead|Army of the Dead]] trait.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_FIREANGEL
 
|Gives the benefits of the [[Traits#Fireangel|Fireangel]] trait.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_GUNKATA
 
|Gives the benefits of the [[Traits#Gun Kata|Gun Kata]] trait.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_AMMOCHAIN
 
|Gives the benefits of the [[Traits#Ammochain|Ammochain]] trait.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_MASTERDODGE
 
|Gives the benefits of the [[Traits#Dodgemaster|Dodgemaster]] trait.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_INV
 
|Stops the being from taking any damage. (Directly setting the being's HP can circumvent this.)
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_BERSERK
 
|Gives the damage reduction and melee damage bonus of [[Effects#Berserk|berserk]]. (The speed bonus is not included.)
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_USESITEMS
 
|This is a flag for the default AI. Beings with this flag will be able to pick up and use items.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_PISTOLMAX
 
|Gives the benefits of the [[Sharpshooter]] trait.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_MEDPLUS
 
|Allows med-packs to heal beyond 100% health.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_HARDY
 
|Allows protection to reduce damage all the way to zero.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_SCAVENGER
 
|Gives the player the [[Scavenger]] ability.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_INSTAUSE
 
|Allows consumable items to be used in 0.1s instead of the usual 1.0s.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_STAIRSENSE
 
|For the player, reveals the stairs tile(s).
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_POWERBONUS
 
|Extends the duration of powerups as the [[Marine]] class bonus. New powerups will have to check for this flag (or use the provided helper function) to respect it.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|BF_MAPEXPERT
 
|Makes computer maps work like tracking maps.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|BF_LUAAI
 
|This flag is automatically set for beings that use lua AI.
 
|}
 
 
==== Item Flags ====
 
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"
 
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Item Flags'''
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_CHAMBEREMPTY
 
|For IF_PUMPACTION weapons, this flag indicates whether ammo is in the chamber or not.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_UNIQUE
 
|This flag is set for unique items. Unique items add a player history message when picked up as well as doing a screen blink. Unique items are also not destroyable.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_EXOTIC
 
|This flag is set for exotic items. This is used by the game to compile the special items list.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_MODIFIED
 
|This flag is automatically set for items that have been modded. Items with this flag have "modified " prepended to their names.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_HALFKNOCK
 
|If a weapon with this flag is wielded, all knockback against the wielder will be halved.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_GLOBE
 
|This is a marker flag for items that are disallowed in Angel of Masochism.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_CURSED
 
|Items with this flag cannot be unequipped.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_RECHARGE
 
|Items with this flag regenerate ammo or durability as with a [[Nano Pack]].
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_CLEAVE
 
|Items with this flag give the wielder the benefits of the [[Traits#Blademaster|Blademaster]] trait (as [[Butcher's Cleaver]]).
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_NOAMMO
 
|Items with this flag don't consume ammo when fired. For the player, a weapon still must have ammo loaded to be fired.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_NECROCHARGE
 
|Items with this flag recharge as with IF_RECHARGE, but reduce the weilder's health by 1 for each point of recharge (as with [[Necroarmor]]).
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_PUMPACTION
 
|Ranged weapons with this flag must be pumped after each shot as with the combat shotgun.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_SINGLERELOAD
 
|Ranged weapons with this flag only reload one ammo at a time (as with the missile launcher) instead of all at once.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_PISTOL
 
|This flag indicates whether the weapon counts as a pistol for the purposes of the [[Traits#Son of a Gun|Son of a Gun]] and [[Traits#Dualgunner|Dualgunner]] traits. (For kill counting, the weapon group is used instead.)
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_SHOTGUN
 
|This flag causes a weapon's missile to be treated as a shotgun id rather than a missile id. Also, this flag is used to decide if the [[Traits#Shottyman|Shottyman]] trait should count the weapon as a shotgun. (For kill counting, the weapon group is used instead.)
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_SPREAD
 
|Ranged weapons with this flag fire three shots at once (as the [[tristar blaster]] and [[mancubus]] natural weapon). In 0.9.9.4, this flag is a bit buggy.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_SCATTER
 
|For ranged weapons with this flag, each shot is aimed at a different cell near the real target (as with the [[BFG 10K]]).
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_MODABLE
 
|Allows a unique item to be fully modded.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_SINGLEMOD
 
|Restricts the number of allowed mods on the item to one. (For unique items, this must be used along with IF_MODABLE.)
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_DUALSHOTGUN
 
|For multi-shot weapons, this flag eliminates all delay between shots and causes the firing sound to play only once.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_AIHEALPACK
 
|This flag allows the default AI to pick up and use the item.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_NOUNLOAD
 
|Ranged weapons with this flag cannot be unloaded.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_NUKERESIST
 
|Items with this flag will not be destroyed by nuking.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_NODROP
 
|Items with this flag will not be dropped when the carrier/wearer dies.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_AUTOHIT
 
|Weapons with this flag never miss (as with items modified by a sniper weapon pack).
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_SETITEM
 
|This flag is automatically set for items that specify a set.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_NODURABILITY
 
|Armors and boots with this flag have no durability (as with items modified by an Onyx Armor Pack).
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_NODESTROY
 
|Armors with this flag cannot be destroyed by damage. Also, items on the ground with this flag will not be destroyed by explosions.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_NONMODABLE
 
|Items with this flag cannot be modded.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_NOREPAIR
 
|Armors and boots with this flag cannot be repaired by normal methods (ie item:fix). Directly setting item.durability bypasses this prohibition.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|IF_ASSEMBLED
 
|This flag is automatically set on assemblies. Items with this flag cannot be used for the base of any other assembly.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|IF_DESTROY
 
|Weapons with this flag will be destroyed after firing (with a default message). The flag is used for overcharged weapons.
 
|}
 
 
==== Level Flags ====
 
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"
 
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Level Flags'''
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|LF_MELEEONLY
 
|If this flag is set, the only melee weapons can be used as in the [[Unholy Cathedral]]. (This applies only to the player.)
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|LF_NOHOMING
 
|This flag causes homing phase devices to act like normal phase devices.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|LF_UNIQUEITEM
 
|This flag is used by the level generation code to keep track of whether a unique item has dropped on the current level (in order to prevent multiple uniques from dropping on one level). This flag also causes a level feeling to occur indicating that a unique item is present.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|LF_BONUS
 
|This flag is automatically set for so-called special levels like [[Halls of Carnage]]. (It is not set for those special levels like [[Hellgate]] that replace normal levels, only by those reached from red stairs.)
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|LF_NORESPAWN
 
|This flag prevents the Nightmare! respawn feature.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|LF_NUKED
 
|This flag is automatically set when the level is nuked.
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|LF_NONUKE
 
|This flag causes the thermonuclear bomb to have no effect when it is used. It is not respected by other nuke effects.
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|LF_ITEMSVISIBLE
 
|This flag allows the player to see all items on the level (as with a [[Computer Map]]).
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|LF_BEINGSVISIBLE
 
|This flag allows the player to see all beings on the level (as with a [[Tracking Map]]).
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|LF_RESPAWN
 
|This flag causes monsters to randomly respawn as when playing the game on Nightmare!
 
 
|}
 
|}
  
Line 755: Line 373:
 
|style="vertical-align:top; padding-right: 2ex;"|EF_NOSPAWN
 
|style="vertical-align:top; padding-right: 2ex;"|EF_NOSPAWN
 
|Excludes cells with LF_NOSPAWN.
 
|Excludes cells with LF_NOSPAWN.
|}
 
 
==== Missile Flags ====
 
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"
 
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Missile Flags'''
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|MF_RAY
 
|This flag changes the missile's animation. The delay is ignored and all cells in the path are drawn with the projectile (as with the [[Shambler|Shambler's]] ranged attack).
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|MF_HARD
 
|This flag causes the missile to continue after hitting a being (as with the [[Railgun]]).
 
|-
 
|style="vertical-align:top; padding-right: 2ex;"|MF_EXACT
 
|This flag causes the missile to stop at the targeted square (as with the [[Revenant's Launcher]]).
 
|- style="background: #333;"
 
|style="vertical-align:top; padding-right: 2ex;"|MF_IMMIDATE
 
|This flag causes the missile to always hit the targetted square (although it may still miss a being standing on that square). The missile does not respect line of fire -- it will go through walls (although AI controlled beings using such a missile will still respect line-of-sight). The animation for the missile will only display over the targeted cell. ([[Arch-vile|Arch-viles']] natural weapon uses this flag.)
 
 
|}
 
|}

Latest revision as of 16:42, 18 July 2013

Constants and Enumerations are common in any game and DoomRL is no exception. Internally, as most programmers are aware, these are integers. But to modders they are all important magic values, looked up here.

Contents

Engine Enums

ItemType

Every item has a type that determines how the engine treats it.

TItemType
ITEMTYPE_NONE
ITEMTYPE_RANGED
ITEMTYPE_NRANGED
ITEMTYPE_ARMOR
ITEMTYPE_MELEE
ITEMTYPE_AMMO
ITEMTYPE_PACK
ITEMTYPE_POWER
ITEMTYPE_BOOTS
ITEMTYPE_TELE
ITEMTYPE_LEVER
ITEMTYPE_AMMOPACK

BodyTarget

Sources of damage must specify a body target to determine which sources of armor are used. Inherent armor bonuses always apply.

TBodyTarget
TARGET_INTERNAL Protection from boots and armor will be ignored.
TARGET_TORSO Protection from armor counts but protection from boots does not.
TARGET_FEET Protection from boots counts but protection from armor does not.

EqSlot

It is preferred to use the (equivalent) slot constants.

TEqSlot
EFTORSO
EFWEAPON
EFBOOTS
EFWEAPON2

StatusEffect

Affects specify one of these status effects that will apply a color scheme to all the tiles on the HUD.

TStatusEffect
STATUSNORMAL No affects
STATUSINVERT Berserk (sic!)
STATUSRED Invincibility (sic!)
STATUSGREEN Environsuit
STATUSBLUE Light-Amp Goggle effect
STATUSMAGENTA Unused
STATUSYELLOW Unused
STATUSGRAY Unused
STATUSWHITE Unused

DamageType

Sources of damage usually specify a damage type that determines how the damage regards protection, resistances, gibbing, and other things. For details on the differences between the damage types, look here.

TDamageType
DAMAGE_BULLET
DAMAGE_MELEE
DAMAGE_SHARPNEL [sic]
DAMAGE_ACID
DAMAGE_FIRE
DAMAGE_PLASMA
DAMAGE_SPLASMA
DAMAGE_IGNOREARMOR

AltFire

TAltFire
ALT_NONE
ALT_CHAIN
ALT_THROW
ALT_SCRIPT
ALT_AIMED
ALT_SINGLE

AltReload

TAltReload
RELOAD_NONE
RELOAD_SCRIPT
RELOAD_FULL
RELOAD_DUAL
RELOAD_SINGLE

ExplosionFlag

TExplosionFlag
EFSELFHALF Deals half damage to the active being.
EFSELFKNOCKBACK Gives extra knockback to the active being.
EFSELFSAFE Deals no damage to the active being.
EFAFTERBLINK Blinks the screen after the explosion finishes.
EFCHAIN Causes secondary explosions (as the BFG 9000).
EFHALFKNOCK Causes half the usual knockback.
EFNOKNOCK Doesn't cause knockback.
EFRANDOMCONTENT Transmutes some cells in the explosion to the explosion's content cell; the rules is to transmute when damage is greater than 20.
EFNODISTANCEDROP

Level Flag

Level Flags
LF_NOHOMING Causes homing phase devices to act like normal phase devices.
LF_UNIQUEITEM Used by the level generation code to keep track of whether a unique item has dropped on the current level (in order to prevent multiple uniques from dropping on one level). This flag also causes a level feeling to occur indicating that a unique item is present.
LF_BONUS This flag is automatically set for so-called special levels like Halls of Carnage. (It is not set for those special levels like Hellgate that replace normal levels, only by those reached from red stairs.)
LF_SCRIPT This flag is automatically set for scripted levels, ie levels defined with the level blueprint.
LF_NORESPAWN Prevents the Nightmare! respawn feature.
LF_NUKED This flag is automatically set when the level is nuked.
LF_NONUKE Causes the thermonuclear bomb to have no effect when it is used. It is not respected by other nuke effects.
LF_ITEMSVISIBLE Allows the player to see all items on the level (as with a Computer Map).
LF_BEINGSVISIBLE Allows the player to see all beings on the level (as with a Tracking Map).
LF_RESPAWN Causes monsters to randomly respawn as when playing the game on Nightmare!
LF_SHARPFLUID  ???

Light Flag

Light Flags
LFEXPLORED This flag is set for explored cells. It can be modified to create computer map-like effects or Angel of Darkness-like effects.
LFVISIBLE This flag is set for cells in the player's current LOS. This flag is automatically recalculated on every player action. It may be useful to manually modify this flag if LOS needs to be updated more often.
LFLIGHTED This flag is always set on the same cells as LFVISIBLE; both flags must be set for a cell to be visible.
LFDAMAGE This is a bookkeeping flag for shotgun area-of-effect. Cells are set with this flag if they are calculated as in the shotgun blast but haven't yet been processed.
LFFRESH This is a bookkeeping flag for explosions. New corpses are set with this flag to keep them from being immediately destroyed. This flag can also be set to make any cell indestructible, but it may be cleared by the engine.
LFPERMANENT This flag marks a cell as being indestructible.
LFCORNER This flag only exists in debug builds of DoomRL. It identifies a cell that is visible but that enemies will not return fire from, ie, corner shooting.
LFBLOOD This flag marks a cell as being bloody. Bloody cells can only have cosmetic differences.
LFNOSPAWN
LFMARKER1
LFMARKER2

Constants

Maximums

Maximums
MAXX 78
MAXY 20
BOSS_LEVEL 25
MAXDEPTH 26
MAXAFFECT 12
MAX_INV_SIZE 22
MAX_EQ_SIZE 4

Cellsets

Cellsets
CELLSET_WALLS
CELLSET_FLOORS
CELLSET_CORPSES

Challenges

Challenges
CHALLENGE_BERSERK
CHALLENGE_MARKSMANSHIP
CHALLENGE_SHOTGUNNERY
CHALLENGE_LIGHTTRAVEL
CHALLENGE_IMPATIENCE
CHALLENGE_HASTE
CHALLENGE_PURITY
CHALLENGE_REDALERT
CHALLENGE_CARNAGE
CHALLENGE_MASOCHISM
CHALLENGE_100
CHALLENGE_PACIFISM
CHALLENGE_HUMANITY

Difficulty

Difficulty
DIFF_EASY
DIFF_MEDIUM
DIFF_HARD
DIFF_VERYHARD
DIFF_NIGHTMARE

PlayerRank

PlayerRank
RANKEXP
RANKSKILL

Player Statistics

Player Statistics
RANK_KILLTOTAL
RANK_KILLMELEE
RANK_KILLPISTOL
RANK_LEVEL
RANK_BADGE

Equip Slots

Equip Slots
SLOT_ARMOR
SLOT_WEAPON
SLOT_BOOTS
SLOT_PREPARED

Colors

Usually, it is possible to specify a foreground color and a background color. Since DoomRL uses 4 bit color, the lowest 4 bits determine the foreground color, and the next 4 bits determine the background color (zero is black). Occasionally, one of these may conflict with one of the special color constants. See Modding:Color for details.

Also, note that the exact color the end-user sees may depend on his system settings. For the basic 16 colors, the valkyrie string coloring escape is noted.

Colors
Color ID Valkyrie ID Looks Like
BLACK 0 @D
BLUE 1 @b
GREEN 2 @g
CYAN 3 @c
RED 4 @r
MAGENTA 5 @v
BROWN 6 @n or @N
LIGHTGRAY 7 @l
DARKGRAY 8 @d
LIGHTBLUE 9 @B
LIGHTGREEN 10 @G
LIGHTCYAN 11 @C
LIGHTRED 12 @R
LIGHTMAGENTA 13 @V
YELLOW 14 @y or @Y
WHITE 15 @L
Colors
Color ID Looks Like Comments
MULTIBLUE 17 Missile only
MULTIYELLOW 18 Missile only
MULTIPORTAL 20 Map object only
COLOR_WATER 21 Map object only
COLOR_ACID 22 Map object only
COLOR_LAVA 23 Map object only

Flags

Item Flags

Item Flags
IF_CHAMBEREMPTY For IF_PUMPACTION weapons, this flag indicates whether ammo is in the chamber or not.
IF_UNIQUE This flag is set for unique items. Unique items add a player history message when picked up as well as doing a screen blink. Unique items are also not destroyable.
IF_EXOTIC This flag is set for exotic items. This is used by the game to compile the special items list.
IF_MODIFIED This flag is automatically set for items that have been modded.
IF_HALFKNOCK If a weapon with this flag is wielded, all knockback against the wielder will be halved.
IF_GLOBE This is a marker flag for items that are disallowed in Angel of Masochism.
IF_CURSED Items with this flag cannot be unequipped.
IF_RECHARGE Items with this flag regenerate ammo or durability as with a Nano Pack.
IF_CLEAVE Items with this flag give the wielder the benefits of the Blademaster trait (as Butcher's Cleaver).
IF_NOAMMO Items with this flag don't consume ammo when fired. For the player, a weapon still must have ammo loaded to be fired.
IF_NECROCHARGE Items with this flag recharge as with IF_RECHARGE, but reduce the weilder's health by 1 for each point of recharge (as with Necroarmor).
IF_PUMPACTION Ranged weapons with this flag must be pumped after each shot as with the combat shotgun.
IF_SINGLERELOAD Ranged weapons with this flag only reload one ammo at a time (as with the missile launcher) instead of all at once.
IF_PISTOL This flag indicates whether the weapon counts as a pistol for the purposes of the Son of a Gun and Dualgunner traits. (For kill counting, the weapon group is used instead.)
IF_SHOTGUN This flag causes a weapon's missile to be treated as a shotgun id rather than a missile id. Also, this flag is used to decide if the Shottyman trait should count the weapon as a shotgun. (For kill counting, the weapon group is used instead.)
IF_SPREAD Ranged weapons with this flag fire three shots at once (as the tristar blaster and mancubus natural weapon). In 0.9.9.4, this flag is a bit buggy.
IF_SCATTER For ranged weapons with this flag, each shot is aimed at a different cell near the real target (as with the BFG 10K).
IF_MODABLE Allows a unique item to be fully modded.
IF_SINGLEMOD Restricts the number of allowed mods on the item to one. (For unique items, this must be used along with IF_MODABLE.)
IF_DUALSHOTGUN For multi-shot weapons, this flag eliminates all delay between shots and causes the firing sound to play only once.
IF_AIHEALPACK This flag allows the default AI to pick up and use the item.
IF_NOUNLOAD Ranged weapons with this flag cannot be unloaded.
IF_NUKERESIST Items with this flag will not be destroyed by nuking.
IF_NODROP Items with this flag will not be dropped when the carrier/wearer dies.
IF_AUTOHIT Weapons with this flag never miss (as with items modified by a sniper weapon pack).
IF_SETITEM This flag is automatically set for items that specify a set.
IF_NODURABILITY Armors and boots with this flag have no durability (as with items modified by an Onyx Armor Pack).
IF_NODESTROY Armors with this flag cannot be destroyed by damage. Also, items on the ground with this flag will not be destroyed by explosions.
IF_NONMODABLE Items with this flag cannot be modded.
IF_NOREPAIR Armors and boots with this flag cannot be repaired by normal methods (ie item:fix). Directly setting item.durability bypasses this prohibition. Usually set for shields.
IF_ASSEMBLED This flag is automatically set on assemblies. Items with this flag cannot be used for the base of any other assembly.
IF_DESTROY Weapons with this flag will be destroyed after firing (with a default message). The flag is used for overcharged weapons.
IF_BLADE Weapons with this flag are considered blades for the purpose of activating the flags used for Malicious Blades.
IF_DESTRUCTIVE Weapons with this flag deal double damage to cells (if they can hurt cells, see CF_FRAGILE.)
IF_ROCKET Any weapon with this flag defined as a rocket launcher.
IF_NODEGRADE Armor's or boots' resistances aren't degraded due to damage taken. Usually set for shields.
IF_THROWDROP Combat knife has this flag in 0.9.9.7.
IF_FARHIT
IF_UNSEENHIT

Being Flags

Being Flags
BF_BOSS Killing this being will end the game. Other boss-only actions are usually scripted in Lua based on this flag.
BF_ENVIROSAFE Hazard tiles should not affect this being. Engine pathfinding algorithms are affected. Protection is not engine based; modders must make custom hazard cells check for this flag to prevent damage.
BF_CHARGE Hazard tiles do not concern this being. Engine pathfinding algorithms are affected.
BF_OPENDOORS This being can open doors. Engine pathfinding algorithms are affected.
BF_NODROP This being will not drop their inventory or equipment when they die.
BF_NOEXP This being will not award experience to the player. Often used to prevent exp farming.
BF_QUICKSWAP This being has the benefits of the Juggler trait.
BF_HUNTING This being always knows where the player is and will hunt them down. This flag is not engine based; modders must make custom AIs respect this flag before it will have any effect.
BF_BACKPACK This being has the ammo stacking benefits of the Backpack powerup.
BF_UNIQUENAME This being's name is a proper noun and UI messages will treat it as such.
BF_IMPATIENT This being will consume packs automatically. This flag is the main component of the Angel of Impatience challenge.
BF_SHOTTYMAN This being will reload shotguns on the move as part of the Shottyman trait. A shotgun is defined as any weapon with the IF_SHOTGUN flag.
BF_ROCKETMAN This being will reload rocket launchers on the move as part of the Shottyman trait. A rocket launcher is defined as any weapon with the IF_ROCKET flag.
BF_BERSERKER This being has the benefits of the Berserker trait.
BF_DARKNESS This being does not record exploration. This is one component of the Angel of Darkness challenge.
BF_DUALGUN This being has the benefits of the Dualgunner trait.
BF_POWERSENSE This being can sense powerups, one of the benefits of the first level Intuition trait.
BF_BEINGSENSE This being can sense enemies, one of the benefits of the second level Intuition trait.
BF_LEVERSENSE1 This being can sense if a lever is harmful, beneficial, or neutral, one of the benefits of the first level Intuition trait.
BF_LEVERSENSE2 This being can sense the exact effect of a lever, one of the benefits of the second level Intuition trait.
BF_NOMELEE This being cannot perform a melee attack. This is only seen on the Angel of Pacifism challenge and is probably not safe to use on an enemy. A custom AI can achieve a better effect.
BF_CLEAVE This being has the benefits of the Blademaster trait.
BF_MAXDAMAGE This being always rolls maximum damage. Every being gets this flag in the Angel of Max Carnage challenge.
BF_SESSILE This being cannot move. Only seen with the Gothic Arms set. This flags is not correctly implemented for non-player creatures; if you want an immobile enemy use a custom AI instead.
BF_VAMPYRE This being has the benefits of the Vampyre trait.
BF_REGENERATE This being regenerates one health per second if they have less than 20 health remaining. This used to be the benefit of a trait called Regenerator but it is no longer used anywhere in DoomRL.
BF_ARMYDEAD This being has the benefits of the Army of the Dead trait.
BF_FIREANGEL This being has the benefits of the Fireangel trait.
BF_GUNKATA This being has the benefits of the Gun Kata trait.
BF_AMMOCHAIN This being has the benefits of the Ammochain trait.
BF_MASTERDODGE This being has the benefits of the Dodgemaster trait.
BF_INV This being will not take any damage. This is the main component of the Invulnerable status effect. Be careful not to directly set an invincible being's HP to zero.
BF_BERSERK This being has the face pounding benefits of the Berserk status effect. The speed and resistance bonuses are not included.
BF_NORUNPENALTY This being has the benefits of the Running Man trait.
BF_PISTOLMAX This being has the benefits of the Sharpshooter trait.
BF_MEDPLUS This being can heal beyond 100% with med-packs alone as part of the Survivalist trait. This flag is not engine based; modders must make custom sources of healing respect this flag.
BF_HARDY This being can reduce damage all the way down to zero as part of the Survivalist trait. Normally all attacks do a minimum of one damage regardless of how much armor you have.
BF_SCAVENGER This being has the benefits of the Scavenger trait.
BF_INSTAUSE This being uses consumable items in 0.1s instead of the usual 1.0s. Part of the Technician class bonus.
BF_STAIRSENSE This being always knows the location of stair tiles. Part of the Scout class bonus.
BF_POWERBONUS Powerup effects last longer for this being. The exact bonus depends on difficulty. Part of the Marine class bonus.
BF_MAPEXPERT Computer maps will work like tracking maps for this being. Part of the Technician class bonus. This flag is not engine based obviously.
BF_DUALBLADE This being can attack with two melee weapons at once with each weapon attacking in half the time. Part of the Malicious Blades trait. A bladed weapon is defined as any weapon with the IF_BLADE flag.
BF_BLADEDEFEND This being gains extra resistances by having a bladed weapon in the prepared. Part of the Malicious Blades trait. A bladed weapon is defined as any weapon with the IF_BLADE flag.
BF_BULLETDANCE This being has the benefits of the Bullet Dance trait.
BF_SHOTTYHEAD This being has the benefits of the Shottyhead trait.
BF_ENTRENCHMENT This being has the benefits of the Entrenchment trait.
BF_MODEXPERT This being can mod unique items. Part of the Technician class bonus.
BF_SELFIMMUNE This being cannot be hurt by its own attack. Arch-Viles and Cyberdemons are two such beings.
BF_KNOCKIMMUNE This being is immune to knockback. Largely a characteristic of boss level enemies.
BF_NOHEAL This being cannot be healed. This is only seen on the Angel of Masochism challenge. This flag is not engine based; modders must make custom sources of healing respect this flag.
BF_GUNRUNNER This being has the benefits of the Gunrunner trait.

Some flags have no effect on non-player beings. Most trait flags are that way.

Cell Flags

Cell Flags
CF_BLOCKMOVE Cells with this flag block movement and projectiles.
CF_BLOCKLOS Cells with this flag block vision.
CF_CORPSE This flag is set for autogenerated corpses. Only cells with this flag can be ressurected. The being created by resurrection can be specified by setting the cell's effect parameter to 100 + being.id. Note that the "corpse" cell does not have this flag. To include this cell, use Level.is_corpse.
CF_NOCHANGE Currently, this flag is only checked by the map powerups. The map powerups reveal cells with this flag (as well as CF_BLOCKMOVE cells).
CF_NORUN The run command (not the run tactic) will stop the player before he steps on a cell with this flag.
CF_PUSHABLE Cells with this flag can be pushed (like barrels in DoomRL). Pushing is mostly hard-coded.
CF_FRAGILE Cells with this flag can be destroyed by any damage type (assuming they have HP or armor) whereas cells cannot usually be damaged by bullet, melee, shrapnel, or piercing damage.
CF_HAZARD This flag should be set for cells that are dangerous to step on. The AI will usually avoid these tiles. This flag is also used with the EF_NOHARM empty flag.
CF_OVERLAY This flag is related to the graphical version. Overlays are drawn OVER a base tile.
CF_MULTISPRITE This flag is related to the graphical version. Cells which have rotations (walls being the main example) need this flag.
CF_STICKWALL This flag is related to the graphical version. When a multisprite wall is calculating its rotations it takes stickwalls into account. That way wall-like cells (such as doors) will be attached to the multisprite walls correctly.
CF_LIQUID This flag is used to mark liquid cells (water, acid, lava). Currently, it is only checked by Level.flood which will flood over CELLSET_FLOORS cells and CF_LIQUID cells.
CF_OPENABLE This flag indicates that the cell can be opened. What happens when the cells is opened is determined by the cell's OnAct hook.
CF_CLOSABLE As CF_OPENABLE, but for the close command.
CF_RUNSTOP Cells with this flag will stop the player's run when the player is orthogonally adjacent. Contrast with CF_NORUN.
CF_NUKABLE Cells with this flag will be destroyed be a nuke even if they are normally not destructible.
CF_CRITICAL Cells with this flag should usually not be altered or destroyed be the game. It is currently only checked by the flooding level event. Stairs have this flag.
CF_HIGHLIGHT This flag determines whether the light or dark color variant is used when a StatusEffect overlay is being applied.
CF_BLOODY When a being walks on one of these cells, its feet won't become less bloody. (See CF_BLOODY.)
CF_VBLOODY When a being walks on one of these cells, its feet will become bloody and it will temporarily leave a trail of blood.
CF_STAIRS Stairs are marked with this flag. (New stairs cells should include this.)
CF_RAISABLE

Generic Flags

Generic Flags
F_OVERLAY This flag is related to the graphical version.

Empty Flags

Empty flags are used with various functions to control the selection of random coords.

Empty Flags
EF_NOITEMS Excludes cells that contain an item.
EF_NOBEINGS Excludes cells that contain a being.
EF_NOBLOCK Excludes cells that block movement (CF_BLOCKMOVE).
EF_NOVISION Excludes cells that block vision (CF_BLOCKLOS).
EF_NOSTAIRS Excludes stairs (cells with an OnExit hook).
EF_NOTELE Excludes cells with a teleporter (an item with ITEMTYPE_TELE).
EF_NOHARM Excludes hazardous cells (CF_HAZARD).
EF_NOSAFE Excludes cells that are too near to the player (currently the threshold is less than or equal to distance of 5).
EF_NOSPAWN Excludes cells with LF_NOSPAWN.
Personal tools