Page 1 of 1
Changing sniper rifle scope color [Solved]
Posted: Sat Apr 25, 2009 4:01 pm
by Superm9
Hello, all! I was wondering if it would be possible to tint the color of a rifle scope green, in order to simulate a "night scope" - in other words, when you zoom in when using a sniper rifle, the scope would be generally tinted green.
Thanks!
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 4:10 pm
by -_-
Change your over-sized avatar please. 1600x1200?
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 4:15 pm
by Superm9
Avatar fixed... I guess?

Sorry about any unintentional issues there.
So, any advice on changing the scoped-in view color?
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 4:26 pm
by AQT
In data_***\Common\interface\PC, you will find four scope textures (weapon_scope, weapon_scope2, weapon_scope3, and weapon_scope4.tga). Choose the one you want to edit, edit it, and save it as weapon_scope5 in your side's msh folder. Reference this scope texture in your weapon's .odf file like so
under
save it and munge your sides.
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 4:37 pm
by Fiodis
Won't you need to make a custom ingame.lvl for that, since Data***/Common is not in any particular sides folder?
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 4:54 pm
by Superm9
Well, I did just as was suggested, and what actually happened was the rifle scope image defaulted back to the "weapon_scope" texture - the first weapon scope. It doesn't seem to be recognizing the existence of my "weapon_scope5" texture, even though I saw the visualmunge tool munge it...
I'll post my errorlog here in the next few minutes.
Help!
EDIT: I'm not seeing any error in the log related to rifle scopes, but here it is anyways:
Note that the game isn't crashing; it's just not displaying the correct rifle scope texture.
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 5:11 pm
by AQT
Well I guess you do need a custom ingame.lvl then as Fiodis pointed out. Just save your scope texture over any of the four original ones, reference it in the weapon's .odf file, then open up your .lua and find
and change it to
save it and munge. After the munge is complete go to data_***\_LVL_PC and copy the ingame.lvl to your map's _LVL_PC folder in the addon folder. Your scope texture should show up in-game (hopefully).
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 5:11 pm
by Fiodis
It is just like I thought, you need a custom ingame.lvl file. Check the FAQ thread for information on how to make one, there's a handy tutorial in there although I never got it to work for me.
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 5:33 pm
by AQT
I forgot to mention that alternatively you could just reference the "weapon_scope5" texture in your side's (or unit's) .req like so
Code: Select all
REQN
{
"texture"
"weapon_scope5"
}
instead of using a custom ingame.lvl. I did this with the auto turret skin (located in data_***\Common\msh) and it showed up.
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 5:41 pm
by Fiodis
Omg. That works? It's so much simpler than a custom ingame.lvl.... I've got to try it.
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 5:54 pm
by Superm9
Errmmm... it didn't work...
I added the code you posted to my rep.req file, and made sure that the rifle was referencing weapon_scope5, and... it defaulted back to weapon_scope, the same as before...
I also tried copying over the ingame.lvl file - is there any other modification that I need to make? Because the scope didn't change at all using that method.
Thanks!
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 5:57 pm
by Fluffy_the_ic
Do you need the original scope in teh first place? Because if you don't, then you should just overwrite it. If you just overwrite it, it's just like skinning any other object.
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 5:59 pm
by Frisbeetarian
Fluffy_the_ic wrote:Do you need the original scope in teh first place? Because if you don't, then you should just overwrite it. If you just overwrite it, it's just like skinning any other object.
Except that the scope is part of the HUD, and as such, like Fiodis said in the first place, you need a custom ingame.lvl to make changes to the HUD.
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 6:13 pm
by AQT
Superm9 wrote:I added the code you posted to my rep.req file, and made sure that the rifle was referencing weapon_scope5, and... it defaulted back to weapon_scope, the same as before...
My mistake. I just thought if it worked for the auto turret (which is somewhat part of the HUD) it would also for the scope texture.
I also tried copying over the ingame.lvl file - is there any other modification that I need to make? Because the scope didn't change at all using that method.
Did you overwrite one of the original scope textures and reference your custom ingame.lvl in you .lua by adding the "dc:"?
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 6:22 pm
by Superm9
I actually managed to get it ingame - I just had to take what you said for the second option (changing the .req) and apply it to your first option (changing the ingame.lvl file) - I didn't make the connection that I was supposed to be editing my ingame.req file; once I did that, then munged, then copied over the new ingame.lvl file, it worked like a charm - a great night vision scope!
So, in summary your methods work - just as one complete method!

Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 6:51 pm
by Fiodis
That's not one complete method. That's creating a new ingame.lvl file. Editing the req is part of it.
What do you mean, AQT, when you said it worked for the autoturret? How could you see the autoturret's scope?
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 7:34 pm
by AQT
Not the scope but the turret's texture itself. I made
this thread awhile ago concerning the now solved problem.
Re: Changing sniper rifle scope color
Posted: Sat Apr 25, 2009 11:36 pm
by RogueKnight
AQT wrote:Superm9 wrote:I added the code you posted to my rep.req file, and made sure that the rifle was referencing weapon_scope5, and... it defaulted back to weapon_scope, the same as before...
My mistake. I just thought if it worked for the auto turret (which is somewhat part of the HUD) it would also for the scope texture.
I also tried copying over the ingame.lvl file - is there any other modification that I need to make? Because the scope didn't change at all using that method.
Did you overwrite one of the original scope textures and reference your custom ingame.lvl in you .lua by adding the "dc:"?
Uh, wasn't he supposed to add it to the req folder, not the rep.req?