crosshair

Talk about anything related to Unvanquished.
Post Reply
User avatar
PhantomFang
Mantis
Posts: 72
Joined: Thu Nov 03, 2022 5:37 pm UTC
Clan: LBF
Location: at your house, I empty your fridge
Contact:

crosshair

Post 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

User avatar
Crepe
Posts: 15
Joined: Wed Nov 02, 2022 7:57 am UTC
Location: Spain

Re: crosshair

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

User avatar
killing time
Programmer
Posts: 165
Joined: Wed Jul 04, 2012 7:55 am UTC

Re: crosshair

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

User avatar
PhantomFang
Mantis
Posts: 72
Joined: Thu Nov 03, 2022 5:37 pm UTC
Clan: LBF
Location: at your house, I empty your fridge
Contact:

Re: crosshair

Post 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

User avatar
killing time
Programmer
Posts: 165
Joined: Wed Jul 04, 2012 7:55 am UTC

Re: crosshair

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

User avatar
PhantomFang
Mantis
Posts: 72
Joined: Thu Nov 03, 2022 5:37 pm UTC
Clan: LBF
Location: at your house, I empty your fridge
Contact:

Re: crosshair

Post by PhantomFang »

no problem :smile:

Post Reply