Australian MSTS @ steam4me  Tutorials Packaging & distribution in MSTS additional notes

Packaging and Distribution- additional notes

(the saga continues!)

by Jim "Sniper" Ward


All these following bats from my belfrey are for packaging and distribution, and my guess would be that it's gonna be a while before you need to learn all that. Hopefully Mike Simpson will have RouteRiter perfected by then, which will make all the packaging steps automatic, and all the packaging/sorting batch files obsolete. Then you won't need to learn how to use them, thus saving a lot of money on aspirin!

There is a new Install.bat that should be used as a template for the installation, and it includes some sample lines for copying individual terrain textures to keep the final install size down.

The three files for custom objects are used according to where you are and what you want to do. NAcustom.bat or EUcustom.bat will copy all the files that were written or modified after May of 2001 (which would be all non-KUJU files) to a directory tree in \custom. Today is April 11th, 2002, and since I'm in North America, my computer date reads "4/11/02", so I use NAcustom.bat, which uses month/day/year format. For Europeans, they would be reading "11/4/02", and use EUcustom.bat, which uses day/month/year to sort the files.
After all the custom files are copied to the \custom folder, you can delete the \stuffed folder from the route.

When you're ready to package, delete the \envfiles \shapes \sound \terrtex \textures folders as usual.

What you do next depends on what you have, if you're using only custom objects, you can run repack.bat to copy all the custom shapes back into the route, then delete the \custom folder. This will re-create the directory tree in the route, with only the custom object files and none of the default ones, and the route can be zipped up like that.

If you have replacement textures for default objects, that wouldn't work correctly, since the copy routine in Install.bat overwrites any same name file with the last texture copied. So if you have a custom track texture, for example, it will get overwritten by the Acleantrack1.ace from USA2. In that case, you'll need to leave the \custom folder, don't run repack.bat, and let the last line in Install.bat take cared of it. Done that way, any file in \custom with the same name as a default file will overwrite it.

Note that any part of this package can be used independently, if you wrote your own .REF file and .DAT files you can still use the batch files to sort out custom objects, and/or use edited portions of the Install.bat file to copy only the files from the routes you want. Or use only the DAT files, if you know what you're doing you can copy only the necessary sounds, shapes and textures for those and leave out the rest. The whole point of this package is flexibility, it's designed to be customized for however you want to use it.

Other than the custom object packaging, I've only made some minor changes to the .REF file, splitting the Mainline Stations into JP, OE, and US categories, and moving siding and platform markers to track objects.

Altho this is still considered a beta, the Seaview, Port Ogden & Northern 5, and Ohio & West Virgina routes all used portions of this package, so most of the bugs are out of it



More addendums to this, gotta add this to the readme.
1. The forest.dat file in that package is flawed, if you use the treestump forest region objects, you need to copy the ace file for whichever stump or stumps you use to all the seasonal folders, or you'll get error messages from the stumps in spring, fall, etc

2. THM files are generated in the \Shapes folder if you have thumbnails enabled in the route editor object menu. These don't do anything useful so they should be deleted before zipping, since they're generated the first time you look at the object class in the object menu, they'll have a date after May 2001, and will get copied to \custom\shapes folder by the custom.bat file.

3. If you have Sky Conductor installed, all the Sky files are in the \Envfiles folders for the original six routes, and will get copied into the new route's \envfiles folder. The EUcustom.bat or NAcustom.bat will copy all those to \Custom\Envfiles, since they also are after May 2001. Some of the default .env files in the original six routes get their dates changed by the Sky Conductor installation, so those need to be checked too

4.  After running whichever custom.bat you use, do a search in \Custom\Shapes for *.thm, select all, delete all. If you are using custom env files or textures, probably the easiest way is to seperate those, delete all the files from \custom\envfiles and \custom\envfiles\textures, then paste yours back in. Then either zip it, or run the repack.bat after getting rid of the thm and HITW files. Again, if you are using custom env files, it's usually something like the moving water hack that replaces the water textures with files that have the same name. So you need to either leave the custom folder in place and let the install.bat overwrite the default files, or if you're going to run repack.bat to rebuild the directory tree, then you need to cut out the lines for copying \envfiles from any of the defaults or templates, and include all the necessary envfiles in the route, both default and custom. You only need one set of env files, that's governed by the listings in the .trk file, I'm currently sorting out the .env files, so the new custom water stuff can get sorted out to use unique file names by:

(1) Change the listing in the .trk file, example AWEsun.env, AWErain.env, AWEsnow.env, then rename the .env files to match.

(2) Hack the 3 renamed .env files to look for AWEwatertop.ace, AWEwatermid.ace, AWEwaterbot.ace, then rename the ace files to match. Done that way, there's no possibility of overwriting with a default texture since it don't have the same name (why the hell didn't KUJU do this?!). I'll have to check it thoroughly to make sure I get no train world initialization failed out of it, but it should work. Not that hard to hack the .trk file either, open it in wordpad, it's short and self explanatory.


 > Return to top of this page
 > Other tutorials(complete list)
 > Return to the Aust MSTS @ steam4me start page

19 July 2002