Posted by yoyoman @ 18:09 CST, 17 December 2012 - iMsg
Not sure if this is the right place to post this but basically i want my xhair to be an "x" instead of "+". If anyone makes one for me i will give them my measely 3% plusses (it may have raised!).
To get the above xhair it is "cg_crosshairsize 33" and "r_texturemode gl_nearest_mipmap_nearest" and "cg_crosshaircolor 16" and r_mode 23 (1920x1080)
Edited by yoyoman at 02:04 CST, 18 December 2012 - 5950 Hits
That's actually more difficult than you might think.
Crosshairsize 33 should be 33x33 pixels, and I guess it is except that the image (they actually are .png images in the pk3 file) extends outside of the crosshair itself by 4 pixels.
Since the hud is based on 640x480, each horizontal pixel will be 0.3333333 and each vertical pixel 0.44444444 so keep in this mind for proper granularity of sizes and positions.
The crosshair image has a black border around it, as well as some blended color pixels.
It would be a million times easier if you could just copy the image in the pk3 file, rotate it, rename it according to the naming convention used there, stick it back in, re-pk3 and do drawcrosshair x. However I think that the pk3 files are pure and won't allow this sort of thing. As a long shot you could try adding the path name folders into your QL directory, the way you can in quakeworld. It's very likely to have been locked down in QL though.
Since the hud does not natively support the drawing of diagonal lines, a "box" would have to be made for each pixel (unless you are clever and know where you can fit larger boxes of the same color).
Just the crosshair part, without the black border consists of 200 total pixels at 640x480, which would be 600 total pixels at 1920x1080. That's a LOT of boxes, so probably some effort would have to be made to draw it with some larger than one pixel boxes in spots.
It would probably be better in this case to "draw" it in 640x480 via the hud, then have the game extrapolate it to 1920x1080. Unfortunately then you would lose the ability to have some pixels colored differently with the same accuracy as is shown with crosshair 2 size 33 at mode 23.
Maybe the easiest way would be to extract the crosshair 2 image from the pk3 file, rotate it 45° and save it. Then write a program, in C or C++ that would read the image file's pixels. You might need to convert it from png to bmp since bmp is a simpler more easy to read format. The program would then output each "box"'s code to a text file for you with all the MenuDef/ItemDef stuff in place. Voids could be created easily just by modifying the picture such that void pixels are all a certain color.
You'd keep in mind that the crosshair would be for 1920x1080 by using the appropriate numbers for each pixel given above. There are very likely libraries and such available for interpreting picture files like this.
That would be to do a perfect job, if you could live with a half-assed version you could plod around on the visual hud creator, making boxes for each "pixel" of the X. That link is here:
Alternatively you could try and find someone who already made an X that you can live with. Unfortunately ql hudcore is gone, but it has been backed up here: http://qlhud.eu/
As a result, browsing it is a lot more tedious. I suppose you could just download the zip file, and view all the screenshots with a picture browser program and see if you can see an X you like in their midst.
or you can just do comment #1 with an extra, slightly larger black x in the background for the border
although that x is going to be in ql's chat font then, which is not perfect, of course, but still
I found a good one here - http://quakelivehud.blogspot.com.au/2009/05/extra-2.html (2nd pic below). Problem is it's not a true x (if you rotated the above image like you said the xhair would look slightly different). Also has no black borders and isn't yellow. And testing it out it seems to be affected by post processing e.g. if i turn off post processing xhair is 50% darker (i want 100% opaque) and also has some boxes around xhair - http://i.imgur.com/Wth6k.jpg .Would it be difficult to fix any of these issues?