Train-Sim.Com
MSTS Route Design

Message Areas - "Does anyone wants to know what objects are hidden in the World files?"

Train-Sim.Com Message Areas

"Does anyone wants to know what objects are hidden in the World files?"

Email this topic to a friend
Printer-friendly version of this topic
Bookmark this topic (Registered users only)
Previous Topic | Next Topic Conferences MSTS Route Design (Protected) Original message
dvdhoven (764 posts)
Apr-21-02, 01:58 PM (EDT) "Does anyone wants to know what objects are hidden in the World files?" LAST EDITED ON Apr-21-02 AT 02:11 PM (EST)Hi,Due to the recent postings, I got inspired to pick up my old script, blow off the dust and see if I can make something that reveals which objects are referenced by the World files and if these objects are default objects what textures they use.This way, the other guys have more time to create something beautifull.I have now a very bare script, that can do these tasks.
When you run this script, you get four files:
- Log file
- File with used shapes which have one or more default textures
- File with used shapes for which no textures can be found
- File with the used texturesThere is no read-me so farYou need to install my CrossReference files in the Routes folder
in a folder CrossRef
Then you can run the script from every folder on your machine.
You need to have scripting enabled, if not the only very coarse way, I know is downloading the scripting engine from http://msdn.microsoft.com/scripting
The script will ask for the route folder name, give this without any slashes or path. So for the portogden5 route, type portogden5
You can run the script by double-clicking it
A more safe way is running from a DOS-box:
cscript checkroute.vbs > checkroute.txt
In this way you don't have to click OK many times just in case, I left a testing message somewhere.
For a DOS box, you need to navigate to the folder where the script resides.
The script name is CheckRoute.vbs
The script reads the registry to determine the installation path of MSTS.
The world files need to be uncompressed, I have tried to made the script so that it will not crash, but the results are useless, so uncompress your world files.
I haven't tested this, but when I have done it well, in the log file are the compressed world files reported.Well I hope I have giving all the information you need. For me it is sleeping time, so I will not follow this thread before tomorrow evening.Here is the script and the CrossReference files
http://www.train-sim.com/dcforum/User_files/3cc30bc24c84a5e7.zip Dick van den Hoven
Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 1 Alert Edit | Reply | Reply With Quote | Top
Table of Contents

Subject Author Message Date ID RE: Does anyone wants to know what ... dvdhoven Apr-22-02 1 RE: Does anyone wants to know what ... Engineer Apr-27-02 21 RE: Does anyone wants to know what ... DKlemm Apr-22-02 2 RE: Does anyone wants to know what ... dansherman Apr-22-02 3 RE: Does anyone wants to know what ... sniper297 Apr-22-02 4 RE: Does anyone wants to know what ... sniper297 Apr-22-02 5 RE: Does anyone wants to know what ... dvdhoven Apr-23-02 8 RE: Does anyone wants to know what ... dansherman Apr-23-02 7 RE: Does anyone wants to know what ... dvdhoven Apr-23-02 10 RE: Does anyone wants to know what ... railwaysoftware1 Apr-23-02 6 RE: Does anyone wants to know what ... dvdhoven Apr-23-02 9 RE: Does anyone wants to know what ... sniper297 Apr-23-02 11 RE: Does anyone wants to know what ... dvdhoven Apr-23-02 12 RE: Does anyone wants to know what ... sniper297 Apr-23-02 13 RE: Does anyone wants to know what ... sniper297 Apr-23-02 14 RE: Does anyone wants to know what ... dansherman Apr-24-02 15 RE: Does anyone wants to know what ... dvdhoven Apr-24-02 16 RE: Does anyone wants to know what ... Jitny Apr-24-02 17 RE: Does anyone wants to know what ... sniper297 Apr-24-02 18 RE: Does anyone wants to know what ... Jitny Apr-25-02 19 RE: Does anyone wants to know what ... dvdhoven Apr-25-02 20

