Thanks!
Changing sniper rifle scope color [Solved]
Moderator: Moderators
- Superm9
- Second Lance Corporal

- Posts: 104
- Joined: Thu Aug 23, 2007 8:41 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Changing sniper rifle scope color [Solved]
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!
Thanks!
-
-_-
- Gametoast Staff

- Posts: 2678
- Joined: Sat May 07, 2005 1:22 pm
Re: Changing sniper rifle scope color
Change your over-sized avatar please. 1600x1200?
- Superm9
- Second Lance Corporal

- Posts: 104
- Joined: Thu Aug 23, 2007 8:41 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Changing sniper rifle scope color
Avatar fixed... I guess?
Sorry about any unintentional issues there.
So, any advice on changing the scoped-in view color?
So, any advice on changing the scoped-in view color?
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: Changing sniper rifle scope color
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.
Code: Select all
ScopeTexture = "weapon_scope5"Code: Select all
[Properties]- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Changing sniper rifle scope color
Won't you need to make a custom ingame.lvl for that, since Data***/Common is not in any particular sides folder?
- Superm9
- Second Lance Corporal

- Posts: 104
- Joined: Thu Aug 23, 2007 8:41 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Changing sniper rifle scope color
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.
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:
Hidden/Spoiler:
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: Changing sniper rifle scope color
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).
Code: Select all
ReadDataFile("ingame.lvl")Code: Select all
ReadDataFile("dc:ingame.lvl")- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Changing sniper rifle scope color
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.
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: Changing sniper rifle scope color
I forgot to mention that alternatively you could just reference the "weapon_scope5" texture in your side's (or unit's) .req like so
instead of using a custom ingame.lvl. I did this with the auto turret skin (located in data_***\Common\msh) and it showed up.
Code: Select all
REQN
{
"texture"
"weapon_scope5"
}- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Changing sniper rifle scope color
Omg. That works? It's so much simpler than a custom ingame.lvl.... I've got to try it.
- Superm9
- Second Lance Corporal

- Posts: 104
- Joined: Thu Aug 23, 2007 8:41 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Changing sniper rifle scope color
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!
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!
- Fluffy_the_ic
- Hoth Battle Chief

- Posts: 3223
- Joined: Thu Jan 24, 2008 7:03 pm
- xbox live or psn: fluffytherc
- Location: she/her
- Contact:
Re: Changing sniper rifle scope color
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.
- Frisbeetarian
- Jedi

- Posts: 1233
- Joined: Wed Sep 12, 2007 3:13 pm
Re: Changing sniper rifle scope color
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.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.
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: Changing sniper rifle scope color
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.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...
Did you overwrite one of the original scope textures and reference your custom ingame.lvl in you .lua by adding the "dc:"?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.
- Superm9
- Second Lance Corporal

- Posts: 104
- Joined: Thu Aug 23, 2007 8:41 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Changing sniper rifle scope color
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!
So, in summary your methods work - just as one complete method!
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Changing sniper rifle scope color
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?
What do you mean, AQT, when you said it worked for the autoturret? How could you see the autoturret's scope?
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: Changing sniper rifle scope color
Not the scope but the turret's texture itself. I made this thread awhile ago concerning the now solved problem.
-
RogueKnight
- Space Ranger
- Posts: 2512
- Joined: Sat Nov 22, 2008 1:50 pm
- Projects :: Life. Work.
- xbox live or psn: No gamertag set
- Location: Washington, US
Re: Changing sniper rifle scope color
Uh, wasn't he supposed to add it to the req folder, not the rep.req?AQT wrote: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.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...Did you overwrite one of the original scope textures and reference your custom ingame.lvl in you .lua by adding the "dc:"?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.
