A guide on making sniper scopes for Day of Defeat 1.3 and a solution to problem cased by the Half-Life 25th anniversary update.

  1. First we can download some files I used to make this guide.
  2. Next we have to understand what's wrong with them.
  3. Then we can download some free tools, take my templates and make some custom sprite files.

We have a quick option in this guide.

 

Just want to change the center lines of the scope?

If you just want to change the center part of the scope and want to do that in a correct 16:9 image size... use my template.

  • Grab the download above
  • Go to section 3, get those tools.
  • In the download you will find a file in the main folder called "dod_scope_master_16_9_ratio.pdn"
  • The file must be opened in Paint.Net.
  • Open the file and edit inside the scope clear area (with Paint.Net)
  • Pick up the guide in section 4 here "Making the new bmp images"
  • Read on from there.

 

Article Index

 Section  Description
 1.  The issues with dod scopes in Nov 2023 to date
 2.  About the files
 3.  The Tools we will need
 4.  Getting the BMP (bitmap) images out of the default files.
 5.  Making the BMP file the correct type of BMP.
 6.  Make the Sprite with SprWiz
 7.  Test the File
 8.  Example file and video from bulletlottery on how these can be used.

The sniper scopes in day of defeat have always been different to other Half Life 1 mods.
The images are four sections (256 X 256 pixels each) of a maximum size (512 X 512) sprite file.
These four images (frame 0-3) once in a sprite file of the correct type animate around the center point and make the image you see on the screen.
Since the Half-Life 25th Anniversary update there is a problem with scaling and a large section around the image border is not filled in with black-out.

 ultrawide standard scope

 A 21:9 ratio Ultra-Wide monitor with default files and default settings

The default command gl_widescreen_yfov "1" does this. That command was supposed to fix the “zoomed in” effect that affected the gun model and made for a tighter field of vision (FOV) that also had the effect of running slower.
The “gl_widescreen_yfov” command does fix it but… it broke the sprite image of 512 X 512 and it doesn’t cover the areas that made a better FOV.

Reported in Nov 2023, this is still the case in early 2025 …
https://github.com/ValveSoftware/halflife/issues/3583 They may not fix it.

The second issue with the default files is they were made back in the day when everyone ran small 4:3 ratio CRT screens.
As you can see above the sniper view is an oval, not round.
There isn’t any fast fix for the out of bounds back-out areas (apart for Valve fixing it) but we can fix the image to display a round sniper view at least for the now common 16:9 ratio screens.

I made a file and it looks like this…

 spring scope fullscreen fov on
 A fixed sniper image “scope_spring.spr” gl_widescreen_yfov "1"

Further, you can set the “gl_widescreen_yfov” command off the default of “1” (as above) change that to “0” and you get this…

 spring scope fullscreen fov off
 The way it was in 2000-2004 gl_widescreen_yfov "0"

You can of course go to the “Options – Video – “ GUI panel and click the FOV widescreen fix and the command will change.

You can also make a toggle bind in a userconfig.cfg to turn it on and off (Mouse 4 is good).

Code:
 
// Valve Widescreen FOV fix on and off toggle
// "0" (OFF) will make the sniper scope full screen
// gl_widescreen_yfov "1" (ON) Default - for all other weapons.
gl_widescreen_yfov 1
bind "MOUSE4" "fov_tog"
alias fov_tog "fov_tog0"
alias fov_tog0 "gl_widescreen_yfov 0; alias fov_tog fov_tog1"
alias fov_tog1 "gl_widescreen_yfov 1; alias fov_tog fov_tog0" 

Now that bind and script would be seen as a cheat in some places (like competitive players) as it does give a small advantage to zoom at anytime.


My two cents of common sense (for single play and Pub servers)…

  • The advantage isn’t ground breaking to the point the average player would be labeled a cheat.
  • Competitive players, maybe they would view this as a cheat.
  • You could also say (for everyone) that the default settings in Figure 1 and Figure 2 above ARE a cheat.

Lots of other games have a non-weapon zoom, for the visually impaired the command gl_widescreen_yfov “0” actually helps them enjoy the game.

That’s it isn’t it, games are for fun?

It’s a game meant to be enjoyed and seeing this will never get fixed, we should make some custom files to at least make it work better, look better.

About the files

The original files are found in dod\sprites. You can make a new image, place it in Half-Life\dod_addon\sprites and that custom file will display.
The disassembly and reassembly (including modifying them) are not easy.

