Page 1 of 1

crosshair

Posted: Thu Nov 03, 2022 5:42 pm UTC
by PhantomFang

I wanted to know where is the file with the crosshairs loaded at the start of the game/game, my final goal is to change them
Thank you in advance for your answer


Re: crosshair

Posted: Thu Nov 03, 2022 8:53 pm UTC
by Crepe

This was discussed a long time ago on Openarena forums and the main problem was that you wouldn't be allowed by the server to use a custom crosshair if the pure server option was enabled.

I'm not sure whether Unvanquished uses that option, but you could start by reading how it would work on OA: http://bullseyecrosshairs.com/q3psp503.shtm

I think it shouldn't differ so much.


Re: crosshair

Posted: Fri Nov 04, 2022 5:09 am UTC
by killing time

We had a feature for this:

Code: Select all

commit 6b5df72075e8bf359577d5b15e0ee50a16ff8acd
Author: dolcetriade <vcelestialragev@gmail.com>
Date:   Wed Feb 20 18:36:04 2013 -0800

Add the ability for users to pick custom crosshairs on pure servers.

Just set cg_crosshairFile to the file which contains the settings. File format is:

Ex:
<name of weapon> <size of crosshair> <path to image>
blaster 24 gfx/crosshair/cross.tga
rifle   30 gfx/crosshair/myCoolCrosshair.png

However I broke it last year with some filesystem changes. I'm trying to make a fix with https://github.com/Unvanquished/Unvanquished/pull/2298.


Re: crosshair

Posted: Fri Nov 04, 2022 9:58 am UTC
by PhantomFang

First of all I would like to thank you for your quick response.

Crepe:
The article was quite interesting. But I believe that "contacting" the administrators of all the servers would be quite complicated... for the "doing the Crosshair" part I have already done my Crosshair. I had already tried to change it: using the command: grep -Ril"cross_p" . , and I had seen that in .local/share/unvanquished/base/pkg/unvanquished_0.52.0.dpk there were the files. with crunch-master I had changed my image to .crn
and picked up those in the file. when I connected to the Sweet server it made me redownload the file... suddenly I changed my strategy and I modified what the .dpk contains directly without decompressing it and honestly well it didn't didn't work, he didn't take it into account.

killing time :

I'm not sure I understand you well, you say it would be enough to go to the file: autogen.cfg
and write:

cg_crosshairFile blaster 24 base/pkg/mynewcrosshair/rifle_new.crn

that's it?

Thank you in advance for your answers


Re: crosshair

Posted: Sun Nov 06, 2022 11:21 am UTC
by killing time

I have discovered that the custom crosshair code doesn't work as claimed. So you probably won't be able to use it, sorry.


Re: crosshair

Posted: Sun Nov 06, 2022 12:38 pm UTC
by PhantomFang

no problem :smile: