Train-Sim.Com
MSTS Route Design

Utility Idea

Notice to all visitors and members of the Train-Sim.Com message forums:
If you plan on using a signature banner in your posts, we would like to remind you that there is a maximum size for banners. That maximum is 450 pixels wide by 120 pixels high, and not to exceed 25k. Your compliance is appreciated. FORUM RULES Problems? There are two common reasons for problems with logging in and posting messages. The first is that you are running a firewall that prevents your messages from being sent to the server. The other is that you have cookies disabled; the DCForum software requires cookies to work properly.

Previous Topic | Next Topic

Printer-friendly copy Email this topic to a friend

Reading Topic #12727

Member since Apr-8-03 · 614 posts

Utility Idea – image 1

With the questions swirling around Cascade Crossings, the tsection.dat files, etc., I realized I didn't know of any simple way to find out how many objects, distinct object files, and distinct texture files were needed at any given point of a route. And as a route designer, perhaps I should. Which lead to an idea for a utility that counts such data and reports it. Does anyone else see value in that or is this an exercise in useless numbers?I think it would work (in very general terms) along these lines:While not at end of world file list,
Open next world file
Read a world file rows, counting the objects and distinct object filenames, saving the two sums in an array.
endwhileWhile not at end of array
increment pointer
add count of objects(this tile) + count of objects (tile to left) etc. for all this one and all 8 adjacent tiles. Ditto for filenames. Report sum.
endwhileA more sophisticated version might be able to calculate the number of distinct texture files for the 9 tiles and maybe even the sum of polys.Well that's the idea anyway. Now the problem: I'm not a coder, so this might just be a pipe dream. I'd certainly be willing to work with anyone who wants to code this tho.Dave NelsonWP mainline, Oakland-Stockton: 100% complete;
SP mainline, Oakland-Stockton: 20% complete;
Aug 1950 Utility Idea – image 2
<<new .sig under construction>>

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

RE: Utility Idea, NS4Life, Nov-20-04, 02:42 PM, (1) RE: Utility Idea, MikeSimpson, Nov-20-04, 06:31 PM, (2) RE: Utility Idea, muskokaandtahoe, Nov-20-04, 08:23 PM, (3) RE: Utility Idea, MikeSimpson, Nov-20-04, 09:51 PM, (4) RE: Utility Idea, Br5an, Nov-21-04, 10:17 AM, (5) RE: Utility Idea, MikeSimpson, Nov-21-04, 06:07 PM, (6) RE: Utility Idea, RMapplebeck, Nov-22-04, 04:34 AM, (10) RE: Utility Idea, Br5an, Nov-22-04, 02:45 PM, (11) RE: Utility Idea, RMapplebeck, Nov-22-04, 11:26 PM, (12) RE: Utility Idea, muskokaandtahoe, Nov-21-04, 06:09 PM, (7) RE: Utility Idea, MikeSimpson, Nov-21-04, 06:51 PM, (8) RE: Utility Idea, Br5an, Nov-22-04, 03:34 AM, (9)

Conferences | Topics | Previous Topic | Next Topic

Charter Member · 1044 posts

RE: Utility Idea

Hi Dave,Route-Riter actually does much of what you need during the Compact Route option.1. It reads each world tile and builds an array of all the shape files on the tile. Then goes on to the next one and does the same for that. Ending up with an array of all the shapes used in the route.
2. These are sorted and duplicates removed, so a final array is built which lists all the UNIQUE shapes used.
3. Each shape is then read to find the .ace files in use.
4. Same thing happens for miscellaneous items such as level crossings, track sections etc.With a bit of effort, this could be modified just to read a specified .W file and the 8 surrounding tiles (if they existed) and produce a report. However I am pretty busy with RR at present, but if a few users think this would be useful, then I am willing to look at your concept.This would have to be an option within Route-Riter, as most of the subsidiary code is there already.The number of Terrtex textures could similarly be provided, however sums of polys are beyond me.Mike

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Apr-8-03 · 614 posts

RE: Utility Idea

Utility Idea – image 5

Sounds promissing.I'm a data head, by and large, so such information is always of interest. Hopeful it would also be of some use in avoiding what appears to be a fairly common problem.Dave NelsonWP mainline, Oakland-Stockton: 100% complete;
SP mainline, Oakland-Stockton: 20% complete;
Aug 1950 Utility Idea – image 6
<<new .sig under construction>>

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 1044 posts

RE: Utility Idea

Hi Dave,I have managed to code much of what you require. Do you require the details for each tile seperately? Or the total for all 9 tiles.If you have the latest Route-riter, I can just send you the .exe to check if you let me have your email address. You can contact me direct at virtualtrains@optushome.com.auMike

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Jul-3-04 · 20 posts

RE: Utility Idea

I've been wishing for a utility that looks in a routes shape folder and looks for shapes that are not in the routes ref file. Then it would add them to the ref file. I think if there was a master reference file for the 1000+ shapes that come with MSTS, ordered into classes, then it would be a parse, copy, and paste effort for such a utility. Custom shape makers or those using custom shape could still make manual entries to individual ref files or to the master. I did try some things with the make .ref functions in Route Riter but it didn't seem to be quite what I had in mind. Is there a utility like I describe above? If not, what do the rest of you think of the idea?Thanks,
Brian K.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 1044 posts

RE: Utility Idea

Hi Brian,If you look in the Route-Riter root folder, you will find a file stuffit.ref - This is a ref file compiled by Jim Ward and others which covers nearly all of the shapes which ship with MSTS - This would appear to be the Master .ref file you require. You can use the .ref Editor in RR to change the classes to something which suits you.If you remove the .ref file from a route, then run the Make .ref file option, RR will build you a .ref file of all the shapes in the route, although of course RR has no idea what class any particular shape should be in, so they will all end up as 'Misc', but at least you then only need to change the Class entry to something meaningful.
Mike

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Feb-26-03 · 86 posts

RE: Utility Idea

Insted of Misc, couldnt, RR search for the matching text string for a shape file amongst the known file extentions that might contain the reference listing such as the other ref files, the yourref.txt that some people use for the ref entry with thier shapes when they distribute them, readme.txt and so on.
course, then this leads me to the ole stand by of a standardized class list. thus creating IMHO a cleaner easier to locate Object Selector..Robert C. Mapplebeck
rmapplebeck@visi.com
Minneapolis / St PaulUtility Idea – image 7

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Jul-3-04 · 20 posts

RE: Utility Idea

>then this leads me to the ole stand by of a
>standardized class list. thus creating IMHO a cleaner easier
>to locate Object Selector..
>
>Robert
Robert, Maybe you could take a look at 'stuffit.ref' that is in the Route Riter root folder as Mike pointed out. See if the class break down is to your liking. When someone talks about nice class layout I am interested in hearing their opinions and how they do things.Misc, for anyone who wants to read it: Honestly I didn't mean to drag Route Riter into this other than to say make ref wasn't quite what I wanted/expected. My utility idea never was Route Riter's problem. I do understand why the program need this info when compacting a route. And a great program it is!!! In fact 'stuffit.ref' is great when using the Stuffit method of starting to build a new route. Maybe this is the way I should do things and just forget about my utility program idea. Then only custom shapes would have to be entered by hand into the ref file. Now from a tinker perspective in me it's interesting to note that ref items can be stretched out into single lines. As long as the 'tab' characters are in proper position, this makes it nice to work with these rows in a spreadsheet format. I'm just going to play with my utility idea for now and see if anything comes of it.Regards,
Brian K.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Feb-26-03 · 86 posts

RE: Utility Idea

I have used Stuffit many times, but as I was saying in another post about this same subject, the way some things are classed and right off the top of my head I cant remember which ones specifically, they could have been classed a little better. and in a couple cases, the class and the discription really dont go with the object and of course thiers a few cases of names of the authors. But in trying to set up my own I broke things out a little more in closer groups, such as..Buildings - Warehouse
Buildings - Indusrial
Buildings - Manufac
Vehicles - Cars
Vehicles - Trucks
Vehicles - Construction
Vegetation - Trees
Vegetation - Weedsand so on.. I just took a few off the top of my head, but I think as of the last time I entered a new object there were about 35 different classes.
With the ref file as stuffit makes it, there are some classes that you have to weed through a few hundred objects to find the right thing...
So far I like it... its much fster way of locating something.. I dont have to look thru 300 Buildings to find a Large Blue Warehouse.
And with all the downloaded objects that I have nabbed, my total shape file count is HUGE and im sure is only going to get larger.The more and more I work with getting objects in the ref for use. the more and more im thinking that a complete object manager is what might be needed... I know, RR does now do alot of things in regards to object and ref file management. And while I am still a little over whelmed by the reports Ref Check spits out, I like how it finds out what it does, and between the two, im making strides toawrds at least achiving object managment. I think it wouldnt be to hard to combine the codes to make them all work together... course, then this is from a guy who cant do any code... not even morse code, course, i have tried in the past to learn those things call C++ and so on... but its way beyond me.Anyway, I think I might be rambling now..
Robert C. Mapplebeck
rmapplebeck@visi.com
Minneapolis / St PaulUtility Idea – image 8

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Apr-8-03 · 614 posts

RE: Utility Idea

Utility Idea – image 9

> Then it would add them to the ref file.and I'd prefer to delete them from the shapes directory. I figure by the time I'm using route riter, if I havn't used the shape yet, get rid ot it. 8-)Dave NelsonWP mainline, Oakland-Stockton: 100% complete;
SP mainline, Oakland-Stockton: 20% complete;
Aug 1950 Utility Idea – image 10
<<new .sig under construction>>

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 1044 posts

RE: Utility Idea

DickFurther to your utility request, I have uploaded a RR .exe file to my site http://members.optusnet.com.au/virtualtrains/beta6.htmlThis is RR6151exe.zipNew option 'Count objects in World tiles' - Select a route, then a .W file within that route, and RR will display a report showing how many shapes/textures/terrain files etc are loaded when that tile is entered. This includes the selected tile and the 8 adjacent tiles. In the report the tiles are listed 1 thru 9 with tile 5 being the centre tile which you selected. Totals for each tile are listed separately, and all shapes,textures and track sections are listed.Please let me know if this is about what you wanted.
Mike

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Jul-3-04 · 20 posts

RE: Utility Idea

>> Then it would add them to the ref file.
>
>and I'd prefer to delete them from the shapes directory. I
>figure by the time I'm using route riter, if I havn't used
>the shape yet, get rid ot it. 8-)
>
>Dave Nelson Route Riter is fine for what it is intended to do. I'm talking about how did you get the shape names in the .ref file to begin with. It seems alot of people are doing it manually and I'm way to lazy for that.Best,
BK

Alert | IP


[ Home | MSTS Forum | MSTS FAQ | How To... | File Library ] Copyright © 2004 by Nels Anderson. All Rights Reserved.

Restored from the Train-Sim.Com archive, captured December 10, 2004. About this archive.