To start with sprite files, use outdated 8 bit bitmap images, most modern image editors will not save in the bitmap specifications that the tools to reassemble them require. It is a multi-step process that often results in persons giving up.


I found my old Photoshop CS2 that barely runs on Windows 11 the best for me. I save the files as Windows – 24 bit and then take them through Irfanview and save them in the 8 bit format.


Then you have the color palette issue where the last color in the palette is the one that controls the transparency if the inner circle. Don’t worry we will take this step by step soon.
I used five different programs to make my sprite, this is why its so hard.

The gimp can be used and that can cut out some steps.

Paint.Net is (normally) a pain with spites and Wally while great with color palette control and good for crosshair edits isn’t good enough for the complex scope images however it can be one of the programs used.

We will use Paint.Net as it's free and there is a couple more steps that make the sprite files work correctly, see the next section.

 

The Tools we will need.

HLTextureTools 1.6.2.0
https://github.com/yuraj11/HL-Texture-Tools
Download the latest release (look at the right middle of the page)

Wally 1.55B (twhl link)
https://twhl.info/wiki/embed/Wally_1.55b

SprWiz V1.1 (twhl link)
https://twhl.info/wiki/embed/VERC_Archive%3A_SprView_1.05

IrfanView
https://www.irfanview.com/main_download_engl.htm

Paint.Net
https://www.getpaint.net/download.html

Or look in the windows store

The Paint.Net plugin “Grid and Checker Maker”

https://forums.getpaint.net/topic/4175-grid-maker-plugin/

Install after Paint.Net.

Classic version of Paint.net
Unzip and (re)place the DLL in your Effect folder usually: C:/Program Files/Paint.NET/Effects

Microsoft Store version of Paint.net
Unzip and (re)place the DLL in your Effect folder usually: /My Documents/paint.net App Files/Effects/
The tool is under Effect/Render menu.

 

 

Getting the BMP (bitmap) images out of the default files.

  •  Make a folder on the desktop…call it “Make scopes
  • Make a folder inside that called “dod files
  • Go to “Half-Life\dod\sprites
  • Get three files, scope_enfield.spr, scope_k43.spr and scope_spring.spr
  • Put them in your “dod files” folder.
  • You can see other files with “soft” in the name… I will explain later.


We will use HLTextureTools 1.6.2.0 to view them and extract the images.
https://github.com/yuraj11/HL-Texture-Tools


Download the latest release (look at the right middle of the page)
Put the zip in the “Make scopes” folder. 

Extract it there, I put mine in a folder called “1_HLTextureTools
You can run this from the folder (HLTextureTools.exe) and on startup you will have a windows popup,

  • Just click on “More Info
  • Scroll to the right and select “Run Anyway
  • The program will open, it has a simple interface, the left is the image and on the right is a list panel of the images in the sprite, there can be one or many depending on the animation needs of the file.
  • .spr files can be associated with the HLTextureTools program as it is both a viewer and a handy tool.

If you have associated the .spr image type via open with – choose program – HLTextureTools – always in the right click menu, just go to that “dod files” folder and open “scope_spring.spr

 hltexturetool 1
 HLTextureTools – The scope_sprite.spr file

The very first thing you see doesn’t look like a sniper scope. It is but has four separate 256X256 images named Frame #0 to Frame #3.
You can click on each image and note the position like upper left, upper right, lower right and lower left. Note below the menu “Image” (top left of the program) there is a play button icon? Press it.

See how it rotates around clockwise?

Imagine center point of the scope and the images are rotating around that to make a 512 X 512 image.
Now you see why in the image, the white bit is transparent in the game and not a true circle but would be if you stretched it width wise. Look at the file data at the bottom…

  • Count: 0004 (images)
  • Origin: – where that image starts
  • Size: 256X256
  • Type: Two settings divided by a “|”. Orientation and Render mode

The ones in “Type:” are two important settings we are going to need on reassembly of the four files when put in another program called “SprWiz” a program that takes bmp images and makes all kinds of different sprite files.

The best way to look at these sprite types is to read this part of the TWHL guide… https://twhl.info/wiki/page/env_sprite#Sprite_type_and_orientation

In this case the orientation type is VP_PARALLEL…
“Always faces the camera with roll applied. The majority of sprites are in this format.”

Then the render mode… SPR_INDEXALPHA (or Index-alpha) …
“Index-alpha - 8-bit alpha channel. The palette is ignored, except for the last color, which determines the overall sprite color. This format is also used for decal textures.”

Remember we talked of the challenges of the “color palette issue” note that is in the settings, color palrtte’s are important! We will get to that.

