Shape File Manager
created by Paul "Decapod" Gausden
(tutorial by Yuri Sos)

Overview

"....the only way you can change a model
is if you have the original 3D files from
which the shape file was created."

How many times have you seen this written in response to a query from a MSTS user wanting to adjust the height, width or even position of a model?

Well sorry, the statement above is not true...... well it's no longer true since Paul Gausden wrote "Shape File Manager", a piece of Pommie ingenuity bundled up in a miniscule 38k Java application.

What is Shape File Manager (SFM)?

SFM is a single-file HTML Application written in Javascript (unrelated to Java: this application does not require Java to run) to assist with shape file maintenance. Once SFM is opened, a simple yet powerful interface enables you to select an MSTS Shape, uncompress it, then adjust height, width, length, size, position and visibility of any model in MSTS.

 

Download And Installation

sfm24_2.zip

  • Click on links above to download Shape File Manager 2.4.2 (17,503 bytes) (version 2.4.2 (or 2.4a) uploaded to this site July 2005 - small fixes over v2.4).
     
  • SFM requires Internet Explorer (IE 5 or higher); IE does NOT need to be your default browser;
     
  • Save the ZIP file into any directory and extract its contents into your Train Simulator/UTILS/FFEdit folder, overwriting the default newshape.bnf file (uncompressing locos with animation will only work if you have installed the updated newshape.bnf file (included within the .ZIP file));
     
  • Double-click on sfm.hta to start SFM;
     
  • The first you run this software some anti-virus software may report the file as a "malicious script": I can assure you it is not: if you receive this message, select the option (usually last on the drop-down box) that instructs your anti-virus software to "Authorise this script".
     
  • If after installation, opening Shape File Manager just opens a notepad with the source code text, you will need to edit/change the File Associations in Explorer. Go Tools | Folder Options | File Types, scroll down to .HTA, press EDIT: look for the "Open" command - it should read thus:

    C:\WINDOWS\system32\mshta.exe "%1" %*

    Make it so, click "ok" and SFM should now open correctly.

  • If SFM still does not run, it's possible one of its DLLs has not registered properly: run the following line from a command prompt:

    regsvr32 scrrun.dll

    command prompt window

 

Using Shape File Manager

  1. Uncompression/Compression
  2. When you open SFM, you will be presented with a screen something like shown below; click on "Parent" to move up a folder, click on a folder name to open that folder; use the scroll bar at right or the mouse-wheel to scroll folder lists that are off-screen.

    To modify any shape file, you need to uncompress it first. Move your mouse pointer over the grey Options box beside the shape file you wish to uncompress. A minimal series of options will appear. Click on Uncompress.

    After a few seconds, the file size will change and SFM will show your file as Uncompressed. Mousing over the Options box now gives you an expanded range of choices.

    Once you've finished with the model, you Compress the shape file by selecting Compress when the list of options appear.

  3. Scale
  4. The first option for your uncompressed model is Scale: it is now a simple matter to create or distort an existing model to suit custom applications.

    For example, you can distort a tunnel entrance along all or any axis to achieve a larger tunnel.

    Clicking on scale pops up a new dialogue box with a series of further options: here we will use JP1Tunnel.s as an example (if you're following this tutorial, it would be a good idea to first make a backup by clicking copy/paste on the shape file to give you a "Copy of JP1Tunnel1.s").

    Check the box for "Scale same in all directions" and type in 2.5; static models have no ENG/WAG file, so uncheck that option as well:

    This achieves a new shape file which has been enlarged in all axes by a factor of 2.5.  The original JP1Tunnel is shown to the left of the altered version (below):

    You can also just alter one axis: uncheck the "Scale same in all directions" and fields appear for all three axes: x (width), y (height), z (length). This time we set the Y axis to be scaled by a factor of 2.5, but left the X and z axis at no change (=1).

    The result can be seen in the image below, JP1Tunnel has been enlarged in only the "y" axis by a factor of 2.5.  The original JP1Tunnel is shown in front of the altered version:

    When Australian designer Michael Thompson reskinned Jens-Chris Baerenz's E8 to resembler an Australian outline NSWGR 42 class, he shrank the model 5-10% to bring the model within Australia's more restrictive loading gauge.

    Check the images below:


    Warning:  scaling locos/stock may not always work as the WAG/ENG files sometimes can get slightly corrupted.

  5. Texture Modes
  6. Awaiting departure early morning (no specular lighting enhancement).

    Notice the sunlight glinting off the locomotive in the lower image. Click on "Texture Modes".  The following screen will appear.  Click on "HiShine" for the part of the model you wish to enhance.  Save your work and test it in MSTS.

  7. Distance Levels
  8. Distance Visibility / Level of Detail(LOD) Adjustment lets you adjust the maximum distance at which objects are visible (modellers should really be doing this, so that small scenery items disappear over 500m) and adjust the level of detail.   This will help improve frame rates on routes with a high object density.

    The pop-up box varies slightly if there is one (see above) or more than one (see below) LOD.

  9. Shift
  10. As well as resizing a model, you can shift the model on its axis.  A good example of this is 310wdcar.s located in the 310 folder:  this is a MSTS default wagon that rumbles along with the wheels embedded in the rails (image immediately below).

    Using SFM, I shifted the model +0.05m in the "y" direction. 

    As you can see, the wheels now ride on the rails, rather than in them.

  11. Reverse
  12. You can also "Reverse" or rotate a model 180o on its axis. This command runs immediately you click on it. This message pops up when the reversing is complete.

    This command is very useful for diesels running in MU: "flipping" them in Consist Builder means that the loco runs with its bogies turning in the opposite direction to the curve. Note the bogies on the rear (brown loco) on the image below are rotating the wrong way.

    Reversing the shape and adding the reversed shape as a normal trailing unit ensures that the bogies follow the track.

  13. Wordpad Edit .S
  14. Once the .s file is uncompressed, you can edit it in a Unicode-aware editor: this link opens the file in Wordpad. I generally use this to change the name of the embbedded ACE filenames when I'm reskinning.

  15. WordPad Edit .SD
  16. This command uses Wordpad to open the .sd file that matches the .s file.