Custom crosshairs
This article is a stub. Please help the ZDoom Wiki by adding to it.
Creating your own crosshairs
ZDoom includes 7 "built-in" crosshairs (defined in ZDoom.pk3) that are present by default and selectable from the Display menu. However, if you wish to provide your own custom crosshairs, you can easily do so. Crosshairs can be placed in a WAD or PK3 and loaded manually from the command line, or added to an autoload folder to load up every time you start ZDoom, so you can easily replace your crosshair with one of your own making. You can also include custom crosshairs with your mods and allow the user to select them from the menu using the XHAIRS lump, or apply them to custom weapons directly using A_SetCrosshair.
To create a custom crosshair, you need to make two images -- one for the "big" version of your crosshair, and one for the small version. The small version is only used if the player is using a very low screen resolution; otherwise the big version will be used.
You can create the images in any image format that ZDoom supports. It is recommended to use a format which supports an alpha channel so you have direct control over the transparency of the crosshair. You can also use a grayscale image, with white areas showing as fully opaque and black as fully transparent.
Save your small version as XHAIRSxx, and your large version as XHAIRBxx, where xx is the number of the crosshair. (If the number is a single digit, you do not need to include a leading zero) The default crosshairs use XHAIRS1 - XHAIRS7 and XHAIRB1 - XHAIRB7, so it's a good idea not to use those numbers unless you intend to replace them. The actual number you choose does not matter; it is merely the number that you will refer to when setting the crosshair from the console or using A_SetCrosshair.
As a final step, you can optionally add your crosshair to the XHAIRS lump along with a text description. If you do so, your crosshair will be selectable from the in-game menu. Otherwise it won't, but it can still be selected from the console assuming the user knows the crosshair number.