View Single Post
  #1  
Old April 15th, 2011, 09:31 AM
Cross's Avatar

Cross Cross is offline
Captain
 
Join Date: Jun 2006
Location: UK / USA
Posts: 895
Thanks: 32
Thanked 281 Times in 123 Posts
Cross is on a distinguished road
Computer How to Edit Icons

A utility called 'Shp Ed' is used to edit game icons which are in SHP (shape) file format.

This utility can be found in the games GRAPHICS folder here:

WinSPMBT\Game Data\Graphics

SHP files can be exported as a BMP (Bitmap) image from the game using Shp Ed. Or BMP images can be imported into the game and converted to SHP files.

SHP files are found in the game’s GRAPHICS folder.

Each SHP file has about 30 to 100 Icons within it.

Collages
The icons are in collages (of about 35 icons in each collage) like this:



There’s usually 1 to 4 collages of icons in each SHP file.

BMP files
Each icon is a BMP file 89x89 pixels (some are a different size, but most are 89x89 pixels).

The invisible part of the icon is a specific pink colour.

The BMP files can only use a specific 256 Steel Panthers colours (a palette).

Palette
Here’s the 256 colours:




Don’t use the above png image. I’ll attach a BMP image of the palette, where you can use an eye drop dipper to extract the BMP colours you want to use.

Editing BMP files
Use a BMP graphics editor (like Paint.Net, Gimp, or Photoshop) to create or edit your Icon.
1. Make sure the image is the right size (usually 89x89 pixels)
2. Make sure the icon is the right size (5 inches per pixel for most soft vehicles, 6 inches per pixel for most tanks)
3. Make sure you only use the approved 256 colours.

Once the BMP icon is finished, you are ready to add it to the SHP file.

Viewing Icons within SHP files
To view/edit SHP files you must use a SHP editing utility found in the Game’s GRAPHICS folder.

It’s called ‘ShpEd.exe’ (you can create a shortcut to ShpEd and put the shortcut on your desktop).



1. Start up ShpEd (Click on the Brown doors and they disappear, and I like to enlarge the window by dragging the bottom right corner).

2. Check/tick the 3 little boxes on the left hand side, called:
• Use Old Header
• SP-No Flash
• Use Full Pal

3. Click the bottom left hand button (the button has a mouse over msg: ‘load a color palette’). Select the file ‘WinSPMBT_Palette.pal’ and click open. This makes sure you’re using the right palette.

4. You’re now back in the ShpEd window. Click the top left button (Load shp File) then click ‘up one level’ to get into the GRAPHICS folder to select the shape file.

There’s about 100 shp files. Knowing which shp file has the icon you want to edit can be tricky.

There's an icon map called:
WINSPMBT_MasterIconList.txt
which can be found in the DESIGN folder here:
WinSPMBT\Game Data\Design

5. After you’ve selected a shape file, click the 3rd button on the bottom (view collage). This will show you the first page/collage of icons in the shape file (about 35 icons).
In the little scrollable window it tells you how many icons total are in the shp file, and it tells you what the number of the last icon you can see.
To see more icons in the shp file, you can change the “Image#’ in the left box to say ‘36’, then hit the view collage button again and you will see icons 36 to 70.

Editing SHP Files - A 12 step program

This process seems a little complex at first, but it’s just a lot of steps. Once you’ve done it a few times it becomes easy.

1. Use top button 1 in ShpEd to load the right shp file.
2. Use the collages to identify the icon # you want to change. In the example above, the ship is the 2nd Icon (the first icon is # 1 even if it's blank, which it often is), so change the ‘Image #’ to ‘2’ then click button 2 at the top (show image #) to load the Icon and you will see it displayed so you can check you have the right one.
3. Then use button 3 at the top (save shp image as BMP) to download that icon as a BMP file, if you want to edit the original icon. Or you can skip this step.
4. Then use button 4 at the top (load bitmap/BMP from disk) to upload your own 89x89 pixel BMP icon to the shp file.
5. Then use button 5 at the top (convert bmp to shp) to convert the BMP to SHP.
6. Then use button 6 at the top (replace image # with new shp image). This creates a new SHP file, but you’ll have to manually rename it in the next step.
7. Open your GRAPHICS folder in a window and find the file called ‘BigNew.shp’. Which is the new shp file you just created. Rename BigNew to Icon0036.shp or whatever shp file you were editing. You may need to delete, rename or move the original Icon0036 before you rename BigNew.
8. Then go back to the ShpEd utility and reload Icon0036 (because you need to load the new edited file).
9. Enter the Image # (of the icon you just uploaded in steps 2-6) then hit top button 2 (show image #). Don’t skip this step.
10. Then hit the button on the right hand side called ‘SP Fix’. A new window will pop up.
11. Hit the ‘Show’ button, on the bottom left, and your Icon should appear with a blue cross on it.
12. Then use the up and down arrows to centre the blue cross on the icon. When you have it centred, hit the ‘Write’ button on the very bottom left (If you can’t see the ‘Write’ button, just make the window bigger). This positions the icon in the hex.

You are done!

If you get stuck, feel free to ask questions, or try this site here for some useful tips and pictures of the process:

http://www.vojska.net/eng/games/steel-panthers/editing/

Edit: When making/editing your own icons, I find it useful to load the icon into a SHP file, and view the icon in the game, because the icons in the game don't look exactly like the original BMP images. So a bit of testing and adjusting results in better game icons.


Cross
Attached Files
File Type: zip WinSPMBT_Palette.zip (10.3 KB, 578 views)

Last edited by Cross; May 10th, 2011 at 06:30 PM.. Reason: additional info.
Reply With Quote
The Following 13 Users Say Thank You to Cross For This Useful Post: