Tremulous Forum

Mods => Modding Center => Topic started by: Overdose on June 02, 2008, 07:26:18 am

Title: Cross hair help
Post by: Overdose on June 02, 2008, 07:26:18 am
So, I've been trying to add a cross hair to the painsaw for quite some time now but with every attempt it feels like I'm getting farther and farther away (which is ironic because you would think adding a single cross hair would be simple).

I've added crosshair-psaw.tga to gfx/2d and I've modified the crosshairs.shader file in the scripts directory to include the info for the new file.
(painsaw stuff is at the bottom but I added the whole file just to be safe)
Code: [Select]
gfx/2d/crosshair-alien
{
{
map gfx/2d/crosshair-alien.tga
blendfunc blend
rgbgen const ( 1.0 0.0 0.0 )
alphagen const 0.35
}
}

gfx/2d/crosshair-rifle
{
{
map gfx/2d/crosshair-rifle.tga
blendfunc blend
rgbgen const ( 0.0 0.8 1.0 )
alphagen const 0.35
}
}

gfx/2d/crosshair-prifle
{
{
map gfx/2d/crosshair-prifle.tga
blendfunc blend
rgbgen const ( 0.0 0.8 1.0 )
alphagen const 0.35
}
}

gfx/2d/crosshair-chaingun
{
{
map gfx/2d/crosshair-chaingun.tga
blendfunc blend
rgbgen const ( 0.0 0.8 1.0 )
alphagen const 0.35
}
}

gfx/2d/crosshair-mdriver
{
{
map gfx/2d/crosshair-mdriver.tga
blendfunc blend
rgbgen const ( 0.0 0.8 1.0 )
alphagen const 0.35
}
}

gfx/2d/crosshair-lcannon
{
{
map gfx/2d/crosshair-lcannon.tga
blendfunc blend
rgbgen const ( 0.0 0.8 1.0 )
alphagen const 0.35
}
}

gfx/2d/crosshair-lgun
{
{
map gfx/2d/crosshair-lgun.tga
blendfunc blend
rgbgen const ( 0.0 0.8 1.0 )
alphagen const 0.35
}
}

gfx/2d/crosshair-flamer
{
{
clampmap gfx/2d/crosshair-flamer1.tga
blendfunc blend
rgbgen const ( 0.0 0.8 1.0 )
alphagen const 0.15
tcmod rotate 5
}
{
clampmap gfx/2d/crosshair-flamer1.tga
blendfunc blend
rgbgen const ( 0.0 0.8 1.0 )
alphagen const 0.15
tcmod rotate -5
}
}

gfx/2d/crosshair-psaw
{
  {
    map gfx/2d/crosshair-psaw.tga
    blendfunc blend
    rgbgen const ( 0.0 0.8 1.0 )
    alphagen const 0.35
  }
}

But when I run Tremulous I get lots of errors and missing cross hairs.

Code: [Select]
trying gfx/2d/crosshair-alien_s.TGA...
ERROR: weapon crosshair not found gfx/2d/crosshair-alien_s
ERROR: weapon crosshair not found gfx/2d/crosshair-alien_s
trying gfx/2d/crosshair-prifle_s.TGA...
ERROR: weapon crosshair not found gfx/2d/crosshair-prifle_s
trying gfx/2d/crosshair-rifle_s.TGA...
ERROR: weapon crosshair not found gfx/2d/crosshair-rifle_s
trying gfx/2d/crosshair-lcannon_s.TGA...
ERROR: weapon crosshair not found gfx/2d/crosshair-lcannon_s
trying gfx/2d/crosshair-lgun_s.TGA...
ERROR: weapon crosshair not found gfx/2d/crosshair-lgun_s
trying gfx/2d/crosshair-mdriver_s.TGA...
ERROR: weapon crosshair not found gfx/2d/crosshair-mdriver_s
trying gfx/2d/crosshair-chaingun_s.TGA...
ERROR: weapon crosshair not found gfx/2d/crosshair-chaingun_s
ERROR: weapon crosshair not found gfx/2d/crosshair-prifle_s
trying gfx/2d/crosshair-flamer_s.TGA...
ERROR: weapon crosshair not found gfx/2d/crosshair-flamer_s
ERROR: weapon crosshair not found gfx/2d/crosshair-lcannon_s

I've already tried renaming the files to include _s at the end and I've tried deleting the _s at the end in the shader file.

Does anybody have some idea as to how I can solve this problem?
Thanks.
Title: Re: Cross hair help
Post by: kevlarman on June 02, 2008, 04:41:53 pm
you can't add a crosshair to the painsaw without a client mod (or getting rid of the human crosshair and placing a static image in its place)
Title: Re: Cross hair help
Post by: Overdose on June 02, 2008, 08:43:43 pm
This is a client mod, it includes a slew of other graphics changes.

By static image do you mean replace all the cross hairs with 1 single image? I really don't want to do that.
Title: Re: Cross hair help
Post by: kevlarman on June 03, 2008, 03:40:45 am
This is a client mod, it includes a slew of other graphics changes.
in that case fire up your svn client and text editor of choice
Title: Re: Cross hair help
Post by: Overdose on June 03, 2008, 04:52:33 am
in that case fire up your svn client and text editor of choice

I'm not quite sure I understand, what am I going to be editing? (my client was based on svn 755 btw)
Title: Re: Cross hair help
Post by: kevlarman on June 03, 2008, 05:21:02 am
in that case fire up your svn client and text editor of choice

I'm not quite sure I understand, what am I going to be editing? (my client was based on svn 755 btw)
the cgame
Title: Re: Cross hair help
Post by: Overdose on June 03, 2008, 06:25:03 am
Oh, so I'm gonna have to do some compiling right? If that's the case then it's not worth it, thanks anyway.