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
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