Difference between revisions of "Manual:color.lua"

From DoomRL Wiki

Jump to: navigation, search
m (link to sIDs)
(Revamped, will need to revisit when we cover new ids)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
__NOTOC__
+
In console mode all game objects are associated with a color. While these are automatically set on a per-object basis there is a configuration file--colors.lua--which allows you to customize them to your own preferences.
All game tiles are associated with a particular color. While these are automatically set on a per-object basis, color.lua grants you the option to customize these tiles however you like, using the [[Modding:sID|sID]].
+
  
As color.lua itself is rather small (given that all objects have a predetermined color in the source code), this page seeks to fully explain as much about color customization as possible.
+
== Color Definitions ==
 +
{{Template:Color}}
 +
{{Template:Special_Color}}
  
==Color Definitions==
+
More information on colors can be found at [[Modding:Color]]
{|
+
 
! scope="col" align="left"                  | Color
+
== Customizing colors ==
! scope="col" align="left" cell-padding="2ex"| Associated With:
+
To customize an object you will need that object's [[Modding:sID|id]] or color_id. Once you have the id add it to the colors.lua file!
|-style="background:#333"
+
<source lang="lua">
|BLUE
+
Colors = {
|[[Fluids|water]] (dark), [[combat shotgun]], [[phase device]], [[former commando]], [[enemies#nightmare enemies|nightmare variants]], [[John Carmack]]
+
--This is a cell. Cells have both a light color (the cell is visible)
|-
+
--and a dark color (the cell is out of vision).
|GREEN
+
--For cells the proper syntax is [id]_dark = COLOR and [id]_light = COLOR
|[[Fluids|acid]] (dark), [[envirosuit pack]]
+
floor_dark = GREEN,
|-style="background:#333"
+
floor_light = BLUE,
|CYAN
+
 
|[[plasma rifle]], [[power cell]]
+
--These are items and beings.
|-
+
--The proper syntax for non-cells is [id] = COLOR
|RED
+
former = RED,
|blood, bloodstone, [[Fluids|lava]] (dark), [[chaingun]], [[large med-pack]], [[Large Health Globe]], [[Berserk Pack]], [[former captain]], [[cacodemon]], [[baron of hell]], [[Angel of Death]], [[Cyberdemon]]
+
ammo = YELLOW,
|-style="background:#333"
+
 
|MAGENTA
+
--This is a lava lever. Perhaps you think you can distinguish
|unused
+
-- between different lever types by color. Think again!
|-
+
lever_flood_lava = RED, --Doesn't work!
|BROWN
+
lever = RED, --Makes ALL levers red
|door, [[rocket launcher]], [[rocket]], [[pain elemental]], [[mancubus]]
+
}
|-style="background:#333"
+
</source>
|LIGHTGRAY
+
|wall/floor (light), [[pistol]], [[10mm ammo]], [[former human]]
+
|-
+
|DARKGRAY
+
|wall/floor (dark), [[shotgun]], [[shotgun shell]], [[former sergeant]]
+
|-style="background:#333"
+
|LIGHTBLUE
+
|[[Fluids|water]] (light), [[homing phase device]], [[Supercharge Globe]]
+
|-
+
|LIGHTGREEN
+
|[[Fluids|acid]] (light), [[Specials|unique equipment]], [[Arena Master]]
+
|-style="background:#333"
+
|LIGHTCYAN
+
|teleporter, [[Assemblies|assembled equipment]]
+
|-
+
|LIGHTRED
+
|[[small med-pack]], [[Small Health Globe]], [[demon]], [[bruiser brother]]
+
|-style="background:#333"
+
|LIGHTMAGENTA
+
|[[Specials|exotic equipment]], [[agony elemental]]
+
|-
+
|YELLOW
+
|[[Fluids|lava]] (light), [[lost soul]], [[arch-vile]], [[lava elemental]]
+
|-style="background:#333"
+
|WHITE
+
|lever, [[double shotgun]], [[Invulnerability Globe]], [[revenant]], [[shambler]]
+

Latest revision as of 04:27, 8 December 2012

In console mode all game objects are associated with a color. While these are automatically set on a per-object basis there is a configuration file--colors.lua--which allows you to customize them to your own preferences.

Color Definitions

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

More information on colors can be found at Modding:Color

Customizing colors

To customize an object you will need that object's id or color_id. Once you have the id add it to the colors.lua file!

Colors = {
	--This is a cell. Cells have both a light color (the cell is visible)
	--and a dark color (the cell is out of vision).
	--For cells the proper syntax is [id]_dark = COLOR and [id]_light = COLOR
	floor_dark  = GREEN,
	floor_light = BLUE,
 
	--These are items and beings.
	--The proper syntax for non-cells is [id] = COLOR
	former = RED,
	ammo = YELLOW,
 
	--This is a lava lever. Perhaps you think you can distinguish
	-- between different lever types by color. Think again!
	lever_flood_lava = RED, --Doesn't work!
	lever = RED, --Makes ALL levers red
}
Personal tools