Crosshair Customization

Overview

This article is intended to help one understand how to tweak SMOD's crosshair/targeting reticule to their liking. If you've ever fiddled with the crosshair variable in the game's console, you know that crosshair 0 will remove it entirely, 1 will set it to HL2's normal style, and 2 will give you a new and funky blue cross. What you may not know is that simple blue cross can be changed to any color or made into virtually any shape(s) you could want. The latter is simpler than you might think once you "get it", but it can be confusing on the way there.

It can be helpful while going through this page to run SMOD in a window so you can quickly and easily switch back and forth as you toy around with things. You can do this by right-clicking on SMOD in your Steam games menu, choosing Properties, choosing Set Launch Options, and adding -window.

Changing Your Colors

The variable crosshair_color is all you need in shifting the SMOD crosshair's color. The variable is in Red-Green-Blue-Opacity form, meaning that the first three numbers of the variable's setting indicate how much of each color makes up the total color, and how opaque (non-transparent) that color is. The number range for each is 0-255.

As examples, crosshair_color 255 255 0 128 would make the crosshair bright yellow and about 50% transparent,

CrossYellow.PNG

while 255 0 0 225 would give a completely red crosshair that's only about 10% transparent.

CrossRed.PNG

If you need help finding values for a color, use a reference such as this one (R;G;B Decimal).

Shape Shifting

Before moving on, some may need a quick explanation or refresher on 2D (XY) coordinates since we'll be using those to draw our shapes. Those with a solid grasp can skip this part.

Say the crude graph below represents the game world. The center represents the center of the screen.

CrossGraph_NoPointsd.png

On a graph like this, coordinates are written in XY form. For this article, you can treat X-axis coordinates as simply being left/right and Y-axis coordinates as up/down. So if I were to draw a square at "1, 6" on the chart, I'd be placing the square one unit to the right of the center and six units upward, like in the graph below.

CrossGraph_Points2c.png

Also shown are "-2, 3", "4, -4", and "-4, 5". Hope you can dig it because you'll need to understand the concept once you read on.

How-To

The variable you'll be using to make shapes is crosshair_data. A good place to start might be breaking down what makes the default + crosshair tick. Note that the Y axis is inverted when dealing with this variable; "1, -6" means 6 units upward, not the other way around.

Below's our default blue crosshair in action, along with its crosshair_data code.

Cross1.PNGCross2.PNG
l 0 -6 0 -2 0 -5 l -6 0 -2 0 -5 0 l 0 6 0 2 0 5 l 6 0 2 0 5 0 e

If you think it's complicated, don't. It's mostly just the odd way it has to be written.

The very first character is a lowercase L and signals that the next few numbers are for drawing a line (here, the topmost).

Immediately after, 0 -6 marks those coordinates as the starting point for the line, with -2 0 as the ending point. 0 -5 controls how much the line will move when you run around or fire. In this case, it cannot move left or right at all but is allowed to move a maximum 5 units upward.

The other lines are written in the same way, with each starting near the center and then tracing 4 units inward, and set so they all scatter apart when inaccuracy rears its ugly head. As for the e, it simply marks the end of the data. It's not strictly needed, but anything extra will be ignored. All pretty simple when you get down to it, eh?

Probably simpler still is making circles, though the format is slightly different. Instead of [start, end, movement], circles use [origin, size / sides, move]. Below is a simple circle that begins from the center (0, 0) with a circumference of 16 and a movement value of 4.

Circle1.PNGCircle2.PNG
c 0 0 16 4 e

Note that you can combine circles with lines and other circles to create more complex reticules. One more variable to discuss before we wrap it up: crosshair_vis_in_ironsightmode. When turned on (1), crosshairs will still show up when using a weapon's iron sight view. This is usually to align weapons' iron sights with the crosshair so that they're accurate, but it also has some use while messing with crosshair_data, since it provides an easy way to see the center point of your creation.

Conclusion/Notes

That should be all you need to know about crosshairs to make some new ones of your own. What follows are a few small things skipped over for the sake of succinctness.

l, c and e will not function normally if they're capitalized.
• There is a maximum numbers of values that can be plugged in. You won't hit it in most cases, but it's something to keep in mind. The Duplex example below was limited to three "lines" because of this.
• Coordinates must be whole numbers. Decimal values will not work.
• When setting a size for circles, make sure it's a big enough number and that it's also an even number. 0-4 don't make anything close to a circle (although 4 may be good for a quick diamond shape that won't need expanding), and this author suggests 8+ for a more or less proper circle. As for odd numbers, they make the shape noticeably lopsided thanks to an uneven number of sides. To illustrate, below is a crosshair with the center circle's size set to 5, as seen in SMOD Outbreak:

