Prototype Operations in Trainz

The following is from a thread on the TrainzDev website:
Chris Bergmann wrote:
. . . As to why the library is loading in the older session- once a library has been successfully loaded into a session, it becomes part of that session and will persist across a load/save process. It is likely that you used some other (valid) mechanism for loading the script library in the past, and this has persisted in the session after you changed your script techniques around. . . . . .


Dap Write:
This problem has reared its ugly head again. Is there any way to remove the persistent reference to a library asset? I have removed all assets (Portals)from the route with the GetLibrary() call, along with an asset that referenced those calling assets (PortalSchedule Rule). When I open the route in surveyor, I still get the library functions. How can I break this persistence and remove all reference to the library?

Chris wrote:
There is no direct, supported mechanism for removing an existing library reference from a session. Your library should be structured such that this is not problematic - libraries are supposed to be passive, not active.

In practice, you *may* be able to remove the library by deleting the library asset (in CM2) and then re-saving the session in question. I'm not 100% sure but it's worth an attempt.

DAP wrote:
Your suggestion worked. First, I removed the assets from the route. Then I copied my library and portal assets to a cdp. Then deleted the original copies listed in CM2. I then loaded the the route (the library asset was still there and doing it's init routine). Then save it. Upon loading it again, the persistance was broken and the library functions were no longer happening.


So, this is apparently an inheirent problem with Trainz . . . .

Hope this helps
 
Last edited:
would it be possible to be able to specify what the car was loaded with in the database tables? That way you wouldn't have a flatcar loaded with logs being delivered to a dairy farm.
 
would it be possible to be able to specify what the car was loaded with in the database tables? That way you wouldn't have a flatcar loaded with logs being delivered to a dairy farm.

What else would you deliver on a flat car to a dairy farm? :hehe:

That upgrade is in the works.

David
 
Another question.

I have yet to actually operate a session for 24 hours...does it automatically change over the day? I am just wondering how that would work. I am trying to get the CMTM system running on my 350 mile route with over 100 industries.
 
The Huron Central route has 18 towns, 61 industries and interchanges with 2 other railroads. It runs very nicely in TRS2009. The longest session I have run to date is 14 hrs.

Pguy is working on a package that will impliment Day as a Trainz standard variable. Hopefully later this month we will have something to test that will roll over to the next day at midnight, OR when you jump forward in time and cross the midnight timeline. The Huron Central has no activity between the hours of 11pm and 6:50am. When operating, if you get to 11pm and all the work is done and all the thru trains have left the route, you can jump the clock forward to 6:50am. CMTM will then restructure the database for the new day and you keep operating. One feature that we are planning is Days for the Portal Timetable Rule. Then you can have different trains run on different days. Progress will be posted on this thread.

David
 
here's another idea...is it possible to make a time limit to deliver a car. Express and reefers for example. A delivered by tag maybe?
 
When and how you deliver cars to your customers is completely up to you. CMTM simply assigns destinations based on a database that reflects the operational needs of the railroad's customers.

Do some research into how Express and/or reefer shipments were handled on the railroad you are modeling. And then incorporate those operational rules into your route. My approach to Trainz is not as a game, but as a modeling medium that has the flexibility to allow you to create YOUR railroad as prototypical as possible with as few constraints as possible.

There are several excellent resources available to assist in your research.
Model Railroad Operations SIG

Ry-ops-industrialSIG A forum for rail modellers to discuss railway operations

These are jus two. Also, many railroad have historical societies that have a wealth on information.

Have fun doing your research. It is a facet of RR modeling that I thoroughly enjoy.

David
 
Last edited:
my route is over 350 miles long...so when I start a session there are sometimes a few mainline freights on the route. Is there a way to assign traffic management destinations to a consist? It would seem silly to have an eastbound freight consisting of westbound cars. Maybe a specialized "local" track that was direction dependant or something could work? I don't want to have to wait 10 hours for my freights to reach the division point haha
 
An interesting problem. CMTM is designed to provide continious operations for a route with different traffic patterns each day. As such, I envisioned one session for the route that would begin on the day you select and then run day after day until you call it quits. As such, I didn't think of moving trains on the route at start-up nor did I have in mind a route 350 miles long.

Here is a possible solution. At those locations where trains will be on the mainline at the beginning of the session, install a Portal that will emit those trains 2 - 3 minutes after the start of the session( on a route your size, you may need to wait longer, depending on how quickly it loads). Use invisible track to connect them to the mainline. This will make the tracks in the portal invisible also. As the trains are emitted, they will be assigned destination data. Create data records with beginning Location for that Portal and you will then have complete control on the data assigned to the cars in those trains. This solution is might be a slight-of-hand, but with a route that size, just make sure you focus the beginning camera elsewhere on the route and no one will ever see those trains materialize out of thin air on invisible track!

If you give this a try, let us know how it works.

David
 
Last edited:
ok...here's a problem...if I put portals all over the place then I will have trains coming out of them every day. Is this true? Is it possible to make another Portal Destination Local trackmark?
 
Last edited:
You are correct, that will be a problem today. But there is a new Portal Timetable Rule in the works that incorporates Days as well as times. This will allow you to emit the train at the beginning of the first day and give you a whole week of operations before you get a repeat. If you want your sessions to run past a week, you could always use the set time feature of QuickDrive. Two minutes before the "restart" of the week, jump the clock ahead just past the time when the "start trains" will to be emitted. The "start trains" will not be emitted and you can continue operations into the second week. Etc, etc, etc. If you get past a month of operations, I think you will have set a worlds record for the longest continious operation of a Trainz route. :cool:

David
 
It is in the works but sometimes job and family take priority. And then there was the week I spent at the Comanche & Indian Gap Railroad doing operations on 7-1/2 gage live steam.

Hope to have something by early June.

David
 
oh hey, no worries,

I know what you mean. I had a 30 day stretch there last month without a day off and had maybe only 2 hours last month to do trainz...I guess that's summer for you though...winter is when I get to trainz it up!

Thanks for all you hard work DAP.
 
Dear Dap,

Could you send me a private message for the CMTM files and could you send me your route that you used to run it with, also could you package some instructions with it.

Thanks,

Ethan
 
tw stone,

sorry to sound rude, but you really do demand a lot from people..or come across as doing so. You need to learn to help yourself. All of these files are in this thread. DAP has better things to do than to individually send files to people. His route and files are all either here on on the GAURC forum and can be downloaded from the DS.

Peace,

Jayturf
 
Yah, but hey, I was born in Iowa, so I am used to the Iowa way of thinking as in The Music Man.
 
Back
Top