





          #
                                   SHP FILE EDITOR
                                 Shp Ed Version 0.4
                               Copyright Fred Chlanda
                                    January 1998

          PLEASE SEE THE CONDITIONS OF USE AT THE END OF THIS HELP.

                                          
                                          


          INTRODUCTION:
          Many of SSI's games have used a graphics file format that is
          rather obscure. Generally, these files have a shp extension, but
          sometimes are included in larger files. (This cuts down on the
          storage space required so it is a desirable feature.) I became
          interested in the shp file format while developing a map editor
          (PacMap) for Pacific General and was encouraged to expand my
          knowledge so that an editor could be developed for Panzer General
          graphics.

          This is a beta version of my shp file editor intended mainly for
          PG. I have run it under WIN95 but it will probably run under
          WIN3.1 with WIN32s1.3. Hicolor (16bpp) 640x480 display is
          adequate, but 600x800 at 16bpp is recommended. Since this is
          still an experimental product you should  back up all files you
          plan to alter and test the new files with the game frequently.

          continue _ Installation

                                 
                                 





















                              
          #intro






          #
          INSTALLATION:
          To install the Shp Ed put all the files in the archive in their
          own directory. Several temporary files will be added to the
          directory and you may want to keep separate the new shp files you
          make from the originals while you work on them. You can, however,
          edit shp files directly in the game directory if you desire. To
          uninstall, just delete the installation directory. In addition to
          the main program, several utilities and palette files are
          included with this distribution. (See filelist.txt).

          continue _ Features

                             
                             






































                              
          #inst






          #
          FEATURES:
          What this version of  program will do:
          1. Allow you to view shp file images from Panzer General and from
          other SSI programs including Steel Panthers I,II and III, Fantasy
          General and Age of Rifles (Allied General does not use the shp
          format).
          2. Save images as bitmaps (BMP).
          3. Import edited bitmaps and convert them to shp format.
          4. Insert or append the converted bitmap to a shp file (with some
          limitations).

          5. The auxiliary DOS programs UPG2SHP.EXE and UPAGSHP.EXE will
          unpack the shp files included with Panzer General II and Pacific
          General, respectively. PPG2SHP will repack the PG2 shp files so
          it is possible to edit PG2 files.  As yet there is no utility to
          repack the file PacGen files, so they cannot be edited. (See
          UNPCKSHP.TXT)
          continue _ Operation

                              
                              































                              
          #feat






          #
          The overall size of the actual image in a Steel Panthers
          _problem_ icon cannot be changed. Features may be added or edited
          within the confines of the existing image however.
















































                              
          #splimits






          #
          OPERATION:
          Easily recognized icons are used on buttons to control the
          operation of the program. The top row of buttons perform the main
          functions for editing a shp file laid out in the order they would
          typically be used in to perform the edit. To help until you
          become familiar with the graphics, each button has a hint
          associated with it which will pop-up when the mouse is held over
          the button.

          From left to right the buttons are:

          {bml shp_load.bmp} Load shp File. A file is loaded for viewing
          and editing.

          {bml view_shp.bmp} Display Image. The image (icon) from the shp
          file selected by Image # is displayed.

          {bml bmp_save.bmp} Save bmp. The currently displayed image is
          saved as a bitmap for editing.

          {bml bmp_load.bmp} Load bmp. A bitmap (edited) is loaded and
          displayed.

          {bml bmp2shp.bmp} Convert bmp. The bitmap in the display is
          converted to a shp image

          {bml ins_shp.bmp} Replace Image. The image at Image # in the
          currently loaded shp file will be replaced with with the
          converted image

          {bml add_shp.bmp} Add Image. The converted image will be added to
          the end of currently loaded shp file.

          Note that when the program starts some of the buttons will be
          displayed in an inactive state until their use is appropriate.

          continue _ Quick Directions

                                     
                                     












                              
          #oper






          #

          QUICK DIRECTIONS:
          To edit an icon in a Panzer General shp file just use buttons on
          the top row in order, editing the saved bitmap with the editor of
          your choice between steps 3 and 4. (Note that the bmp file from
          the editor must be in 24bbp format.) After you finish editing, a
          new shp file called bignew.shp will be added to the directory
          where your source shp file was located. Rename the old shp file
          (e.g. foobar.shp to foobar.bak ) and then rename bignew.shp to
          the original name (e.g. foobar.shp). To make multiple changes to
          a file, after the first edit in which bignew.shp is generated,
          switch the shp file being edited to bignew.shp and continue
          replacing/adding images.

          continue _ Other functions

                                    
                                    


































                              
          #qdir






          #
          OTHER FUNCTIONS:
          Some of the other functions are useful for viewing files and
          working with files from games other than PG.

          The buttons from left to right across the bottom are:
          {bml load_pal.bmp} Load Palette. A color palette will be loaded.

                                                          
                                                          


          {bml show_pal.bmp} Display Palette. The current palette will be
          displayed in the shp Image window.

          {bml collage.bmp} View Collage. As many of images from the shp
          file starting at Image # as possible will be displayed in the shp
          Image window.

          {bml img_save.bmp} Save Collage. The view in the shp Image window
          will be saved as a bitmap. Use this to save the collage or
          palette view. (WARNING. Don't use this to save bitmaps that will
          be converted later to shp format.)

          {bml help.bmp} Help. Display this help.

          {bml about.bmp} About. Display information about Shp Ed.

          {bml cancel.bmp} Cancel. The writing of a shp image or collage to
          the shp Image window will be stopped.

          continue _Color Palettes

                                  
                                  



















                              
          #ofunct






          #
          COLOR PALETTES:
          Different games use different color palettes. Although sometimes
          the palette information is include with the shp file, sometimes
          it is omitted entirely or only a partial set of colors is
          available. To use the complete palette for the game, load one of
          the supplied  palettes and make sure the Use Full Palette box is
          checked. The Panzer General palette is built into Shp Ed and does
          not have to be loaded. If you see funny colors when displaying a
          shp image, it is probably because the wrong palette is loaded or
          the Use Full Palette box is not checked. Keep in mind when
          editing images that only the colors in the palette are available.
          The colors contained in edited images will be matched by Shp Ed
          to the current palette, but if no close match is available, the
          results may not be what you intended. Use the Display palette
          button to see what colors are available. For reference this
          palette image can be saved as a bitmap using Save Collage.

          continue _Collage

                           
                           































                              
          #cpal






          #
          VIEWING MULTIPLE IMAGES (Collage):
          Pressing View Collage will display multiple images in the shp
          file. (Check the message area to see how many images are in the
          shp file.) Starting at Image # the shp images in a file will be
          displayed until the last is reached or the display area is full.
          Check the memo area for the last image displayed and set the
          Image # to that image and press the View Collage button again to
          continue displaying images in the file. Files that contain many
          small images or one large one can take a long time to display.
          Use the Cancel button to stop.

          continue _Saving Files

                                
                                





































                              
          #collage






          #
          SAVING IMAGES:
          After displaying the shp image, the image can be saved to a file
          for editing. Use the Save bmp button in the top row for this.

          The entire shp Image window can be saved as a bitmap with the
          Save Collage button. This function is NOT compatible with
          conversion to shp images. Use this to capture a collage or
          palette to a bitmap for reference or for getting an image to be
          used by programs other than Shp Ed.

          continue _Steel Panthers

                                  
                                  






































                              
          #save






          #

          EDITING STEEL PANTHERS FILES:
          Steel Panthers and perhaps other programs use headers to describe
          some images stored in the shp file that are not compatible with
          Shp Ed's interpretation of the header. When this occurs, the
          message box will display _Problem??_. When replacing an image in
          the shp file with one of the _problem_ icons, check _Use Old
          Header_ and the original header will be preserved. There are
          still some limitations in that the size of the image cannot be
          extended for the problem icons, i.e. non-transparent material
          cannot be added below or to the right of where it currently
          exists. Of course, images cannot be added to the end of a file
          with the Use Old Header option since no header exists. (There may
          be further problems in editing Steel Panthers rotating icons.
          Improvements may be incorporated in the next version of Shp Ed).

          continue _Tutorial

                            
                            
































                              
          #sp






          #
          TUTORIAL:
          How do I alter a shp file image?
          For Panzer General just follow these steps.
          1. Start by loading a shp file, say Tacicons.shp

          2. Go through the images using the Image # box and the Display
          Image button until you get the image that you wish to edit. (Or
          use View Collage then set the Image # and use Display Image ).

          3. Select Save bmp and save the image to a bitmap file, say
          ICON23.BMP.

          4. Go to your compatible bitmap editor and make changes. I have
          used Corel Photopaint, Picture Publisher and Paintshop Pro
          successfully. The pink color is used to represent transparent
          areas. Changing it too another color will make it opaque. Don't
          do it unless that is what you want. Save the edited bitmap to a
          file e.g. ICON23x.BMP.

          5. Back in Shp Ed, select Load bmp and load ICON23x.BMP.

          6. Select Convert bmp. You probably want to make sure that the
          Use Full Pal is selected first or the colors may not be what you
          want. The shp Image should look like the edited bitmap.

          7. Set Image # to either the icon you wish to replace or one more
          than the total number of icons if you are adding to the end of
          the shp file.

          8. Depending on whether you want to alter an existing icon or add
          a new one, choose Replace Image or Add Image. (I guess that there
          is a 256 icon limit in tacicons.shp and in tacmap.shp so there
          isn't much room for additions. There are some empty spots (or so
          it seems) in tacmap.shp and these might be useable.)

          9. Place the file bignew.shp just generated in the PG\DAT
          directory (if it isn't there already). Rename the actual shp file
          (e.g. Tacicons.shp -> Tacicons.bk1) then rename bignew.shp to the
          real shp file (e.g. Tacicons.shp).

          10. Start PG and hope everything works as planned.

          continue _Conditions of Use

                                     
                                     






                              
          #tutor






          #
          CONDITIONS OF USE:
          This program is Freeware and may be freely distributed as long as
          it is not modified. The author makes no warranty as to the
          suitability of the program for its intended or any other purpose.
          Furthermore, the author is not responsible for any damage to your
          system nor is he liable for any other damages whatsoever that may
          be incurred by use of this program. In particular, the author
          does not encourage or condone the unauthorized distribution of
          copyrighted materials.

          continue _Acknowledgements

                                    
                                    






































                              
          #use






          #
          ACKNOWLEDGMENTS:
          This program was prompted by my association with the Panzer
          General DOS Research Center, Panos Stoucas, Director. I wish to
          thank all of the associates of the PG-DOSRC for their
          encouragement, especially Paul Bond and Steve Farrell for their
          alpha testing.

          continue _About the author

                                    
                                    









































                              
          #ack






          #
          ABOUT THE AUTHOR AND Shp Ed:
          Please send comments and bug reports to me at
          chlanda@hotmail.com. I will try to respond to your message and
          will take your comments into consideration in any future releases
          of this program.

          I was bitten by the computer bug about 20 years ago. My first
          computer was a TRS-80 Model I with 4k of memory. It was
          wonderful! Gradually that system expanded to 48k and 2 disk
          drives. While I used the TRS-80, I programmed in BASIC and Z80
          assembly language. When I got my first PC compatible sometime in
          the mid 80's I switched to Borland's Turbo Pascal. Since then, on
          increasingly more complex systems, I have continued to use
          Borland products going from Pascal to C to (briefly) Delphi and
          now C++Builder. This is a very powerful tool and generates
          Windows code with a minimal effort. Excellent!

          My gaming interests are mainly in RPG and Strategy/War games. I
          guess I own more games from SSI than anyone else. I have never
          been able to decide whether it is more fun to play the games or
          investigate the inner workings of the programs and data files.
          When copy protection was made obsolete by the sheer size and
          CDROM nature of most games, I lost one of my favorite pastimes.
          Usually my first project was to get rid of the many annoying copy
          protection schemes. Oh well, there are still cheats and editors
          to be developed.

          Pacific General is a war game with some promise. The built in
          scenario editor is great, but the lack of original maps severely
          limits the usefulness of the editor . I think that the game might
          be more popular among wargamers if it did not have this
          limitation. Anyway, I decided to write a map editor to generate
          new maps. I wanted to access the map tiles for Pacific General,
          and ran across a bunch of shp files in some huge data
          collections. Looking back at Panzer General, I saw the same type
          of files. After a few days of "I know what it looks like but what
          the hell do those numbers mean" I gradually figured out most of
          the ins and outs of unpacking the files so that I could proceed
          with my map editor, PacMap. I was amazed to hear that shp files
          were considered mysterious and that quite a few people really
          wanted an editor. Shp Ed is the result. I still do not completely
          understand the shp files used for Steel Panthers. Hopefully, this
          will be remedied in the next version of Shp Ed.

          Besides Shp Ed and PacMap I have released an editor for Jagged
          Alliance: Deadly Games (DGED) and a quest item locator for
          Daggerfall (DDFQL).

          Fred Chlanda
          January 1998

                              
          #author