First, I want to explain what the other files named scope_enfield_soft.spr, scope_k43_soft.spr and scope_spring_soft.spr.

It isn’t common to change them when working on a scope sprite. So, what are the “soft” files for?

 normal soft scope files
 The standard scope image and the soft type.

Notice they are different.

Still four files and origin and size the same its still VP_PARALLEL but the soft file is “SPR_ALPHATEST”.


“Alpha-test - 8-bit indexed format, using a 256-color palette. The last color in the palette is used for transparent areas. This format is also used for transparent textures.”

So… much the same thing as scope_spring.spr ?


They seem to be a older file left in, in Alpha 6.2 (year 2000) blackouts were added, the files in Beta 1.3 (2001) are different, in dod 3.1 beta (8 Aug 2002) they are the same as now. Somewhere in 2001 and 2003 they were added.
Another oddity is the file “scope_binoc.spr” I would say that is for the attempt at mortar class.

 scope binoc
 The unused scope_binoc.spr file

Safe to say that we can ignore those four files for customization.

Lets get the images we need out.

HLTextureTools

  • Make a folder in “dod files” call it “scope_spring images
  • Open HLTextureTools and select the scope_spring.spr in “dod files
  • Now go to “File” – “Extract all” – “as BMP…”
  • Navigate to the "scope_spring images” folder and they will be in that folder via pressing OK.
saved bmp frames
 The saved BMPs

 

Open them in Wally.


Next is open them in Wally and grab the “Color Palette” before any images get corrupted in edits.

  • Wally, once opened will accept a file via drag and drop, or navigate in the normal way.
  • Open “Frame 0.bmp
  • If it isn’t make sure “View” – “Color Palette” is ticked.
 wally color pallet
 Wally and the color palette.

To save the color palette.

  • Go to menu item “Colors” – “Save Palette”
  • Save the “.pal” file as “scope_spring” in the “scope_spring images” folder.


Now if your graphics program edits the color palette you have the original one to use and Wally can load that file, then save it to repair it.


Remember the render mode setting?… SPR_INDEXALPHA (or Index-alpha) …
“Index-alpha - 8-bit alpha channel. The palette is ignored, except for the last color, which determines the overall sprite color. This format is also used for decal textures.”

The last color is the one on the bottom right of the color palette.

We are done with Wally for now.

 

Get the Four images in an editor.
This is where things may get tricky for you, everyone has a free or specific editor they like.

For me it’s PS CS2 for these old files but we will use Paint.Net, Gimp is great I am told but it’s PS or Paint.Net for me (normally).

Paint.Net

  • Open each image in Paint.Net
  • Make a new image 512X512

If you have not done it yet (recommended) You may want to install a grid plugin as Paint.Net has a grid but its not adjustable, use this one, put the .dll in your effects folder.
https://forums.getpaint.net/topic/4175-grid-maker-plugin/

The plugin “Grid and Checker Maker” is under Effect/Render menu.

Set it on 256 like below to find center.

 paintNet grid
 Paint.Net Grid and Checker Maker

 The grid now divides the image into 4 squares and you can get your line tool set to one pixel, make a new layer called “Grid Guide” and trace over the grid for a guide.

The four images will go in each square and now you know where the true center is.

Open each image and place them in the correct square using the “Edit” – “Copy” – Now select the 512X512 image and “Edit” “Paste into a new Layer”.

 

I named my layers the same name as the BMP images. You should have this by now…

 paintNet imported bmps
 Paint.Net new file with layers and the grid guide.

We can delete the “Background” layer now as we don’t need it.


So that is a copy of the standard .bmp files in an editor we can effect changes to what ever you like, like changes to the line, making a different surround.


In my case I want to make the standard files suit a 16:9 screen, typically a 1920X1080 screen and have the image round not oval.

The standard images suit a 4:3 ratio screen typically 800X600 or 600X480, so let’s make a new image 1920X1080.

Now go back to the 512X512 image, we want to reverse engineer that size to a 4:3 ratio 640X480.
“Image” – “Resize” – untick “Maintain aspect Ratio”set width 640 and height 480.

Go to the 1920X1080 image and adjust the height to 480 and we are going to need the width to maintain its aspect ratio with the height. “Maintain aspect Ratio” must be ticked.
Your height should be 853. Press OK.


Go back to the resized 640X480 image.

  • Untick the layers we don’t want (like the grid guide) and go to “Edit” – “Copy Merged”.
  • Paste that into the now resized 853 X 480 image as a new layer. It will hook to the height but it’s not centered yet.
  • Make a new layer and select it. Do the same process in making a four-line grid.
  • Horizontal = 240 but 853 is actually 426.5 so use 426
  • Make another layer, use the line tool and mark the center.
  • Select the layer with the scope image in it and center it. 

Use the move tool (not the handles) to move the image.


You will know when it’s right when it looks like this zoomed in, you can see the corner of the grid guide you need to get to and ensure the scope lines are dead center, deselect the image when done …

 

 paintNet grid guide correct
 The zoomed in center.

 Deselect via pressing enter to apply the layer in position.


We now have some areas to fill in and we have a 16:9 screen ration with…a round circle.

 paintNet pasted image ends need fill
 The new layer, centered and needs black fill on the ends

Select the areas in the Layer that need filling so we don’t affect other parts of the image.


With the color selection tool (eyedropper) select the black in the image.


Then the fill bucket, doing each side.


Now we have an image that will scale correctly for a sniper scope on a 16:9 ratio screen, but it needs to be 512X512 for the sprite to work…so, “Image” – “Resize” – untick “Maintain aspect Ratio” – set width 512 and height 512.


The guide layer looks wrong now, make a new one like we did in the very first image.

  • Make another new layer. Select a green on the color wheel
  • Untick other layers so they don’t display
  • The plugin “Grid and Checker Maker” is under Effect/Render menu. 
  • Set it on 256 like below to find center.
  • Select all the white in that layer and delete via the magic tool selection and pressing “DEL” key.
  • Now click on the layer with the scope.

It’s slightly off center Horizontally buy one pixel. The vertical one looks OK but look closer.

The lines in the other 512X512 image are…

  • 8 pixels for the vertical line (to allow for the stretching of the image on the display)
  • 6 pixels wide for the horizontal line

To make it dead center really, we should make an odd number like 9 Pixels for the vertical and 7 for the horizontal line. 

 So, select each line using the guide.

  • Make sure the scope image layer is selected.
  • Go to the edge of the image and select 4 Pixels up and 3 Pixels below it.
  • Copy, and past that in a new layer. Name it HOZ LINE.
  • Press enter.
  • While it is still selected, go to the center and move it down one pixel.
 Paint.Net HOZ LINE layer
 HOZ LINE new layer and now centered by moving down one pixel.

If you wanted a thinner line, you could reduce the top.
Seeing this is the spring, the line is fine enough but in a new layer we can separate the lines and make others later.

Do the same for the vertical line now, increase by one to 7.

  • Make sure the scope image layer is selected.
  • Go to the edge of the image and select from the left 3 Pixels past the green guide and 2 Pixels to the right.
  • Copy, and paste that in a new layer. Name it VERT LINE. Press Enter.
  • While it is still selected, go to the center and move the right side across one pixel.
 Paint.Net VERT LINE layer
 The VERT LINE layer is now moved and centered.

Now we have the blackouts done, the lines are in different layers.

It really is time to save the file at this point. I’ll call it “dod_scope_master_16_9_ratio

We should really get rid of the old lines as we may want to make another scope with different lines.

  • Deselect all other layers and select the scope image.
  • Carefully look for a white pixel as some are different colors that depict scratches.
  • The selected color should be pure white 255 255 255.
  • Fix any of the gradient parts around the edge of the circle with the clone stamp tool.
  • Fix the blackouts with pure black.
  • Zoom in and turn off the grid to help spot issues.


Now turn on the other line layers and by selecting each one use the eraser tool to blend them around the circle edge areas.


Now we have a file we can use as a template for the US sniper, the British Enfield and the Kar 98 scope. The image will display correctly on a 16:9 screen and we can fool with the lines in other edits.

 Paint Net finished template
 The finished base template with US sniper lines and a center guide.

The next task for this template is to copy over those .BMP files we made this with and get 4 files out of it.

I renamed the “Layer 2” to “Scope”

  • Turn off the guide layer.
  • Select the other layers Scope and the two lines
  • Go the Edit – Copy Merged – Past into new layer
  • Rename the layer “Spring”
  • Turn off the “Scope” and two line layers
  • Check the new image has pasted correctly to the edges, then press enter to apply it.
  • Save the file.

 

Making the new .BMP images.