Lobby | Topics | Previous Topic | Next Topic
Messages in this topic
dvdhoven (764 posts)
Apr-22-02, 11:19 AM (EDT) 1. "RE: Does anyone wants to know what objects are hidden in the World files?" LAST EDITED ON Apr-22-02 AT 11:25 AM (EST)Hi,

And I thought that you were interested in this.
Well then I have the time to play some Activities at the new German route.Well sad about the waste of time.Oh and what I forgot, the script creates a folder called CheckRoute in your Route folder and puts it files in there.
But why am writing this? You don't read or react to my posts.
Dick van den Hoven
Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 2 Remove | Alert Edit | Reply | Reply With Quote | Top
Engineer (7 posts)
Apr-27-02, 03:48 PM (EDT) 21. "RE: Does anyone wants to know what objects are hidden in the World files?" Thanks
Usefull info, still plugging away at an automated solution. Remove | Alert Edit | Reply | Reply With Quote | Top
DKlemm (1436 posts)
Apr-22-02, 12:31 PM (EDT) 2. "RE: Does anyone wants to know what objects are hidden in the World files?" Dick;I wasn't on much yesterday so I didn't see it until this morning. Won't be able to give it a try until tonight. Please don't think this isn't useful. Just not a lot of us that do route building and have a clue what you are talking about.David Klemm
Illinois Central Route
Illinois and St Louis Divisions
Ver 0.7 uploaded
Decatur IL 51% done, off playing with trains and doing research for the next update!
Remove | Alert Edit | Reply | Reply With Quote | Top
dansherman (49 posts)
Apr-22-02, 12:52 PM (EDT) 3. "RE: Does anyone wants to know what objects are hidden in the World files?" Dick,Just saw your post, just downloaded the zip, will give it a try tonight unless I have to work overtime. (again) It looks like it will be the answer to a lot of questions I have about why some things work for MS/KUJU but not for me.Thanks for ALL your fine work.Dan Remove | Alert Edit | Reply | Reply With Quote | Top
sniper297 (2087 posts)
Apr-22-02, 05:16 PM (EDT) 4. "RE: Does anyone wants to know what objects are hidden in the World files?" I'm not getting how to use it, Dick. I put it in the train simulator\routes folder, then doubleclick on the CheckRoute.vbs, type in the route folder name, blink, OK, what happened? So I did the right click thing and "open with MS-DOS prompt", and got this:Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 3After that, nothing. FShapes.txt, NFShapes.txt, Textures.txt are all 0kb, empty files.I have 98SE (4.10 build 2222), I dunno if I have scripts enabled or not, I'll have to check that next. Remove | Alert Edit | Reply | Reply With Quote | Top
sniper297 (2087 posts)
Apr-22-02, 05:21 PM (EDT) 5. "RE: Does anyone wants to know what objects are hidden in the World files?" Nope. D/Led and installed the script engine from your link, same thing. Remove | Alert Edit | Reply | Reply With Quote | Top
dvdhoven (764 posts)
Apr-23-02, 12:03 PM (EDT) 8. "RE: Does anyone wants to know what objects are hidden in the World files?" LAST EDITED ON Apr-23-02 AT 12:26 PM (EST)LAST EDITED ON Apr-23-02 AT 12:09 PM (EST)Hi,
Jim, you have scripting enabled, otherwise this input box doesn't show up and you have the Microsoft Scripting Header in that DOS box.
I'm wondering what it can be. You have version 5.0, may be that that is the problem. You can download the 5.6 version from Microsoft. msdn.microsoft.com/scripting
I'm using the Dictionary object quite heavily and I am doubting if that was introduced with version 5.5.
Try to download and install version 5.6 and see if the script will run.
And when you run cscript checkroute.vbs > checkroute.txt what is the content of checkroute.txt?Sorry, later I saw that already installed version 5.6. Are the CrossReference files installed in a Folder CrossRef in the Routes folder? Mark the s!Dick van den Hoven
Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 4 Remove | Alert Edit | Reply | Reply With Quote | Top
dansherman (49 posts)
Apr-23-02, 09:21 AM (EDT) 7. "RE: Does anyone wants to know what objects are hidden in the World files?" Dick,Ran the script last night on three different routes, Europe1, Japan1, and USA1. Four files were placed into each of the check route folders in each of the corresponding route folders, Fshapes.txt,NFShapes.tex,Textures.txt and Log.txt. The only file that was not zero length was the log file which stated, after parsing each file, that each '.w file seems to be compressed'. Shouldn't at least one of the other files have a list of hidden objects on at least one of those routes? Should I have tried it on an addon route like P.O.&N?My system is as follows:ASUS A7A-266 mobo with 1.4 ghz Thunderbird, 512 mb DDR ram, GeForce 2 pro, Windows XP pro, 20 gb free on hd. I did install the front coupler patch. Dan Remove | Alert Edit | Reply | Reply With Quote | Top
dvdhoven (764 posts)
Apr-23-02, 12:19 PM (EDT) 10. "RE: Does anyone wants to know what objects are hidden in the World files?" Hi,Yes, the World files need to be uncompressed, like PortOgden5 and 4.Dick van den Hoven
Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 5 Remove | Alert Edit | Reply | Reply With Quote | Top
railwaysoftware1 (72 posts)
Apr-23-02, 04:49 AM (EDT) 6. "RE: Does anyone wants to know what objects are hidden in the World files?" Dick,Waarschuw de gebruikers..........ooops ! sorry, Please warn any potential user that turning the scripting setting in Windows on initiates a very high security risk.
I found many computers at some of my previous jobs that were broken into just because windows scripting wasn't turned off.Ron
www.railwaysoftware.com
currently building the Nescio route. Remove | Alert Edit | Reply | Reply With Quote | Top
dvdhoven (764 posts)
Apr-23-02, 12:17 PM (EDT) 9. "RE: Does anyone wants to know what objects are hidden in the World files?" Hi,Ron, I agree that turning scripting on is a certain security risk, but we don't need to exagerate this issue. The problem is that it somewhat confusing for me, where to enable and where not.
In Internet Explorer, it should be disabled or set on the ask permission setting, but I'm not sure if this effects the scripting within Windows where it can be a great help.The reason that I use scripts, is the fact that there needs nothing to be installed. When I use VB, it needs some files to be installed.Dick van den Hoven
Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 6 Remove | Alert Edit | Reply | Reply With Quote | Top
sniper297 (2087 posts)
Apr-23-02, 12:33 PM (EDT) 11. "RE: Does anyone wants to know what objects are hidden in the World files?" LAST EDITED ON Apr-23-02 AT 12:37 PM (EST)Nope, I did DL and install 5.6 for 98, same thing. I tried deleting the 4 txt files, but it don't make new ones. I don't get any error messages, I just don't get any new or overwritten text files generated, unless I'm looking for them in the wrong folder? WAIT! I got it! I pasted the whole checkroute folder into \portogden5 instead of \routes, that time it came up with the 3 lists in \portogden5\checkroute\ folder. OK, I'm gonna delete and re-install PO&N5, then run your gizmo on it, and see if I can use the text files to put together a batch to copy only the necessary textures. I think you're on to something here! Remove | Alert Edit | Reply | Reply With Quote | Top
dvdhoven (764 posts)
Apr-23-02, 12:44 PM (EDT) 12. "RE: Does anyone wants to know what objects are hidden in the World files?" Hi,Wierd, strange. I have tested the script and it created the Checkroute folder.
Be aware that this are only the textures for the objects that are referenced in the world files.
No carspawner, no telephone poles and what so ever.The script considers the following types in the world file:
CollideObject
Pickup
LevelCr
Signal
Gantry
HazardDick van den Hoven
Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 7 Remove | Alert Edit | Reply | Reply With Quote | Top
sniper297 (2087 posts)
Apr-23-02, 01:59 PM (EDT) 13. "RE: Does anyone wants to know what objects are hidden in the World files?" OK, Dick, I'm working on that premise now. One thing I'm gonna try is to open the texture file, and do the CTRL-V thing to paste "call Xcopy" at the beginning of each line, and ".\ /s /y" at the end of each line to get all the seasonal textures. I'm focusing on only the textures at the moment, since the biggest space hogs in any route are;
\Textures
\Terrtex
\Sound
It's fairly easy to do \terrtex and \sound manually, or even select only a single route to copy them from and don't use more than one regional sound or terrtex source. You can do that without getting errors in the RE since the sounds and terrain textures are not accessed from the ref file, which simplifies the whole thing. I don't think it's really worth bothering about shapes, the shapes folder is the smallest of all even with all shape files all six routes. But the \textures is the biggest, and the hardest to sort out manually.Here's what you left out of the readme;Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 8Paste the checkroute folder into routes, double click on the CheckRoute.vbs file, type in the route folder name. Got that, you forgot to mention it creates a new \checkroute folder inside the folder for whichever route you're doing, and THAT is where to find the newly created txt files! Man, I was looking for them on the desktop, in \My Documents, you name it, I even did a search for "*.cvs", since your readme mentioned something about those. Gotta cut down on the Heinekens while you're writing readme files! Anyway, proper steps, paste \checkroute into \routes, run CheckRoute.vbs from \routes\checkroute, type in name of route folder, look for txt files in \routes\RouteFolderName\Checkroute\ folder.
I'll be back with a new bat after I test this, I currently have PO&N5 re-installed at 324 megabytes. That will vary, since I have Sky Conductor installed and the existing instalpo5.bat copies Europe2 \envfiles, it gets all the HITW files put in there by Sky Conductor on mine. The bat also copies Europe2 \Terrtex, which it don't need either, the first thing I gotta do is fix those so I can get a corrected final install size for comparison.
I'll be back, gotta go pick up the critter from school. Remove | Alert Edit | Reply | Reply With Quote | Top
sniper297 (2087 posts)
Apr-23-02, 06:44 PM (EDT) 14. "RE: Does anyone wants to know what objects are hidden in the World files?" LAST EDITED ON Apr-23-02 AT 06:50 PM (EST)Oopsie. Found one flaw in the database so far.jp2bluebrg.s;1;JP2bluebrgtex.ace
jp2bluebrg_r.s;1;JP2bluebrgtex.aceThose are listed in the CrossRef_USA2.txt, but they are not in USA2, only Japan2. That one is easily fixed, but it makes me wonder how many others there are? Or, and a more horrifying thought, if the default folder structure is actually different between the US/Canadian and European versions of MSTS!
Well, anyway Dick, check that when you sober up a little and let me know. Here's what I did so far;Deleted and re-extracted PO&N5, unchecking the box for the auto-install. Edited instalpo5.bat to get rid of the two lines for copying terrtex and envfiles from Europe2 (my mis\*.*take in the original, my turn to ease up on the Heinekens!), and that took the final install size down from 324mb to 280mb.
Next, I ran CheckRoute.vbs. I opened the resulting Textures.txt in wordpad, and made a bat file out of it to add to instalpo5.bat.Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 9
First, I did the edit, replace, for the 6 main route names, replacing with call xcopy ..\foldername\textures\ in order to get the "copy from" routine.
Since all the files end with ".ace", the next thing was to get the "copy to" part in, so I replaced ".ace" with ".ace .\textures\ /s /y"Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 10
I just did a global on that for the whole 280 line list, the /s switch will take care of all the seasonal subfolders, if any.
After copying and pasting all 280 lines into instalpo5.bat, I then deleted all the lines for copying textures from all the routes, leaving only the lines to copy all shapes (again, that's only 11 megabytes).Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 11By now I have a 22kb batch file, but it didn't work - Send/don't send, BSOD, reboot, you know. Anyway, after analyzing it for a few minutes, I added these;Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 12
Altho I probably could have just left in the lines to copy all the template textures and gotten the same thing, \Template\Textures has most of the basics, and it's only 10.7 megs.That got me a little further down the road, but still not there yet - missing texture usautofir.ace. Like you said, it don't read what's in the dat files, so that's next.
So far it looks very promising, I have a 122 mb route folder instead of 280 mb, it's going to get a little bigger before I get it to actually run, but the concept is definitely workable. Congratulations!Next step, double check the 6 CrossRef_*.txt files you're using for your database, gotta start with flawless or the errors will compound themselves.
If possible, a way to automate adding the ""call xcopy ..\(original route folder name)\textures" to the beginning of each line, and the " .\textures\ /s /y" to the end of each line would be nice. Otherwise it gets tedious as hell, and it has to be checked and tested thoroughly to weed out the \\syntax*errors. I can whip up a template batch for copying the common ace files (track, signals, cars, trees) not in the .w files once we figure out for sure which ones they are, so don't worry about those for now. Even if it don't end up being perfect and copies SOME unnecessary files, it could still save 100 to 150 megs on each installed route just in the \textures folder, so it's well worth it to keep going on this. Remove | Alert Edit | Reply | Reply With Quote | Top
dansherman (49 posts)
Apr-24-02, 09:17 AM (EDT) 15. "RE: Does anyone wants to know what objects are hidden in the World files?" Dick,I was going to write a rather long message about how Cross Ref would make a route builder's life so much easier, but coming after what Sniper writes, it would like me trying to tell Einstein about the theory of relativity. So, I'll just say "Thanks, Dick. Cross Ref will be one of my most used utility programs and I appreciate your sharing it with us." Dan Remove | Alert Edit | Reply | Reply With Quote | Top
dvdhoven (764 posts)
Apr-24-02, 12:11 PM (EDT) 16. "RE: Does anyone wants to know what objects are hidden in the World files?" Hi,Thanks for the replies.
Well remember this is only a temporary tool, just to give those programming boys more time.Some remarks from me:
The bat files.
I have plans to create some bat template files. A line in such a file will look like this:
<param1> ..\..\USA2\Textures\Idontknow.ace <param2>
This way, you can easily do a search and replace for <param1> and <param2>Some .ace files belongs to the hidden objects. I have put them in the USA2 folder thus causing some trouble now. I have to do a clean install of MSTS on a other machine and recreate the Cross Reference files.Forest.
In the World files is a type Forest listed with an .ace file, I can put these .ace files to the .ace files list.Transfer.
In the World files the transfers are listed. But in which folder do they reside? Textures or TerrTex?As Jim have demonstrated that with the .s switch of Xcopy, you can copy files from subfolders, I have not taken in account the information about Snow, night and seasonal folders.I think I can do something in the next weekend.Dick van den Hoven
Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 13 Remove | Alert Edit | Reply | Reply With Quote | Top
Jitny (157 posts)
Apr-24-02, 08:28 PM (EDT) 17. "RE: Does anyone wants to know what objects are hidden in the World files?" lolI need sumpin to sort out the .bat files Regards
Bob
Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 14
Mobile AL
M&O,GM&N,GM&O,CSX,IC,SOUTHERN,BNSF,L&N(Old Reliable)

Remove | Alert Edit | Reply | Reply With Quote | Top
sniper297 (2087 posts)
Apr-24-02, 10:22 PM (EDT) 18. "RE: Does anyone wants to know what objects are hidden in the World files?" Hey, man, that's easy, you got a lot of ".bat"s, put them in a folder named "\Belfrey", that's where I keep mine!Yeah, I found that as the last one, Dick, I had something that finally opened instead of returning error messages, and after starting in a bunch of different places, the starting point Fowlis gave me the missing texture for the only place on the route I used a transfer, in that crater between Stevens Point and Fowlis. (Terrain transfers, altho they follow the same protocol as terrain textures, go into \Textures and \Textures\Snow instead of \Terrtex.) I went ahead and added a wild card copy for \Template\Textures since it's only 10 megs, then I added these lines;
call xcopy ..\Europe1\Textures\*tree*.ace .\Textures\ /s /y
call xcopy ..\Europe1\Textures\*fir*.ace .\Textures\ /s /y
call xcopy ..\Europe1\Textures\*bush*.ace .\Textures\ /s /y
call xcopy ..\Europe1\Textures\*trans*.ace .\Textures\ /s /ycall xcopy ..\Europe2\Textures\*tree*.ace .\Textures\ /s /y
call xcopy ..\Europe2\Textures\*fir*.ace .\Textures\ /s /y
call xcopy ..\Europe2\Textures\*bush*.ace .\Textures\ /s /y
call xcopy ..\Europe2\Textures\*trans*.ace .\Textures\ /s /ycall xcopy ..\japan1\Textures\*tree*.ace .\Textures\ /s /y
call xcopy ..\japan1\Textures\*fir*.ace .\Textures\ /s /y
call xcopy ..\japan1\Textures\*bush*.ace .\Textures\ /s /y
call xcopy ..\japan1\Textures\*trans*.ace .\Textures\ /s /ycall xcopy ..\japan2\Textures\*tree*.ace .\Textures\ /s /y
call xcopy ..\japan2\Textures\*fir*.ace .\Textures\ /s /y
call xcopy ..\japan\Textures\*bush*.ace .\Textures\ /s /y
call xcopy ..\japan\Textures\*trans*.ace .\Textures\ /s /ycall xcopy ..\usa1\Textures\*tree*.ace .\Textures\ /s /y
call xcopy ..\usa1\Textures\*fir*.ace .\Textures\ /s /y
call xcopy ..\usa1\Textures\*bush*.ace .\Textures\ /s /y
call xcopy ..\usa1\Textures\*trans*.ace .\Textures\ /s /ycall xcopy ..\usa2\Textures\*tree*.ace .\Textures\ /s /y
call xcopy ..\usa2\Textures\*fir*.ace .\Textures\ /s /y
call xcopy ..\usa2\Textures\*bush*.ace .\Textures\ /s /y
call xcopy ..\usa2\Textures\*trans*.ace .\Textures\ /s /yI was getting tired by this time, so I changed to wild card copying and got a lot more than necessary. I still have a working route now, at 164 megs instead of 280, so still over 100 megs space saving even tho it's not as compact as it could be. I also haven't fully tested it yet, altho I did a bunch of locations and day/night/winter/autumn/etc. This is a lot more work than most route developers (including me!) are gonna be willing to put into compacting, and since I don't have roads or carspawners it will need to be tested on other routes that do.
The big trick here, in case you can't get all the dat object textures, is going to be to make shortcuts that will keep the finished install as small as possible consistent with error free installation. Compromises are acceptable, an extra 20 or 30 megs over and above what's actually needed is much better than 150 to 200 megs. Remove | Alert Edit | Reply | Reply With Quote | Top
Jitny (157 posts)
Apr-25-02, 09:49 AM (EDT) 19. "RE: Does anyone wants to know what objects are hidden in the World files?" Sorry.... belfry file full.access denied. Regards
Bob
Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 15
Mobile AL
M&O,GM&N,GM&O,CSX,IC,SOUTHERN,BNSF,L&N(Old Reliable)

Remove | Alert Edit | Reply | Reply With Quote | Top
dvdhoven (764 posts)
Apr-25-02, 12:17 PM (EDT) 20. "RE: Does anyone wants to know what objects are hidden in the World files?" Hi,Jim, what I plan to do - may be coming weekend - is to include the reading of all the .dat files and to include the reading of the world file entries:
- Forest
- Transfer
Reading the dat files is in fact easier than the world files. Dat files are never compressed.What is nearly impossible for me is reading the tile files. So I cannot include the terrain textures.I will also make a test of a texture files has a modification date after 2001-May-31. In that case the texture may be altered and need to be included by the route builder in the package.Jim, many many thanks for all the labour you have done for me. Thanks again.Later on I will take a look at the sound files.Dick van den Hoven
Message Areas - "Does anyone wants to know what objects are hidden in the World files?" – image 16 Remove | Alert Edit | Reply | Reply With Quote | Top

Lock | Archive | Remove

Lobby | Topics | Previous Topic | Next Topic

Restored from the Train-Sim.Com archive, captured June 7, 2002. About this archive.