Repainting of Engines and Wagons

Repainting and uploading the new file has to take care of a few things.
Trying to explain the basics:

Other programs required

- TGAtools and tkutils from train-sim.
- a paint program, any can be used including MSPaint.
- Shape viewer to find the textures used.

Use of a Shape file in MSTS

Any object you see in MSTS has three sub-objects responsible for viewing it. They are
-a shape file with an extension of ".s";
-a shape description file with an extension of ".sd" and
-an image files which the shape uses ".ace"

The original for repainting

Open with the Shape Viewer (SV). From the menu above, find out which textures are being used. Unselect them one by one and determine which ace file you want to change.

The Texture file (.ace)

Open the texture ace file with TGAtools. It will show two windows. The left one is the main image and the right one is the alpha mask. If the image does not use mask, the right side window will be blank. Double clicking on either will export the image to paint where you can do the alterations. You can copy the image to any other paint program you fancy and know better to use, e.g. Photoshop or gimp. Initially stick to Paint. Also altering the mask is slightly different and will take further reading to achieve.
Once the alterations are done, click to close the window. A message will appear asking whether to save? Click yes and you will be back in the TGAtools with your new image. Make a note of the type of image as seen in the title bar. From the menu, export it as the same type, Ace (alpha), Ace (no alpha), etc. Very important, change the name of the new file, e.g. Original ABCD.ace to the new one ABCD1.ace.
Now rename the original ABCD.ace as say ABCDx.ace and the new one as ABCD.ace. Open the shape in SV to see the result. If you are happy, rename both aces back to original names.

Creating a new shape which uses this file

You cannot use this new file as such because it will replace the original. So you need to create a new shape using this ace file. No need to learn the shape making programs, just notepad will do.

The Shape file (.s)

The shape file can be opened by any text editor like notepad. However, frequently it is compressed and has to be uncompressed first. Try to open the shape file with notepad, if you seee some meaningful words, then the file is not compressed, if some gibberish is seen, it means that the file has to be uncompressed first.

Open the "Zipper", part of tkutils. It requires dotnet to work. In the window of zipper, drag the compressed file. It will uncompress it. Now open it in wordpad. Search for ace. Some lines naming the textures used will be seen. Find the ace file being changed, in our case ABCD.ace. Use a new name in its place say ABCD1.ace. If the original shape file was "house1.s"; save your altered shape file as "house1A.s". Your new shape is ready ! You may drag it back to the zipper to comprss it.

The Shape description (.sd) file

MSTS will need this to show in the game. Copy the original "house1.sd" and rename it as 'house1A.sd", the new name you selected. Open this new house1A.sd with notepad and change the shape file name from house1.s to house1A.s, save close. Ready to use it in MSTS.

Alter the ref file so that your new shape file appears while using the Route Editor if you intend to use it in a route.

Usually however most of the repainting is done for engines and wagons, for which some additional procedure is needed.

Creating new engine/ wagon form your new shape

As you renamed the shape file, copy the eng/ wag file and give it a new name. Say "GP38.eng" to "myGP38.eng". In this new file, search for the line showing the shape used. Change it to your new one. The engine file uses the filename on three occasions, and the wagon once, you have to change all those incidences. Search for "GP38" and replace it with "myGP38". Frequently the shape file will also be named similar to the eng file (like GP38.s). This you have already changed, keep it as it is. Your new engine is ready. Create a consist and test it in MSTS.