Now it’s a matter of selecting each section and making a perfect 256X256 set of 4 BMP files named Frame 0 – 3 via the layer

  • Select the “Spring” layer ONLY.
  • Turn on the Guide layer
  • Start your selection from the center and go to the upper left corner.
  • Make sure its like the image below…
 Paint.Net copy from centre
 Copy from the center and stop at the left top.
  • Go the Edit – Copy – Past into a new Image
  • Note we don’t want the green line so don’t use “copy merged”
  • Check your image size is it 256X256 (look down at the Paint.Net bottom bar)
  • Save it as a .BMP named “Frame 0” in a new folder “New 16_9 BMP” Make scopes\dod files\scope_spring images Folder
  • Use the image below to save in that format
 save file type
 BMP format
  • Press OK
  • Do the same for the other three noting that…
  • The Center is off by one pixel and the start point is the same spot for each image.
  • See the images below for that start point
  • Saving the images and name just remember the images cycle clockwise starting at Frame 0
  • Check each image size is 256X256
 Frame 1 start point  Frame 2 start point  Frame 3 start point
 “Frame 1.bmp” start point  “Frame 2.bmp” start point  “Frame 3.bmp” start point
end point is upper right corner end point is lower right corner end point is lower left corner
Where is that Center – the start points?

You can now close this template image ensuring while doing that last part you didn’t screw up anything.
When we make a new one we can do another layer for the different internal lines and name them, then make a new image for the other teams or types you may want to make.

One of the goals I have is to just make copies of each standard scope but make it display right on 16:9.

Go to the next section.

 

Making the BMP file the correct type of BMP.

This step is important and we need to download and use Irfanview. No matter what editor you used it’s likely not correct and the color palette will be wrong for sure.
https://www.irfanview.com/main_download_engl.htm

After you have that installed…

  • Open it up and select “Batch conversion/Rename”
  • In Batch Conversion settings (upper left) Output formula is “BMP – Windows Bitmap”
  • Select “advanced” (image below) and do those selections, then press OK.
  • Find the files in your folder. Select them and press “Add all” button
  • Go to the bottom left and press – “Start Batch.”
  • The files save and you will see a warning, its OK, because we overwrote the files
 irfanview advanced settings2
 The advanced settings in Irfanview Batch.

Press the exit batch button and close irfanview.


Now we need to look at the color table and correct it with the one we saved.

 

Open Wally.

  • Open the "New 16_9 BMP" folder for the files we saved
  • Drag in the BMP Frame 0.
  • Go to “Colors” – “Load Palette…”
  • In the “scope_spring images” folder select the “scope_spring.pal” file
  • Note the color palette just changed.
  • Save the file.
  • Do the same process for Frame 1, Frame 2 and Frame 3.
  • Close Wally.

 

 

Make the Sprite with SprWiz

This is the final part.

  • Open SprWiz
  • Press “Next”
  • Press “Browse..”
  • In the folder Make scopes\dod files\scope_spring images\New 16_9 BMP select all the images.
  • Press “Open”
  • Press “Next”
  • Press “Next” again


Remember we looked at the sprite types and the default sprite reported that it was a “SPR_INDEXALPHA” ?

  • Select “Indexalpha – Grey scale; last color is the sprite color.
  • Press “Finish” go to the Make scopes\dod files\scope_spring images\New 16_9 BMP folder and save it as “scope_spring
  • Close the program.

 

Test the File

Place that in Half-Life\dod_addon\sprites and open dod.

 first result
 Spring scope needs improvement.

I can see some errors there in the black “Frame 0” area and while I like the thick lines that look damaged and uneven, some may not.

Now you can see why making all those different layers for the different parts will come in handy. You can adjust back in paint.net and make another version.

 spring scope fullscreen fov off
 The final Spring scope.

In the second image the vertical line is now reduced. I’ll call that done for now.

The last bit is to make the standard lines for the scope_enfield and scope_k43.


It’s the same process but using the “dod_scope_master_16_9_ratio.pdn” file we will just add the lines in more layers.
Then follow the same process in making the four new BMP’s and “washing” the file in Irfanview, Wally and final assembly in SprWiz.

Now the other two are done and in the master Paint.Net file. Here are my results…

 K43 scope 16 9
 The Axis Scope for the K98 scoped and the FG43 scoped

 

 enfield scope 16 9
 The scope for the Enfield (British Marksman)

 

It was hard doing this from scratch and likely why no one has written a complete step by step guide on dod scopes.

Now there is one.

Example file and video from bulletlottery on how these can be used.

Here is a example where those files were used bulletlottery packed them up, made a script to control fov via binds...

https://streamable.com/ggm4to?src=player-page-share

INsane

Webmaster Sturmbot.org