LopCirc.PNG


Other Examples

Armed Assault Style #1

ArmA11.PNGArmA12.PNGCrossArmA1_Stable_t.jpgCrossArmA1_Firing_t.jpg
l -10 0 -3 0 -10 0 l 10 0 3 0 10 0 l -3 0 -3 15 -10 0 l 3 0 3 15 10 0 l -1 0 1 0 0 10

Armed Assault Style #2

ArmA21.PNGArmA22.PNGCrossArmA2_Stable_t.jpgCrossArmA2_Firing_t.jpg
l -12 0 -5 0 0 0 l -5 0 -5 20 0 0 l 12 0 5 0 0 0 l 5 0 5 20 0 0 l 0 4 0 -1 0 -10

Double Cross (Horizontal / Vertical)

DCross1.PNGDCross2.PNGCrossDCross_Stable_t.jpgCrossDCross_Firing_t.jpg
l 0 -9 0 -3 0 -5 l -9 0 -3 0 -5 0 l 0 9 0 3 0 5 l 9 0 3 0 5 0 l -6 -6 -2 -2 -9 -9 l -6 6 -2 2 -9 9 l 6 6 2 2 9 9 l 6 -6 2 -2 9 -9

Diamond

Diamond1.PNGDiamond2.PNGCrossDiamond_Stable_t.jpgCrossDiamond_Firing_t.jpg
l -4 0 0 4 -5 5 l 4 0 0 4 5 5 l -4 0 0 -4 -5 -5 l 4 0 0 -4 5 -5

Duplex Style

Dup1.PNGDup2.PNGCrossDup_Stable_t.jpgCrossDup_Firing_t.jpg
l 0 0 -30 0 -4 0 l -10 -1 -30 -1 -4 0 l -10 1 -30 1 -4 0 l 0 0 30 0 4 0 l 10 -1 30 -1 4 0 l 10 1 30 1 4 0 l 0 0 0 30 0 4 l 1 10 1 30 0 4 l -1 10 -1 30 0 4

EOTech Style

EOTech1.PNGEOTech2.PNGCrossEOTech_Stable_t.jpgCrossEOTech_Firing_t.jpg
c 0 0 16 0 l -16 0 -22 0 -2 0 l 16 0 22 0 2 0 l 0 -16 0 -22 0 -2 l 0 16 0 22 0 2 l 0 0 0 -1 0 0

Simple Style #1

Fine1.PNGFine2.PNGCrossFine_Stable_t.jpgCrossFine_Firing_t.jpg
c 0 0 12 5 l -4 0 -12 0 -5 0 l 4 0 12 0 5 0 l 0 4 0 12 0 5 l 0 -4 0 -12 0 -5

Simple Style #2

DFine1.PNGDFine2.PNGCrossDFine_Stable_t.jpgCrossDFine_Firing_t.jpg
c 0 0 16 5 c 0 0 12 5 l -4 0 -16 0 -5 0 l 4 0 16 0 5 0 l 0 4 0 16 0 5 l 0 -4 0 -16 0 -5

Simple Style #3

CCross1.PNGCCross2.PNGCrossCCross_Stable_t.jpgCrossCCross_Firing_t.jpg
c 0 0 8 5 c 0 0 16 5 l -8 0 -16 0 -8 0 l 8 0 16 0 8 0 l 0 -8 0 -16 0 -5 l 0 8 0 16 0 5

X-Shaped

XCross1.PNGXCross2.PNGCrossX_Stable_t.jpgCrossX_Firing_t.jpg
l -6 -6 -2 -2 -5 -5 l -6 6 -2 2 -5 5 l 6 6 2 2 5 5 l 6 -6 2 -2 5 -5


Customization

Mapadd Command Reference (Non-LUA)Command Reference (LUA)Getting StartedPorts 'n' Doors
Alarm, Alarm!Color Correction in SMODDoor BreachingMobile APCsWorking With Dropships
Supply Drop (LUA)Countdown (LUA)
kh0rn3's Mapadd Generator
Scripts addcontentsoverride_classsmod_custom_explosivesmodaclistSMOD Soundscripts

npc_gib_modelnpc_replace_modelnpc_shieldsetnpc_weapon_randomizenpc_weaponweight

excludeweaponsweapon_categoryweapon_customConsole Command List
Other Crosshair CustomizationGenerating AI NodesUsing the NodemakerSubViewCam
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License