https://drl.chaosforge.org/w/api.php?action=feedcontributions&user=Yaflhdztioxo&feedformat=atomDoomRL Wiki - User contributions [en]2024-03-29T06:09:54ZUser contributionsMediaWiki 1.21.1https://drl.chaosforge.org/wiki/Talk:Modding:DocumentationTalk:Modding:Documentation2013-06-27T22:53:50Z<p>Yaflhdztioxo: </p>
<hr />
<div>== 0.9.9.7 Documentation Update Progress ==<br />
<br />
Current state of the documentation update:<br />
<br />
To anyone who updates the documentation: Please note which pages you are working on or have updated. Thanks! -- [[User:Shark20061|Shark20061]] 21:51, 10 June 2013 (CEST)<br />
<br />
=== Pages Updated ===<br />
<br />
Place completed pages in this area with your name attached.<br />
<br />
*[[Modding:being_blueprint]] Last update: 0.9.9.7 --Yaff<br />
*[[Modding:being_object]] Last update: 0.9.9.7 --Yaff<br />
*[[Modding:level_blueprint]] Last update: 0.9.9.7 --Yaff<br />
*[[Modding:level_object]] Last update: 0.9.9.7 --Yaff<br />
<br />
=== Pages In Progress ===<br />
<br />
*[[Modding:being_API]] (Archived 0.9.9.6- at [[Modding:being_API_(0.9.9.6)]]) (Might be finished but need to check) -- [[User:Shark20061|Shark20061]]<br />
*[[Modding:level_API]] (Archived 0.9.9.6- at [[Modding:level_API_(0.9.9.6)]]) (Still tweaking and fixing) -- [[User:Shark20061|Shark20061]]<br />
*[[Modding:player_API]] (Header info missing, couple fixes left) -- [[User:Shark20061|Shark20061]]<br />
*[[Modding:generator_API]] (Archived 0.9.9.6- at [[Modding:generator_API_(0.9.9.6)]]) (Missing links to weight table and needs constants moved in) -- [[User:Shark20061|Shark20061]]<br />
*[[Modding:weighttable]] -- [[User:Shark20061|Shark20061]]<br />
<br />
=== Pages Not Updated ===<br />
<br />
*[[Modding:Module]] Last update: 0.9.9.4 (0.9.9.7 changes are in the talk page.)<br />
*[[Modding:Thing]] Last update: 0.9.9.5?<br />
*[[Modding:Item]] Last update: 0.9.9.5 (Should this also be sub-paged by item type?)<br />
*[[Modding:Cell]] Last update: 0.9.9.5?<br />
*[[Modding:Constants]] Last update: Various (Needs to be merged in with the objects/blueprint that they work with.)<br />
<br />
=== Pages Without API Changes ===<br />
<br />
All need to be split/moved to match new format anyway.<br />
*[[Modding:Missile]] Last update: 0.9.9.6 -> [[Modding:missile]]<br />
*[[Modding:ItemSet]] Last update: 0.9.9.5 -> [[Modding:itemset]]<br />
*[[Modding:ModArray]] Last update: 0.9.9.5 -> [[Modding:modarray]]<br />
*[[Modding:Affects]] Last update: 0.9.9.6 -> [[Modding:affect]]<br />
*[[Modding:Coord]] Last update: 0.9.9.5 -> [[Modding:coord_API]] and [[Modding:coord_object]] OR just [[Modding:coord]]<br />
*[[Modding:Area]] Last update: 0.9.9.5 -> [[Modding:area_API]] and [[Modding:area_object]] OR just [[Modding:area]]<br />
*[[Modding:UI]] Last update: 0.9.9.6 -> [[Modding:ui]]<br />
*[[Modding:Statistics]] Last update: 0.9.9.6 -> [[Modding:statistics]]<br />
*[[Modding:Medal]] Last update: 0.9.9.5 -> [[Modding:medal]]<br />
<br />
=== Pages Needed ===<br />
<br />
*[[Modding:ai]]<br />
*[[Modding:award]]<br />
*[[Modding:badge]]<br />
*[[Modding:challenge]] (Despite not being useful for modders yet)<br />
*[[Modding:command]]<br />
*[[Modding:core]]<br />
*[[Modding:rankexp]] (Also despite not being useful for modders yet)<br />
*[[Modding:rankskill]] (Again, also despite not being useful for modders yet)<br />
*[[Modding:trait]]<br />
<br />
*[[Modding:player_object]]<br />
*[[Modding:blueprint_blueprint]]<br />
<br />
=== Pages With Unknown Status ===<br />
<br />
*[[Modding:sID]] Last update: 0.9.9.7</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:generator_APIModding:generator API2013-04-25T22:04:28Z<p>Yaflhdztioxo: moved Modding:Generator API to Modding:generator API</p>
<hr />
<div>''This page is currently under construction.''<br />
<br />
The generator holds all of the ever-present functions used to create the random maps in DoomRL. It also contains a variety of helper functions, many of them useful if not vital to the creation of intricate and meticulous game design.<br />
<br />
== API ==<br />
<br />
Please note that the type "integer" indicates an numeric value without a decimal part. It does not indicate the range of acceptable values.<br />
<br />
The argument type "CellID" may be the numeric or string ID of a cell.<br />
<br />
The argument type "CellSet" may be the numeric ID, string ID, or a list of numeric and/or string IDs.<br />
<br />
The argument type "Flags" expects a list of [[Modding:Constants|flag constants]] of the indicated type. <br />
<br />
An argument name in [square brackets] is an optional one. The function description will indicate how the function operates if it is omitted.<br />
<br />
=== Generator API Function List ===<br />
<br />
{|class="wikitable" style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
! colspan="2" style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Generator Interface - Functions'''<br />
{{Table2Col<br />
|es=background: #333; <br />
|c1=font-weight:bold; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=padding:0px 2px;<br />
||'''[[#Basic Cell Handling Functions|Basic Cell Handling Functions]]'''<br />
|{{modarg|integer}}|{{moddef|list|get_cell|dot||Coord|loc}}<br />
|{{modarg|string}}|{{moddef|list|get_cell_id|dot||Coord|loc}}<br />
|{{modarg|integer}}|{{moddef|list|fast_get_cell|dot||integer|x|integer|y}}<br />
|{{modarg|void}}|{{moddef|list|set_cell|dot||Coord|loc|CellID|what}}<br />
|{{modarg|void}}|{{moddef|list|fast_set_cell|dot||integer|x|integer|y|integer|what}}<br />
||'''[[#Map Checking Functions|Map Checking Functions]]'''<br />
|{{modarg|integer}}|{{moddef|list|around|dot||Coord|where|CellSet|what}}<br />
|{{modarg|integer}}|{{moddef|list|cross_around|dot||Coord|where|CellSet|what}}<br />
|{{modarg|boolean}}|{{moddef|list|is_empty|dot||Coord|where|Flags|reqs}}<br />
|{{modarg|boolean}}|{{moddef|list|is_empty_area|dot||Area|where|Flags|reqs}} <br />
|{{modarg|boolean}}|{{moddef|list|scan|dot||Area|where|CellID|good}}<br />
||'''[[#Map Searching Functions|Map Searching Functions]]'''<br />
|{{modarg|Coord}}|{{moddef|list|drop_coord|dot||Coord|where|Flags|reqs}}<br />
|{{modarg|Coord}}|{{moddef|list|find_coord|dot||CellSet|what|Area|[where]}}<br />
|{{modarg|Coord}}|{{moddef|list|random_coord|dot||Area|[where]}}<br />
|{{modarg|Coord}}|{{moddef|list|find_random_coord|dot||CellSet|what|Area|[where]}}<br />
|{{modarg|Coord}}|{{moddef|list|find_empty_coord|dot||CellSet|what|Flags|reqs|Area|[where]}}<br />
|{{modarg|Coord}}|{{moddef|list|random_empty_coord|dot||Flags|reqs|Area|[where]}}<br />
|{{modarg|Coord}}|{{moddef|list|find_random_empty_coord|dot||CellSet|what|Flags|reqs|Area|[where]}}<br />
|{{modarg|Coord}}|{{moddef|list|safe_empty_coord|dot||Area|[where]}}<br />
|{{modarg|Coord}}|{{moddef|list|standard_empty_coord|dot}}<br />
||'''[[#Advanced Cell Handling Functions|Advanced Cell Handling Functions]]'''<br />
|{{modarg|void}}|{{moddef|list|fill|dot||CellID|what|Area|[where]}}<br />
|{{modarg|void}}|{{moddef|list|fill_pattern|dot||Area|where|boolean|horiz|Table|line1|Table|[line2]}}<br />
|{{modarg|void}}|{{moddef|list|fill_edges|dot||CellID|what}}<br />
|{{modarg|Table}}|{{moddef|list|each|dot||CellID|what|Area|[where]}}<br />
|{{modarg|void}}|{{moddef|list|set_blood|dot||Area|[where]|boolean|[value]|CellID|[what]}}<br />
|{{modarg|void}}|{{moddef|list|set_permanence|dot||Area|[where]|boolean|[value]|CellID|[what]}}<br />
|{{modarg|Table}}|{{moddef|list|cell_set|dot||CellSet|cells}}<br />
|{{modarg|void}}|{{moddef|list|restore_walls|dot||CellID|wallCell|boolean|keepFluids}}<br />
|{{modarg|void}}|{{moddef|list|plot_line|dot||Coord|where|boolean|horiz|CellID|cell|CellSet|block}}<br />
|{{modarg|void}}|{{moddef|list|plot_lines|dot||Coord|where|Area|larea|boolean|horiz|CellID|cell|CellSet|block}}<br />
|{{modarg|void}}|{{moddef|list|scatter|dot||Area|where|CellID|good|CellID|fill|integer|count}}<br />
|{{modarg|void}}|{{moddef|list|scatter_blood|dot||Area|where|CellID|[good]|integer|count}}<br />
|{{modarg|void}}|{{moddef|list|scatter_put|dot||Area|where|Table|translation|string|tile|CellID|good|integer|count}}<br />
|{{modarg|void}}|{{moddef|list|transmute|dot||CellID|to|CellSet|from|Area|[where]}}<br />
|{{modarg|void}}|{{moddef|list|transmute_marker|dot||Flag|marker|CellID|To|Area|[where]}}<br />
||'''[[#Tile Handling Functions|Tile Handling Functions]]'''<br />
|{{modarg|Table}}|{{moddef|list|create_translation|dot||Table|code}}<br />
|{{modarg|Tile}}|{{moddef|list|tile_new|dot||string|map|Table|translation}}<br />
|{{modarg|void}}|{{moddef|list|tile_place|dot||Coord|where|Tile|what}}<br />
|{{modarg|void}}|{{moddef|list|place_tile|dot||Table|translation|string|tile|integer|x|integer|y}}<br />
|{{modarg|void}}|{{moddef|list|place_dungen_tile|dot||Table|code|Tile|tile|Coord|where}}<br />
|{{modarg|void}}|{{moddef|list|place_symmetry_quad|dot||string|tile|Table|translation}}<br />
|{{modarg|void}}|{{moddef|list|place_proto_map|dot||Coord|where|string|proto_map|string|proto_key|Table|code}}<br />
||'''[[#Room Handling Functions|Room Handling Functions]]'''<br />
|{{modarg|void}}|{{moddef|list|add_room|dot||Area|room|string|[class]}}<br />
|{{modarg|void}}|{{moddef|list|add_rooms|dot}}<br />
|{{modarg|Room}}|{{moddef|list|get_room|dot||integer|min_size|integer|max_x|integer|max_y|integer|max_area|string|[class]}}<br />
|{{modarg|integer, integer}}|{{moddef|list|get_endpoints|dot||Coord|where|boolean|horiz|CellSet|what}}<br />
|{{modarg|void}}|{{moddef|list|handle_rooms|dot||integer|count|boolean|no_monsters}}<br />
||'''[[#Generation Algorithm Functions|Generation Algorithm Functions]]'''<br />
|{{modarg|void}}|{{moddef|list|run_drunkard_walk|dot||Area|where|Coord|start|integer|steps|CellID|fill|CellSet|[ignore]|boolean|[stop_at_edge]}}<br />
|{{modarg|void}}|{{moddef|list|drunkard_walks|dot||integer|amount|integer|steps|CellID|fill|CellSet|[ignore]|boolean|[stop_at_edge]|Area|[where]}}<br />
|{{modarg|void}}|{{moddef|list|contd_drunkard_walks|dot||integer|amount|integer|steps|CellID|fill|CellSet|edges1|CellSet|edges2|CellSet|[ignore]|boolean|[stop_at_edge]}}<br />
|{{modarg|void}}|{{moddef|list|warehouse_fill|dot||CellSet|fill|Area|where|integer|size|integer|count|integer|special_chance|CellSet|special}}<br />
|{{modarg|void}}|{{moddef|list|place_blob|dot||Coord|start|integer|size|CellID|cell}}<br />
||'''[[#Generator Helper Functions|Generator Helper Functions]]'''<br />
|{{modarg|<value>, <value>}}|{{moddef|list|roll_pair|dot||Table|list}}<br />
|{{modarg|integer}}|{{moddef|list|being_weight|dot}}<br />
|{{modarg|integer}}|{{moddef|list|item_amount|dot}}<br />
|{{modarg|void}}|{{moddef|list|horiz_river|dot||CellID|cell|integer|width|boolean|[bridge]}}<br />
|{{modarg|void}}|{{moddef|list|vert_river|dot||CellID|cell|integer|width|boolean|bridge|integer|position}}<br />
{{moddef|list|vert_river|dot||CellID|cell|integer|width|boolean|bridge|Coord|position}}<br />
|{{modarg|void}}|{{moddef|list|generate_rivers|dot||boolean|allow_horiz|boolean|allow_more}}<br />
|{{modarg|void}}|{{moddef|list|generate_fluids|dot||Area|[where]}}<br />
|{{modarg|void}}|{{moddef|list|generate_barrels|dot}}<br />
|{{modarg|void}}|{{moddef|list|generate_stairs|dot}}<br />
|{{modarg|void}}|{{moddef|list|generate_special_stairs|dot}}<br />
|{{modarg|void}}|{{moddef|list|place_player|dot}}<br />
|{{modarg|void}}|{{moddef|list|run|dot||Generator|gen}}<br />
|{{modarg|void}}|{{moddef|list|reset|dot}}<br />
||'''[[#Dungeon Generation Functions|Dungeon Generation Functions]]'''<br />
|{{modarg|void}}|{{moddef|list|generate_tiled|dot}}<br />
|{{modarg|void}}|{{moddef|list|maze_dungeon|dot||CellID|floor|CellID|wall|integer|granularity|integer|tries|integer|min_size|integer|max_size}}<br />
|{{modarg|void}}|{{moddef|list|generate_caves_dungeon|dot}}<br />
|{{modarg|void}}|{{moddef|list|generate_caves_2_dungeon|dot}}<br />
|{{modarg|void}}|{{moddef|list|generate_lava_dungeon|dot}}<br />
||'''[[#Event Handler Functions|Event Handler Functions]]'''<br />
|{{modarg|void}}|{{moddef|list|roll_event|dot}}<br />
|{{modarg|void}}|{{moddef|list|setup_flood_event|dot||integer|direction|integer|step|CellID|cell}}<br />
|{{modarg|void}}|{{moddef|list|setup_deadly_air_event|dot||integer|step}}<br />
|{{modarg|void}}|{{moddef|list|setup_explosion_event|dot||integer|step|integer|size|integer|dice|integer|[content]}}<br />
{{moddef|list|setup_explosion_event|dot||integer|step|Table|size|integer|dice|integer|[content]}}<br />
|{{modarg|void}}|{{moddef|list|setup_targeted_event|dot||integer|step}}<br />
|}}<br />
|}<br />
<br />
=== Basic Cell Handling Functions ===<br />
;{{moddef|desc|get_cell|dot|integer|Coord|loc}}<br />
Gets the Numeric ID (NID) of the [[Modding:Cell|cell]] at a given map position.<br />
:''loc'': The coordinates of the cell to get.<br />
:'''Returns''': The NID of the cell.<br />
----<br />
;{{moddef|desc|get_cell_id|dot|string|Coord|loc}}<br />
Gets the ID of the [[Modding:Cell|cell]] at a given map position.<br />
:''loc'': The coordinates of the cell to get.<br />
:'''Returns''': The string ID of the cell.<br />
----<br />
;{{moddef|desc|fast_get_cell|dot|integer|integer|x|integer|y}}<br />
Gets the Numeric ID (NID) of the [[Modding:Cell|cell]] at a given map position.<br />
:''x'': The X position of the cell to get.<br />
:''y'': The Y position of the cell to get.<br />
:'''Returns''': The NID of the cell.<br />
----<br />
;{{moddef|desc|set_cell|dot||Coord|loc|CellID|what}}<br />
Assigns a [[Modding:Cell|cell]] to a map position.<br />
:''loc'': The coordinates of the position to set.<br />
:''what'': The ID of the cell to assign to the position.<br />
----<br />
;{{moddef|desc|fast_set_cell|dot||integer|x|integer|y|integer|what}}<br />
Assigns a [[Modding:Cell|cell]] to a map position.<br />
:''x'': The X position of the cell to set.<br />
:''y'': The Y position of the cell to set.<br />
:''what'': The NID (string IDs not allowed) of the cell to assign to the position.<br />
----<br />
=== Map Checking Functions ===<br />
;{{moddef|desc|around|dot|integer|Coord|where|CellSet|what}}<br />
Checks the positions adjacent to a location (including diagonally adjacent) and returns the number of cells that match one of the indicated cell IDs.<br />
:''where'': The coordinate to check around. The coordinate sent in this way is not checked, only adjacent cells are.<br />
:''what'': The cell(s) to check for.<br />
:'''Returns''': The number of cells (from 0 to 8) that matched one of the ''what'' cell IDs.<br />
----<br />
;{{moddef|desc|cross_around|dot|integer|Coord|where|CellSet|what}}<br />
Checks the positions adjacent to a location (but not diagonally adjacent) and returns the number of cells that match one of the indicated cell IDs.<br />
:''where'': The coordinates to check around. The coordinate sent in this way is not checked, only adjacent cells are.<br />
:''what'': The cell(s) to check for.<br />
:'''Returns''': The number of cells (from 0 to 4) that matched one of the ''what'' cell IDs.<br />
----<br />
;{{moddef|desc|is_empty|dot|boolean|Coord|where|Flags|reqs}}<br />
Checks to see if the indicated cell is "empty", defining "empty" based on a list of criteria.<br />
:''where'': The position to check.<br />
:''reqs'': A list of EmptyFlags (named numeric constants that start with EF_) indicating which types of objects or properties the position cannot have. For example, if the flag EF_NOBEINGS is sent, the function only returns true if the map position does not contain a [[Modding:Being|being]]. See [[Modding:Constants#Empty_Flags]] for more information.<br />
:'''Returns''': ''True'' if the cell satisfies all of the conditions indicated in ''reqs'', ''False'' otherwise.<br />
----<br />
;{{moddef|desc|is_empty_area|dot|boolean|Area|where|Flags|reqs}}<br />
Checks to see if the indicated area is "empty", defining "empty" based on a list of criteria.<br />
:''where'': The area to check.<br />
:''reqs'': A list of EmptyFlags (named numeric constants that start with EF_) indicating which types of objects or properties the area cannot have. For example, if the flag EF_NOBEINGS is sent, the function only returns true if the area does not contain a [[Modding:Being|being]]. See [[Modding:Constants#Empty_Flags]] for more information.<br />
:'''Returns''': ''True'' if every cell in the area satisfies all of the conditions indicated in ''reqs'', ''False'' otherwise.<br />
----<br />
;{{moddef|desc|scan|dot|boolean|Area|where|CellID|good}}<br />
Checks to see if the entire area is filled with a certain cell.<br />
:''where'': The area to check.<br />
:''good'': The cell to look for.<br />
:'''Returns''': ''True'' if all cells in the area are ''good'', ''False'' otherwise.<br />
----<br />
=== Map Searching Functions ===<br />
;{{moddef|desc|drop_coord|dot|Coord|Coord|where|Flags|reqs}}<br />
Finds the nearest "empty" coordinate to a given coordinate, defining "empty" based on a list of criteria.<br />
:''where'': The coordinate to try. If this coordinate is "empty", this coordinate will be returned.<br />
:''reqs'': A list of EmptyFlags (named numeric constants that start with EF_) indicating which types of objects or properties the coordinate cannot have. For example, if the flag EF_NOBEINGS is sent, the function only returns a coordinate that does not contain a [[Modding:Being|being]]. See [[Modding:Constants#Empty_Flags]] for more information.<br />
:'''Returns''': The nearest coordinate the satisfies the criteria. If the supplied coordinate meets the criteria, that coordinate will be returned. If not a nearby, random, coordinate will be checked. <br />
----<br />
;{{moddef|desc|find_coord|dot|Coord|CellSet|what|Area|[where]}}<br />
Searches the map for the first coordinate containing one of the indicated cell IDs.<br />
:''what'': The cell(s) to search for.<br />
:''where'': ''Optional.'' The area to restrict the search to. If omitted, the coordinate can be picked from anywhere on the map.<br />
:'''Returns''': The coordinates of the first position that contains one of the ''what'' cell IDs. The map is checked row by row starting from the top, going from left to right across each row.<br />
----<br />
;{{moddef|desc|random_coord|dot|Coord|Area|[where]}}<br />
Searches for a random coordinate within the specified area.<br />
:''where'': ''Optional.'' The area to restrict the coordinate to. If omitted, the coordinate can be picked from anywhere on the map.<br />
:'''Returns''': A random coordinate.<br />
----<br />
;{{moddef|desc|find_random_coord|dot|Coord|CellSet|what|Area|[where]}}<br />
Searches for a random coordinate within the specified area that contains one of the specified cell IDs.<br />
:''what'': The cell(s) to search for.<br />
:''where'' : ''Optional.'' The area to restrict the search to. If omitted, the coordinate can be picked from anywhere on the map.<br />
:'''Returns''': A random coordinate that meets the supplied criteria.<br />
----<br />
;{{moddef|desc|find_empty_coord|dot|Coord|CellSet|what|Flags|reqs|Area|[where]}}<br />
Searches the map for the first "empty" coordinate containing one of the indicated cell IDs, defining "empty" based on a list of criteria.<br />
:''what'': The cell(s) to search for.<br />
:''reqs'': A list of EmptyFlags (named numeric constants that start with EF_) indicating which types of objects or properties the coordinate cannot have. For example, if the flag EF_NOBEINGS is sent, the function only returns a coordinate that does not contain a [[Modding:Being|being]]. See [[Modding:Constants#Empty_Flags]] for more information.<br />
:''where'': ''Optional.'' The area to restrict the search to. If omitted, the coordinate can be picked from anywhere on the map.<br />
:'''Returns''': The coordinates of the first position that meets the supplied criteria. The map is checked row by row starting from the top, going from left to right across each row.<br />
----<br />
;{{moddef|desc|random_empty_coord|dot|Coord|Flags|reqs|Area|[where]}}<br />
Searches the map for a random coordinate that is "empty", defining "empty" based on a list of criteria.<br />
:''reqs'': A list of EmptyFlags (named numeric constants that start with EF_) indicating which types of objects or properties the random coordinate cannot have. For example, if the flag EF_NOBEINGS is sent, the function only returns a coordinate that does not contain a [[Modding:Being|being]]. See [[Modding:Constants#Empty_Flags]] for more information.<br />
:''where'': ''Optional.'' The area to restrict the search to. If omitted, the coordinate can be picked from anywhere on the map.<br />
:'''Returns''': A random coordinate that meets the supplied criteria.<br />
----<br />
;{{moddef|desc|find_random_empty_coord|dot|Coord|CellSet|what|Flags|reqs|Area|[where]}}<br />
Searches the map for a random "empty" coordinate containing one of the indicated cell IDs, defining "empty" based on a list of criteria.<br />
:''what'': The cell(s) to search for.<br />
:''reqs'': A list of EmptyFlags (named numeric constants that start with EF_) indicating which types of objects or properties the random coordinate cannot have. For example, if the flag EF_NOBEINGS is sent, the function only returns a coordinate that does not contain a [[Modding:Being|being]]. See [[Modding:Constants#Empty_Flags]] for more information.<br />
:''where'': ''Optional.'' The area to restrict the search to. If omitted, the coordinate can be picked from anywhere on the map.<br />
:'''Returns''': A random coordinate that meets the supplied criteria.<br />
----<br />
;{{moddef|desc|random_square|dot|Coord|CellSet|what}}<br />
Searches for a random 3x3 area containing only specified cells.<br />
:''what'': The cell(s) to search for.<br />
:'''Returns''': The center coordinate of the random 3x3 area.<br />
----<br />
;{{moddef|desc|safe_empty_coord|dot|Coord|Area|[where]}}<br />
Searches for a random coordinate that meets certain predetermined criteria.<br />
<br />
The function will try to find a coordinate that does not contain a being, item, staircase, wall, harmful terrain, spawning restrictions (cells marked with LF_NOSPAWN), and is more than 5 spaces from the player (EF_NOBEINGS, EF_NOITEMS, EF_NOSTAIRS, EF_NOBLOCK, EF_NOHARM, EF_NOSPAWN, and EF_NOSAFE). If a valid space isn't found, the function will ignore distance from the player (EF_NOSAFE). If a valid space still can't be found, the function will ignore stairs and harmful terrain (EF_NOSTAIRS and EF_NOHARM).<br />
:''where'': ''Optional.'' The area to restrict the initial pass to. If a valid coordinate is not found within the area after ignoring stairs and harmful terrain, the search is restarted and expanded automatically to the entire map. If omitted, the entire map will be searched.<br />
:'''Returns''': A random coordinate that meets the criteria.<br />
----<br />
;{{moddef|desc|standard_empty_coord|dot|Coord}}<br />
Searches for a random coordinate that meets certain predetermined criteria.<br />
<br />
The function will search for a coordinate that does not contain a being, item, staircase, wall, harmful terrain, or spawning restrictions (EF_NOBEINGS, EF_NOITEMS, EF_NOSTAIRS, EF_NOBLOCK, EF_NOHARM, and EF_NOSPAWN).<br />
:'''Returns''': A random coordinate that meets the criteria.<br />
----<br />
=== Advanced Cell Handling Functions ===<br />
;{{moddef|desc|fill|dot||CellID|what|Area|[where]}}<br />
Fills an area of the map with a given cell.<br />
:''what'': The cell to fill with.<br />
:''where'': ''Optional.'' The area to fill with the cell. If omitted, the entire map will be filled.<br />
----<br />
;{{moddef|desc|fill_pattern|dot||Area|where|boolean|horiz|string|Table|line1|Table|[line2]}}<br />
Fills an area of the map with a pattern of cells.<br />
:''where'': The area to fill.<br />
:''horiz'': If ''True'', the pattern will fill each row left to right, then move to the next row down in the area. If ''False'', the pattern will fill each column top to bottom, then move to the next column right in the area. <br />
:''line1'': The pattern to fill with. If the pattern is shorter than the area size, the pattern will loop. The pattern does not restart at the end of a row or column.<br />
:''line2'': ''Optional.'' If given, each time the end of row (if ''horiz'' is ''True'') or column (if ''horiz'' is ''False'') is reached, the function will switch to filling with the other pattern. That is, the first row will use ''line1'' then the second will use ''line2'', then the third will use ''line1'' again, etc.<br />
----<br />
;{{moddef|desc|fill_edges|dot||CellID|what}}<br />
Fills the edges of the map with the given cell.<br />
:''what'': The cell to fill with.<br />
----<br />
;{{moddef|desc|each|dot|Table|CellID|what|Area|[where]}}<br />
Searches for a cell and returns a table containing every location it was found.<br />
:''what'': The cell to search for.<br />
:''where'': ''Optional.'' The area to restrict the search to.<br />
:'''Returns''': A table containing a list of [[Modding:Coord|Coord]] objects.<br />
----<br />
;{{moddef|desc|set_blood|dot||Area|[where]|boolean|[value]|CellID|[what]}}<br />
Adds blood to the map or removes blood from it.<br />
:''where'': ''Optional.'' The area to affect. If omitted, the entire map will selected.<br />
:''value'': ''Optional.'' ''True'' adds blood. ''False'' removes it. If omitted, the default is to add blood.<br />
:''what'': ''Optional.'' If provided, only locations containing the given cell are affected. If omitted, all cells in the area are affected.<br />
----<br />
;{{moddef|desc|set_permanence|dot||Area|[where]|boolean|[value]|CellID|[what]}}<br />
Makes cell permanent or removes their permanence.<br />
:''where'': ''Optional.'' The area to affect. If omitted, the entire map will be selected.<br />
:''value'': ''Optional.'' ''True'' adds permanence. ''False'' removes it. If omitted, the default is to add permanence.<br />
:''what'': ''Optional.'' If provided, only locations containing the given cell are affected. If omitted, wall cells (which includes crate cells) are affected.<br />
----<br />
;{{moddef|desc|cell_set|dot|Table|CellSet|cells}}<br />
Creates a cell group.<br />
:''cells'': A list of cells to add to the group.<br />
:'''Returns''': A cell group table.<br />
----<br />
;{{moddef|desc|restore_walls|dot||CellID|wallCell|boolean|keepFluids}}<br />
Fixes the edge walls of the map.<br />
:''wallCell'': The cell to fill the edge of the map with.<br />
:''keepFluids'': ''True'' to maintain any fluid tiles on the edge of the map. ''False'' to overwrite them.<br />
----<br />
;{{moddef|desc|plot_line|dot||Coord|where|boolean|horiz|CellID|cell|CellSet|block}}<br />
Splits an area into two at the indicated location.<br />
:''where'': The starting point.<br />
:''horiz'': ''True'' draws along the indicated X position of the ''where'' coordinate. ''False'' draws along the indicated Y position of the ''where'' coordinate.<br />
:''cell'': The cell that will be used to split the area.<br />
:''block'': The cell(s) that block the line plotting. The drawn line will stop before hitting a coordinate with one of these cells.<br />
----<br />
;{{moddef|desc|plot_lines|dot||Coord|where|Area|larea|boolean|horiz|CellID|cell|CellSet|block}}<br />
Splits an area into two at the indicated location.<br />
:''where'': The starting point.<br />
:''larea'': The boundaries of the line. The line will not extend past the edge of the area.<br />
:''horiz'': ''True'' draws along the indicated X position of the ''where'' coordinate. ''False'' draws along the indicated Y position of the ''where'' coordinate.<br />
:''cell'': The cell that will be used to split the area.<br />
:''block'': The cell(s) that block the line plotting. The drawn line will stop before hitting a coordinate with one of these cells.<br />
----<br />
;{{moddef|desc|scatter|dot||Area|where|CellID|good|CellID|fill|integer|count}}<br />
Randomly places a certain cell around the map.<br />
:''where'': The area to scatter the cell in.<br />
:''good'': Only this locations with this cell will be changed by the function.<br />
:''fill'': The cell to scatter around the area.<br />
:''count'': The number to attempt to place. If the chosen location is not ''good'', then it will not change it. The final number placed may be less than ''count'' (or even 0), but never more.<br />
----<br />
;{{moddef|desc|scatter_blood|dot||Area|where|CellID|[good]|integer|count}}<br />
Randomly adds blood in an area.<br />
:''where'': The area to scatter blood in.<br />
:''good'': ''Optional.'' If defined, only locations with this cell will have blood added. If omitted, any location my have blood added.<br />
:''count'': The number of attempts. On each attempt, a random cell in the area will be chosen to have blood added. The number of cell that will end up bloody may be less than ''count'' (or even 0), but never more.<br />
----<br />
;{{moddef|desc|scatter_put|dot||Area|where|Table|translation|string|tile|CellID|good|integer|count}}<br />
Randomly adds a specified tile (a defined arrangement of cells) around the map.<br />
:''where'': The area to scatter the tile in. The tiles will only be placed in locations entirely within the area.<br />
:''translation'': A table with to be used with the ''tile'' argument. Refer to this (will be linked soon) for more information.<br />
:''tile'': A multi-line string, one row of the tile per line, that lays out the arrangment of the cells. Refer to this (will be linked soon) for more information<br />
:''good'': Only locations with this cell will be valid for the tile placement. If any coordinates of the selected placement area are not ''good'', the tile will not be placed at that location.<br />
:''count'': The number of tiles to try to place. The placement will continue until this many have been placed, or 10,000 attempts have been made, whichever comes first.<br />
----<br />
;{{moddef|desc|transmute|dot||CellID|to|CellSet|from|Area|[where]}}<br />
Changes all of one cell on the map to another cell.<br />
:''to'': The cell that will replace the existing cells.<br />
:''from'': The cell(s) that will be replaced.<br />
:''where'': ''Optional.'' If specified, only cells in the area are changed. If omitted, the function will change cells across the entire map.<br />
----<br />
;{{moddef|desc|transmute_marker|dot||Flag|marker|CellID|To|Area|[where]}}<br />
Changes all positions on the map that have a specified LightFlag (a named constant starting with "LF", no underscore) to another cell.<br />
:''marker'': The LightFlag to check for. Only cells with this flag will be changed.<br />
:''to'': The cell that will replace the existing cells.<br />
:''where'': ''Optional.'' If specified, only cells in the area are changed. If omitted, the function will change cells across the entire map.<br />
----<br />
<br />
=== Tile Handling Functions ===<br />
;{{moddef|desc|create_translation|dot|Table|Table|code}}<br />
Parses a translation table. Refer to this (will be linked soon) for more information.<br />
:''code'': The translation table.<br />
:'''Returns''': A parsed translation table.<br />
----<br />
;{{moddef|desc|tile_new|dot|Tile|string|map|Table|translation}}<br />
Creates a new tile object.<br />
:''map'': A multi-line string containing the arrangement of the tile using the ''translation'' to convert the characters to cells. Refer to this (will be linked soon) for more information.<br />
:''translation'': A table with to be used with the ''map'' argument. Refer to this (will be linked soon) for more information.<br />
:'''Returns''': The new tile object.<br />
----<br />
;{{moddef|desc|tile_place|dot||Coord|where|Tile|what}}<br />
Places the cells of the tile on the map.<br />
:''where'': The coordinate that the upper-left of the tile should reside at.<br />
:''what'': The tile object that will be placed.<br />
----<br />
;{{moddef|desc|place_tile|dot||Table|translation|string|tile|integer|x|integer|y}}<br />
Combines the tile_new and tile_place functions together, by placing a tile using a string and translation table.<br />
:''translation'': A table with to be used with the ''tile'' argument. Refer to this (will be linked soon) for more information.<br />
:''tile'': A multi-line string containing the arrangement of the tile using the ''translation'' to convert the characters to cells. Refer to this (will be linked soon) for more information.<br />
:''x'': The X position that the tile will be placed at.<br />
:''y'': The Y position that the tile will be placed at.<br />
----<br />
;{{moddef|desc|place_dungen_tile|dot||Table|code|Tile|tile|Coord|where}}<br />
Places an entire tile, including beings and items in the translation, on the map.<br />
:''code'': The translation table. Refer to this (will be linked soon) for more information.<br />
:''tile'': A multi-line string containing the arrangement of the tile using the ''translation'' to convert the characters to cells and indicate the positions of the beings and items. Refer to this (will be linked soon) for more information.<br />
:''where'': The coordinate the tile will be placed at.<br />
----<br />
;{{moddef|desc|place_symmetry_quad|dot||string|tile|Table|translation}}<br />
Takes a tile object and places it in all four corners. The tile object should be setup for the upper left corner and will be mirrored to the other corners. The tiles are placed one space from the map edge.<br />
:''tile'': A multi-line string containing the arrangement of the tile using the ''translation'' to convert the characters to cells and indicate the positions of the beings and items. Refer to this (will be linked soon) for more information.<br />
:''translation'': The translation table. Refer to this (will be linked soon) for more information.<br />
----<br />
;{{moddef|desc|place_proto_map|dot||Coord|where|string|proto_map|string|proto_key|Table|code}}<br />
Creates a map using multiple tile sets.<br />
:''where'': The upper-left position of the map where the tiles will be layout from.<br />
:''proto_map'': A string indicating the arrangement of the different pieces of the map. e.g., "ABCD", will lay out 4 different tiles with A on the far left and D on the far right.<br />
:''proto_key'': A table containing, for each character in ''proto_map'', a table of the possible tiles for that section.<br />
:''code'': The translation table for all the tile possibilities. Refer to this (will be linked soon) for more information. All tiles use the same translation table.<br />
----<br />
<br />
=== Room Handling Functions ===<br />
;{{moddef|desc|add_room|dot||Area|room|string|[class]}}<br />
Marks an area that can become a special room.<br />
:''room'': The area of the room. This includes the walls.<br />
:''class'': ''Optional.'' A string used to denote which room generators can be used on this room. If omitted, the class used is "closed".<br />
----<br />
;{{moddef|desc|add_rooms|dot}}<br />
Finds all the areas that can be rooms on a map and adds them to the appropriate meta-map tables.<br />
----<br />
;{{moddef|desc|get_room|dot|Room|integer|min_size|integer|max_x|integer|max_y|integer|max_area|string|class}}<br />
Selects a room given certain criteria.<br />
:''min_size'': The smallest X and Y dimensions the room can be.<br />
:''max_x'': The maximum width of the room.<br />
:''max_y'': The maximum height of the room.<br />
:''max_area'': The largest area the room can be.<br />
:''class'': ''Optional.'' The string denoting which room classes are valid for this room generator. If omitted, "any" is used, which does not restrict the selection of rooms.<br />
----<br />
;{{moddef|desc|get_endpoints|dot|integer, integer|Coord|where|boolean|horiz|CellSet|what}}<br />
Finds the ends of a line of cells.<br />
:''where'': The starting coordinate.<br />
:''horiz'': ''True'' checks horizontally. ''False'' checks vertically.<br />
:''what'': The cell(s) that make up the line to check. The functions stops at the first cell '''not''' in this list.<br />
:'''Returns''': Two integers. If ''horiz'' is ''True'', these are the X positions the line stops at. If ''horiz'' is ''False'', these are the Y positions the line stops at.<br />
----<br />
;{{moddef|desc|handle_rooms|dot||integer|count|boolean|no_monsters}}<br />
Runs the rooms selection and setup process for a map.<br />
:''count'': The number of rooms to attempt to place.<br />
:''no_monsters'': ''True'' will exclude room generators that place monsters. ''False'' will not.<br />
----<br />
=== Generation Algorithm Functions ===<br />
;{{moddef|desc|run_drunkard_walk|dot||Area|where|Coord|start|integer|steps|CellID|fill|CellSet|[ignore]|boolean|[stop_at_edge]|Area|where}}<br />
Runs an algorithm that walks to random adjacent spaces.<br />
:''where'': The area that the algorithm will run in. If the algorithm tries to leave the area, it will stop early or will be pushed back in the area (''stop_at_edge'' will determine which of these happen).<br />
:''start'': The location the algorithm will begin at.<br />
:''steps'': The number of steps the algorithm will take. The number of spaces covered by the algorithm will be at most this number.<br />
:''fill'': The cell that will be placed at each location the algorithm hits.<br />
:''ignore'': ''Optional.'' If specified, the algorithm will not place the ''fill'' cell in any location that has one of the cell(s) specified. If omitted, no locations are ignored.<br />
:''stop_at_edge'': ''Optional.'' If ''True'', the algorithm will end early if it moves past the end of the area. If ''False'', the algorithm will clamp to the area (any moves to outside the area get moved back in the area). If omitted, the default is to clamp.<br />
----<br />
;{{moddef|desc|drunkard_walks|dot||integer|amount|integer|steps|CellID|fill|CellSet|[ignore]|boolean|[stop_at_edge]|Area|[where]}}<br />
Runs multiple "drunken walk" algorithms.<br />
:''amount'': The number of times to perform the algorithm.<br />
:''steps'': The number of steps each run of the algorithm will take. The number of spaces covered by the algorithm will be at most the ''amount'' times the number of ''steps''.<br />
:''fill'': The cell that will be placed at each location the algorithm hits.<br />
:''ignore'': ''Optional.'' If specified, the algorithm will not place the ''fill'' cell in any location that has one of the cell(s) specified. If omitted, no locations are ignored.<br />
:''stop_at_edge'': ''Optional.'' If ''True'', the algorithm will end early if it moves past the end of the area. If ''False'', the algorithm will clamp to the area (any moves to outside the area get moved back in the area). If omitted, the default is to clamp.<br />
:''where'': ''Optional.'' The area the algorithm will run in. If the algorithm tries to leave the area, it will stop early or will be pushed back in the area (''stop_at_edge'' will determine which of these happen). If omitted, the default is entire area minus the very edge.<br />
----<br />
;{{moddef|desc|contd_drunkard_walks|dot||integer|amount|integer|steps|CellID|fill|CellSet|edges1|CellSet|edges2|CellSet|[ignore]|boolean|[stop_at_edge]}}<br />
Runs multiple "drunken walk" algorithms starting at a space that doesn't have certain cells around it.<br />
:''amount'': The number of times to perform the algorithm.<br />
:''steps'': The number of steps each run of the algorithm will take. The number of spaces covered by the algorithm will be at most the ''amount'' times the number of ''steps''.<br />
:''fill'': The cell that will be placed at each location the algorithm hits.<br />
:''edges1'': The algorithm will not start on a space with a cell listed here next to it.<br />
:''edges2'': The algorithm will not start on a space with a cell listed here next to it.<br />
:''ignore'': ''Optional.'' If specified, the algorithm will not place the ''fill'' cell in any location that has one of the cell(s) specified. If omitted, no locations are ignored.<br />
:''stop_at_edge'': ''Optional.'' If ''True'', the algorithm will end early if it moves past the end of the area. If ''False'', the algorithm will clamp to the area (any moves to outside the area get moved back in the area). If omitted, the default is to clamp.<br />
----<br />
;{{moddef|desc|warehouse_fill|dot||CellID|fill|Area|where|integer|[size]|integer|[count]|integer|[special_chance]|CellID|[special]}}<br />
Fills an area with random squares of cells.<br />
:''fill'': The cell(s) to use for each square. If a list is given, one is chosen at random for each square.<br />
:''where'': The area to fill.<br />
:''size'': ''Optional.'' The size of the squares to use. If omitted, the default is 2.<br />
:''count'': ''Optional.'' The number of attempts. If omitted, the default is 50.<br />
:''special_chance'': ''Optional.'' A number indicating the probability of using a special list of cells to fill the square with instead of the ''fill'' list. The roll used for the chance is based on the ''size'' parameter. A number from 1 to (100 * ''size'') is chosen for each square and if the roll is less than the special_chance number, the ''special'' cell set is used to fill the square instead. If omitted, all squares will be filled from the ''fill'' set.<br />
:''special'': ''Optional.'' The list of cells to use if the special set is to be used, based on ''special_chance''. If omitted, all squares will be filled from the ''fill'' set.<br />
----<br />
;{{moddef|desc|place_blob|dot||Coord|start|integer|size|CellID|cell}}<br />
Fills an area by expanding to random edge coordinates.<br />
:''start'': The position to start the blob at.<br />
:''size'': The number of spaces to expand the blob to.<br />
:''cell'': The cell to fill the blob area with.<br />
----<br />
=== Generator Helper Functions ===<br />
;{{moddef|desc|roll_pair|dot|<value>, <value>|Table|list}}<br />
Takes a list of values of any type and returns two different values randomly from the list.<br />
:''list'': The list to choose from.<br />
:'''Returns''': Two different values. If the list only contains one choice, it will be returned, but only once.<br />
----<br />
;{{moddef|desc|being_weight|dot}}<br />
Gets the total danger level for the current dungeon level.<br />
'''Returns''': The danger level for the current dungeon level. This value is calcuated using the current difficulty and ''level.danger_level''.<br />
----<br />
;{{moddef|desc|item_amount|dot}}<br />
Gets the number of items to drop for the current dungeon level.<br />
'''Returns''': The number of items to drop for the current dungeon level.<br />
----<br />
;{{moddef|desc|horiz_river|dot||CellID|cell|integer|width|boolean|[bridge]}}<br />
Places a horizontal river on the map.<br />
:''cell'': The cell to use for the river. It does not have to be a fluid cell.<br />
:''width'': The width of the river.<br />
:''bridge'': ''Optional.'' If ''True'', a 2 space wide bridge will be placed at a random coordinate on the river. If ''False'', no bridge will be placed. If omitted, the default is to not place a bridge.<br />
----<br />
;{{moddef|desc|vert_river|dot||CellID|cell|integer|width|boolean|bridge|integer|[position]}}<br />
;{{moddef|desc|vert_river|dot||CellID|cell|integer|width|boolean|bridge|Coord|[position]}}<br />
Places a vertical river on the map.<br />
:''cell'': The cell to use for the river. It does not have to be a fluid cell.<br />
:''width'': The width of the river.<br />
:''bridge'': ''Optional.'' If ''True'', a 2 space wide bridge will be placed at a random coordinate on the river. If ''False'', no bridge will be placed. If omitted, the default is to not place a bridge.<br />
:: NOTE: Because of a bug, a bridge will always be placed on the river, even if this value is set to ''False'' or omitted.<br />
:''position'': A coordinate or an integer. If an integer is supplied, this is the X position of the river's left edge. If a coordinate is supplied, the river will start at this coordinate. If omitted, the river's left edge will be selected from between X = 19 to 58.<br />
----<br />
;{{moddef|desc|generate_rivers|dot||boolean|allow_horiz|boolean|allow_more}}<br />
Creates rivers based on normal DoomRL river generation.<br />
:''allow_horiz'': ''True'' allows horizontal rivers to be generated. ''False'' will prevent the generation of horizontal rivers.<br />
:''allow_more'': ''True'' allows multiple vertical rivers. ''False'' will prevent more than one vertical river from being placed.<br />
----<br />
;{{moddef|desc|generate_fluids|dot||Area|[where]}}<br />
Creates fluids based on normal DoomRL fluid generation.<br />
:''where'': ''Optional.'' The area to generate fluids in. If omitted, the area used will be the entire map minus the very edge.<br />
----<br />
;{{moddef|desc|generate_barrels|dot}}<br />
Creates barrels based on normal DoomRL barrel generation.<br />
----<br />
;{{moddef|desc|generate_stairs|dot}}<br />
Creates the normal staircase based on normal DoomRL stair generation.<br />
----<br />
;{{moddef|desc|generate_special_stairs|dot}}<br />
Creates the special staircase based on normal DoomRL special stair generation. Whether a special staircase is placed depends on the level.special_exit value.<br />
----<br />
;{{moddef|desc|place_player|dot}}<br />
Places the player on a random empty space.<br />
----<br />
;{{moddef|desc|run|dot||Generator|gen}}<br />
Runs a generator object. These are stored in the generators table.<br />
:''gen'': The generator object to run.<br />
----<br />
;{{moddef|desc|reset|dot}}<br />
Resets the map.<br />
----<br />
=== Dungeon Generation Functions ===<br />
;{{moddef|desc|generate_tiled|dot}}<br />
Creates a tiled dungeon, also known as a "normal" dungeon. This only creates the layout, it does not place beings, items, stairs, barrels, or the player.<br />
----<br />
;{{moddef|desc|maze_dungeon|dot||CellID|floor|CellID|wall|integer|granularity|integer|tries|integer|min_size|integer|max_size}}<br />
Creates a maze dungeon. This only creates the layout, it does not place beings, items, stairs, barrels, or the player.<br />
:''floor'': The cell to use for the floor of the maze.<br />
:''wall'': The cell to use for the wall of the maze.<br />
:''granularity'': This denotes the size of the maze's paths.<br />
:''tries'': Number of attempts to place a new wall in the maze.<br />
:''min_size'': The smallest possible size of a wall.<br />
:''max_size'': The largest possible size of a wall.<br />
----<br />
;{{moddef|desc|generate_caves_dungeon|dot}}<br />
Runs the generation script for the cave dungeon. This is an all inclusive function, it also places all beings and items.<br />
----<br />
;{{moddef|desc|generate_caves_2_dungeon|dot}}<br />
Runs the generation script for the cave-city dungeon. This is an all inclusive function, it also places all beings and items.<br />
----<br />
;{{moddef|desc|generate_lava_dungeon|dot}}<br />
Runs the generation script for the lava dungeon. This is an all inclusive function, it also places all beings and items.<br />
----<br />
=== Event Handler Functions ===<br />
;{{moddef|desc|roll_event|dot}}<br />
Picks an event from the events table and sets it up.<br />
----<br />
;{{moddef|desc|setup_flood_event|dot||integer|direction|integer|step|CellID|cell}}<br />
Runs the setup script for the flood event.<br />
:''direction'': Use 1 to flood from the left. Use -1 to flood from the right.<br />
:''step'': Number of turns (0.1 second intervals) between each flood step.<br />
:''cell'': The cell to flood with. This does not have to be a fluid cell.<br />
----<br />
;{{moddef|desc|setup_deadly_air_event|dot||integer|step}}<br />
Runs the setup script for the deadly air event.<br />
:''step'': Number of turns between each "chill" (loss of HP).<br />
----<br />
;{{moddef|desc|setup_explosion_event|dot||integer|step|integer|size|integer|dice|integer|[content]}}<br />
;{{moddef|desc|setup_explosion_event|dot||integer|step|Table|size|integer|dice|integer|[content]}}<br />
Runs the setup script for the explosion event.<br />
:''step'': Number of turns between each explosion.<br />
:''size'': Either a number or a table of two numbers. Indicates the size of each explosion. If a table is supplied, the size is randomly chosen between the range supplied each time an explosion is created.<br />
:''dice'': Number of d6 dice to use for the damage roll.<br />
:''content'': ''Optional.'' The content to place in any space where the damage to a space is more than 20 points. If omitted, nothing will placed.<br />
----<br />
;{{moddef|desc|setup_targeted_event|dot||integer|step}}<br />
Runs the setup script for the targeting event.<br />
:''step'': Number of turns between each monster teleport.<br />
----</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:Generator_APIModding:Generator API2013-04-25T22:04:28Z<p>Yaflhdztioxo: moved Modding:Generator API to Modding:generator API</p>
<hr />
<div>#REDIRECT [[Modding:generator API]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:player_(0.9.9.7)Modding:player (0.9.9.7)2013-04-22T02:07:04Z<p>Yaflhdztioxo: </p>
<hr />
<div>Within the context of modding the 'player' can refer to:<br />
<br />
* The [[Modding:player_API (0.9.9.7)|player API]], a set of functions which can be used to manipulate player specific content during gameplay.<br />
* The [[Modding:player_object (0.9.9.7)|player object]], a singleton that inherits from [[Modding:being|being]] and which represents you, the player, in-game as a standard, alterable object.<br />
<br />
<br />
These pages will be split our from the 0996 data soon.<br />
Original 0996 below<br />
------<br />
<br />
The player. AKA you. Runs around half-cocked, blows shit up. The player is a [[Modding:Being|Being]] and a [[Modding:Thing|Thing]], but there are also a few properties and functions that are specific to the player. The player is created from the "soldier" being prototype. In lua, there is a global variable called player that holds a reference to the player.<br />
<br />
== Properties ==<br />
The player also has all [[Modding:Being#Properties|being properties]] and [[Modding:Thing#Properties|thing properties]].<br />
<br />
{|class="wikitable" style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
! colspan="3" style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Player'''<br />
{{Table3Col<br />
|es=background: #333;<br />
|c1=font-weight:bold; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=vertical-align:top; padding:0px 2px;<br />
|c3=padding:0px 2px;<br />
|'''Boolean'''|running|This is true when the player is [[Tactics|running]]. Setting this to false will make the player tired.<br />
|'''Boolean'''|tired|This true when the player is [[Tactics|tired]]. Setting this to false will restore the player to cautious.<br />
|'''Word'''|runningtime|This is the number of actions the player has until his running tactic expires.<br />
|'''LongInt'''|exp|This is the player's current [[experience]] total. Increasing this value directly won't cause the player to gain a level.<br />
|'''Byte'''|explevel|This is the player's level. Changing it won't remove traits or trigger level ups. Lowering it can allow the player to achieve lower levels again.<br />
|[[Modding:Klass|Klass ID]]|klass|This is the numeric id of the player's class.<br />
|'''Word'''|nuketime|This is the number of 0.1s intervals remaining until a [[Thermonuclear bomb|nuclear explosion]] occurs. Setting this to 0 will halt the current countdown.<br />
|'''Real'''|expfactor|All of the player's experience gains are multiplied by this factor. This is normally set based on the difficulty level.<br />
|'''string'''|killedby|This is the string that indicates how the player was killed (but not where). This is automatically set by the engine at the beginning of mortem output. This property is read-only.<br />
|[[Modding:Rank|Skill Rank ID]]|skillrank|This is the numeric id of the player's current skill rank. This property is read-only.<br />
|[[Modding:Rank|Exp Rank ID]]|exprank|This is the numeric id of the player's current exp rank. This property is read-only.<br />
|'''LongInt'''|score|This is the player's current score. This property is read-only.<br />
|'''Byte'''|depth|This is the level of the dungeon that the player is currently on. (Level generation should usually ignore this, instead using the [[Modding:Level]] values.) This property is read-only.<br />
|}}<br />
|}<br />
<br />
== API ==<br />
The player can also use the [[Modding:Being#API|being API]] and [[Modding:Thing#API|thing API]].<br />
<br />
{|class="wikitable" style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
! colspan="2" style="background: darkred; color: yellow; font-size: 120%; text-align: center"|Player Inferface<br />
{{Table2Col<br />
|es=background: #333;<br />
|c1=font-weight:bold; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=padding:0px 2px;<br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_set_affect|set_affect]]([[Modding:Affect|Affect ID]] affect, '''integer''' duration) <br />
|'''boolean'''|[[Modding:Player|Player]]&#058;[[#player_is_affect|is_affect]]([[Modding:Affect|Affect ID]] affect) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_add_exp|add_exp]]('''integer''' exp) <br />
|'''boolean'''|[[Modding:Player|Player]]&#058;[[#player_has_won|has_won]]() <br />
|'''integer'''|[[Modding:Player|Player]]&#058;[[#player_get_trait|get_trait]]([[Modding:Trait|Trait ID]] trait) <br />
|'''string'''|[[Modding:Player|Player]]&#058;[[#player_get_trait_hist|get_trait_hist]]() <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_power_backpack|power_backpack]]() <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_win|win]]() <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_choose_trait|choose_trait]]() <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_level_up|level_up]]() <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_exit|exit]]('''integer''' level) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_exit|exit]]([[Modding:Level|Level ID]] level) <br />
|'''boolean'''|[[Modding:Player|Player]]&#058;[[#player_record_badge|record_badge]]([[Modding:Badge|Badge ID]] id) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_quick_weapon|quick_weapon]]([[Modding:Item|Item ID]] id) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_set_inv_size|set_inv_size]]('''integer''' size) <br />
|'''boolean'''|[[Modding:Player|Player]]&#058;[[#player_found_item|found_item]]([[Modding:Item|Item ID]] id) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_assembled_item|assembled_item]]([[Modding:ModArray|ModArray ID]] id) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_mortem_print|mortem_print]]('''string''' mortemtext) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_add_medal|add_medal]]([[Modding:Medal|Medal ID]] medal) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_remove_medal|remove_medal]]([[Modding:Medal|Medal ID]] medal) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_remove_medals|remove_medals]]([[Modding:Medal|Medal ID]] '''list''' medallist) <br />
|'''boolean'''|[[Modding:Player|Player]]&#058;[[#player_has_medal|has_medal]]([[Modding:Medal|Medal ID]] medal) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_add_badge|add_badge]]([[Modding:Badge|Badge ID]] badge) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_remove_badge|remove_badge]]([[Modding:Badge|Badge ID]] badge) <br />
|'''boolean'''|[[Modding:Player|Player]]&#058;[[#player_has_badge|has_badge]]([[Modding:Badge|Badge ID]] badge) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_add_history|add_history]]('''string''' historytext) <br />
|}}<br />
|}<br />
<br />
{{Anchor|player_set_affect}}<br />
;[[Modding:Player|Player]]&#058;set_affect([[Modding:Affect|Affect ID]] affect, '''integer''' duration) <br />
:Adds ''duration'' actions to the appropriate affect timer. This will properly trigger affect activation hooks. <br />
----<br />
{{Anchor|player_is_affect}}<br />
;[[Modding:Player|Player]]&#058;is_affect([[Modding:Affect|Affect ID]] affect) &rarr; '''boolean'''<br />
:Determines if the given affect is currently active on the player.<br />
----<br />
{{Anchor|player_add_exp}}<br />
;[[Modding:Player|Player]]&#058;add_exp('''integer''' exp) <br />
:Adds the given amount of experience to the player. This can trigger level ups. (To avoid level ups, player.exp and player.explevel can be modified directly.) <br />
----<br />
{{Anchor|player_has_won}}<br />
;[[Modding:Player|Player]]&#058;has_won() &rarr; '''boolean'''<br />
:Determines if the player has won the game. Typically, this will only be true during mortem generation (if the player has indeed won).<br />
----<br />
{{Anchor|player_get_trait}}<br />
;[[Modding:Player|Player]]&#058;get_trait([[Modding:Trait|Trait ID]] trait) &rarr; '''integer'''<br />
:Counts the number of levels the player has in the given trait.<br />
----<br />
{{Anchor|player_get_trait_hist}}<br />
;[[Modding:Player|Player]]&#058;get_trait_hist() &rarr; '''string'''<br />
:Returns a string describing the player's previous trait selections as seen in the mortem.<br />
----<br />
{{Anchor|player_power_backpack}}<br />
;[[Modding:Player|Player]]&#058;power_backpack() <br />
:Adds the BF_BACKPACK flag to the player and then resorts the ammo in the player's inventory.<br />
----<br />
{{Anchor|player_win}}<br />
;[[Modding:Player|Player]]&#058;win() <br />
:Ends the game; the player is considered to have won the game for the purposes of player:has_won().<br />
----<br />
{{Anchor|player_choose_trait}}<br />
;[[Modding:Player|Player]]&#058;choose_trait() <br />
:Allows the player to pick a new trait (as if a level up had occured).<br />
----<br />
{{Anchor|player_level_up}}<br />
;[[Modding:Player|Player]]&#058;level_up() <br />
:Causes the player to level up. Experience is not affected. This is similar to player:choose_trait(), but level up events are triggered, and the player's explevel increases.<br />
----<br />
{{Anchor|player_exit}}<br />
;[[Modding:Player|Player]]&#058;exit('''integer''' level) <br />
:Causes the player to enter the dungeon level given by ''level''. With no argument, the player advances to the next level.<br />
----<br />
{{Anchor|player_exit}}<br />
;[[Modding:Player|Player]]&#058;exit([[Modding:Level|Level ID]] level) <br />
:Causes the player to enter the given special level.<br />
----<br />
{{Anchor|player_record_badge}}<br />
;[[Modding:Player|Player]]&#058;record_badge([[Modding:Badge|Badge ID]] id) &rarr; '''boolean'''<br />
:Adds the given badge to the player's profile. (Modules have either separate profiles or no profiles.) Returns false if there is no player profile, or if the player already had the badge.<br />
----<br />
{{Anchor|player_quick_weapon}}<br />
;[[Modding:Player|Player]]&#058;quick_weapon([[Modding:Item|Item ID]] id) <br />
:Causes the player to prepare a weapon of the given type as though pressing a quickkey. This is affected by BF_JUGGLER. ''id'' must be a string id.<br />
----<br />
{{Anchor|player_set_inv_size}}<br />
;[[Modding:Player|Player]]&#058;set_inv_size('''integer''' size) <br />
:Sets the player's inventory size. The new size can't be bigger than [[Modding:Constants#Maximums|MAX_INV_SIZE]], nor can it be 0. This doesn't do anything with items in the inventory that are already beyond the limit.<br />
----<br />
{{Anchor|player_found_item}}<br />
;[[Modding:Player|Player]]&#058;found_item([[Modding:Item|Item ID]] id) &rarr; '''boolean'''<br />
:Determines if the player has previously picked up an item with the given id.<br />
----<br />
{{Anchor|player_assembled_item}}<br />
;[[Modding:Player|Player]]&#058;assembled_item([[Modding:ModArray|ModArray ID]] id) <br />
:Adds the given assembly to the player's list of assemblies that have been created in the current game. If there is a profile, the assembly will be added there as well.<br />
----<br />
{{Anchor|player_mortem_print}}<br />
;[[Modding:Player|Player]]&#058;mortem_print('''string''' mortemtext) <br />
:This can only be called while the mortem is being generated. It adds the given line of text to the player's mortem.<br />
----<br />
{{Anchor|player_add_medal}}<br />
;[[Modding:Player|Player]]&#058;add_medal([[Modding:Medal|Medal ID]] medal) <br />
:Adds the given medal to the list of medals the player has achieved in the current game.<br />
----<br />
{{Anchor|player_remove_medal}}<br />
;[[Modding:Player|Player]]&#058;remove_medal([[Modding:Medal|Medal ID]] medal) <br />
:Removes the given medal from the list of medals the player has achieved in the current game.<br />
----<br />
{{Anchor|player_remove_medals}}<br />
;[[Modding:Player|Player]]&#058;remove_medals([[Modding:Medal|Medal ID]] '''list''' medallist) <br />
:This removes all the medals in ''medallist'' from the medals that the player has achieved in the current game. Calling this with nil equates to calling it with the empty list.<br />
----<br />
{{Anchor|player_has_medal}}<br />
;[[Modding:Player|Player]]&#058;has_medal([[Modding:Medal|Medal ID]] medal) &rarr; '''boolean'''<br />
:Determines if the player has achieved the given medal in the current game.<br />
----<br />
{{Anchor|player_add_badge}}<br />
;[[Modding:Player|Player]]&#058;add_badge([[Modding:Badge|Badge ID]] badge) <br />
:Adds the given badge to the list of badges the player has achieved in the current game.<br />
----<br />
{{Anchor|player_remove_badge}}<br />
;[[Modding:Player|Player]]&#058;remove_badge([[Modding:Badge|Badge ID]] badge) <br />
:Removes the given badge from the list of badges the player has achieved in the current game.<br />
----<br />
{{Anchor|player_has_badge}}<br />
;[[Modding:Player|Player]]&#058;has_badge([[Modding:Badge|Badge ID]] badge) &rarr; '''boolean'''<br />
:Determines if the player has achieved the given badge in the current game.<br />
----<br />
{{Anchor|player_add_history}}<br />
;[[Modding:Player|Player]]&#058;add_history('''string''' historytext) <br />
:Adds the given line to the history section of the mortem. Unlike print_mortem, this can be done while the game is still ongoing. (The default mortem handler prints the history section, but a custom handler might not.)</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:playerModding:player2013-04-22T02:02:49Z<p>Yaflhdztioxo: Redirected page to Modding:player (0.9.9.7)</p>
<hr />
<div>#REDIRECT [[Modding:player (0.9.9.7)]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:player_(0.9.9.7)Modding:player (0.9.9.7)2013-04-22T02:02:30Z<p>Yaflhdztioxo: moved Modding:Player to Modding:player (0.9.9.7)</p>
<hr />
<div>The player. AKA you. Runs around half-cocked, blows shit up. The player is a [[Modding:Being|Being]] and a [[Modding:Thing|Thing]], but there are also a few properties and functions that are specific to the player. The player is created from the "soldier" being prototype. In lua, there is a global variable called player that holds a reference to the player.<br />
<br />
== Properties ==<br />
The player also has all [[Modding:Being#Properties|being properties]] and [[Modding:Thing#Properties|thing properties]].<br />
<br />
{|class="wikitable" style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
! colspan="3" style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Player'''<br />
{{Table3Col<br />
|es=background: #333;<br />
|c1=font-weight:bold; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=vertical-align:top; padding:0px 2px;<br />
|c3=padding:0px 2px;<br />
|'''Boolean'''|running|This is true when the player is [[Tactics|running]]. Setting this to false will make the player tired.<br />
|'''Boolean'''|tired|This true when the player is [[Tactics|tired]]. Setting this to false will restore the player to cautious.<br />
|'''Word'''|runningtime|This is the number of actions the player has until his running tactic expires.<br />
|'''LongInt'''|exp|This is the player's current [[experience]] total. Increasing this value directly won't cause the player to gain a level.<br />
|'''Byte'''|explevel|This is the player's level. Changing it won't remove traits or trigger level ups. Lowering it can allow the player to achieve lower levels again.<br />
|[[Modding:Klass|Klass ID]]|klass|This is the numeric id of the player's class.<br />
|'''Word'''|nuketime|This is the number of 0.1s intervals remaining until a [[Thermonuclear bomb|nuclear explosion]] occurs. Setting this to 0 will halt the current countdown.<br />
|'''Real'''|expfactor|All of the player's experience gains are multiplied by this factor. This is normally set based on the difficulty level.<br />
|'''string'''|killedby|This is the string that indicates how the player was killed (but not where). This is automatically set by the engine at the beginning of mortem output. This property is read-only.<br />
|[[Modding:Rank|Skill Rank ID]]|skillrank|This is the numeric id of the player's current skill rank. This property is read-only.<br />
|[[Modding:Rank|Exp Rank ID]]|exprank|This is the numeric id of the player's current exp rank. This property is read-only.<br />
|'''LongInt'''|score|This is the player's current score. This property is read-only.<br />
|'''Byte'''|depth|This is the level of the dungeon that the player is currently on. (Level generation should usually ignore this, instead using the [[Modding:Level]] values.) This property is read-only.<br />
|}}<br />
|}<br />
<br />
== API ==<br />
The player can also use the [[Modding:Being#API|being API]] and [[Modding:Thing#API|thing API]].<br />
<br />
{|class="wikitable" style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
! colspan="2" style="background: darkred; color: yellow; font-size: 120%; text-align: center"|Player Inferface<br />
{{Table2Col<br />
|es=background: #333;<br />
|c1=font-weight:bold; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=padding:0px 2px;<br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_set_affect|set_affect]]([[Modding:Affect|Affect ID]] affect, '''integer''' duration) <br />
|'''boolean'''|[[Modding:Player|Player]]&#058;[[#player_is_affect|is_affect]]([[Modding:Affect|Affect ID]] affect) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_add_exp|add_exp]]('''integer''' exp) <br />
|'''boolean'''|[[Modding:Player|Player]]&#058;[[#player_has_won|has_won]]() <br />
|'''integer'''|[[Modding:Player|Player]]&#058;[[#player_get_trait|get_trait]]([[Modding:Trait|Trait ID]] trait) <br />
|'''string'''|[[Modding:Player|Player]]&#058;[[#player_get_trait_hist|get_trait_hist]]() <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_power_backpack|power_backpack]]() <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_win|win]]() <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_choose_trait|choose_trait]]() <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_level_up|level_up]]() <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_exit|exit]]('''integer''' level) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_exit|exit]]([[Modding:Level|Level ID]] level) <br />
|'''boolean'''|[[Modding:Player|Player]]&#058;[[#player_record_badge|record_badge]]([[Modding:Badge|Badge ID]] id) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_quick_weapon|quick_weapon]]([[Modding:Item|Item ID]] id) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_set_inv_size|set_inv_size]]('''integer''' size) <br />
|'''boolean'''|[[Modding:Player|Player]]&#058;[[#player_found_item|found_item]]([[Modding:Item|Item ID]] id) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_assembled_item|assembled_item]]([[Modding:ModArray|ModArray ID]] id) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_mortem_print|mortem_print]]('''string''' mortemtext) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_add_medal|add_medal]]([[Modding:Medal|Medal ID]] medal) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_remove_medal|remove_medal]]([[Modding:Medal|Medal ID]] medal) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_remove_medals|remove_medals]]([[Modding:Medal|Medal ID]] '''list''' medallist) <br />
|'''boolean'''|[[Modding:Player|Player]]&#058;[[#player_has_medal|has_medal]]([[Modding:Medal|Medal ID]] medal) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_add_badge|add_badge]]([[Modding:Badge|Badge ID]] badge) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_remove_badge|remove_badge]]([[Modding:Badge|Badge ID]] badge) <br />
|'''boolean'''|[[Modding:Player|Player]]&#058;[[#player_has_badge|has_badge]]([[Modding:Badge|Badge ID]] badge) <br />
|'''void'''|[[Modding:Player|Player]]&#058;[[#player_add_history|add_history]]('''string''' historytext) <br />
|}}<br />
|}<br />
<br />
{{Anchor|player_set_affect}}<br />
;[[Modding:Player|Player]]&#058;set_affect([[Modding:Affect|Affect ID]] affect, '''integer''' duration) <br />
:Adds ''duration'' actions to the appropriate affect timer. This will properly trigger affect activation hooks. <br />
----<br />
{{Anchor|player_is_affect}}<br />
;[[Modding:Player|Player]]&#058;is_affect([[Modding:Affect|Affect ID]] affect) &rarr; '''boolean'''<br />
:Determines if the given affect is currently active on the player.<br />
----<br />
{{Anchor|player_add_exp}}<br />
;[[Modding:Player|Player]]&#058;add_exp('''integer''' exp) <br />
:Adds the given amount of experience to the player. This can trigger level ups. (To avoid level ups, player.exp and player.explevel can be modified directly.) <br />
----<br />
{{Anchor|player_has_won}}<br />
;[[Modding:Player|Player]]&#058;has_won() &rarr; '''boolean'''<br />
:Determines if the player has won the game. Typically, this will only be true during mortem generation (if the player has indeed won).<br />
----<br />
{{Anchor|player_get_trait}}<br />
;[[Modding:Player|Player]]&#058;get_trait([[Modding:Trait|Trait ID]] trait) &rarr; '''integer'''<br />
:Counts the number of levels the player has in the given trait.<br />
----<br />
{{Anchor|player_get_trait_hist}}<br />
;[[Modding:Player|Player]]&#058;get_trait_hist() &rarr; '''string'''<br />
:Returns a string describing the player's previous trait selections as seen in the mortem.<br />
----<br />
{{Anchor|player_power_backpack}}<br />
;[[Modding:Player|Player]]&#058;power_backpack() <br />
:Adds the BF_BACKPACK flag to the player and then resorts the ammo in the player's inventory.<br />
----<br />
{{Anchor|player_win}}<br />
;[[Modding:Player|Player]]&#058;win() <br />
:Ends the game; the player is considered to have won the game for the purposes of player:has_won().<br />
----<br />
{{Anchor|player_choose_trait}}<br />
;[[Modding:Player|Player]]&#058;choose_trait() <br />
:Allows the player to pick a new trait (as if a level up had occured).<br />
----<br />
{{Anchor|player_level_up}}<br />
;[[Modding:Player|Player]]&#058;level_up() <br />
:Causes the player to level up. Experience is not affected. This is similar to player:choose_trait(), but level up events are triggered, and the player's explevel increases.<br />
----<br />
{{Anchor|player_exit}}<br />
;[[Modding:Player|Player]]&#058;exit('''integer''' level) <br />
:Causes the player to enter the dungeon level given by ''level''. With no argument, the player advances to the next level.<br />
----<br />
{{Anchor|player_exit}}<br />
;[[Modding:Player|Player]]&#058;exit([[Modding:Level|Level ID]] level) <br />
:Causes the player to enter the given special level.<br />
----<br />
{{Anchor|player_record_badge}}<br />
;[[Modding:Player|Player]]&#058;record_badge([[Modding:Badge|Badge ID]] id) &rarr; '''boolean'''<br />
:Adds the given badge to the player's profile. (Modules have either separate profiles or no profiles.) Returns false if there is no player profile, or if the player already had the badge.<br />
----<br />
{{Anchor|player_quick_weapon}}<br />
;[[Modding:Player|Player]]&#058;quick_weapon([[Modding:Item|Item ID]] id) <br />
:Causes the player to prepare a weapon of the given type as though pressing a quickkey. This is affected by BF_JUGGLER. ''id'' must be a string id.<br />
----<br />
{{Anchor|player_set_inv_size}}<br />
;[[Modding:Player|Player]]&#058;set_inv_size('''integer''' size) <br />
:Sets the player's inventory size. The new size can't be bigger than [[Modding:Constants#Maximums|MAX_INV_SIZE]], nor can it be 0. This doesn't do anything with items in the inventory that are already beyond the limit.<br />
----<br />
{{Anchor|player_found_item}}<br />
;[[Modding:Player|Player]]&#058;found_item([[Modding:Item|Item ID]] id) &rarr; '''boolean'''<br />
:Determines if the player has previously picked up an item with the given id.<br />
----<br />
{{Anchor|player_assembled_item}}<br />
;[[Modding:Player|Player]]&#058;assembled_item([[Modding:ModArray|ModArray ID]] id) <br />
:Adds the given assembly to the player's list of assemblies that have been created in the current game. If there is a profile, the assembly will be added there as well.<br />
----<br />
{{Anchor|player_mortem_print}}<br />
;[[Modding:Player|Player]]&#058;mortem_print('''string''' mortemtext) <br />
:This can only be called while the mortem is being generated. It adds the given line of text to the player's mortem.<br />
----<br />
{{Anchor|player_add_medal}}<br />
;[[Modding:Player|Player]]&#058;add_medal([[Modding:Medal|Medal ID]] medal) <br />
:Adds the given medal to the list of medals the player has achieved in the current game.<br />
----<br />
{{Anchor|player_remove_medal}}<br />
;[[Modding:Player|Player]]&#058;remove_medal([[Modding:Medal|Medal ID]] medal) <br />
:Removes the given medal from the list of medals the player has achieved in the current game.<br />
----<br />
{{Anchor|player_remove_medals}}<br />
;[[Modding:Player|Player]]&#058;remove_medals([[Modding:Medal|Medal ID]] '''list''' medallist) <br />
:This removes all the medals in ''medallist'' from the medals that the player has achieved in the current game. Calling this with nil equates to calling it with the empty list.<br />
----<br />
{{Anchor|player_has_medal}}<br />
;[[Modding:Player|Player]]&#058;has_medal([[Modding:Medal|Medal ID]] medal) &rarr; '''boolean'''<br />
:Determines if the player has achieved the given medal in the current game.<br />
----<br />
{{Anchor|player_add_badge}}<br />
;[[Modding:Player|Player]]&#058;add_badge([[Modding:Badge|Badge ID]] badge) <br />
:Adds the given badge to the list of badges the player has achieved in the current game.<br />
----<br />
{{Anchor|player_remove_badge}}<br />
;[[Modding:Player|Player]]&#058;remove_badge([[Modding:Badge|Badge ID]] badge) <br />
:Removes the given badge from the list of badges the player has achieved in the current game.<br />
----<br />
{{Anchor|player_has_badge}}<br />
;[[Modding:Player|Player]]&#058;has_badge([[Modding:Badge|Badge ID]] badge) &rarr; '''boolean'''<br />
:Determines if the player has achieved the given badge in the current game.<br />
----<br />
{{Anchor|player_add_history}}<br />
;[[Modding:Player|Player]]&#058;add_history('''string''' historytext) <br />
:Adds the given line to the history section of the mortem. Unlike print_mortem, this can be done while the game is still ongoing. (The default mortem handler prints the history section, but a custom handler might not.)</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:PlayerModding:Player2013-04-22T02:02:30Z<p>Yaflhdztioxo: moved Modding:Player to Modding:player (0.9.9.7)</p>
<hr />
<div>#REDIRECT [[Modding:player (0.9.9.7)]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:DocumentationModding:Documentation2013-04-22T02:01:58Z<p>Yaflhdztioxo: /* Main Objects */</p>
<hr />
<div>Players are allowed to load custom game content into the DoomRL engine using the Custom Game menu option. These packages (called modules, mods, or wads) of new content are created by various members of the DoomRL community; look for modules on the [http://forum.chaosforge.org/index.php/board,22.0.html modding forum].<br />
<br />
== Getting Started ==<br />
As of right now the best place to learn about modding DoomRL is to view the source code of current mods and, if you can't find what you need there, to ask for advice on the Chaosforge IRC channel, #chaosforge. Mods and their sources can be found in the modding section of the Chaosforge forums. IRC, if you are not familiar with it already, can be accessed quickly by using a free web based IRC client like the one found [http://en.irc2go.com/webchat/?net=QuakeNet&room=Chaosforge here]. Unfortunately BOTH sources are filled with obsolete information, as is this wiki. It will get better over time.<br />
<br />
Although currently very out of date there is a [[Modding:Tutorial|series of tutorials]] in place to help with some of the basics of modding (as well as some advanced tricks for more experienced modders). It is suggested that you read through these if you want to understand most of the documentation. If you want to learn only enough to build a quick map, head to the tutorial [[Modding:Tutorial/Constructing a Map|Constructing a Map]] for guidelines and an example.<br />
<br />
If you're just here to figure out how to play modules, it is a very simple process:<br />
<br />
*Download either a folder with the .module extension (this is a "raw" module) or a file with the .WAD extension.<br />
*Place the folder or file into your "modules" directory, located in your DoomRL folder.<br />
*Start DoomRL, then select the "Custom Game" option.<br />
*Select from any of the modules in the menu, at which point the normal game startup procedure will begin.<br />
<br />
== Documentation ==<br />
This section is documents the DoomRL modding system including the various objects and libraries available to modders.<br />
<br />
==== Modules ====<br />
<br />
* [[Modding:Module|Module]]<br />
<br />
==== Base Object ====<br />
<br />
* [[Modding:Thing|Thing]]<br />
<br />
==== Main Objects ====<br />
<br />
* [[Modding:Item|Items]]<br />
* [[Modding:Missile|Missiles]]<br />
* [[Modding:Cell|Cells]]<br />
* [[Modding:being|Beings]] ([[Modding:being blueprint|b]] [[Modding:being API|a]] [[Modding:being object|o]])<br />
* [[Modding:player|Player]] ([[Modding:player API|a]] [[Modding:player object|o]])<br />
* [[Modding:level|Levels]] ([[Modding:level blueprint|b]] [[Modding:level API|a]] [[Modding:level object|o]])<br />
<br />
==== Secondary Objects ====<br />
<br />
* [[Modding:ItemSet|Item Sets]]<br />
* [[Modding:ModArray|Assemblies]]<br />
* [[Modding:Affects|Affects]]<br />
* [[Modding:Generator|Generator]]<br />
* [[Modding:Coord|Coordinates]]<br />
* [[Modding:Area|Areas]]<br />
* [[Modding:AI|AI]]<br />
* [[Modding:UI|User Interface]]<br />
* [[Modding:Command|Commands]]<br />
<br />
==== Other ====<br />
<br />
* [[Modding:Core|Core]]<br />
* [[Modding:Functions|Functions]]<br />
* [[Modding:Kills|Kills]]<br />
* [[Modding:Statistics|Statistics]]<br />
* [[Modding:Badge|Badges]]<br />
* [[Modding:Medal|Medals]]<br />
* [[Modding:Traits|Traits]]<br />
* [[Modding:Challenges|Challenges]]<br />
* [[Modding:RankExp|Experience Ranks]]<br />
* [[Modding:RankSkill|Skill Ranks]]<br />
<br />
==== Constants ====<br />
<br />
* [[Modding:Constants|Constants]]<br />
* [[Modding:Constants#Flags|Flags]]<br />
* [[Modding:sID|Object IDs]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:being_object_(0.9.9.7)Modding:being object (0.9.9.7)2013-04-22T02:00:31Z<p>Yaflhdztioxo: </p>
<hr />
<div>All beings inherit from [[Modding:thing|thing]]. This means all '''thing''' properties can be accessed in addition to the below.<br />
<br />
== Properties ==<br />
{{drltable|Properties |3|{{Table3Col<br />
|es=background: #333;<br />
|c1=font-family:monospace; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=vertical-align:top; padding:0px 2px;<br />
|c3=padding:0px 2px;<br />
|<u>can_dual_reload</u>|{{modarg|boolean}}|This boolean's purpose is a mystery since a being's dual reload status can be determined without it.<br />
|hp |{{modarg|int}} |This is the being's current [[health]].<br />
|hpmax|{{modarg|word}}|This is the being's maximum [[health]].<br />
|hpnom|{{modarg|word}}|This is the being's normal [[health]]. It is used to scale the [[Ironman]] bonus in the [[Angel of Humanity]] challenge.<br />
|vision|{{modarg|byte}} |This is the being's vision radius. It is up to the being AI to respect this radius.<br />
|scount|{{modarg|longint}}|This is the being's speed count or energy. It counts up by the being's speed every 0.1s, and when it reaches 5000, the being gets to act. For details, see [[Time#Fractional Time|here]].<br />
|tohit |{{modarg|shortint}}|This [[accuracy]] modifier is applied to all of the being's attacks.<br />
|todam |{{modarg|shortint}}|This damage modifier is applied to all the being's melee attacks.<br />
|todamall |{{modarg|shortint}}|This damage modifier is applied to all the being's attacks.<br />
|tohitmelee|{{modarg|shortint}}|This accuracy modifier is applied to the being's melee attacks.<br />
|speed |{{modarg|byte}}|This is the rate at which the being's scount increases. It affects the speed of all actions.<br />
|armor |{{modarg|byte}}|This is the being's natural armor. It appears as [[protection]] against all attacks.<br />
|expvalue|{{modarg|word}}|This is the amount of [[experience]] that is awarded to the player when the being dies.<br />
|techbonus |{{modarg|shortint}}|This is the property used to implement [[Whizkid]]. It affects the number of mods that can be applied which in turn affects the level of assemblies that can be constructed.<br />
|pistolbonus|{{modarg|shortint}}|This is the property used to implement [[Son of a Gun]]. It affects pistol firing time and damage.<br />
|rapidbonus |{{modarg|shortint}}|This is the property used to implement [[Triggerhappy]]. Each point increases the number of shots fired by rapid-fire weapons by one.<br />
|bodybonus |{{modarg|shortint}}|This is one of the properties used to implement [[Badass]]. Each point reduces [[knockback]] by one.<br />
|dodgebonus |{{modarg|shortint}}|This is one of the properties used to implement [[Hellrunner]]. It increases the likelihood of dodging incoming attacks.<br />
|hpdecaymax |{{modarg|word}} |This is one of the properties used to implement [[Badass]]. It represents the threshold that kicks off health decay.<br />
|reloadtime|{{modarg|byte}}|This is the property used to implement [[Reloader]]. This is the percentage of normal reload time that the being takes to reload.<br />
|firetime |{{modarg|byte}}|This is the property used to implement [[Finesse]]. This is the percentage of normal fire time that the being takes to fire.<br />
|movetime |{{modarg|byte}}|This is one of the properties used to implement [[Hellrunner]]. This is the percentage of normal movement time that the being takes to move.<br />
|soundact |{{modarg|word}}|This is the being's .act sound.<br />
|soundhit |{{modarg|word}}|This is the being's .hit sound.<br />
|sounddie |{{modarg|word}}|This is the being's .die sound.<br />
|soundattack|{{modarg|word}}|This is the being's .attack sound.<br />
|soundmelee |{{modarg|word}}|This is the being's .melee sound.<br />
|soundhoof |{{modarg|word}}|This is the being's .hoof sound.<br />
|}}<br />
}}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:BeingModding:Being2013-04-22T01:06:36Z<p>Yaflhdztioxo: Redirected page to Modding:being (0.9.9.7)</p>
<hr />
<div>#REDIRECT [[Modding:being (0.9.9.7)]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:being_blueprint_(0.9.9.7)Modding:being blueprint (0.9.9.7)2013-04-22T01:03:26Z<p>Yaflhdztioxo: </p>
<hr />
<div>The being [[Modding:blueprint|blueprint]] is used to define new beings.<br />
<br />
== Blueprint ==<br />
<br />
Being blueprints are registered with the ''register_being'' procedure. Registered blueprints are stored in a global Lua table called ''beings''.<br />
<br />
{{drltable|Being Blueprint|3|{{Table3Col<br />
|es=background: #333;<br />
|c1=font-family:monospace; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=vertical-align:top; padding:0px 2px;<br />
|c3=padding:0px 2px;<br />
|id |{{modarg|string}}|The unique identifier used by the engine for this being. Passed as the first argument when registering a blueprint.<br />
|<u>name</u> |{{modarg|string}}|This is the being's name.<br />
|name_plural |{{modarg|string}}|This is the being's pluralized name. This defaults to the being's the name with an "s" appended.<br />
|sound_id |{{modarg|being}}|If included the being will search for sounds bound to this id instead of its own.<br />
|<u>ascii</u> |{{modarg|string}}|This is the being's picture in console mode. It should be a single character string.<br />
|<u>color</u> |{{modarg|Color}}|This is the being's color in console mode.<br />
|<u>sprite</u> |{{modarg|Sprite}}|This is the being's sprite in graphical mode.<br />
|coscolor |{{modarg|ColorSet}}|This is a graphical mode filter that can be used to add color to specific sprites.<br />
|glow |{{modarg|ColorSet}}|This is a graphical mode filter that can be used to give a sprite a colored glow.<br />
|overlay |{{modarg|ColorSet}}|This is a graphical mode filter that can be used to subtract color from any sprite.<br />
|hp |{{modarg|integer}}|This is the being's hpmax and starting hp. The default is 10.<br />
|armor |{{modarg|integer}}|This is the being's armor bonus. The default is 0.<br />
|attackchance |{{modarg|integer}}|This is the being's attackchance. The default is 75.<br />
|todam |{{modarg|integer}}|This is the being's todam bonus. The bonus applies only to melee attacks. The default is 0.<br />
|tohit |{{modarg|integer}}|This is the being's tohit bonus. The default is 0.<br />
|tohitmelee |{{modarg|integer}}|This is the being's tohitmelee bonus. The default is 0.<br />
|speed |{{modarg|integer}}|This is the being's speed. The maximum allowed speed is 255. The default is 100.<br />
|vision |{{modarg|integer}}|This is the being's vision bonus. The default is 0, meaning the same vision as the player.<br />
|<u>min_lev</u> |{{modarg|integer}}|This is a [[Monster Generation|monster generation]] parameter.<br />
|max_lev |{{modarg|integer}}|This is a [[Monster Generation|monster generation]] parameter. The default is 10000.<br />
|corpse |{{modarg|cell}}|The determines the corpse left by the being. Instead of passing in a cell directly you can pass a boolean ''true'' which will make the engine automatically create and assign an appropriate being corpse. You can also pass in ''false'' or leave this field blank to specify no corpse.<br />
|<u>danger</u> |{{modarg|integer}}|This is a [[Monster Generation|monster generation]] parameter.<br />
|<u>weight</u> |{{modarg|integer}}|This is a [[Monster Generation|monster generation]] parameter.<br />
|xp |{{modarg|integer}}|This is the being's expvalue. By default, it is <font-family: monospace>3xD<sup>2</sup>+20, where D is the being's <u>danger</u> value (above).<br />
|bulk |{{modarg|integer}}|This parameter is unused. The default is 100.<br />
|flags |{{modarg|Being Flag}}|This parameter is an array of being flags which will be used by all beings of this type by default.<br />
|<u>ai_type</u> |{{modarg|AI}}|This determines the being's AI.<br />
|res_bullet |{{modarg|integer}}|This is the being's resistance to bullet damage. The default is 0.<br />
|res_melee |{{modarg|integer}}|This is the being's resistance to melee damage. The default is 0.<br />
|res_shrapnel |{{modarg|integer}}|This is the being's resistance to shrapnel damage. The default is 0.<br />
|res_acid |{{modarg|integer}}|This is the being's resistance to acid damage. The default is 0.<br />
|res_fire |{{modarg|integer}}|This is the being's resistance to fire damage. The default is 0.<br />
|res_plasma |{{modarg|integer}}|This is the being's resistance to plasma damage. The default is 0.<br />
|<u>desc</u> |{{modarg|string}}|This is the description of the being displayed in the 'more information' view.<br />
|<u>kill_desc</u> |{{modarg|string}}|If included this being will have a special kill description in the mortem.<br />
|kill_desc_melee |{{modarg|string}}|If included this being will have a special melee kill description in the mortem.<br />
|weapon |{{modarg|Item Blueprint}}|You can inline an item blueprint here and it will be registered for you. Items defined this way are always natural ranged weapons that never drop and have no ammo. It will even be equippedly automatically for you.<br />
|OnCreate |{{modarg|function}}|<br />
|OnAction |{{modarg|function}}|<br />
|OnAttacked |{{modarg|function}}|<br />
|OnDie |{{modarg|function}}|<br />
|OnDieCheck |{{modarg|function}}|<br />
|OnPickupItem |{{modarg|function}}|<br />
|}}<br />
}}<br />
<br />
<br />
== Engine Hooks ==<br />
<br />
{{drltable|Being Hooks|2|{{Table2Col<br />
|es=background: #333;<br />
|c1=font-family:monospace; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=padding:0px 2px;<br />
|{{modarg|void}} |[[#being_OnCreate |OnCreate]] ({{modarg|being}} self)<br />
|{{modarg|void}} |[[#being_OnAction |OnAction]] ({{modarg|being}} self)<br />
|{{modarg|void}} |[[#being_OnAttacked |OnAttacked]] ({{modarg|being}} self)<br />
|{{modarg|void}} |[[#being_OnDie |OnDie]] ({{modarg|being}} self, {{modarg|boolean}} overkill)<br />
|{{modarg|boolean}}|[[#being_OnDieCheck |OnDieCheck]] ({{modarg|being}} self, {{modarg|boolean}} overkill)<br />
|{{modarg|void}} |[[#being_OnPickupItem|OnPickupItem]] ({{modarg|being}} self, {{modarg|item}} item)<br />
|}}<br />
}}<br />
<br />
<br />
{{Anchor|being_OnCreate}}<br />
'''OnCreate'''({{modarg|being}} self)<br />
:This is called when the being is created. Usually inventory and equipment get added here but many more adjustments are possible.<br />
----<br />
{{Anchor|being_OnAction}}<br />
'''OnAction'''({{modarg|being}} self)<br />
:This is called at the beginning of a being's turn. It is never called more than once per tick and the player, sadly, does not use this.<br />
----<br />
{{Anchor|being_OnAttacked}}<br />
'''OnAttacked'''({{modarg|being}} self)<br />
:This is called when a being is attacked and is usually only used by being AIs. It is not possible to determine the attacker.<br />
----<br />
{{Anchor|being_OnDie}}<br />
'''OnDie'''({{modarg|being}} self, {{modarg|boolean}} overkill)<br />
:This is called when the being dies. ''overkill'' is true if the being was gibbed.<br />
----<br />
{{Anchor|being_OnDieCheck}}<br />
'''OnDieCheck'''({{modarg|being}} self, {{modarg|boolean}} overkill) &rarr; '''boolean'''<br />
:This is called right before a being would normally die. Returning '''false''' will prevent the death, giving the being a minimum of 1 hp. ''overkill'' is true if the being was gibbed.<br />
----<br />
{{Anchor|being_OnPickupItem}}<br />
'''OnPickupItem'''({{modarg|being}} self, {{modarg|item}} item)<br />
:This is called when a being picks up an item. It is only used in DoomRL for statistical purposes.</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:Sprites_(0.9.9.7)Modding:Sprites (0.9.9.7)2013-04-22T00:12:06Z<p>Yaflhdztioxo: moved Modding:Sprites to Modding:Sprites (0.9.9.7)</p>
<hr />
<div>A sprite in DoomRL is comprised of three distinct components: a color spritesheet, a grayscale version for [[Modding:Color#Color Sets|coloring]], and a black and white version for outlining sans shadow. Very few sprites make use of all three.<br />
<br />
As of this version it is not possible for modders to directly edit sprites so there is no need to go into further detail. What is needed is a list of sprites that modders can use:<br />
<br />
== Player Sprites ==<br />
Player sprites have colorable armor and change based on wielded weapon. They are good sprites to use for player-like beings provided you manually handle the corpse.<br />
<br />
{{drltable|Player Sprites|1|{{Table1Col<br />
|es=background: #333;<br />
|c1=vertical-align:top; padding:0px 2px;<br />
|SPRITE_PLAYER<br />
|SPRITE_PLAYER_KNIFE<br />
|SPRITE_PLAYER_CHAINSAW<br />
|SPRITE_PLAYER_PISTOL<br />
|SPRITE_PLAYER_SHOTGUN<br />
|SPRITE_PLAYER_CSHOTGUN<br />
|SPRITE_PLAYER_DSHOTGUN<br />
|SPRITE_PLAYER_CHAINGUN<br />
|SPRITE_PLAYER_BAZOOKA<br />
|SPRITE_PLAYER_PLASMA<br />
|SPRITE_PLAYER_BFG9000<br />
|SPRITE_PLAYER_SPEAR<br />
|SPRITE_PLAYER_STAFF<br />
|SPRITE_PLAYER_CLEAVER<br />
|SPRITE_PLAYER_DRAGON<br />
|}}<br />
}}<br />
<br />
== Item Sprites ==<br />
Armor, non-steel boots, mod packs, skulls, and phase devices are colorable. Choice is otherwise limited.<br />
<br />
{{drltable|Item Sprites|1|{{Table1Col<br />
|es=background: #333;<br />
|c1=vertical-align:top; padding:0px 2px;<br />
|SPRITE_KNIFE<br />
|SPRITE_CHAINSAW<br />
|SPRITE_PISTOL<br />
|SPRITE_SHOTGUN<br />
|SPRITE_CSHOTGUN<br />
|SPRITE_DSHOTGUN<br />
|SPRITE_CHAINGUN<br />
|SPRITE_BAZOOKA<br />
|SPRITE_PLASMA<br />
|SPRITE_BFG9000<br />
|SPRITE_SPEAR<br />
|SPRITE_BFG10K<br />
|SPRITE_STAFF<br />
|SPRITE_CLEAVER<br />
|SPRITE_DRAGON<br />
|SPRITE_ARMOR<br />
|SPRITE_AARMOR<br />
|SPRITE_SBOOTS<br />
|SPRITE_BOOTS<br />
|SPRITE_MOD<br />
|SPRITE_SKULL<br />
|SPRITE_AMMO<br />
|SPRITE_PAMMO<br />
|SPRITE_SHELL<br />
|SPRITE_PSHELL<br />
|SPRITE_ROCKET<br />
|SPRITE_PROCKET<br />
|SPRITE_CELL<br />
|SPRITE_PCELL<br />
|SPRITE_PHASE<br />
|SPRITE_BACKPACK<br />
|SPRITE_ENVIRO<br />
|SPRITE_HGLOBE<br />
|SPRITE_LHGLOBE<br />
|SPRITE_SUPERCHARGE<br />
|SPRITE_INV<br />
|SPRITE_MEGASPHERE<br />
|SPRITE_SHARD<br />
|SPRITE_MEDPACK<br />
|SPRITE_LMEDPACK<br />
|SPRITE_BERSERK<br />
|SPRITE_MAP<br />
|SPRITE_TMAP<br />
|SPRITE_SCHEMATIC<br />
|SPRITE_LIGHTAMP<br />
|SPRITE_NUKE<br />
|SPRITE_LAVAINV<br />
|}}<br />
}}<br />
<br />
== Being Sprites ==<br />
NoCorpse sprites can be accessed by adding 16 to the parent being, except in the case of oversized sprites--those just add 2. Lost Souls, pain elementals, and agony elementals do not have corpse sprites. Both the cyberdemon and mastermind are oversized sprites.<br />
<br />
{{drltable|Being Sprites|1|{{Table1Col<br />
|es=background: #333;<br />
|c1=vertical-align:top; padding:0px 2px;<br />
|SPRITE_FORMER<br />
|SPRITE_SERGEANT<br />
|SPRITE_CAPTAIN<br />
|SPRITE_COMMANDO<br />
|SPRITE_IMP<br />
|SPRITE_DEMON<br />
|SPRITE_LOSTSOUL<br />
|SPRITE_CACODEMON<br />
|SPRITE_PAIN<br />
|SPRITE_KNIGHT<br />
|SPRITE_BARON<br />
|SPRITE_ARACHNO<br />
|SPRITE_ARCHVILE<br />
|SPRITE_REVENANT<br />
|SPRITE_MANCUBUS<br />
|SPRITE_BRUISER<br />
|SPRITE_AGONY<br />
|SPRITE_MASTER<br />
|SPRITE_LAVAELEM<br />
|SPRITE_ANGEL<br />
|SPRITE_SHAMBLER<br />
|SPRITE_JC<br />
|SPRITE_CYBERDEMON<br />
|SPRITE_MASTERMIND<br />
|}}<br />
}}<br />
<br />
== Cell Sprites ==<br />
Many cells have multiple sprite variants that, if you want to access separately will take some trial and error. Fluids are in a 2x2 square, walls are in a 3x15 vertical rectangle, floors are a 16x1 line, and most other multi-sprite cells are adjacent.<br />
Stairs, cave walls, brick walls, and the colored boxes are colorable.<br />
<br />
{{drltable|Cell Sprites|1|{{Table1Col<br />
|es=background: #333;<br />
|c1=vertical-align:top; padding:0px 2px;<br />
|SPRITE_DOOR<br />
|SPRITE_OPENDOOR<br />
|SPRITE_HELLDOOR<br />
|SPRITE_HELLOPENDOOR<br />
|SPRITE_BARREL<br />
|SPRITE_LAVABARREL<br />
|SPRITE_ACIDBARREL<br />
|SPRITE_TREE<br />
|SPRITE_GRAYSTAIRS<br />
|SPRITE_STAIRS<br />
|SPRITE_REDSTAIRS<br />
|SPRITE_PORTAL<br />
|SPRITE_TELEPORT<br />
|SPRITE_LEVER<br />
|SPRITE_BLOOD<br />
|SPRITE_BLOODPOOL<br />
|SPRITE_CORPSE<br />
|SPRITE_WALLBLOOD<br />
|SPRITE_FLOOR<br />
|SPRITE_CAVEFLOOR<br />
|SPRITE_HELLFLOOR<br />
|SPRITE_WALL<br />
|SPRITE_CAVEWALL<br />
|SPRITE_BRICKWALL<br />
|SPRITE_TECHWALL<br />
|SPRITE_BOSSWALL<br />
|SPRITE_WATER<br />
|SPRITE_ACID<br />
|SPRITE_LAVA<br />
|SPRITE_BRIDGE<br />
|SPRITE_YBOX<br />
|SPRITE_WBOX<br />
|SPRITE_YBOXC<br />
|SPRITE_WBOXC<br />
|}}<br />
}}<br />
<br />
== Missile Sprites ==<br />
There are only a few missile sprites. Color shots and acid shots are colorable.<br />
{{drltable|Missile Sprites|1|{{Table1Col<br />
|es=background: #333;<br />
|c1=vertical-align:top; padding:0px 2px;<br />
|SPRITE_SHOT<br />
|SPRITE_CSHOT<br />
|SPRITE_BLAST<br />
|SPRITE_ROCKETSHOT<br />
|SPRITE_EXPLOSION<br />
|SPRITE_PLASMASHOT<br />
|SPRITE_BFGSHOT<br />
|SPRITE_FIREBALL<br />
|SPRITE_PLASMABALL<br />
|SPRITE_ACIDSHOT<br />
|}}<br />
}}<br />
<br />
== Miscellaneous Sprites ==<br />
These last few sprites are special purpose graphics that may still be of use. The arrow, select, and mark sprites are colorable.<br />
{{drltable|Misc Sprites|1|{{Table1Col<br />
|es=background: #333;<br />
|c1=vertical-align:top; padding:0px 2px;<br />
|SPRITE_ARROW<br />
|SPRITE_SELECT<br />
|SPRITE_MARK<br />
|SPRITE_GRID<br />
|}}<br />
}}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:SpritesModding:Sprites2013-04-22T00:12:06Z<p>Yaflhdztioxo: moved Modding:Sprites to Modding:Sprites (0.9.9.7)</p>
<hr />
<div>#REDIRECT [[Modding:Sprites (0.9.9.7)]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:Sprites_(0.9.9.7)Modding:Sprites (0.9.9.7)2013-04-22T00:11:53Z<p>Yaflhdztioxo: Created page with "A sprite in DoomRL is comprised of three distinct components: a color spritesheet, a grayscale version for coloring, and a black and white version fo..."</p>
<hr />
<div>A sprite in DoomRL is comprised of three distinct components: a color spritesheet, a grayscale version for [[Modding:Color#Color Sets|coloring]], and a black and white version for outlining sans shadow. Very few sprites make use of all three.<br />
<br />
As of this version it is not possible for modders to directly edit sprites so there is no need to go into further detail. What is needed is a list of sprites that modders can use:<br />
<br />
== Player Sprites ==<br />
Player sprites have colorable armor and change based on wielded weapon. They are good sprites to use for player-like beings provided you manually handle the corpse.<br />
<br />
{{drltable|Player Sprites|1|{{Table1Col<br />
|es=background: #333;<br />
|c1=vertical-align:top; padding:0px 2px;<br />
|SPRITE_PLAYER<br />
|SPRITE_PLAYER_KNIFE<br />
|SPRITE_PLAYER_CHAINSAW<br />
|SPRITE_PLAYER_PISTOL<br />
|SPRITE_PLAYER_SHOTGUN<br />
|SPRITE_PLAYER_CSHOTGUN<br />
|SPRITE_PLAYER_DSHOTGUN<br />
|SPRITE_PLAYER_CHAINGUN<br />
|SPRITE_PLAYER_BAZOOKA<br />
|SPRITE_PLAYER_PLASMA<br />
|SPRITE_PLAYER_BFG9000<br />
|SPRITE_PLAYER_SPEAR<br />
|SPRITE_PLAYER_STAFF<br />
|SPRITE_PLAYER_CLEAVER<br />
|SPRITE_PLAYER_DRAGON<br />
|}}<br />
}}<br />
<br />
== Item Sprites ==<br />
Armor, non-steel boots, mod packs, skulls, and phase devices are colorable. Choice is otherwise limited.<br />
<br />
{{drltable|Item Sprites|1|{{Table1Col<br />
|es=background: #333;<br />
|c1=vertical-align:top; padding:0px 2px;<br />
|SPRITE_KNIFE<br />
|SPRITE_CHAINSAW<br />
|SPRITE_PISTOL<br />
|SPRITE_SHOTGUN<br />
|SPRITE_CSHOTGUN<br />
|SPRITE_DSHOTGUN<br />
|SPRITE_CHAINGUN<br />
|SPRITE_BAZOOKA<br />
|SPRITE_PLASMA<br />
|SPRITE_BFG9000<br />
|SPRITE_SPEAR<br />
|SPRITE_BFG10K<br />
|SPRITE_STAFF<br />
|SPRITE_CLEAVER<br />
|SPRITE_DRAGON<br />
|SPRITE_ARMOR<br />
|SPRITE_AARMOR<br />
|SPRITE_SBOOTS<br />
|SPRITE_BOOTS<br />
|SPRITE_MOD<br />
|SPRITE_SKULL<br />
|SPRITE_AMMO<br />
|SPRITE_PAMMO<br />
|SPRITE_SHELL<br />
|SPRITE_PSHELL<br />
|SPRITE_ROCKET<br />
|SPRITE_PROCKET<br />
|SPRITE_CELL<br />
|SPRITE_PCELL<br />
|SPRITE_PHASE<br />
|SPRITE_BACKPACK<br />
|SPRITE_ENVIRO<br />
|SPRITE_HGLOBE<br />
|SPRITE_LHGLOBE<br />
|SPRITE_SUPERCHARGE<br />
|SPRITE_INV<br />
|SPRITE_MEGASPHERE<br />
|SPRITE_SHARD<br />
|SPRITE_MEDPACK<br />
|SPRITE_LMEDPACK<br />
|SPRITE_BERSERK<br />
|SPRITE_MAP<br />
|SPRITE_TMAP<br />
|SPRITE_SCHEMATIC<br />
|SPRITE_LIGHTAMP<br />
|SPRITE_NUKE<br />
|SPRITE_LAVAINV<br />
|}}<br />
}}<br />
<br />
== Being Sprites ==<br />
NoCorpse sprites can be accessed by adding 16 to the parent being, except in the case of oversized sprites--those just add 2. Lost Souls, pain elementals, and agony elementals do not have corpse sprites. Both the cyberdemon and mastermind are oversized sprites.<br />
<br />
{{drltable|Being Sprites|1|{{Table1Col<br />
|es=background: #333;<br />
|c1=vertical-align:top; padding:0px 2px;<br />
|SPRITE_FORMER<br />
|SPRITE_SERGEANT<br />
|SPRITE_CAPTAIN<br />
|SPRITE_COMMANDO<br />
|SPRITE_IMP<br />
|SPRITE_DEMON<br />
|SPRITE_LOSTSOUL<br />
|SPRITE_CACODEMON<br />
|SPRITE_PAIN<br />
|SPRITE_KNIGHT<br />
|SPRITE_BARON<br />
|SPRITE_ARACHNO<br />
|SPRITE_ARCHVILE<br />
|SPRITE_REVENANT<br />
|SPRITE_MANCUBUS<br />
|SPRITE_BRUISER<br />
|SPRITE_AGONY<br />
|SPRITE_MASTER<br />
|SPRITE_LAVAELEM<br />
|SPRITE_ANGEL<br />
|SPRITE_SHAMBLER<br />
|SPRITE_JC<br />
|SPRITE_CYBERDEMON<br />
|SPRITE_MASTERMIND<br />
|}}<br />
}}<br />
<br />
== Cell Sprites ==<br />
Many cells have multiple sprite variants that, if you want to access separately will take some trial and error. Fluids are in a 2x2 square, walls are in a 3x15 vertical rectangle, floors are a 16x1 line, and most other multi-sprite cells are adjacent.<br />
Stairs, cave walls, brick walls, and the colored boxes are colorable.<br />
<br />
{{drltable|Cell Sprites|1|{{Table1Col<br />
|es=background: #333;<br />
|c1=vertical-align:top; padding:0px 2px;<br />
|SPRITE_DOOR<br />
|SPRITE_OPENDOOR<br />
|SPRITE_HELLDOOR<br />
|SPRITE_HELLOPENDOOR<br />
|SPRITE_BARREL<br />
|SPRITE_LAVABARREL<br />
|SPRITE_ACIDBARREL<br />
|SPRITE_TREE<br />
|SPRITE_GRAYSTAIRS<br />
|SPRITE_STAIRS<br />
|SPRITE_REDSTAIRS<br />
|SPRITE_PORTAL<br />
|SPRITE_TELEPORT<br />
|SPRITE_LEVER<br />
|SPRITE_BLOOD<br />
|SPRITE_BLOODPOOL<br />
|SPRITE_CORPSE<br />
|SPRITE_WALLBLOOD<br />
|SPRITE_FLOOR<br />
|SPRITE_CAVEFLOOR<br />
|SPRITE_HELLFLOOR<br />
|SPRITE_WALL<br />
|SPRITE_CAVEWALL<br />
|SPRITE_BRICKWALL<br />
|SPRITE_TECHWALL<br />
|SPRITE_BOSSWALL<br />
|SPRITE_WATER<br />
|SPRITE_ACID<br />
|SPRITE_LAVA<br />
|SPRITE_BRIDGE<br />
|SPRITE_YBOX<br />
|SPRITE_WBOX<br />
|SPRITE_YBOXC<br />
|SPRITE_WBOXC<br />
|}}<br />
}}<br />
<br />
== Missile Sprites ==<br />
There are only a few missile sprites. Color shots and acid shots are colorable.<br />
{{drltable|Missile Sprites|1|{{Table1Col<br />
|es=background: #333;<br />
|c1=vertical-align:top; padding:0px 2px;<br />
|SPRITE_SHOT<br />
|SPRITE_CSHOT<br />
|SPRITE_BLAST<br />
|SPRITE_ROCKETSHOT<br />
|SPRITE_EXPLOSION<br />
|SPRITE_PLASMASHOT<br />
|SPRITE_BFGSHOT<br />
|SPRITE_FIREBALL<br />
|SPRITE_PLASMABALL<br />
|SPRITE_ACIDSHOT<br />
|}}<br />
}}<br />
<br />
== Miscellaneous Sprites ==<br />
These last few sprites are special purpose graphics that may still be of use. The arrow, select, and mark sprites are colorable.<br />
{{drltable|Misc Sprites|1|{{Table1Col<br />
|es=background: #333;<br />
|c1=vertical-align:top; padding:0px 2px;<br />
|SPRITE_ARROW<br />
|SPRITE_SELECT<br />
|SPRITE_MARK<br />
|SPRITE_GRID<br />
|}}<br />
}}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Template:Table1ColTemplate:Table1Col2013-04-21T23:53:05Z<p>Yaflhdztioxo: </p>
<hr />
<div>|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{1|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{2|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{3|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{4|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{5|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{6|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{7|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{8|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{9|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{10|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{11|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{12|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{13|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{14|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{15|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{16|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{17|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{18|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{19|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{20|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{21|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{22|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{23|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{24|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{25|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{26|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{27|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{28|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{29|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{30|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{31|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{32|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{33|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{34|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{35|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{36|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{37|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{38|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{39|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{40|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{41|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{42|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{43|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{44|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{45|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{46|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{47|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{48|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{49|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{50|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{51|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{52|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{53|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{54|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{55|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{56|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{57|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{58|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{59|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{60|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{61|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{62|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{63|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{64|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{65|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{66|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{67|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{68|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{69|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{70|}}}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Template:Table1ColTemplate:Table1Col2013-04-21T23:29:21Z<p>Yaflhdztioxo: </p>
<hr />
<div>|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{1|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{2|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{3|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{4|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{5|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{6|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{7|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{8|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{9|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{10|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{11|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{12|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{13|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{14|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{15|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{16|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{17|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{18|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{19|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{20|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{21|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{22|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{23|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{24|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{25|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{26|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{27|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{28|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{29|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{30|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{31|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{32|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{33|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{34|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{35|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{36|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{37|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{38|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{39|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{40|}}}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:being_blueprint_(0.9.9.7)Modding:being blueprint (0.9.9.7)2013-04-21T23:26:37Z<p>Yaflhdztioxo: </p>
<hr />
<div>The being [[Modding:blueprint|blueprint]] is used to define new beings.<br />
<br />
== Blueprint ==<br />
<br />
Being blueprints are registered with the ''register_being'' procedure. Registered blueprints are stored in a global Lua table called ''beings''.<br />
<br />
{{drltable|Being Blueprint|3|{{Table3Col<br />
|es=background: #333;<br />
|c1=font-family:monospace; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=vertical-align:top; padding:0px 2px;<br />
|c3=padding:0px 2px;<br />
|id |{{modarg|string}}|The unique identifier used by the engine for this being. Passed as the first argument when registering a blueprint.<br />
|<u>name</u> |{{modarg|string}}|This is the being's name.<br />
|name_plural |{{modarg|string}}|This is the being's pluralized name. This defaults to the being's the name with an "s" appended.<br />
|sound_id |{{modarg|being}}|If included the being will search for sounds bound to this id instead of its own.<br />
|<u>ascii</u> |{{modarg|string}}|This is the being's picture in console mode. It should be a single character string.<br />
|<u>color</u> |{{modarg|Color}}|This is the being's color in console mode.<br />
|<u>sprite</u> |{{modarg|Sprite}}|This is the being's sprite in graphical mode.<br />
|coscolor |{{modarg|ColorSet}}|This is a graphical mode filter that can be used to add color to specific sprites.<br />
|glow |{{modarg|ColorSet}}|This is a graphical mode filter that can be used to give a sprite a colored glow.<br />
|overlay |{{modarg|ColorSet}}|This is a graphical mode filter that can be used to subtract color from any sprite.<br />
|hp |{{modarg|integer}}|This is the being's hpmax and starting hp. The default is 10.<br />
|armor |{{modarg|integer}}|This is the being's armor bonus. The default is 0.<br />
|attackchance |{{modarg|integer}}|This is the being's attackchance. The default is 75.<br />
|todam |{{modarg|integer}}|This is the being's todam bonus. The bonus applies only to melee attacks. The default is 0.<br />
|tohit |{{modarg|integer}}|This is the being's tohit bonus. The default is 0.<br />
|tohitmelee |{{modarg|integer}}|This is the being's tohitmelee bonus. The default is 0.<br />
|speed |{{modarg|integer}}|This is the being's speed. The maximum allowed speed is 255. The default is 100.<br />
|vision |{{modarg|integer}}|This is the being's vision bonus. The default is 0, meaning the same vision as the player.<br />
|<u>min_lev</u> |{{modarg|integer}}|This is a [[Monster Generation|monster generation]] parameter.<br />
|max_lev |{{modarg|integer}}|This is a [[Monster Generation|monster generation]] parameter. The default is 10000.<br />
|corpse |{{modarg|cell}}|The determines the corpse left by the being. Instead of passing in a cell directly you can pass a boolean ''true'' which will make the engine automatically create and assign an appropriate being corpse. You can also pass in ''false'' or leave this field blank to specify no corpse.<br />
|<u>danger</u> |{{modarg|integer}}|This is a [[Monster Generation|monster generation]] parameter.<br />
|<u>weight</u> |{{modarg|integer}}|This is a [[Monster Generation|monster generation]] parameter.<br />
|xp |{{modarg|integer}}|This is the being's expvalue. By default, it is <font-family: monospace>3xD<sup>2</sup>+20, where D is the being's <u>danger</u> value (above).<br />
|bulk |{{modarg|integer}}|This parameter is unused. The default is 100.<br />
|flags |{{modarg|Being Flag}}|This parameter is an array of being flags which will be used by all beings of this type by default.<br />
|<u>ai_type</u> |{{modarg|AI}}|This determines the being's AI.<br />
<br />
|res_bullet |{{modarg|integer}}|This is the being's resistance to bullet damage. The default is 0.<br />
|res_melee |{{modarg|integer}}|This is the being's resistance to melee damage. The default is 0.<br />
|res_shrapnel |{{modarg|integer}}|This is the being's resistance to shrapnel damage. The default is 0.<br />
|res_acid |{{modarg|integer}}|This is the being's resistance to acid damage. The default is 0.<br />
|res_fire |{{modarg|integer}}|This is the being's resistance to fire damage. The default is 0.<br />
|res_plasma |{{modarg|integer}}|This is the being's resistance to plasma damage. The default is 0.<br />
<br />
|<u>desc</u> |{{modarg|string}}|This is the description of the being displayed in the 'more information' view.<br />
|<u>kill_desc</u> |{{modarg|string}}|If included this being will have a special kill description in the mortem.<br />
|kill_desc_melee |{{modarg|string}}|If included this being will have a special melee kill description in the mortem.<br />
<br />
|weapon |{{modarg|Item Blueprint}}|You can inline an item blueprint here and it will be registered for you. Items defined this way are always natural ranged weapons that never drop and have no ammo. It will even be equippedly automatically for you.<br />
<br />
|OnCreate |{{modarg|function}}|<br />
|OnAction |{{modarg|function}}|<br />
|OnAttacked |{{modarg|function}}|<br />
|OnDie |{{modarg|function}}|<br />
|OnDieCheck |{{modarg|function}}|<br />
|OnPickupItem |{{modarg|function}}|<br />
|}}<br />
}}<br />
<br />
<br />
== Engine Hooks ==<br />
Specifying one or more of these hooks in the prototype will allow for greater customization.<br />
<br />
{|class="wikitable" style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
! colspan="2" style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Being Hooks'''<br />
{{Table2Col<br />
|es=background: #333;<br />
|c1=font-weight:bold; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=padding:0px 2px;<br />
|'''void'''|[[#being_OnCreate|OnCreate]]([[Modding:Being|Being]] self) <br />
|'''void'''|[[#being_OnAction|OnAction]]([[Modding:Being|Being]] self) <br />
|'''void'''|[[#being_OnDie|OnDie]]([[Modding:Being|Being]] self, '''boolean''' overkill) <br />
|}}<br />
|}<br />
<br />
{{Anchor|being_OnCreate}}<br />
;OnCreate([[Modding:Being|Being]] self) <br />
:This is called when the being is created.<br />
----<br />
{{Anchor|being_OnAction}}<br />
;OnAction([[Modding:Being|Being]] self) <br />
:This is called at the beginning of each of the being's turns. (Note that turns are only differentiated if time elapses in between.)<br />
----<br />
{{Anchor|being_OnDie}}<br />
;OnDie([[Modding:Being|Being]] self, '''boolean''' overkill) <br />
:This is called when the being dies. ''overkill'' is true if the being was gibbed.</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:level_blueprint_(0.9.9.7)Modding:level blueprint (0.9.9.7)2013-04-21T23:25:31Z<p>Yaflhdztioxo: </p>
<hr />
<div>The level [[Modding:blueprint|blueprint]] is used to define the properties of fixed special levels. This is in contrast to the [[Modding:generator|generator]] blueprint which is used to construct random levels. Both tend to make heavy use of the [[Modding:level_API|level API]], [[Modding:level_object|level object]], and [[Modding:generator_API|generator API]].<br />
<br />
== Blueprint ==<br />
Level blueprints are registered with the ''register_level'' procedure. Registered blueprints are stored in a global Lua table called ''levels''.<br />
<br />
{{drltable|Level Blueprint|3|{{Table3Col<br />
|es=background: #333;<br />
|c1=font-family:monospace; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=vertical-align:top; padding:0px 2px;<br />
|c3=padding:0px 2px;<br />
|<u>id</u> |{{modarg|string}}|The unique identifier used by the engine for this level. Passed as the first argument when registering a blueprint.<br />
|<u>name</u>|{{modarg|string}}|The level name displayed in the HUD.<br />
|entry |{{modarg|string}}|Message recorded to mortem on level entry.<br />
|welcome |{{modarg|string}}|Message displayed on level entry.<br />
|level |{{modarg|range}} |dlevel range where the level may appear.<br />
|<u>Create</u> |{{modarg|function}}|<br />
|canGenerate |{{modarg|function}}|<br />
|OnRegister |{{modarg|function}}|<br />
|OnCreate |{{modarg|function}}|<br />
|OnDie |{{modarg|function}}|<br />
|OnDieCheck |{{modarg|function}}|<br />
|OnPickup |{{modarg|function}}|<br />
|OnPickupCheck |{{modarg|function}}|<br />
|OnUse |{{modarg|function}}|<br />
|OnUseCheck |{{modarg|function}}|<br />
|OnKill |{{modarg|function}}|<br />
|OnKillAll |{{modarg|function}}|<br />
|OnEnter |{{modarg|function}}|<br />
|OnFire |{{modarg|function}}|<br />
|OnFired |{{modarg|function}}|<br />
|OnExit |{{modarg|function}}|<br />
|OnTick |{{modarg|function}}|<br />
|OnCompletedCheck|{{modarg|function}}|<br />
|OnNuked |{{modarg|function}}|<br />
|}}<br />
}}<br />
<br />
== Engine Hooks ==<br />
{{drltable|Level Hooks|2|{{Table2Col<br />
|es=background: #333;<br />
|c1=font-family:monospace; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=padding:0px 2px;<br />
|{{modarg|void}} |[[#level_create |<u>Create</u> ]] ()<br />
|{{modarg|boolean}} |[[#level_cangenerate |canGenerate ]] ()<br />
|{{modarg|void}} |[[#level_onregister |OnRegister ]] ()<br />
|{{modarg|void}} |[[#level_oncreate |OnCreate ]] ({{modarg|being}})<br />
|{{modarg|void}} |[[#level_oncreate |OnCreate ]] ({{modarg|item}})<br />
|{{modarg|void}} |[[#level_ondie |OnDie ]] ({{modarg|being}})<br />
|{{modarg|boolean}} |[[#level_ondiecheck |OnDieCheck ]] ({{modarg|being}})<br />
|{{modarg|void}} |[[#level_onpickup |OnPickup ]] ({{modarg|item}}, {{modarg|being}})<br />
|{{modarg|boolean}} |[[#level_onpickupcheck |OnPickupCheck ]] ({{modarg|item}}, {{modarg|being}})<br />
|{{modarg|void}} |[[#level_onuse |OnUse ]] ({{modarg|item}}, {{modarg|being}})<br />
|{{modarg|boolean}} |[[#level_onusecheck |OnUseCheck ]] ({{modarg|item}}, {{modarg|being}})<br />
|{{modarg|void}} |[[#level_onkill |OnKill ]] ({{modarg|being}})<br />
|{{modarg|void}} |[[#level_onkillall |OnKillAll ]] ()<br />
|{{modarg|void}} |[[#level_onenter |OnEnter ]] ()<br />
|{{modarg|boolean}} |[[#level_onfire |OnFire ]] ({{modarg|item}}, {{modarg|being}})<br />
|{{modarg|void}} |[[#level_onfired |OnFired ]] ({{modarg|being}})<br />
|{{modarg|void}} |[[#level_onexit |OnExit ]] ()<br />
|{{modarg|void}} |[[#level_ontick |OnTick ]] ()<br />
|{{modarg|boolean}} |[[#level_oncompletedcheck|OnCompletedCheck]] ()<br />
|{{modarg|void}} |[[#level_onnuked |OnNuked ]] ()<br />
|}}<br />
}}<br />
<br />
{{Anchor|level_create}}<br />
;Create()<br />
:This function should create the layout of the level. It also usually sets up the initial being and item locations. The player's initial location should be set here as well.<br />
----<br />
{{Anchor|level_cangenerate}}<br />
;canGenerate() &rarr; '''boolean'''<br />
:This function determines if a level can show up in a given game. If the function returns false the level will not appear. A common requirement is the difficulty be set to at least a certain value.<br />
----<br />
{{Anchor|level_onregister}}<br />
;OnRegister()<br />
:This function should store level specific objects (such as items, cells, medals, and badges). It is called by the engine during its loading phase. Using this hook is not necessary (there are plenty of other places to define objects) but it is considered good practice.<br />
----<br />
{{Anchor|level_oncreate}}<br />
;OnCreate({{modarg|being}})<br />
;OnCreate({{modarg|item}})<br />
:A hook chained to the [[Modding:being blueprint#being_oncreate|being]] and [[Modding:item blueprint#item_oncreate|item]] OnCreate methods. Since this hook is chained to both you may need to check the object's type to ensure it matches what you need.<br />
----<br />
{{Anchor|level_ondie}}<br />
;OnDie({{modarg|being}})<br />
:A hook chained to the [[Modding:being blueprint#being_ondie|being]] OnDie method.<br />
----<br />
{{Anchor|level_ondiecheck}}<br />
;OnDieCheck({{modarg|being}}) &rarr; '''boolean'''<br />
:A hook chained to the [[Modding:being blueprint#being_ondiecheck|being]] OnDieCheck method.<br />
----<br />
{{Anchor|level_onpickup}}<br />
;OnPickup({{modarg|item}}, {{modarg|being}})<br />
:A hook chained to the [[Modding:item blueprint#item_onpickup|item]] OnPickup method.<br />
----<br />
{{Anchor|level_onpickupcheck}}<br />
;OnPickupCheck({{modarg|item}}, {{modarg|being}}) &rarr; '''boolean'''<br />
:A hook chained to the [[Modding:item blueprint#item_onpickupcheck|item]] OnPickupCheck method.<br />
----<br />
{{Anchor|level_onuse}}<br />
;OnUse({{modarg|item}}, {{modarg|being}})<br />
:A hook chained to the [[Modding:item blueprint#item_onuse|item]] OnUse method.<br />
----<br />
{{Anchor|level_onusecheck}}<br />
;OnUseCheck({{modarg|item}}, {{modarg|being}}) &rarr; '''boolean'''<br />
:A hook chained to the [[Modding:item blueprint#item_onusecheck|item]] OnUseCheck method.<br />
----<br />
{{Anchor|level_onkill}}<br />
;OnKill({{modarg|being}})<br />
:Triggered whenever an enemy is killed.<br />
----<br />
{{Anchor|level_onkillall}}<br />
;OnKillAll()<br />
:Triggered when a kill is made and there are no more enemies on a level. This hook is fired AFTER OnKill and can be fired again if more enemies are spawned. By default, the "relatively safe" message is displayed.<br />
----<br />
{{Anchor|level_onenter}}<br />
;OnEnter()<br />
:Triggered just after the player enters the level.<br />
----<br />
{{Anchor|level_onfire}}<br />
;OnFire({{modarg|item}}, {{modarg|being}})<br />
:A hook chained to the [[Modding:item blueprint#item_onfire|item]] OnFire method.<br />
----<br />
{{Anchor|level_onfired}}<br />
;OnFired({{modarg|being}})<br />
:A hook chained to the [[Modding:item blueprint#item_onfired|item]] OnFired method.<br />
----<br />
{{Anchor|level_onexit}}<br />
;OnExit()<br />
:Triggered when the player leaves a level. This is a good place to assign level specific badges or medals as well as the best place to generate history entries for the mortem generation.<br />
----<br />
{{Anchor|level_ontick}}<br />
;OnTick()<br />
:Triggered every 0.1s of game time. This will happen many times for each of the player's moves so be careful about putting intense calculations here.<br />
----<br />
{{Anchor|level_oncompletedcheck}}<br />
;OnCompletedCheck() &rarr; '''boolean'''<br />
:Called by the engine when trying to determine if a special level should be counted as 'completed' for statistics purposes. This is only called for special levels, not scripted levels. By default a level is considered complete if all enemies are dead.<br />
----<br />
{{Anchor|level_onnuked}}<br />
;OnNuked()<br />
:Triggered when a nuke is detonated.</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Template:Table3ColTemplate:Table3Col2013-04-21T23:22:08Z<p>Yaflhdztioxo: </p>
<hr />
<div>|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{1|}}}<br />
|style="{{{c2|}}}"|{{{2|}}}<br />
|style="{{{c3|}}}"|{{{3|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{4|}}}<br />
|style="{{{c2|}}}"|{{{5|}}}<br />
|style="{{{c3|}}}"|{{{6|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{7|}}}<br />
|style="{{{c2|}}}"|{{{8|}}}<br />
|style="{{{c3|}}}"|{{{9|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{10|}}}<br />
|style="{{{c2|}}}"|{{{11|}}}<br />
|style="{{{c3|}}}"|{{{12|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{13|}}}<br />
|style="{{{c2|}}}"|{{{14|}}}<br />
|style="{{{c3|}}}"|{{{15|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{16|}}}<br />
|style="{{{c2|}}}"|{{{17|}}}<br />
|style="{{{c3|}}}"|{{{18|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{19|}}}<br />
|style="{{{c2|}}}"|{{{20|}}}<br />
|style="{{{c3|}}}"|{{{21|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{22|}}}<br />
|style="{{{c2|}}}"|{{{23|}}}<br />
|style="{{{c3|}}}"|{{{24|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{25|}}}<br />
|style="{{{c2|}}}"|{{{26|}}}<br />
|style="{{{c3|}}}"|{{{27|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{28|}}}<br />
|style="{{{c2|}}}"|{{{29|}}}<br />
|style="{{{c3|}}}"|{{{30|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{31|}}}<br />
|style="{{{c2|}}}"|{{{32|}}}<br />
|style="{{{c3|}}}"|{{{33|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{34|}}}<br />
|style="{{{c2|}}}"|{{{35|}}}<br />
|style="{{{c3|}}}"|{{{36|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{37|}}}<br />
|style="{{{c2|}}}"|{{{38|}}}<br />
|style="{{{c3|}}}"|{{{39|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{40|}}}<br />
|style="{{{c2|}}}"|{{{41|}}}<br />
|style="{{{c3|}}}"|{{{42|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{43|}}}<br />
|style="{{{c2|}}}"|{{{44|}}}<br />
|style="{{{c3|}}}"|{{{45|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{46|}}}<br />
|style="{{{c2|}}}"|{{{47|}}}<br />
|style="{{{c3|}}}"|{{{48|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{49|}}}<br />
|style="{{{c2|}}}"|{{{50|}}}<br />
|style="{{{c3|}}}"|{{{51|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{52|}}}<br />
|style="{{{c2|}}}"|{{{53|}}}<br />
|style="{{{c3|}}}"|{{{54|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{55|}}}<br />
|style="{{{c2|}}}"|{{{56|}}}<br />
|style="{{{c3|}}}"|{{{57|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{58|}}}<br />
|style="{{{c2|}}}"|{{{59|}}}<br />
|style="{{{c3|}}}"|{{{60|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{61|}}}<br />
|style="{{{c2|}}}"|{{{62|}}}<br />
|style="{{{c3|}}}"|{{{63|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{64|}}}<br />
|style="{{{c2|}}}"|{{{65|}}}<br />
|style="{{{c3|}}}"|{{{66|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{67|}}}<br />
|style="{{{c2|}}}"|{{{68|}}}<br />
|style="{{{c3|}}}"|{{{69|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{70|}}}<br />
|style="{{{c2|}}}"|{{{71|}}}<br />
|style="{{{c3|}}}"|{{{72|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{73|}}}<br />
|style="{{{c2|}}}"|{{{74|}}}<br />
|style="{{{c3|}}}"|{{{75|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{76|}}}<br />
|style="{{{c2|}}}"|{{{77|}}}<br />
|style="{{{c3|}}}"|{{{78|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{79|}}}<br />
|style="{{{c2|}}}"|{{{80|}}}<br />
|style="{{{c3|}}}"|{{{81|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{82|}}}<br />
|style="{{{c2|}}}"|{{{83|}}}<br />
|style="{{{c3|}}}"|{{{84|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{85|}}}<br />
|style="{{{c2|}}}"|{{{86|}}}<br />
|style="{{{c3|}}}"|{{{87|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{88|}}}<br />
|style="{{{c2|}}}"|{{{89|}}}<br />
|style="{{{c3|}}}"|{{{90|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{91|}}}<br />
|style="{{{c2|}}}"|{{{92|}}}<br />
|style="{{{c3|}}}"|{{{93|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{94|}}}<br />
|style="{{{c2|}}}"|{{{95|}}}<br />
|style="{{{c3|}}}"|{{{96|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{97|}}}<br />
|style="{{{c2|}}}"|{{{98|}}}<br />
|style="{{{c3|}}}"|{{{99|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{100|}}}<br />
|style="{{{c2|}}}"|{{{101|}}}<br />
|style="{{{c3|}}}"|{{{102|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{103|}}}<br />
|style="{{{c2|}}}"|{{{104|}}}<br />
|style="{{{c3|}}}"|{{{105|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{106|}}}<br />
|style="{{{c2|}}}"|{{{107|}}}<br />
|style="{{{c3|}}}"|{{{108|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{109|}}}<br />
|style="{{{c2|}}}"|{{{110|}}}<br />
|style="{{{c3|}}}"|{{{111|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{112|}}}<br />
|style="{{{c2|}}}"|{{{113|}}}<br />
|style="{{{c3|}}}"|{{{114|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{115|}}}<br />
|style="{{{c2|}}}"|{{{116|}}}<br />
|style="{{{c3|}}}"|{{{117|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{118|}}}<br />
|style="{{{c2|}}}"|{{{119|}}}<br />
|style="{{{c3|}}}"|{{{120|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{121|}}}<br />
|style="{{{c2|}}}"|{{{122|}}}<br />
|style="{{{c3|}}}"|{{{123|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{124|}}}<br />
|style="{{{c2|}}}"|{{{125|}}}<br />
|style="{{{c3|}}}"|{{{126|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{127|}}}<br />
|style="{{{c2|}}}"|{{{128|}}}<br />
|style="{{{c3|}}}"|{{{129|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{130|}}}<br />
|style="{{{c2|}}}"|{{{131|}}}<br />
|style="{{{c3|}}}"|{{{132|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{133|}}}<br />
|style="{{{c2|}}}"|{{{134|}}}<br />
|style="{{{c3|}}}"|{{{135|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{136|}}}<br />
|style="{{{c2|}}}"|{{{137|}}}<br />
|style="{{{c3|}}}"|{{{138|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{139|}}}<br />
|style="{{{c2|}}}"|{{{140|}}}<br />
|style="{{{c3|}}}"|{{{141|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{142|}}}<br />
|style="{{{c2|}}}"|{{{143|}}}<br />
|style="{{{c3|}}}"|{{{144|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{145|}}}<br />
|style="{{{c2|}}}"|{{{146|}}}<br />
|style="{{{c3|}}}"|{{{147|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{148|}}}<br />
|style="{{{c2|}}}"|{{{149|}}}<br />
|style="{{{c3|}}}"|{{{150|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{151|}}}<br />
|style="{{{c2|}}}"|{{{152|}}}<br />
|style="{{{c3|}}}"|{{{153|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{154|}}}<br />
|style="{{{c2|}}}"|{{{155|}}}<br />
|style="{{{c3|}}}"|{{{156|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{157|}}}<br />
|style="{{{c2|}}}"|{{{158|}}}<br />
|style="{{{c3|}}}"|{{{159|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{160|}}}<br />
|style="{{{c2|}}}"|{{{161|}}}<br />
|style="{{{c3|}}}"|{{{162|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{163|}}}<br />
|style="{{{c2|}}}"|{{{164|}}}<br />
|style="{{{c3|}}}"|{{{165|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{166|}}}<br />
|style="{{{c2|}}}"|{{{167|}}}<br />
|style="{{{c3|}}}"|{{{168|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{169|}}}<br />
|style="{{{c2|}}}"|{{{170|}}}<br />
|style="{{{c3|}}}"|{{{171|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{172|}}}<br />
|style="{{{c2|}}}"|{{{173|}}}<br />
|style="{{{c3|}}}"|{{{174|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{175|}}}<br />
|style="{{{c2|}}}"|{{{176|}}}<br />
|style="{{{c3|}}}"|{{{177|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{178|}}}<br />
|style="{{{c2|}}}"|{{{179|}}}<br />
|style="{{{c3|}}}"|{{{180|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{181|}}}<br />
|style="{{{c2|}}}"|{{{182|}}}<br />
|style="{{{c3|}}}"|{{{183|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{184|}}}<br />
|style="{{{c2|}}}"|{{{185|}}}<br />
|style="{{{c3|}}}"|{{{186|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{187|}}}<br />
|style="{{{c2|}}}"|{{{188|}}}<br />
|style="{{{c3|}}}"|{{{189|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{190|}}}<br />
|style="{{{c2|}}}"|{{{191|}}}<br />
|style="{{{c3|}}}"|{{{192|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{193|}}}<br />
|style="{{{c2|}}}"|{{{194|}}}<br />
|style="{{{c3|}}}"|{{{195|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{196|}}}<br />
|style="{{{c2|}}}"|{{{197|}}}<br />
|style="{{{c3|}}}"|{{{198|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{199|}}}<br />
|style="{{{c2|}}}"|{{{200|}}}<br />
|style="{{{c3|}}}"|{{{201|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{202|}}}<br />
|style="{{{c2|}}}"|{{{203|}}}<br />
|style="{{{c3|}}}"|{{{204|}}}<br />
|-style="{{{os|}}}"<br />
|style="{{{c1|}}}"|{{{205|}}}<br />
|style="{{{c2|}}}"|{{{206|}}}<br />
|style="{{{c3|}}}"|{{{207|}}}<br />
|-style="{{{es|}}}"<br />
|style="{{{c1|}}}"|{{{208|}}}<br />
|style="{{{c2|}}}"|{{{209|}}}<br />
|style="{{{c3|}}}"|{{{210|}}}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:level_blueprint_(0.9.9.7)Modding:level blueprint (0.9.9.7)2013-04-21T22:50:05Z<p>Yaflhdztioxo: </p>
<hr />
<div>The level [[Modding:blueprint|blueprint]] is used to define the properties of fixed special levels. This is in contrast to the [[Modding:generator|generator]] blueprint which is used to construct random levels. Both tend to make heavy use of the [[Modding:level_API|level API]], [[Modding:level_object|level object]], and [[Modding:generator_API|generator API]].<br />
<br />
== Blueprint ==<br />
Level blueprints are registered with the ''register_level'' procedure. Registered blueprints are stored in a global Lua table called ''levels''.<br />
<br />
{{drltable|Level Blueprint|3|{{Table3Col<br />
|es=background: #333;<br />
|c1=font-family:monospace; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=padding:0px 2px;<br />
|c3=padding:0px 2px;<br />
|<u>id</u> |{{modarg|string}}|The unique identifier used by the engine for this level. Passed as the first argument when registering a blueprint.<br />
|<u>name</u>|{{modarg|string}}|The level name displayed in the HUD.<br />
|entry |{{modarg|string}}|Message recorded to mortem on level entry.<br />
|welcome |{{modarg|string}}|Message displayed on level entry.<br />
|level |{{modarg|range}} |dlevel range where the level may appear.<br />
|<u>Create</u> |{{modarg|function}}|<br />
|canGenerate |{{modarg|function}}|<br />
|OnRegister |{{modarg|function}}|<br />
|OnCreate |{{modarg|function}}|<br />
|OnDie |{{modarg|function}}|<br />
|OnDieCheck |{{modarg|function}}|<br />
|OnPickup |{{modarg|function}}|<br />
|OnPickupCheck |{{modarg|function}}|<br />
|OnUse |{{modarg|function}}|<br />
|OnUseCheck |{{modarg|function}}|<br />
|OnKill |{{modarg|function}}|<br />
|OnKillAll |{{modarg|function}}|<br />
|OnEnter |{{modarg|function}}|<br />
|OnFire |{{modarg|function}}|<br />
|OnFired |{{modarg|function}}|<br />
|OnExit |{{modarg|function}}|<br />
|OnTick |{{modarg|function}}|<br />
|OnCompletedCheck|{{modarg|function}}|<br />
|OnNuked |{{modarg|function}}|<br />
|}}<br />
}}<br />
<br />
== Engine Hooks ==<br />
{{drltable|Level Hooks|2|{{Table2Col<br />
|es=background: #333;<br />
|c1=font-family:monospace; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=padding:0px 2px;<br />
|{{modarg|void}} |[[#level_create |<u>Create</u> ]] ()<br />
|{{modarg|boolean}} |[[#level_cangenerate |canGenerate ]] ()<br />
|{{modarg|void}} |[[#level_onregister |OnRegister ]] ()<br />
|{{modarg|void}} |[[#level_oncreate |OnCreate ]] ({{modarg|being}})<br />
|{{modarg|void}} |[[#level_oncreate |OnCreate ]] ({{modarg|item}})<br />
|{{modarg|void}} |[[#level_ondie |OnDie ]] ({{modarg|being}})<br />
|{{modarg|boolean}} |[[#level_ondiecheck |OnDieCheck ]] ({{modarg|being}})<br />
|{{modarg|void}} |[[#level_onpickup |OnPickup ]] ({{modarg|item}}, {{modarg|being}})<br />
|{{modarg|boolean}} |[[#level_onpickupcheck |OnPickupCheck ]] ({{modarg|item}}, {{modarg|being}})<br />
|{{modarg|void}} |[[#level_onuse |OnUse ]] ({{modarg|item}}, {{modarg|being}})<br />
|{{modarg|boolean}} |[[#level_onusecheck |OnUseCheck ]] ({{modarg|item}}, {{modarg|being}})<br />
|{{modarg|void}} |[[#level_onkill |OnKill ]] ({{modarg|being}})<br />
|{{modarg|void}} |[[#level_onkillall |OnKillAll ]] ()<br />
|{{modarg|void}} |[[#level_onenter |OnEnter ]] ()<br />
|{{modarg|boolean}} |[[#level_onfire |OnFire ]] ({{modarg|item}}, {{modarg|being}})<br />
|{{modarg|void}} |[[#level_onfired |OnFired ]] ({{modarg|being}})<br />
|{{modarg|void}} |[[#level_onexit |OnExit ]] ()<br />
|{{modarg|void}} |[[#level_ontick |OnTick ]] ()<br />
|{{modarg|boolean}} |[[#level_oncompletedcheck|OnCompletedCheck]] ()<br />
|{{modarg|void}} |[[#level_onnuked |OnNuked ]] ()<br />
|}}<br />
}}<br />
<br />
{{Anchor|level_create}}<br />
;Create()<br />
:This function should create the layout of the level. It also usually sets up the initial being and item locations. The player's initial location should be set here as well.<br />
----<br />
{{Anchor|level_cangenerate}}<br />
;canGenerate() &rarr; '''boolean'''<br />
:This function determines if a level can show up in a given game. If the function returns false the level will not appear. A common requirement is the difficulty be set to at least a certain value.<br />
----<br />
{{Anchor|level_onregister}}<br />
;OnRegister()<br />
:This function should store level specific objects (such as items, cells, medals, and badges). It is called by the engine during its loading phase. Using this hook is not necessary (there are plenty of other places to define objects) but it is considered good practice.<br />
----<br />
{{Anchor|level_oncreate}}<br />
;OnCreate({{modarg|being}})<br />
;OnCreate({{modarg|item}})<br />
:A hook chained to the [[Modding:being blueprint#being_oncreate|being]] and [[Modding:item blueprint#item_oncreate|item]] OnCreate methods. Since this hook is chained to both you may need to check the object's type to ensure it matches what you need.<br />
----<br />
{{Anchor|level_ondie}}<br />
;OnDie({{modarg|being}})<br />
:A hook chained to the [[Modding:being blueprint#being_ondie|being]] OnDie method.<br />
----<br />
{{Anchor|level_ondiecheck}}<br />
;OnDieCheck({{modarg|being}}) &rarr; '''boolean'''<br />
:A hook chained to the [[Modding:being blueprint#being_ondiecheck|being]] OnDieCheck method.<br />
----<br />
{{Anchor|level_onpickup}}<br />
;OnPickup({{modarg|item}}, {{modarg|being}})<br />
:A hook chained to the [[Modding:item blueprint#item_onpickup|item]] OnPickup method.<br />
----<br />
{{Anchor|level_onpickupcheck}}<br />
;OnPickupCheck({{modarg|item}}, {{modarg|being}}) &rarr; '''boolean'''<br />
:A hook chained to the [[Modding:item blueprint#item_onpickupcheck|item]] OnPickupCheck method.<br />
----<br />
{{Anchor|level_onuse}}<br />
;OnUse({{modarg|item}}, {{modarg|being}})<br />
:A hook chained to the [[Modding:item blueprint#item_onuse|item]] OnUse method.<br />
----<br />
{{Anchor|level_onusecheck}}<br />
;OnUseCheck({{modarg|item}}, {{modarg|being}}) &rarr; '''boolean'''<br />
:A hook chained to the [[Modding:item blueprint#item_onusecheck|item]] OnUseCheck method.<br />
----<br />
{{Anchor|level_onkill}}<br />
;OnKill({{modarg|being}})<br />
:Triggered whenever an enemy is killed.<br />
----<br />
{{Anchor|level_onkillall}}<br />
;OnKillAll()<br />
:Triggered when a kill is made and there are no more enemies on a level. This hook is fired AFTER OnKill and can be fired again if more enemies are spawned. By default, the "relatively safe" message is displayed.<br />
----<br />
{{Anchor|level_onenter}}<br />
;OnEnter()<br />
:Triggered just after the player enters the level.<br />
----<br />
{{Anchor|level_onfire}}<br />
;OnFire({{modarg|item}}, {{modarg|being}})<br />
:A hook chained to the [[Modding:item blueprint#item_onfire|item]] OnFire method.<br />
----<br />
{{Anchor|level_onfired}}<br />
;OnFired({{modarg|being}})<br />
:A hook chained to the [[Modding:item blueprint#item_onfired|item]] OnFired method.<br />
----<br />
{{Anchor|level_onexit}}<br />
;OnExit()<br />
:Triggered when the player leaves a level. This is a good place to assign level specific badges or medals as well as the best place to generate history entries for the mortem generation.<br />
----<br />
{{Anchor|level_ontick}}<br />
;OnTick()<br />
:Triggered every 0.1s of game time. This will happen many times for each of the player's moves so be careful about putting intense calculations here.<br />
----<br />
{{Anchor|level_oncompletedcheck}}<br />
;OnCompletedCheck() &rarr; '''boolean'''<br />
:Called by the engine when trying to determine if a special level should be counted as 'completed' for statistics purposes. This is only called for special levels, not scripted levels. By default a level is considered complete if all enemies are dead.<br />
----<br />
{{Anchor|level_onnuked}}<br />
;OnNuked()<br />
:Triggered when a nuke is detonated.</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Template:ModargTemplate:Modarg2013-04-21T22:47:09Z<p>Yaflhdztioxo: </p>
<hr />
<div><noinclude><br />
Whenever an input or output argument is required for an API function, one should use <nowiki>{{modarg|arg}}</nowiki> to express it. This also handles cases where links are required. Some examples:<br />
*<nowiki>{{modarg|integer}}</nowiki> &rarr; '''integer'''<br />
*<nowiki>{{modarg|Being}}</nowiki> &rarr; '''[[Modding:Being|Being]]'''<br />
*<nowiki>{{modarg|CoordList}}</nowiki> &rarr; '''[[Modding:Coord|CoordList]]'''<br />
If there are more links required, feel free to add a line to the template.<br />
</noinclude>{{#switch: {{{1}}}<br />
| {{#if: {{#pos:{{{1}}}|Affect}} |{{{1}}} }} = '''[[Modding:Affect|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|affect}} |{{{1}}} }} = '''[[Modding:Affect|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|AI}} |{{{1}}} }} = '''[[Modding:AI|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|ai}} |{{{1}}} }} = '''[[Modding:AI|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|AltFire}} |{{{1}}} }} = '''[[Modding:Constants#AltFire|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|altfire}} |{{{1}}} }} = '''[[Modding:Constants#AltFire|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|AltReload}} |{{{1}}} }} = '''[[Modding:Constants#AltReload|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|altreload}} |{{{1}}} }} = '''[[Modding:Constants#AltReload|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Area}} |{{{1}}} }} = '''[[Modding:Area|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|area}} |{{{1}}} }} = '''[[Modding:area|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Badge}} |{{{1}}} }} = '''[[Modding:Badge|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|badge}} |{{{1}}} }} = '''[[Modding:Badge|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Being Flag}} |{{{1}}} }} = '''[[Modding:Constants#Being Flag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|being flag}} |{{{1}}} }} = '''[[Modding:Constants#Being Flag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Being}} |{{{1}}} }} = '''[[Modding:Being|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|being}} |{{{1}}} }} = '''[[Modding:being|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Cell Flags}} |{{{1}}} }} = '''[[Modding:Cell#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|cell flags}} |{{{1}}} }} = '''[[Modding:Cell#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Cellset}} |{{{1}}} }} = '''[[Modding:Constants#Cellsets|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|cellset}} |{{{1}}} }} = '''[[Modding:Constants#Cellsets|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Cell}} |{{{1}}} }} = '''[[Modding:Cell|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|cell}} |{{{1}}} }} = '''[[Modding:cell|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Color Set}} |{{{1}}} }} = '''[[Modding:Color#Color Sets|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|color set}} |{{{1}}} }} = '''[[Modding:Color#Color Sets|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Color}} |{{{1}}} }} = '''[[Modding:Color#Console Colors|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|color}} |{{{1}}} }} = '''[[Modding:Color#Console Colors|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Coord}} |{{{1}}} }} = '''[[Modding:Coord|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|coord}} |{{{1}}} }} = '''[[Modding:coord|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|DamageType}} |{{{1}}} }} = '''[[Modding:Constants#DamageType|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|damagetype}} |{{{1}}} }} = '''[[Modding:Constants#DamageType|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Empty Flag}} |{{{1}}} }} = '''[[Modding:Constants#Empty Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|empty flag}} |{{{1}}} }} = '''[[Modding:Constants#Empty Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Explosion Flag}}|{{{1}}} }} = '''[[Modding:Constants#ExplosionFlag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|fxplosion flag}}|{{{1}}} }} = '''[[Modding:Constants#ExplosionFlag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Flag}} |{{{1}}} }} = '''[[Modding:Constants#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|flag}} |{{{1}}} }} = '''[[Modding:Constants#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Item Flag}} |{{{1}}} }} = '''[[Modding:Item#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|item flag}} |{{{1}}} }} = '''[[Modding:Item#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|ItemSet}} |{{{1}}} }} = '''[[Modding:ItemSet|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|itemset}} |{{{1}}} }} = '''[[Modding:ItemSet|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|ItemType}} |{{{1}}} }} = '''[[Modding:Constants#ItemType|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|itemtype}} |{{{1}}} }} = '''[[Modding:Constants#ItemType|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Item}} |{{{1}}} }} = '''[[Modding:Item|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|item}} |{{{1}}} }} = '''[[Modding:item|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Klass}} |{{{1}}} }} = '''[[Modding:Klass|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|klass}} |{{{1}}} }} = '''[[Modding:Klass|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Level Flag}} |{{{1}}} }} = '''[[Modding:Constants#Level Flag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|level flag}} |{{{1}}} }} = '''[[Modding:Constants#Level Flag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Light Flag}} |{{{1}}} }} = '''[[Modding:Constants#Light Flag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|light flag}} |{{{1}}} }} = '''[[Modding:Constants#Light Flag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Medal}} |{{{1}}} }} = '''[[Modding:Medal|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|medal}} |{{{1}}} }} = '''[[Modding:Medal|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Missile Flag}} |{{{1}}} }} = '''[[Modding:Missile#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|missile flag}} |{{{1}}} }} = '''[[Modding:Missile#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Missile}} |{{{1}}} }} = '''[[Modding:Missile|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|missile}} |{{{1}}} }} = '''[[Modding:Missile|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|ModArray}} |{{{1}}} }} = '''[[Modding:ModArray|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|modArray}} |{{{1}}} }} = '''[[Modding:ModArray|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Player}} |{{{1}}} }} = '''[[Modding:Player|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|player}} |{{{1}}} }} = '''[[Modding:Player|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Range}} |{{{1}}} }} = '''[[Modding:core/functions:resolverange|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|range}} |{{{1}}} }} = '''[[Modding:core/functions:resolverange|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Resistance}} |{{{1}}} }} = '''[[Modding:Constants#Resistance|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|resistance}} |{{{1}}} }} = '''[[Modding:Constants#Resistance|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Room}} |{{{1}}} }} = '''[[Modding:Generator|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|room}} |{{{1}}} }} = '''[[Modding:Generator|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Sprite}} |{{{1}}} }} = '''[[Modding:Sprites|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|sprite}} |{{{1}}} }} = '''[[Modding:Sprites|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|StatusEffect}} |{{{1}}} }} = '''[[Modding:Constants#StatusEffect|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Trait}} |{{{1}}} }} = '''[[Modding:Trait|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|trait}} |{{{1}}} }} = '''[[Modding:Trait|{{{1}}}]]'''<br />
| <b>{{{1}}}</b><br />
}}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:Color_(0.9.9.7)Modding:Color (0.9.9.7)2013-04-21T22:40:59Z<p>Yaflhdztioxo: </p>
<hr />
<div>In console mode all game tiles are associated with a particular color. Choosing a good color scheme is an important part of modding, but the choice is limited--only 16 colors exist in the standard [http://en.wikipedia.org/wiki/VGA-compatible_text_mode VGA compatible console] which, when combined into foreground and background, results in only 256 possible combinations. There are some special engine colors as well to further complicate matters.<br />
<br />
In graphics mode all game tiles are associated with a particular sprite. The sprites obviously support more than 16 colors. They can also be further manipulated by engine effects, color overlays (both additive and subtractive), and outlines.<br />
<br />
==Console Colors ==<br />
=== Color Definitions ===<br />
{{Template:Color}}<br />
<br />
=== Special Colors ===<br />
{{Template:Special_Color}}<br />
<br />
=== Background Colors ===<br />
DoomRL uses 4 bit color. In 4 bit color consoles the lower four bits correspond to the foreground color while the upper four bits correspond to the background color (usually). When you assign a color using the color constants above the upper bits will equal zero, which is the default background color--black. You can change this by explicitly assigning the upper 4 bits a value using code similar to the following:<br />
<source lang="lua">color = LIGHTGRAY + (RED * 16)</source><br />
The above statement will display <span style="color:silver; background:maroon">light gray text over a red background</span>. Officially this is unsupported. Unofficially it is used often enough that support for it will most likely continue. There is a caveat though--some combinations are used by the [[#Special Colors|special colors]] above and thus cannot be used for regular items.<br />
<br />
=== Notes and Advice ===<br />
* The [[Manual:color.lua|color.lua]] script can be used by players to customize tiles.<br />
** Many objects have a color_id property that can be used to prevent unscrupulous players from distinguishing between items such as levers by color.<br />
* Console colors are not always consistent. Brown in particular can vary a lot and more closely mimics orange in some environments.<br />
* Dark Blue is hard to see on a black background and should be used sparingly, especially with beings who can be frustrating when hard to see.<br />
* Background colors should be used sparingly, if at all. The clear divides break immersion.<br />
* Be aware of common roguelike coloring customs, especially those used by NetHack and (obviously) DoomRL.<br />
<br />
<br />
== Color Sets ==<br />
A color set in DoomRL is an array in the form of '''{ ''red'', ''green'', ''blue'', ''alpha'' }'''. Each value is a decimal between 0.0 and 1.0, though at present ''alpha'' is not used.<br />
<br />
=== Coscolor ===<br />
A coscolor is an '''additive''' modifier found on [[Modding:cell|cells]], [[Modding:being|beings]], [[Modding:item|items]], and [[Modding:missile|missiles]]. To have any effect a sprite must have a grayscale color map associated with it. Currently only a small number of sprites, such as mod packs, do.<br />
<br />
=== Overlay ===<br />
An overlay is a '''subtractive''' modifier found on [[Modding:being|beings]] and [[Modding:item|items]]. It will remove colors from sprites--the overlay '''{ ''1.0'', ''0.0'', ''0.0'', ''1.0'' }''' for instance would turn a sprite completely red. This option is mostly intended for creating placeholder sprites quickly and is rather limited. Status effects react to overlays in unusual ways and since adding color or changing hues is impossible it is difficult to get a good end result.<br />
<br />
=== Glow ===<br />
A glow is an '''additive''' modifier found on [[Modding:being|beings]] and [[Modding:item|items]]. Unlike the other graphical modifiers this directly adds a color to a sprite based on its outline (minus its shadow). The effect is a smooth and pleasant glow effect which can be used to great effect without worrying about side effects.</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Template:Color_(0.9.9.7)Template:Color (0.9.9.7)2013-04-21T22:05:26Z<p>Yaflhdztioxo: moved Template:Color to Template:Color (0.9.9.7)</p>
<hr />
<div>{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=4 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Colors'''<br />
|-<br />
! scope="col" align="left"| Color<br />
! scope="col" align="left"| ID<br />
! scope="col" align="left"| Valkyrie ID<br />
! scope="col" align="center"| Looks Like<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|BLACK<br />
|0<br />
|@D<br />
|width="100" style="background: black;"|<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|BLUE<br />
|1<br />
|@b<br />
|width="100" style="background: navy;"|<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|GREEN<br />
|2<br />
|@g<br />
|width="100" style="background: green;"|<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CYAN<br />
|3<br />
|@c<br />
|width="100" style="background: teal;"|<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|RED<br />
|4<br />
|@r<br />
|width="100" style="background: maroon;"|<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|MAGENTA<br />
|5<br />
|@v<br />
|width="100" style="background: purple;"|<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|BROWN<br />
|6<br />
|@n or @N<br />
|width="100" style="background: olive;"|<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|LIGHTGRAY<br />
|7<br />
|@l<br />
|width="100" style="background: silver;"|<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|DARKGRAY<br />
|8<br />
|@d<br />
|width="100" style="background: gray;"|<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|LIGHTBLUE<br />
|9<br />
|@B<br />
|width="100" style="background: blue;"|<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|LIGHTGREEN<br />
|10<br />
|@G<br />
|width="100" style="background: lime;"|<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|LIGHTCYAN<br />
|11<br />
|@C<br />
|width="100" style="background: aqua;"|<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|LIGHTRED<br />
|12<br />
|@R<br />
|width="100" style="background: red;"|<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|LIGHTMAGENTA<br />
|13<br />
|@V<br />
|width="100" style="background: fuchsia;"|<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|YELLOW<br />
|14<br />
|@y or @Y<br />
|width="100" style="background: yellow;"|<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|WHITE<br />
|15<br />
|@L<br />
|width="100" style="background: white;"|<br />
|}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Template:ColorTemplate:Color2013-04-21T22:05:26Z<p>Yaflhdztioxo: moved Template:Color to Template:Color (0.9.9.7)</p>
<hr />
<div>#REDIRECT [[Template:Color (0.9.9.7)]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Template:Special_Color_(0.9.9.7)Template:Special Color (0.9.9.7)2013-04-21T22:05:17Z<p>Yaflhdztioxo: moved Template:Special Color to Template:Special Color (0.9.9.7)</p>
<hr />
<div>{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=9 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Colors'''<br />
|-<br />
! scope="col" align="left"| Color<br />
! scope="col" align="left"| ID<br />
! colspan=6 scope="col" align="center"| Looks Like<br />
! scope="col" align="left"| Comments<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|MULTIBLUE<br />
|17<br />
|colspan=2 width="33" style="background: navy;"|<br />
|colspan=2 width="34" style="background: blue;"|<br />
|colspan=2 width="33" style="background: white;"|<br />
|Missile only<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|MULTIYELLOW<br />
|18<br />
|colspan=2 width="33" style="background: yellow;"|<br />
|colspan=2 width="33" style="background: lime;"|<br />
|colspan=2 width="33" style="background: white;"|<br />
|Missile only<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|MULTIPORTAL<br />
|20<br />
|colspan=2 width="33" style="background: purple;"|<br />
|colspan=2 width="33" style="background: fuchsia;"|<br />
|colspan=2 width="33" style="background: white;"|<br />
|Map object only<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|COLOR_WATER<br />
|21<br />
|colspan=3 width="50" style="background: navy;"|<br />
|colspan=3 width="50" style="background: blue;"|<br />
|Map object only<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|COLOR_ACID<br />
|22<br />
|colspan=3 width="50" style="background: green;"|<br />
|colspan=3 width="50" style="background: lime;"|<br />
|Map object only<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|COLOR_LAVA<br />
|23<br />
|colspan=3 width="50" style="background: maroon;"|<br />
|colspan=3 width="50" style="background: yellow;"|<br />
|Map object only<br />
|}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Template:Special_ColorTemplate:Special Color2013-04-21T22:05:17Z<p>Yaflhdztioxo: moved Template:Special Color to Template:Special Color (0.9.9.7)</p>
<hr />
<div>#REDIRECT [[Template:Special Color (0.9.9.7)]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:Color_(0.9.9.7)Modding:Color (0.9.9.7)2013-04-21T22:04:40Z<p>Yaflhdztioxo: moved Modding:Color to Modding:Color (0.9.9.7)</p>
<hr />
<div>In console mode all game tiles are associated with a particular color. Choosing a good color scheme is an important part of modding, but the choice is limited--only 16 colors exist in the standard [http://en.wikipedia.org/wiki/VGA-compatible_text_mode VGA compatible console] which, when combined into foreground and background, results in only 256 possible combinations. There are some special engine colors as well to further complicate matters.<br />
<br />
== Color Definitions ==<br />
{{Template:Color}}<br />
<br />
== Special Colors ==<br />
{{Template:Special_Color}}<br />
<br />
== Background Colors ==<br />
DoomRL uses 4 bit color. In 4 bit color consoles the lower four bits correspond to the foreground color while the upper four bits correspond to the background color (usually). When you assign a color using the color constants above the upper bits will equal zero, which is the default background color--black. You can change this by explicitly assigning the upper 4 bits a value using code similar to the following:<br />
<source lang="lua">color = LIGHTGRAY + (RED * 16)</source><br />
The above statement will display <span style="color:silver; background:maroon">light gray text over a red background</span>. Officially this is unsupported. Unofficially it is used often enough that support for it will most likely continue. There is a caveat though--some combinations are used by the [[#Special Colors|special colors]] above and thus cannot be used for regular items.<br />
<br />
== Notes and Advice ==<br />
* The [[Manual:color.lua|color.lua]] script can be used by players to customize tiles.<br />
** Many objects have a color_id property that can be used to prevent unscrupulous players from distinguishing between items such as levers by color.<br />
* Colors are not always consistent. Brown in particular can vary a lot and more closely mimics orange in some environments.<br />
* Dark Blue is hard to see on a black background and should be used sparingly, especially with beings who can be frustrating when hard to see.<br />
* Background colors should be used sparingly, if at all. The clear divides break immersion.<br />
* Be aware of common roguelike coloring customs, especially those used by NetHack and (obviously) DoomRL.</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:ColorModding:Color2013-04-21T22:04:40Z<p>Yaflhdztioxo: moved Modding:Color to Modding:Color (0.9.9.7)</p>
<hr />
<div>#REDIRECT [[Modding:Color (0.9.9.7)]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Template:ModargTemplate:Modarg2013-04-21T20:28:11Z<p>Yaflhdztioxo: </p>
<hr />
<div><noinclude><br />
Whenever an input or output argument is required for an API function, one should use <nowiki>{{modarg|arg}}</nowiki> to express it. This also handles cases where links are required. Some examples:<br />
*<nowiki>{{modarg|integer}}</nowiki> &rarr; '''integer'''<br />
*<nowiki>{{modarg|Being}}</nowiki> &rarr; '''[[Modding:Being|Being]]'''<br />
*<nowiki>{{modarg|CoordList}}</nowiki> &rarr; '''[[Modding:Coord|CoordList]]'''<br />
If there are more links required, feel free to add a line to the template.<br />
</noinclude>{{#switch: {{{1}}}<br />
| {{#if: {{#pos:{{{1}}}|ai}} |{{{1}}} }} = '''[[Modding:AI|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|AI}} |{{{1}}} }} = '''[[Modding:AI|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Cell Flags}} |{{{1}}} }} = '''[[Modding:Cell#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Cellset}} |{{{1}}} }} = '''[[Modding:Constants#Cellsets|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Cell}} |{{{1}}} }} = '''[[Modding:Cell|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|cell}} |{{{1}}} }} = '''[[Modding:cell|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|ExplosionFlag}}|{{{1}}} }} = '''[[Modding:Constants#ExplosionFlag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Empty Flag}} |{{{1}}} }} = '''[[Modding:Constants#Empty Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Item Flag}} |{{{1}}} }} = '''[[Modding:Item#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Level Flag}} |{{{1}}} }} = '''[[Modding:Constants#Level Flag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Being Flag}} |{{{1}}} }} = '''[[Modding:Constants#Being Flag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Light Flag}} |{{{1}}} }} = '''[[Modding:Constants#Light Flag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Missile Flag}} |{{{1}}} }} = '''[[Modding:Missile#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Flag}} |{{{1}}} }} = '''[[Modding:Constants#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|ItemType}} |{{{1}}} }} = '''[[Modding:Constants#ItemType|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|ItemSet}} |{{{1}}} }} = '''[[Modding:ItemSet|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Item}} |{{{1}}} }} = '''[[Modding:Item|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|item}} |{{{1}}} }} = '''[[Modding:item|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Affect}} |{{{1}}} }} = '''[[Modding:Affect|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|AltReload}} |{{{1}}} }} = '''[[Modding:Constants#AltReload|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|AltFire}} |{{{1}}} }} = '''[[Modding:Constants#AltFire|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Area}} |{{{1}}} }} = '''[[Modding:Area|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|area}} |{{{1}}} }} = '''[[Modding:area|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Badge}} |{{{1}}} }} = '''[[Modding:Badge|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Being}} |{{{1}}} }} = '''[[Modding:Being|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|being}} |{{{1}}} }} = '''[[Modding:being|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|color}} |{{{1}}} }} = '''[[Modding:Color#Console Colors|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Color}} |{{{1}}} }} = '''[[Modding:Color#Console Colors|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Color Set}} |{{{1}}} }} = '''[[Modding:Color#Color Sets|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|color set}} |{{{1}}} }} = '''[[Modding:Color#Color Sets|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Coord}} |{{{1}}} }} = '''[[Modding:Coord|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|coord}} |{{{1}}} }} = '''[[Modding:coord|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|DamageType}} |{{{1}}} }} = '''[[Modding:Constants#DamageType|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Klass}} |{{{1}}} }} = '''[[Modding:Klass|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Medal}} |{{{1}}} }} = '''[[Modding:Medal|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Missile}} |{{{1}}} }} = '''[[Modding:Missile|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|ModArray}} |{{{1}}} }} = '''[[Modding:ModArray|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Player}} |{{{1}}} }} = '''[[Modding:Player|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|range}} |{{{1}}} }} = '''[[Modding:core/functions:resolverange|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Resistance}} |{{{1}}} }} = '''[[Modding:Constants#Resistance|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Room}} |{{{1}}} }} = '''[[Modding:Generator|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|StatusEffect}} |{{{1}}} }} = '''[[Modding:Constants#StatusEffect|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Trait}} |{{{1}}} }} = '''[[Modding:Trait|{{{1}}}]]'''<br />
| <b>{{{1}}}</b><br />
}}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Template:ModargTemplate:Modarg2013-04-21T19:57:01Z<p>Yaflhdztioxo: </p>
<hr />
<div><noinclude><br />
Whenever an input or output argument is required for an API function, one should use <nowiki>{{modarg|arg}}</nowiki> to express it. This also handles cases where links are required. Some examples:<br />
*<nowiki>{{modarg|integer}}</nowiki> &rarr; '''integer'''<br />
*<nowiki>{{modarg|Being}}</nowiki> &rarr; '''[[Modding:Being|Being]]'''<br />
*<nowiki>{{modarg|CoordList}}</nowiki> &rarr; '''[[Modding:Coord|CoordList]]'''<br />
If there are more links required, feel free to add a line to the template.<br />
</noinclude>{{#switch: {{{1}}}<br />
| {{#if: {{#pos:{{{1}}}|ai}} |{{{1}}} }} = '''[[Modding:AI|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|AI}} |{{{1}}} }} = '''[[Modding:AI|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Cell Flags}} |{{{1}}} }} = '''[[Modding:Cell#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Cellset}} |{{{1}}} }} = '''[[Modding:Constants#Cellsets|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Cell}} |{{{1}}} }} = '''[[Modding:Cell|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|cell}} |{{{1}}} }} = '''[[Modding:cell|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|ExplosionFlag}}|{{{1}}} }} = '''[[Modding:Constants#ExplosionFlag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Empty Flag}} |{{{1}}} }} = '''[[Modding:Constants#Empty Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Item Flag}} |{{{1}}} }} = '''[[Modding:Item#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Level Flag}} |{{{1}}} }} = '''[[Modding:Constants#Level Flag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Being Flag}} |{{{1}}} }} = '''[[Modding:Constants#Being Flag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Light Flag}} |{{{1}}} }} = '''[[Modding:Constants#Light Flag|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Missile Flag}} |{{{1}}} }} = '''[[Modding:Missile#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Flag}} |{{{1}}} }} = '''[[Modding:Constants#Flags|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|ItemType}} |{{{1}}} }} = '''[[Modding:Constants#ItemType|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|ItemSet}} |{{{1}}} }} = '''[[Modding:ItemSet|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Item}} |{{{1}}} }} = '''[[Modding:Item|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|item}} |{{{1}}} }} = '''[[Modding:item|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Affect}} |{{{1}}} }} = '''[[Modding:Affect|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|AltReload}} |{{{1}}} }} = '''[[Modding:Constants#AltReload|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|AltFire}} |{{{1}}} }} = '''[[Modding:Constants#AltFire|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Area}} |{{{1}}} }} = '''[[Modding:Area|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|area}} |{{{1}}} }} = '''[[Modding:area|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Badge}} |{{{1}}} }} = '''[[Modding:Badge|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Being}} |{{{1}}} }} = '''[[Modding:Being|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|being}} |{{{1}}} }} = '''[[Modding:being|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|color}} |{{{1}}} }} = '''[[Modding:Color#Color Definitions|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Color}} |{{{1}}} }} = '''[[Modding:Color#Color Definitions|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Color Set}} |{{{1}}} }} = '''[[Modding:Color#Color Sets|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|color set}} |{{{1}}} }} = '''[[Modding:Color#Color Sets|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Coord}} |{{{1}}} }} = '''[[Modding:Coord|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|coord}} |{{{1}}} }} = '''[[Modding:coord|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|DamageType}} |{{{1}}} }} = '''[[Modding:Constants#DamageType|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Klass}} |{{{1}}} }} = '''[[Modding:Klass|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Medal}} |{{{1}}} }} = '''[[Modding:Medal|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Missile}} |{{{1}}} }} = '''[[Modding:Missile|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|ModArray}} |{{{1}}} }} = '''[[Modding:ModArray|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Player}} |{{{1}}} }} = '''[[Modding:Player|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|range}} |{{{1}}} }} = '''[[Modding:core/functions:resolverange|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Resistance}} |{{{1}}} }} = '''[[Modding:Constants#Resistance|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Room}} |{{{1}}} }} = '''[[Modding:Generator|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|StatusEffect}} |{{{1}}} }} = '''[[Modding:Constants#StatusEffect|{{{1}}}]]'''<br />
| {{#if: {{#pos:{{{1}}}|Trait}} |{{{1}}} }} = '''[[Modding:Trait|{{{1}}}]]'''<br />
| <b>{{{1}}}</b><br />
}}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:ConstantsModding:Constants2013-04-21T19:03:44Z<p>Yaflhdztioxo: /* Being Flags */</p>
<hr />
<div>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.<br />
<br />
== Engine Enums ==<br />
<br />
==== ItemType ====<br />
<br />
Every item has a type that determines how the engine treats it.<br />
<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TItemType'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_NONE<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_RANGED<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_NRANGED<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_ARMOR<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_MELEE<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_AMMO<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_PACK<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_POWER<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_BOOTS<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_TELE<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_LEVER<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_AMMOPACK<br />
|}<br />
<br />
==== BodyTarget ====<br />
<br />
Sources of damage must specify a body target to determine which sources of armor are used. Inherent armor bonuses always apply.<br />
<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TBodyTarget'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|TARGET_INTERNAL<br />
|Protection from boots and armor will be ignored.<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|TARGET_TORSO<br />
|Protection from armor counts but protection from boots does not.<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|TARGET_FEET<br />
|Protection from boots counts but protection from armor does not.<br />
|}<br />
<br />
==== EqSlot ====<br />
<br />
It is preferred to use the (equivalent) [[#Equip Slots|slot]] constants.<br />
<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TEqSlot'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EFTORSO<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EFWEAPON<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EFBOOTS<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EFWEAPON2<br />
|}<br />
<br />
==== StatusEffect ====<br />
<br />
[[Modding:Affects|Affects]] specify one of these status effects that will apply a color scheme to all the tiles on the HUD.<br />
<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TStatusEffect'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|STATUSNORMAL<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|STATUSINVERT<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|STATUSRED<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|STATUSGREEN<br />
|}<br />
<br />
==== DamageType ====<br />
<br />
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 [[Damage type|here]].<br />
<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TDamageType'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_BULLET<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_MELEE<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_SHARPNEL [sic]<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_ACID<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_FIRE<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_PLASMA<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_IGNOREARMOR<br />
|}<br />
<br />
==== AltFire ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TAltFire'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ALT_NONE<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ALT_CHAIN<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ALT_THROW<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ALT_SCRIPT<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ALT_AIMED<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ALT_SINGLE<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ALT_WHIRLWIND<br />
|}<br />
<br />
==== AltReload ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TAltReload'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|RELOAD_NONE<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|RELOAD_SCRIPT<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|RELOAD_FULL<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|RELOAD_DUAL<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|RELOAD_SINGLE<br />
|}<br />
<br />
==== ExplosionFlag ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=3 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TExplosionFlag'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EFSELFHALF<br />
|Deals half damage to the active being.<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EFSELFKNOCKBACK<br />
|Gives extra knockback to the active being.<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EFSELFSAFE<br />
|Deals no damage to the active being.<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EFAFTERBLINK<br />
|Blinks the screen after the explosion finishes.<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EFCHAIN<br />
|Causes secondary explosions (as the [[BFG 9000]]).<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EFHALFKNOCK<br />
|Causes half the usual knockback.<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EFNOKNOCK<br />
|Doesn't cause knockback.<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EFRANDOMCONTENT<br />
|Transmutes some cells in the explosion to the explosion's content cell; the rules is to transmute when damage is greater than 20.<br />
|}<br />
<br />
====Level Flag====<br />
{{Template:Level_Flags}}<br />
<br />
====Light Flag====<br />
{{Template:Light_Flags}}<br />
<br />
== Constants ==<br />
<br />
==== Maximums ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Maximums'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|MAXX || 78<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|MAXY || 20<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|BOSS_LEVEL || 25<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|MAXDEPTH || 26<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|MAXAFFECT || 5<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|MAX_INV_SIZE || 22<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|MAX_EQ_SIZE || 4<br />
|}<br />
<br />
==== Cellsets ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Cellsets'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CELLSET_WALLS<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|CELLSET_FLOORS<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CELLSET_CORPSES<br />
|}<br />
<br />
==== Challenges ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Challenges'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_BERSERK<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_MARKSMANSHIP<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_SHOTGUNNERY<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_LIGHTTRAVEL<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_IMPATIENCE<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_HASTE<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_PURITY<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_REDALERT<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_CARNAGE<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_MASOCHISM<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_100<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_PACIFISM<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_HUMANITY<br />
|}<br />
<br />
==== Difficulty ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Difficulty'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|DIFF_EASY<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|DIFF_MEDIUM<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|DIFF_HARD<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|DIFF_VERYHARD<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|DIFF_NIGHTMARE<br />
|}<br />
<br />
==== PlayerRank ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''PlayerRank'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|RANKEXP<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|RANKSKILL<br />
|}<br />
<br />
==== Player Statistics ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Player Statistics'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|RANK_KILLTOTAL<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|RANK_KILLMELEE<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|RANK_KILLPISTOL<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|RANK_LEVEL<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|RANK_BADGE<br />
|}<br />
<br />
==== Equip Slots ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Equip Slots'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|SLOT_ARMOR<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|SLOT_WEAPON<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|SLOT_BOOTS<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|SLOT_PREPARED<br />
|}<br />
<br />
==== Colors ====<br />
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.<br />
<br />
Also, note that the exact color the end-user sees may depend on his system settings.<br />
For the basic 16 colors, the valkyrie string coloring escape is noted.<br />
{{Template:Color}}<br />
{{Template:Special_Color}}<br />
<br />
== Flags ==<br />
<br />
==== Being Flags ====<br />
{{Template:Being_Flags}}<br />
<br />
Some flags have no effect on non-player beings. Most trait flags are that way.<br />
<br />
==== Generic Flags ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=3 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Generic Flags'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|F_OVERLAY<br />
|This flag is related to the graphical version.<br />
|}<br />
<br />
==== Empty Flags ====<br />
Empty flags are used with various functions to control the selection of random coords.<br />
<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Empty Flags'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOITEMS<br />
|Excludes cells that contain an item.<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOBEINGS<br />
|Excludes cells that contain a being.<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOBLOCK<br />
|Excludes cells that block movement (CF_BLOCKMOVE).<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOVISION<br />
|Excludes cells that block vision (CF_BLOCKLOS).<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOSTAIRS<br />
|Excludes stairs (cells with an OnExit hook).<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOTELE<br />
|Excludes cells with a teleporter (an item with ITEMTYPE_TELE).<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOHARM<br />
|Excludes hazardous cells (CF_HAZARD).<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOSAFE<br />
|Excludes cells that are too near to the player (currently the threshold is less than or equal to distance of 5).<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOSPAWN<br />
|Excludes cells with LF_NOSPAWN.<br />
|}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Template:Being_Flags_(0.9.9.7)Template:Being Flags (0.9.9.7)2013-04-21T18:57:23Z<p>Yaflhdztioxo: moved Template:Being Flags to Template:Being Flags (0.9.9.7)</p>
<hr />
<div>{{drltable|Being Flags|2|{{Table2Col<br />
|es=background: #333;<br />
|c1=font-family:monospace; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=padding:0px 2px;<br />
|BF_BOSS|Killing this being will end the game. Other boss-only actions are usually scripted in Lua based on this flag.<br />
|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.<br />
|BF_CHARGE|Hazard tiles do not concern this being. Engine pathfinding algorithms are affected.<br />
|BF_OPENDOORS|This being can open doors. Engine pathfinding algorithms are affected.<br />
|BF_NODROP|This being will not drop their inventory or equipment when they die.<br />
|BF_NOEXP|This being will not award experience to the player. Often used to prevent exp farming.<br />
|BF_QUICKSWAP|This being has the benefits of the [[Juggler]] trait.<br />
|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.<br />
|BF_BACKPACK|This being has the ammo stacking benefits of the [[Backpack]] powerup.<br />
|BF_UNIQUENAME|This being's name is a proper noun and UI messages will treat it as such.<br />
|BF_IMPATIENT|This being will consume packs automatically. This flag is the main component of the [[Angel of Impatience]] challenge.<br />
|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.<br />
|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.<br />
|BF_BERSERKER|This being has the benefits of the [[Berserker]] trait.<br />
|BF_DARKNESS|This being does not record exploration. This is one component of the [[Angel of Darkness]] challenge.<br />
|BF_DUALGUN|This being has the benefits of the [[Dualgunner]] trait.<br />
|BF_POWERSENSE|This being can sense powerups, one of the benefits of the first level [[Intuition]] trait.<br />
|BF_BEINGSENSE|This being can sense enemies, one of the benefits of the second level [[Intuition]] trait.<br />
|BF_LEVERSENSE1|This being can sense if a lever is harmful, beneficial, or neutral, one of the benefits of the first level [[Intuition]] trait.<br />
|BF_LEVERSENSE2|This being can sense the exact effect of a lever, one of the benefits of the second level [[Intuition]] trait.<br />
|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.<br />
|BF_CLEAVE|This being has the benefits of the [[Blademaster]] trait.<br />
|BF_MAXDAMAGE|This being always rolls maximum damage. Every being gets this flag in the [[Angel of Max Carnage]] challenge.<br />
|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.<br />
|BF_VAMPYRE|This being has the benefits of the [[Vampyre]] trait.<br />
|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.<br />
|BF_ARMYDEAD|This being has the benefits of the [[Army of the Dead]] trait.<br />
|BF_FIREANGEL|This being has the benefits of the [[Fireangel]] trait.<br />
|BF_GUNKATA|This being has the benefits of the [[Gun Kata]] trait.<br />
|BF_AMMOCHAIN|This being has the benefits of the [[Ammochain]] trait.<br />
|BF_MASTERDODGE|This being has the benefits of the [[Dodgemaster]] trait.<br />
|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.<br />
|BF_BERSERK|This being has the face pounding benefits of the [[Berserk]] status effect. The speed and resistance bonuses are not included.<br />
|BF_NORUNPENALTY|This being has the benefits of the [[Running Man]] trait.<br />
|BF_PISTOLMAX|This being has the benefits of the [[Sharpshooter]] trait.<br />
|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.<br />
|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.<br />
|BF_SCAVENGER|This being has the benefits of the [[Scavenger]] trait.<br />
|BF_INSTAUSE|This being uses consumable items in 0.1s instead of the usual 1.0s. Part of the [[Technician]] class bonus.<br />
|BF_STAIRSENSE|This being always knows the location of stair tiles. Part of the [[Scout]] class bonus.<br />
|BF_POWERBONUS|Powerup effects last longer for this being. The exact bonus depends on difficulty. Part of the [[Marine]] class bonus.<br />
|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.<br />
|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.<br />
|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.<br />
|BF_BULLETDANCE|This being has the benefits of the [[Bullet Dance]] trait.<br />
|BF_SHOTTYHEAD|This being has the benefits of the [[Shottyhead]] trait.<br />
|BF_ENTRENCHMENT|This being has the benefits of the [[Entrenchment]] trait.<br />
|BF_MODEXPERT|This being can mod unique items. Part of the [[Technician]] class bonus.<br />
|BF_SELFIMMUNE|This being cannot be hurt by its own attack. [[Arch-vile|Arch-Viles]] and [[Cyberdemon|Cyberdemons]] are two such beings.<br />
|BF_KNOCKIMMUNE|This being is immune to knockback. Largely a characteristic of boss level enemies.<br />
|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.<br />
|BF_GUNRUNNER|This being has the benefits of the [[Gunrunner]] trait.<br />
|}}<br />
}}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Template:Being_FlagsTemplate:Being Flags2013-04-21T18:57:23Z<p>Yaflhdztioxo: moved Template:Being Flags to Template:Being Flags (0.9.9.7)</p>
<hr />
<div>#REDIRECT [[Template:Being Flags (0.9.9.7)]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:ConstantsModding:Constants2013-04-21T18:56:11Z<p>Yaflhdztioxo: /* Flags */</p>
<hr />
<div>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.<br />
<br />
== Engine Enums ==<br />
<br />
==== ItemType ====<br />
<br />
Every item has a type that determines how the engine treats it.<br />
<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TItemType'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_NONE<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_RANGED<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_NRANGED<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_ARMOR<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_MELEE<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_AMMO<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_PACK<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_POWER<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_BOOTS<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_TELE<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_LEVER<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ITEMTYPE_AMMOPACK<br />
|}<br />
<br />
==== BodyTarget ====<br />
<br />
Sources of damage must specify a body target to determine which sources of armor are used. Inherent armor bonuses always apply.<br />
<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TBodyTarget'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|TARGET_INTERNAL<br />
|Protection from boots and armor will be ignored.<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|TARGET_TORSO<br />
|Protection from armor counts but protection from boots does not.<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|TARGET_FEET<br />
|Protection from boots counts but protection from armor does not.<br />
|}<br />
<br />
==== EqSlot ====<br />
<br />
It is preferred to use the (equivalent) [[#Equip Slots|slot]] constants.<br />
<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TEqSlot'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EFTORSO<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EFWEAPON<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EFBOOTS<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EFWEAPON2<br />
|}<br />
<br />
==== StatusEffect ====<br />
<br />
[[Modding:Affects|Affects]] specify one of these status effects that will apply a color scheme to all the tiles on the HUD.<br />
<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TStatusEffect'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|STATUSNORMAL<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|STATUSINVERT<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|STATUSRED<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|STATUSGREEN<br />
|}<br />
<br />
==== DamageType ====<br />
<br />
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 [[Damage type|here]].<br />
<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TDamageType'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_BULLET<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_MELEE<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_SHARPNEL [sic]<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_ACID<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_FIRE<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_PLASMA<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|DAMAGE_IGNOREARMOR<br />
|}<br />
<br />
==== AltFire ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TAltFire'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ALT_NONE<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ALT_CHAIN<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ALT_THROW<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ALT_SCRIPT<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ALT_AIMED<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|ALT_SINGLE<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|ALT_WHIRLWIND<br />
|}<br />
<br />
==== AltReload ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TAltReload'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|RELOAD_NONE<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|RELOAD_SCRIPT<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|RELOAD_FULL<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|RELOAD_DUAL<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|RELOAD_SINGLE<br />
|}<br />
<br />
==== ExplosionFlag ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=3 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''TExplosionFlag'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EFSELFHALF<br />
|Deals half damage to the active being.<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EFSELFKNOCKBACK<br />
|Gives extra knockback to the active being.<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EFSELFSAFE<br />
|Deals no damage to the active being.<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EFAFTERBLINK<br />
|Blinks the screen after the explosion finishes.<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EFCHAIN<br />
|Causes secondary explosions (as the [[BFG 9000]]).<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EFHALFKNOCK<br />
|Causes half the usual knockback.<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EFNOKNOCK<br />
|Doesn't cause knockback.<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EFRANDOMCONTENT<br />
|Transmutes some cells in the explosion to the explosion's content cell; the rules is to transmute when damage is greater than 20.<br />
|}<br />
<br />
====Level Flag====<br />
{{Template:Level_Flags}}<br />
<br />
====Light Flag====<br />
{{Template:Light_Flags}}<br />
<br />
== Constants ==<br />
<br />
==== Maximums ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Maximums'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|MAXX || 78<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|MAXY || 20<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|BOSS_LEVEL || 25<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|MAXDEPTH || 26<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|MAXAFFECT || 5<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|MAX_INV_SIZE || 22<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|MAX_EQ_SIZE || 4<br />
|}<br />
<br />
==== Cellsets ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Cellsets'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CELLSET_WALLS<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|CELLSET_FLOORS<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CELLSET_CORPSES<br />
|}<br />
<br />
==== Challenges ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Challenges'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_BERSERK<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_MARKSMANSHIP<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_SHOTGUNNERY<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_LIGHTTRAVEL<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_IMPATIENCE<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_HASTE<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_PURITY<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_REDALERT<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_CARNAGE<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_MASOCHISM<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_100<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_PACIFISM<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|CHALLENGE_HUMANITY<br />
|}<br />
<br />
==== Difficulty ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Difficulty'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|DIFF_EASY<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|DIFF_MEDIUM<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|DIFF_HARD<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|DIFF_VERYHARD<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|DIFF_NIGHTMARE<br />
|}<br />
<br />
==== PlayerRank ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''PlayerRank'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|RANKEXP<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|RANKSKILL<br />
|}<br />
<br />
==== Player Statistics ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Player Statistics'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|RANK_KILLTOTAL<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|RANK_KILLMELEE<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|RANK_KILLPISTOL<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|RANK_LEVEL<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|RANK_BADGE<br />
|}<br />
<br />
==== Equip Slots ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Equip Slots'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|SLOT_ARMOR<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|SLOT_WEAPON<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|SLOT_BOOTS<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|SLOT_PREPARED<br />
|}<br />
<br />
==== Colors ====<br />
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.<br />
<br />
Also, note that the exact color the end-user sees may depend on his system settings.<br />
For the basic 16 colors, the valkyrie string coloring escape is noted.<br />
{{Template:Color}}<br />
{{Template:Special_Color}}<br />
<br />
== Flags ==<br />
<br />
==== Being Flags ====<br />
{{Template:Being_Flags}}<br />
<br />
==== Generic Flags ====<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=3 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Generic Flags'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|F_OVERLAY<br />
|This flag is related to the graphical version.<br />
|}<br />
<br />
==== Empty Flags ====<br />
Empty flags are used with various functions to control the selection of random coords.<br />
<br />
{| style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
|colspan=2 style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Empty Flags'''<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOITEMS<br />
|Excludes cells that contain an item.<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOBEINGS<br />
|Excludes cells that contain a being.<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOBLOCK<br />
|Excludes cells that block movement (CF_BLOCKMOVE).<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOVISION<br />
|Excludes cells that block vision (CF_BLOCKLOS).<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOSTAIRS<br />
|Excludes stairs (cells with an OnExit hook).<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOTELE<br />
|Excludes cells with a teleporter (an item with ITEMTYPE_TELE).<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOHARM<br />
|Excludes hazardous cells (CF_HAZARD).<br />
|- style="background: #333;"<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOSAFE<br />
|Excludes cells that are too near to the player (currently the threshold is less than or equal to distance of 5).<br />
|-<br />
|style="vertical-align:top; padding-right: 2ex;"|EF_NOSPAWN<br />
|Excludes cells with LF_NOSPAWN.<br />
|}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Template:Being_Flags_(0.9.9.7)Template:Being Flags (0.9.9.7)2013-04-21T18:56:07Z<p>Yaflhdztioxo: </p>
<hr />
<div>{{drltable|Being Flags|2|{{Table2Col<br />
|es=background: #333;<br />
|c1=font-family:monospace; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=padding:0px 2px;<br />
|BF_BOSS|Killing this being will end the game. Other boss-only actions are usually scripted in Lua based on this flag.<br />
|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.<br />
|BF_CHARGE|Hazard tiles do not concern this being. Engine pathfinding algorithms are affected.<br />
|BF_OPENDOORS|This being can open doors. Engine pathfinding algorithms are affected.<br />
|BF_NODROP|This being will not drop their inventory or equipment when they die.<br />
|BF_NOEXP|This being will not award experience to the player. Often used to prevent exp farming.<br />
|BF_QUICKSWAP|This being has the benefits of the [[Juggler]] trait.<br />
|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.<br />
|BF_BACKPACK|This being has the ammo stacking benefits of the [[Backpack]] powerup.<br />
|BF_UNIQUENAME|This being's name is a proper noun and UI messages will treat it as such.<br />
|BF_IMPATIENT|This being will consume packs automatically. This flag is the main component of the [[Angel of Impatience]] challenge.<br />
|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.<br />
|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.<br />
|BF_BERSERKER|This being has the benefits of the [[Berserker]] trait.<br />
|BF_DARKNESS|This being does not record exploration. This is one component of the [[Angel of Darkness]] challenge.<br />
|BF_DUALGUN|This being has the benefits of the [[Dualgunner]] trait.<br />
|BF_POWERSENSE|This being can sense powerups, one of the benefits of the first level [[Intuition]] trait.<br />
|BF_BEINGSENSE|This being can sense enemies, one of the benefits of the second level [[Intuition]] trait.<br />
|BF_LEVERSENSE1|This being can sense if a lever is harmful, beneficial, or neutral, one of the benefits of the first level [[Intuition]] trait.<br />
|BF_LEVERSENSE2|This being can sense the exact effect of a lever, one of the benefits of the second level [[Intuition]] trait.<br />
|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.<br />
|BF_CLEAVE|This being has the benefits of the [[Blademaster]] trait.<br />
|BF_MAXDAMAGE|This being always rolls maximum damage. Every being gets this flag in the [[Angel of Max Carnage]] challenge.<br />
|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.<br />
|BF_VAMPYRE|This being has the benefits of the [[Vampyre]] trait.<br />
|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.<br />
|BF_ARMYDEAD|This being has the benefits of the [[Army of the Dead]] trait.<br />
|BF_FIREANGEL|This being has the benefits of the [[Fireangel]] trait.<br />
|BF_GUNKATA|This being has the benefits of the [[Gun Kata]] trait.<br />
|BF_AMMOCHAIN|This being has the benefits of the [[Ammochain]] trait.<br />
|BF_MASTERDODGE|This being has the benefits of the [[Dodgemaster]] trait.<br />
|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.<br />
|BF_BERSERK|This being has the face pounding benefits of the [[Berserk]] status effect. The speed and resistance bonuses are not included.<br />
|BF_NORUNPENALTY|This being has the benefits of the [[Running Man]] trait.<br />
|BF_PISTOLMAX|This being has the benefits of the [[Sharpshooter]] trait.<br />
|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.<br />
|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.<br />
|BF_SCAVENGER|This being has the benefits of the [[Scavenger]] trait.<br />
|BF_INSTAUSE|This being uses consumable items in 0.1s instead of the usual 1.0s. Part of the [[Technician]] class bonus.<br />
|BF_STAIRSENSE|This being always knows the location of stair tiles. Part of the [[Scout]] class bonus.<br />
|BF_POWERBONUS|Powerup effects last longer for this being. The exact bonus depends on difficulty. Part of the [[Marine]] class bonus.<br />
|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.<br />
|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.<br />
|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.<br />
|BF_BULLETDANCE|This being has the benefits of the [[Bullet Dance]] trait.<br />
|BF_SHOTTYHEAD|This being has the benefits of the [[Shottyhead]] trait.<br />
|BF_ENTRENCHMENT|This being has the benefits of the [[Entrenchment]] trait.<br />
|BF_MODEXPERT|This being can mod unique items. Part of the [[Technician]] class bonus.<br />
|BF_SELFIMMUNE|This being cannot be hurt by its own attack. [[Arch-vile|Arch-Viles]] and [[Cyberdemon|Cyberdemons]] are two such beings.<br />
|BF_KNOCKIMMUNE|This being is immune to knockback. Largely a characteristic of boss level enemies.<br />
|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.<br />
|BF_GUNRUNNER|This being has the benefits of the [[Gunrunner]] trait.<br />
|}}<br />
}}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:being_blueprint_(0.9.9.7)Modding:being blueprint (0.9.9.7)2013-04-21T18:54:54Z<p>Yaflhdztioxo: /* Being Flags */</p>
<hr />
<div>WIP from old pages, must refine and re-investigate<br />
<br />
<br />
------<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
If it bleeds, it leads. Beings inherit from the [[Modding:Thing|Thing]] base class which handles some basic properties in common with items. In addition the [[Modding:Player|Player]] inherits this class, so anything you can do to creatures can be done to the player as well.<br />
<br />
== Prototype ==<br />
<br />
New beings are created from being prototypes. Think of a being prototype as a recipe for creating new beings. There can be multiple former humans, but they all came from the same prototype. Prototypes are declared by passing a table with the desired properties to the Beings function. [[#Engine Hooks|Engine hooks]] may also be included in the prototype. Mostly, the prototype's properties just describe beings' initial properties (occasionally with different names). Beings' properties can also mostly be changed after they are instantiated. Required fields are underlined. Sometimes required fields can safely be omitted, but this will generate a message in the log file. All being prototypes are stored in a global table called beings. This table can be indexed by id or nid.<br />
{|class="wikitable" style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
! colspan="3" style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Being Prototype'''<br />
{{Table3Col<br />
|es=background: #333;<br />
|c1=font-weight:bold; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=vertical-align:top; padding:0px 2px;<br />
|c3=padding:0px 2px;<br />
|'''string'''|<u>name</u>|This is the being's name.<br />
|'''string'''|name_plural|This is the being's name_plural. By default, this is the name with an "s" appended.<br />
|'''string'''|<u>ascii</u>|This is the being's picture. It should be a single character string.<br />
|'''string'''|id|This is the being's sid. It must be distinct from other string ids. (The numeric id is automatically assigned to a field called nid.) Only the first 20 characters will be used. The default is the first word of the name in all lowercase.<br />
|'''integer''' '''list'''|overlay|This field is only used in the graphical version. It describes a color transformation to be applied to the being's sprite. This will create overlay_red, overlay_green, overlay_blue, and overlay_alpha fields in the being prototype.<br />
|'''integer'''|XP|This is the being's expvalue. By default, it is <font-family: monospace>3xD<sup>2</sup>+20, where D is the being's <u>danger</u> (see below).<br />
|[[Modding:Cell|Cell ID]]|corpse|The determines the corpse left by the being. If the value is true, a new corpse cell will automatically be created. Otherwise this field is interpretted as a cell id. After a being is declared, this field will have been translated to a number. The default is true.<br />
|[[Modding:Item|Item Prototype]]|weapon|If this field is included, a new item will be declared and automatically equipped for beings generated from this prototype. The item prototype will automatically be a natural ranged weapon, have an id assigned, have zero weight, have no sprite, and have the IF_NODROP and IF_NOAMMO flags.<br />
|'''integer'''|<u>sprite</u>|This is the being's sprite. (Use 0 for no sprite.)<br />
|[[Modding:Constants#Colors|Color]]|<u>color</u>|This is the being's color.<br />
|'''integer'''|toDam|This is the being's toDam. (This bonus only applies to melee attacks.) The default is 0.<br />
|'''integer'''|toHit|This is the being's toHit. The default is 0.<br />
|'''integer'''|speed|This is the being's speed. (Remember, the maximum allowed speed is 255.) The default is 100.<br />
|'''integer'''|armor|This is the being's armor. The default is 0.<br />
|'''integer'''|<u>danger</u>|This is a [[Monster Generation|monster generation]] parameter.<br />
|'''integer'''|<u>weight</u>|This is a [[Monster Generation|monster generation]] parameter.<br />
|'''integer'''|<u>minLev</u>|This is a [[Monster Generation|monster generation]] parameter.<br />
|'''integer'''|maxLev|This is a [[Monster Generation|monster generation]] parameter. The default is 200.<br />
|'''integer'''|HP|This is the being's hpmax and starting hp. The default is 10.<br />
|'''integer'''|bulk|This parameter is unused. The default is 100.<br />
|'''integer'''|group|Monsters from different groups will fight each other if they use the default AI. Oddly, the default is "weapon-other" which, as a string, translates to 0. The player is in group 1.<br />
|'''integer'''|attackchance|This is the being's attackchance The default is 75.<br />
|'''integer'''|toHitMelee|This is the being's toHitMelee. The default is 0.<br />
|[[Modding:Constants#Being Flags|Being Flag]] '''list'''|flags|The flags in this list will be included in the being's flag set. Upon instantiation, a flagSet property is added to the prototype will include these flags (and possibly some automatic flags) in set format. The default is an empty list.<br />
|'''string'''|sound_id|If included and the being doesn't have sound bindings configured, then it will look for sound bindings under its sound_id.<br />
|[[Modding:AI|AI ID]]|ai_type|This determines the being's AI. By default, the old pascal AI is used. (The pascal AI doesn't have an id.)<br />
|'''integer'''|vision|This is the being's vision. The default is 9. (The player also has vision 9 by default.)<br />
|'''integer'''|res_bullet|This is the being's res_bullet. The default is 0.<br />
|'''integer'''|res_melee|This is the being's res_melee. The default is 0.<br />
|'''integer'''|res_shrapnel|This is the being's res_shrapnel. The default is 0.<br />
|'''integer'''|res_acid|This is the being's res_acid. The default is 0.<br />
|'''integer'''|res_fire|This is the being's res_fire. The default is 0.<br />
|'''integer'''|res_plasma|This is the being's res_plasma. The default is 0.<br />
|'''string'''|<u>desc</u>|This is the description of the being displayed in the more information view.<br />
|'''string'''|kill_desc|If included, this being will have a special kill description in the mortem.<br />
|'''string'''|kill_desc_melee|As kill_desc, but for melee kills.<br />
|}}<br />
|}<br />
=== Flags ===<br />
{{Template:Being_Flags}}<br />
<br />
== Engine Hooks ==<br />
Specifying one or more of these hooks in the prototype will allow for greater customization.<br />
<br />
{|class="wikitable" style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;"<br />
! colspan="2" style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Being Hooks'''<br />
{{Table2Col<br />
|es=background: #333;<br />
|c1=font-weight:bold; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=padding:0px 2px;<br />
|'''void'''|[[#being_OnCreate|OnCreate]]([[Modding:Being|Being]] self) <br />
|'''void'''|[[#being_OnAction|OnAction]]([[Modding:Being|Being]] self) <br />
|'''void'''|[[#being_OnDie|OnDie]]([[Modding:Being|Being]] self, '''boolean''' overkill) <br />
|}}<br />
|}<br />
<br />
{{Anchor|being_OnCreate}}<br />
;OnCreate([[Modding:Being|Being]] self) <br />
:This is called when the being is created.<br />
----<br />
{{Anchor|being_OnAction}}<br />
;OnAction([[Modding:Being|Being]] self) <br />
:This is called at the beginning of each of the being's turns. (Note that turns are only differentiated if time elapses in between.)<br />
----<br />
{{Anchor|being_OnDie}}<br />
;OnDie([[Modding:Being|Being]] self, '''boolean''' overkill) <br />
:This is called when the being dies. ''overkill'' is true if the being was gibbed.</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Template:Being_Flags_(0.9.9.7)Template:Being Flags (0.9.9.7)2013-04-21T18:54:23Z<p>Yaflhdztioxo: Created page with "==== Being Flags ==== {{drltable|Being Flags|2|{{Table2Col |es=background: #333; |c1=font-family:monospace; text-align:right; vertical-align:top; padding:0px 2px; |c2=paddi..."</p>
<hr />
<div>==== Being Flags ====<br />
{{drltable|Being Flags|2|{{Table2Col<br />
|es=background: #333;<br />
|c1=font-family:monospace; text-align:right; vertical-align:top; padding:0px 2px;<br />
|c2=padding:0px 2px;<br />
|BF_BOSS|Killing this being will end the game. Other boss-only actions are usually scripted in Lua based on this flag.<br />
|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.<br />
|BF_CHARGE|Hazard tiles do not concern this being. Engine pathfinding algorithms are affected.<br />
|BF_OPENDOORS|This being can open doors. Engine pathfinding algorithms are affected.<br />
|BF_NODROP|This being will not drop their inventory or equipment when they die.<br />
|BF_NOEXP|This being will not award experience to the player. Often used to prevent exp farming.<br />
|BF_QUICKSWAP|This being has the benefits of the [[Juggler]] trait.<br />
|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.<br />
|BF_BACKPACK|This being has the ammo stacking benefits of the [[Backpack]] powerup.<br />
|BF_UNIQUENAME|This being's name is a proper noun and UI messages will treat it as such.<br />
|BF_IMPATIENT|This being will consume packs automatically. This flag is the main component of the [[Angel of Impatience]] challenge.<br />
|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.<br />
|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.<br />
|BF_BERSERKER|This being has the benefits of the [[Berserker]] trait.<br />
|BF_DARKNESS|This being does not record exploration. This is one component of the [[Angel of Darkness]] challenge.<br />
|BF_DUALGUN|This being has the benefits of the [[Dualgunner]] trait.<br />
|BF_POWERSENSE|This being can sense powerups, one of the benefits of the first level [[Intuition]] trait.<br />
|BF_BEINGSENSE|This being can sense enemies, one of the benefits of the second level [[Intuition]] trait.<br />
|BF_LEVERSENSE1|This being can sense if a lever is harmful, beneficial, or neutral, one of the benefits of the first level [[Intuition]] trait.<br />
|BF_LEVERSENSE2|This being can sense the exact effect of a lever, one of the benefits of the second level [[Intuition]] trait.<br />
|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.<br />
|BF_CLEAVE|This being has the benefits of the [[Blademaster]] trait.<br />
|BF_MAXDAMAGE|This being always rolls maximum damage. Every being gets this flag in the [[Angel of Max Carnage]] challenge.<br />
|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.<br />
|BF_VAMPYRE|This being has the benefits of the [[Vampyre]] trait.<br />
|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.<br />
|BF_ARMYDEAD|This being has the benefits of the [[Army of the Dead]] trait.<br />
|BF_FIREANGEL|This being has the benefits of the [[Fireangel]] trait.<br />
|BF_GUNKATA|This being has the benefits of the [[Gun Kata]] trait.<br />
|BF_AMMOCHAIN|This being has the benefits of the [[Ammochain]] trait.<br />
|BF_MASTERDODGE|This being has the benefits of the [[Dodgemaster]] trait.<br />
|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.<br />
|BF_BERSERK|This being has the face pounding benefits of the [[Berserk]] status effect. The speed and resistance bonuses are not included.<br />
|BF_NORUNPENALTY|This being has the benefits of the [[Running Man]] trait.<br />
|BF_PISTOLMAX|This being has the benefits of the [[Sharpshooter]] trait.<br />
|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.<br />
|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.<br />
|BF_SCAVENGER|This being has the benefits of the [[Scavenger]] trait.<br />
|BF_INSTAUSE|This being uses consumable items in 0.1s instead of the usual 1.0s. Part of the [[Technician]] class bonus.<br />
|BF_STAIRSENSE|This being always knows the location of stair tiles. Part of the [[Scout]] class bonus.<br />
|BF_POWERBONUS|Powerup effects last longer for this being. The exact bonus depends on difficulty. Part of the [[Marine]] class bonus.<br />
|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.<br />
|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.<br />
|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.<br />
|BF_BULLETDANCE|This being has the benefits of the [[Bullet Dance]] trait.<br />
|BF_SHOTTYHEAD|This being has the benefits of the [[Shottyhead]] trait.<br />
|BF_ENTRENCHMENT|This being has the benefits of the [[Entrenchment]] trait.<br />
|BF_MODEXPERT|This being can mod unique items. Part of the [[Technician]] class bonus.<br />
|BF_SELFIMMUNE|This being cannot be hurt by its own attack. [[Arch-vile|Arch-Viles]] and [[Cyberdemon|Cyberdemons]] are two such beings.<br />
|BF_KNOCKIMMUNE|This being is immune to knockback. Largely a characteristic of boss level enemies.<br />
|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.<br />
|BF_GUNRUNNER|This being has the benefits of the [[Gunrunner]] trait.<br />
|}}<br />
}}</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/ScoutScout2013-04-21T18:53:54Z<p>Yaflhdztioxo: Redirected page to Classes#Scout</p>
<hr />
<div>#REDIRECT [[Classes#Scout]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/MarineMarine2013-04-21T18:53:52Z<p>Yaflhdztioxo: Redirected page to Classes#Marine</p>
<hr />
<div>#REDIRECT [[Classes#Marine]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/TechnicianTechnician2013-04-21T18:53:49Z<p>Yaflhdztioxo: Redirected page to Classes#Technician</p>
<hr />
<div>#REDIRECT [[Classes#Technician]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/GunrunnerGunrunner2013-04-21T18:51:36Z<p>Yaflhdztioxo: Redirected page to Traits#Gunrunner</p>
<hr />
<div>#REDIRECT [[Traits#Gunrunner]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Angel_of_DarknessAngel of Darkness2013-04-21T18:50:26Z<p>Yaflhdztioxo: Redirected page to Game Settings#Challenges</p>
<hr />
<div>#REDIRECT [[Game Settings#Challenges]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Light_AmplificationLight Amplification2013-04-21T18:18:51Z<p>Yaflhdztioxo: Redirected page to Effects#Light Amplification</p>
<hr />
<div>#REDIRECT [[Effects#Light Amplification]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/EnvirosuitEnvirosuit2013-04-21T18:18:12Z<p>Yaflhdztioxo: Redirected page to Effects#Envirosuit</p>
<hr />
<div>#REDIRECT [[Effects#Envirosuit]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/InvulnerableInvulnerable2013-04-21T18:17:48Z<p>Yaflhdztioxo: Redirected page to Effects#Invulnerable</p>
<hr />
<div>#REDIRECT [[Effects#Invulnerable]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/InvincibleInvincible2013-04-21T18:17:34Z<p>Yaflhdztioxo: Redirected page to Effects#Invulnerable</p>
<hr />
<div>#REDIRECT [[Effects#Invulnerable]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/BerserkBerserk2013-04-21T18:16:41Z<p>Yaflhdztioxo: Redirected page to Effects#Berserk</p>
<hr />
<div>#REDIRECT [[Effects#Berserk]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/EffectsEffects2013-04-21T18:14:49Z<p>Yaflhdztioxo: </p>
<hr />
<div>{{infostrat switch}}<br />
There are a few items that give the player a temporary enhancement. These enhancements are shown in the game's heads-up display. The duration of these effects is based on the number of actions that the player takes rather than the standard measure of [[time]]. (Only actions that take at least 0.1s of game time count.) When the counter for an effect is at 5 turns or less, the indicator on the heads-up display will darken.<br />
<br />
== Berserk ==<br />
<br />
Being berserk gives 60% to all the player's [[resistance]]s, increases the player's speed by 50% for all actions, doubles melee damage before armor reduction. The player can't [[Tactics|run]] while berserking.<br />
<br />
Berserk is most commonly received from [[Berserk Pack]]s and the [[Traits#Berserker|Berserker]] trait.<br />
<br />
<br />
== Invulnerable ==<br />
<br />
Being invulnerable prevents the player or the player's equipment from taking any damage whatsoever. The player is also healed to max health as long as they aren't on a challenge that prevents healing. The player does still suffer from knockback.<br />
<br />
Invulnerable is most commonly received from [[Invulnerability Globe]]s.<br />
<br />
<br />
== Envirosuit ==<br />
<br />
The envirosuit effect completely negates all [[Fluids|acid and lava]] damage from affecting the player or his boots, and gives 25% acid & fire resistance.<br />
<br />
Envirosuit can only be received from the [[envirosuit pack]] item.<br />
<br />
<br />
== Light Amplification ==<br />
<br />
The light amplification effect increases the player's sight radius by 4 tiles.<br />
<br />
Light Amplification can only be received from the [[Light-Amp Goggles]] powerup.</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:being_objectModding:being object2013-04-20T23:13:31Z<p>Yaflhdztioxo: Redirected page to Modding:being object (0.9.9.7)</p>
<hr />
<div>#REDIRECT [[Modding:being object (0.9.9.7)]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:being_APIModding:being API2013-04-20T23:13:12Z<p>Yaflhdztioxo: Redirected page to Modding:being API (0.9.9.7)</p>
<hr />
<div>#REDIRECT [[Modding:being API (0.9.9.7)]]</div>Yaflhdztioxohttps://drl.chaosforge.org/wiki/Modding:being_blueprintModding:being blueprint2013-04-20T23:12:49Z<p>Yaflhdztioxo: Redirected page to Modding:being blueprint (0.9.9.7)</p>
<hr />
<div>#REDIRECT [[Modding:being blueprint (0.9.9.7)]]</div>Yaflhdztioxo