Custom Weapon Crosshairs?

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Custom Weapon Crosshairs?

Postby jasonbourne » Wed May 14, 2008 5:56 pm

Is there any way to mod nexuiz to support custom weapon crosshairs? Because for some weapons certain crosshairs seem right while others don't. Also possibly allowing for dynamic crosshairs as well.
Like a ring around the target reticule that changes depending on the amount of ammo.
jasonbourne
Newbie
 
Posts: 8
Joined: Wed May 14, 2008 5:33 pm

Postby esteel » Wed May 14, 2008 8:03 pm

Stuff like that is currently not possible.. you can use some fancy scripts to change crosshairs when you change the gun but it will not work if it autoswitches the guns for some reason..
And you CAN create custom crosshairs. I think there is some large thread with some nice examples here in the forum.. Basicly just create a crosshairXX.tga file in Nexuiz/Data/gfx and use the console to set 'crosshair' to XX..
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Postby MirceaKitsune » Thu Aug 14, 2008 7:43 am

I fully support adding the ability to set a different crosshair for every weapon, it would indeed help very much. I hope a way to add such a thing can be found in the end, it would be very nice and useful if possible.
MirceaKitsune
Keyboard killer
 
Posts: 593
Joined: Thu Aug 14, 2008 6:48 am
Location: Romania - Bucharest

Postby esteel » Thu Aug 14, 2008 5:20 pm

Honestly i fail to see how this is "very much help".. is the large weapon not enough to see what weapon your character wields? Besides to get most control disable the autoswitch feature so you will only change guns when out of ammo or switching yourself. And then it should be quite easy to remember which gun is current.
I think different crosshairs is more of a toy not so much a helpful feature.
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Postby zuriastrad » Thu Aug 14, 2008 8:14 pm

i like to play without the weapon model so weapon specific crosshairs sound like a nice idea to me.

r_drawviewmodel "0"
(in case someone asks)
zuriastrad
Alien
 
Posts: 169
Joined: Thu May 15, 2008 4:13 am

Postby esteel » Fri Aug 15, 2008 10:14 pm

Well i did that too some time ago but i failed to see how this helps (party because a lot of games do not allow to set the crosshairs for single guns) and also personally i think the guns do not block sooo much screen so having them disabled hardly improves anything. But i know that taste. I'm not sure but in the next version the scoreboard is finally handled by CSQC.. if the crosshair is also it will be easier to add such customization options
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Postby Spaceman » Sat Aug 23, 2008 8:39 pm

Maybe a cvar for each weapon - crosshair_nex, crosshair_rl or crosshair_7, crosshair_9 etc

Default them to 0. When a new weapon is selected check to see if the crosshair_# is non zero, if it is use that crosshair, otherwise use the default.

You would also have to consider the crosshair RGB & alpha values.
Spaceman
Alien trapper
 
Posts: 264
Joined: Tue Aug 28, 2007 10:53 am

Postby Spaceman » Thu Aug 28, 2008 2:05 am

I know it's bad to reply to yourself, but this will send an email to all the previous commentators.

Have you any examples of the crosshairs you want for the different weapons?
Spaceman
Alien trapper
 
Posts: 264
Joined: Tue Aug 28, 2007 10:53 am

Postby Psychcf » Thu Aug 28, 2008 3:20 am

victim [v] wrote:I know it's bad to reply to yourself, but this will send an email to all the previous commentators.

Have you any examples of the crosshairs you want for the different weapons?


Well, for the nex you'd want to use a dot, but for the shotgun you may want to use a large circle with a dot in the middle, to indicate how far the projectiles would spread.
Psychcf
Forum addon
 
Posts: 1554
Joined: Sun Dec 03, 2006 11:38 pm
Location: NY, USA

Postby Spaceman » Sat Aug 30, 2008 1:09 am

I've now created some working code for this. It allows you to have a different crosshair for each weapon and also individual settings for each crosshair.

There are a total of 6 variables for each crosshair (crosshair number, red, green, blue, alpha, size) and 9 weapons plus a variable to switch it on

Giving a total of 55 new variables to play with.

Before I post the changes I need a name for the variable that enables the new crosshair system. Currently I've called it crosshair_toy, obviously it needs a better, sexy name.
Spaceman
Alien trapper
 
Posts: 264
Joined: Tue Aug 28, 2007 10:53 am

Next

Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron