1.0 Crosshair specifications


Colonel Forbin
05-06-2003, 10:01 PM
Ok, allmost all the 3.1 crosshairs will not work :(, just not going to happen (till someone finds a mysterious CVAR that switches between cross_style_1 and cross_style_2)

ANYWAYS, if you want to know what can be done with the new 1.0 setup here's the deal.

First, open up your hud.txt in the dod\sprites directory. Notice that the crosshairs are now down at the bottom and look like this:

cross_style_1_mid 640 dodcross 0 24 24 24
cross_style_1_outer 640 dodcross 0 0 24 24
cross_style_2_horiz 640 dodcross 36 0 9 7
cross_style_2_vert 640 dodcross 24 0 7 9
cross_style_2_dot 640 dodcross 24 12 3 3
(it may be a bit different, i've changed some for my crosses)

Now, the hud.txt file is formated like this:
|sprite_name | bmp dimensions (320|640) | sprite file (-.spr) | Top Left X | Top Left Y | width | height |

cross_style_1 is the old 3.1 crosshair style, cross_style_2 is the new v1.0 style. There might be a CVAR to switch between the styles, but for now let's concentrate on v1.0

The cross consists of 3 parts, the center dot, the vertical hairs and the horizontal hairs. I think you can tell what they are, in the hud.txt

The cross is split up like this

Vert = P
Horizontal = R
Dot = O

P
R O R
P

Notice that the hairs aren't reflected, but just duplicated. If they were, we could do all kinds of stuff.

Now, here's the good news, you don't have to stick to the 3 pixel wide hairs that everybody thinks. The vertical and Horizontal sprites are automatically centered on the screen. Just modify the width/height in the hud.txt and they'll be centered properly.

Now, some more bad news, the dot's position is NOT relative to it's width. It's location is allways (-1,-1) relative to the center of the screen, so you might as well just stay within the 3x3 pixels they've set up. We would be able to do anything if this was set relative like the hairs, but it's not.

So, we're stuck making pretty basic crosshairs. Check out my new batch:
http://www.dayofdefeat.net/forums/showthread.php?s=&threadid=2948

=DD=Wolf Kahler
05-06-2003, 11:13 PM
I've had some trouble making my own. Used Alphatest transparency with Sprite Wizard, but it always ends up showing black bits, even if I'm just recompiling a sprite someone else made. Mercatorn's sprite, for example. If you download it and just install it directly, it works fine. I checked its info Sprite Viewer and it said Alpha Test transparency. So I saved the BMP, then recompiled it with Sprite Wizard and I get vertical black lines. Is there something I'm missing?

That's clever what you did with those crosses. It's a bit clunky, though. I'm looking for something with clever horizontal bits, but no vertical bits. Preferably nothing -above- the center dot.

Ikujinonai
05-07-2003, 12:21 AM
This is very helpful. Thanks.

Colonel Forbin
05-07-2003, 05:55 AM
Yeah if you have Photoshop (or something other than just paint) to work with, you can go to the color table to check the colors available to your sprite. Make sure the last color is black, then when you use SprWiz to create the sprite you want to use Alpha. That should get rid of the black parts.

Just search google for "Half-life sprite tutorial" and you should come up with omegas tutorial. But the basics are:

1. open .spr file with SprView.
2. save as BMP
3. open .bmp with paint program
4. make changes to bmp and save as bmp
5. open up SprWiz
6. add your bmp, select Alpha mode, then save as a .spr

you should be using your hud.txt to modify the position and dimensions of your new crosshairs.

05-07-2003, 06:38 AM
yeah I found this out to, but weren't able to post here yesterday.
I have posted a similary 3.1 crosshair in other forums, but now you can have it, too

05-07-2003, 06:44 AM
ah, here is a screenshot

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.