Difference between revisions of "Manual:color.lua"

From DoomRL Wiki

Jump to: navigation, search
m (added color ID #s)
(Revamped, will need to revisit when we cover new ids)
 
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"                  | ID #
+
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!
! scope="col" align="left" cell-padding="2ex"| Associated With:
+
<source lang="lua">
|- style="background:#333"
+
Colors = {
|BLACK
+
--This is a cell. Cells have both a light color (the cell is visible)
|0
+
--and a dark color (the cell is out of vision).
|Background color for every object
+
--For cells the proper syntax is [id]_dark = COLOR and [id]_light = COLOR
|-
+
floor_dark = GREEN,
|BLUE
+
floor_light = BLUE,
|1
+
 
|[[Fluids|water]] (dark), [[combat shotgun]], [[phase device]], [[former commando]], [[enemies#nightmare enemies|nightmare variants]], [[John Carmack]]
+
--These are items and beings.
|- style="background:#333"
+
--The proper syntax for non-cells is [id] = COLOR
|GREEN
+
former = RED,
|2
+
ammo = YELLOW,
|[[Fluids|acid]] (dark), [[envirosuit pack]]
+
 
|-
+
--This is a lava lever. Perhaps you think you can distinguish
|CYAN
+
-- between different lever types by color. Think again!
|3
+
lever_flood_lava = RED, --Doesn't work!
|[[plasma rifle]], [[power cell]]
+
lever = RED, --Makes ALL levers red
|- style="background:#333"
+
}
|RED
+
</source>
|4
+
|blood, bloodstone, [[Fluids|lava]] (dark), [[large med-pack]], [[Large Health Globe]], [[Berserk Pack]], [[cacodemon]], [[Angel of Death]]
+
|-
+
|MAGENTA
+
|5
+
|unused
+
|- style="background:#333"
+
|BROWN
+
|6
+
|door, [[rocket launcher]], [[rocket]], [[pain elemental]], [[mancubus]], [[Cyberdemon]]
+
|-
+
|LIGHTGRAY
+
|7
+
|wall/floor (light), [[pistol]], [[10mm ammo]], [[former human]]
+
|- style="background:#333"
+
|DARKGRAY
+
|8
+
|wall/floor (dark), [[shotgun]], [[shotgun shell]], [[former sergeant]]
+
|-
+
|LIGHTBLUE
+
|9
+
|[[Fluids|water]] (light), [[homing phase device]], [[Supercharge Globe]]
+
|- style="background:#333"
+
|LIGHTGREEN
+
|10
+
|[[Fluids|acid]] (light), [[Specials|unique equipment]], [[Arena Master]]
+
|-
+
|LIGHTCYAN
+
|11
+
|teleporter, [[Assemblies|assembled equipment]]
+
|- style="background:#333"
+
|LIGHTRED
+
|12
+
|[[chaingun]], [[small med-pack]], [[Small Health Globe]], [[former captain]], [[bruiser brother]]
+
|-
+
|LIGHTMAGENTA
+
|13
+
|[[Specials|exotic equipment]], [[demon]], [[baron of hell]], [[agony elemental]]
+
|- style="background:#333"
+
|YELLOW
+
|14
+
|[[Fluids|lava]] (light), [[lost soul]], [[arch-vile]], [[lava elemental]]
+
|-
+
|WHITE
+
|15
+
|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