PDA

View Full Version : Animated traffic



railsong
March 6th, 2010, 04:54 PM
I am running TS2010EE and was wondering if anyone could tell me how to get the hiway traffic to move. I haven't found any tutorials on what kind of assets are needed etc. Any help would be appreciated...Thanks....
Mel:)

rweber95
March 7th, 2010, 04:15 AM
The vehicles for the roads in a route are defined in the routes region kuid. The region kuid is listed in the routes config.txt file. If you're making a route in surveyor choose any region except the default region. The default region doesn't contain any carz. If you're having trouble with a specific route, post the kuid number here and we'll help.

Bob

railsong
March 7th, 2010, 10:47 AM
Thanks for the reply Bob. As I am new to trainz I am not familiar with how the directories or folders and files are set up. I have seen mention of the config.txt file, but I don't know where to find it or how to edit it, etc. The route I am working on is a self made one that I have built myself, so there isn't a kuid number. I really don't understand about the regions, etc. I have worked with the Microsoft FSX and pretty well understand it's config files, etc. I just haven't been able to figure out the trainz folder setup yet...If you could explain about regions, etc. it would be appreciated..Thanks again.....

epicmek
March 7th, 2010, 02:40 PM
Hi Railsong

When you are in Surveyor go to the drop down menu and select "Edit Region". This will give you an opportunity to change to a region that does have vehicles on the road (the default one doesn't have any but the rest do).

In Content Manager select the "My Content" tab at the top and find the route you are working on. Right Click it and select "Edit in Explorer" from the list. That is where you will be able to see the "Config.txt" file. Double click on it and it will open in Notebook.

To add cars of your choice you will need to add the following lines for each car:

car0 <kuid of the vehicle to add>
car1 <kuid:######:######:#>
etc.


There are various opinions on how many vehicles you can add and most people will say between 16 and 32. I have 98 on my current route without any obvious degradation in performance.

Have a play with a new test route and get familiar with how it works. In no time you'll have cars wizzing around all over the place.:Y:

In the forum search for "Carz" that will get you lots of advice and help.

Let us all know how you get on.

Martin

EdrickV
March 7th, 2010, 04:56 PM
Thanks for the reply Bob. As I am new to trainz I am not familiar with how the directories or folders and files are set up. I have seen mention of the config.txt file, but I don't know where to find it or how to edit it, etc. The route I am working on is a self made one that I have built myself, so there isn't a kuid number. I really don't understand about the regions, etc. I have worked with the Microsoft FSX and pretty well understand it's config files, etc. I just haven't been able to figure out the trainz folder setup yet...If you could explain about regions, etc. it would be appreciated..Thanks again.....

Understanding the Trainz folder system is pretty simple in a way. You don't mess with anything in the Local or Original folder. When you want to edit something, you use Content Manager and open the item for edit either in Explorer or Content Creator Plus. (Open for Edit in Explorer is what most people use.) Content Manager will then make a copy of the item in the TS2010\Editing folder. The config.txt file will be there and that's where most of the info is. (The equivalent of an aircraft.cfg file from FSX.)

One big difference with Trainz is that a single item (say a locomotive) may consist of multiple assets. For example the cab of a locomotive, aka the interior view, aka Virtual Cockpit in FSX terms, will be separate from the exterior model. Likewise the bogies (wheels) will be separate items. You can have multiple items Open for Edit at one time.

When you are done editing an item, you have to Commit it. During that process the config.txt file will be compiled into a binary format, .texture files that Trainz uses will be created from the .texture.txt files and source image files, and the asset will be checked for errors. Once all that is finished the asset will be copied back to a folder in the Local folder.

Pretty much every item in Trainz will have a KUID number. (For assets you create yourself, say routes/sessions, Trainz will automatically generate a KUID for you.) The first number in a KUID identifies the author. The second number is a number assigned to that specific object. Some items will have a KUID2 number instead, which is basically the same thing except that it adds a 3rd number which indicates the object's version.

Here's an example of how KUIDs look:
Unknown Location: <kuid:44090:1027>
Gresley A3 BR Green <kuid2:44090:1027:1>
Gresley A3 BR Green <kuid2:44090:1027:2>
Gresley A3 BR Green <kuid2:44090:1027:3>
Gresley A3 BR Green <kuid2:44090:1027:4>
Unknown Location: <kuid2:44090:1027:5>
Gresley A3 BR Green Loco <kuid2:44090:1027:6>
Unknown Location: <kuid2:44090:1027:7>
Gresley A3 BR Green Loco <kuid2:44090:1027:8>

All those KUIDs point to, essentially, the same object. The Unknown Location ones are not available on the DLS. (It's possible the first one in the list was never actually used, he might have started off using the KUID2 number.) The 44090 is the number that was assigned to PaulHobbs when he registered here. (If you don't know what your user ID is you can check by clicking the Profile link near the top of this page and then, under Trainz on the left, click the "My User ID" link.)

Edit: Oh, and that locomotive happens to be a TS2010 built-in item. :)

railsong
March 8th, 2010, 10:51 AM
:D Thanks so much for the good imformation on the trainz folder setup etc. I have found my config file etc. I also have got my carz whizzing all over my roads, it looks great. I do have one question about building roads. How do you make the carz make turns on a road. I have a road with a T intersection, using the Intersection T S. When the carz get there they just disappear. Is there a way to make a T or a X intersection where the carz will follow the roads? Maybe I am not using the right intersection...Well thanks again for the good help imformation....
Mel

EdrickV
March 8th, 2010, 03:24 PM
:D Thanks so much for the good imformation on the trainz folder setup etc. I have found my config file etc. I also have got my carz whizzing all over my roads, it looks great. I do have one question about building roads. How do you make the carz make turns on a road. I have a road with a T intersection, using the Intersection T S. When the carz get there they just disappear. Is there a way to make a T or a X intersection where the carz will follow the roads? Maybe I am not using the right intersection...Well thanks again for the good help imformation....
Mel

Sounds like your T is made from two separate roads. You need to have them actually connect. And one tip that you may find very useful when building roads: The straighten tool on the track panel should work on most roads and other scenery spline objects.

railsong
March 8th, 2010, 06:00 PM
:wave: Yes, the T intersection I am using has 3 spline points that the road splines connect to. I guess that must seperate the roads. Do you just connect the road splines together and then put the T in on top or something? Thanks for the help....

EdrickV
March 8th, 2010, 06:11 PM
I would say try using a different intersection. I've actually been making my intersections entirely out of splines, (like making junctions with track but more fiddly) though now that I've actually tried some and see that they actually work with spline roads I might change that. I originally thought that those "fixed" road pieces were meant to be pieced together, not attached to spline roads. Learn something new every day. :)

Dinorius_Redundicus
March 8th, 2010, 06:15 PM
Railsong

There are many different T-intersection objects made by different creators. I would think all of them have 3 spline connection points. Some of them (obviously not the particular one you have chosen) will have the points internally connected by bits of invisible road, and for them, the cars will turn the corners or go straight through, but not disappear.

I'm not sure you can 'fix' the T intersection by manually inserting invisible roads between the outer 3 connection points, in fact I rather suspect you can't. In any case, it would be a tedious exercise.

It might be better to look for another set of intersections that are made with internal connections. Someone here might be able to recommend some. I recall a USA set by Whitedog worked well and there are others, but I just don't know them off the top of my head.

~ Deane

railsong
March 8th, 2010, 07:01 PM
:) OK I will look on the DLS for a different intersection and try that..I sure appreciate all the help you are giving me on my questions....Thanks
Mel

EdrickV
March 8th, 2010, 07:32 PM
DLS? There are a ton of intersections included with TS2010. And all those I've tried so far worked. Though some of the T intersections actually had a 4th spline attach point and, functionally, seemed to be a 4-way intersection. (So cars approaching from the base of the T might vanish.)

FYI, an easy way to refresh the traffic in TS2010 is to hide the layer that the road is on and then show it again. (You pop up the layers panel, click the eye next to the layer the road is on, wait a sec, then click the eye again. If the road doesn't vanish when you click the eye, then that's not the layer it's on. If some of it vanishes, then some of your road is on one layer while the rest is on another.)

railsong
March 8th, 2010, 11:49 PM
:o Well I have tried several T intersections and I just can't get any of them to work with the traffic by just connected the road splines to the 3 intersections spline points. I downloaded some T's from DLS and some of them have 4 spline points but they are not 4 way intersections. There are 2 spline points on each end of the T and 2 close together at the base of the T. I tried them, but they won't work either. Finally I just took one of intersections with the 3 points and connected the 2 road splines at the top part of the T with invisible road and then connected the bottom road spline with invisible road to each side of the 2 top road splines and then just moved the road splines to the intersection being careful to line them up correctly. It seems to work, but I seem to do everything the hard way...This is kind of like the way you hook up the railroad crossings using the ATLS assets. It just seems like you should be able to hook up the roads to the spline points on the intersection. I still would like to hear more ways of doing this simpler...Cheers......
Mel

EdrickV
March 9th, 2010, 02:40 AM
Just what roads and intersections are you using??
Try these:
Road 2L 01
Intersection T S

I know these two work together. Connect the sides of the T and make a loop. Don't connect anything to the base of the T, you want the cars to drive straight through the intersection.

ColPrice2002
March 9th, 2010, 06:06 AM
Hi,

I'm not sure if the same rules apply in 2010 to previous versions (e.g. 2006), but whan I last put together roads, the traffic always turned left at a junction (often through 90 degrees in an instant).

It also used only one lane of a 2 or 3 lane carriageway (in my case the left-hand lane - remember I'm using the UK region!).

The solution I used was to create a road network of scenery roads (i.e. not traffic enabled), then to overlay that with "invisible roads". The invisible roads carry the traffic, so it was possible to have a multi-lane highway, with traffic exiting/entering on ramps and correct lanes (turning left/right) at junctions.

Check out Andi06 items on the DLS - there's a set of traffic lights and controllers (though I suspect that this is UK based - so the light displays will differ from the US/EU ones).

HTH

Colin

railsong
March 9th, 2010, 02:51 PM
:) Thanks to you all for the input on my road intersection problems. EdrickV I tried the assets you gave me, but the traffic coming up the T leg just disapears when it reaches the intersection. I guess I am just to particular on the way I want things to happen. The way I ended up doing it was I just built the main road and then built the T leg of the road coming up and ended it just short of the main road. Then on the main road I inserted 2 spline points just left and right of where the T leg comes up. Then used invisible road to connect the T leg to the left and right spline points I added. Then moved the T leg road spline up to the main road not connecting it to anything and using the track straightening tool to line things up OK. Like was mentioned earlier you only get left hand traffic turns, but it looks more real than disappearing traffic. I will check out the Andi06 items on the DLS. Sure appreciate all the help you all have given me. I am in the USA so am using the United States region....Happy railroading to you all. Will be watching the forums and probably will have other questions...Thanks again....
Mel

EdrickV
March 9th, 2010, 04:36 PM
If by coming up the T leg you mean heading toward the dead end, it vanishes because functionally that is a 4 way intersection rather then a 3 way intersection and the car's trying to go straight through. (That's why I'd said not to connect anything to the base of the T, I wanted to make sure that traffic going from the left side to the right side would go through.)

The Yarn T Intersections (not sure ATM if they're built-in or not) seem to work better with traffic heading toward the dead end. However the road I'm using doesn't fit with them height wise. (There may be a better road for those intersections.) The Yarn ones have purple lines on them showing which ways a car can go. As previously mentioned, cars will either go straight or turn left. They don't want to turn right at an intersection.

railsong
March 9th, 2010, 05:13 PM
:) Yes, EdrickV I tried some different intersections with my roads and they were a different height also. Yeah, I was talking about the dead end part of the road. Like I said in my earlier post I just did away with the intersection object and am just using my roads, forming a T, using the invisible roads for the intersection. That way there is no height issue as long as the topology is level and the spline vertex's are all the same height. I am pretty well satisfied with what I have come up with as the dead end traffic will turn left and not disappear. I sure appreciate your input on this and will keep your thoughts in mind....Thanks....Be seeing you on the forum....
Mel

j_maybury
March 9th, 2010, 06:16 PM
Hi railsong have you tried this I donít know if it works in left hand drive or not, Itís worth checking out though.



Sen City Road Switcher
<kuid:76656:500000>



This is a Road Point or switcher, (turnout) for ordinary traffic roads for TRS 2006. So traffic can now turn right as well as left!

IT IS MANUAL OPERATION ONLY IN TRS 2004.

It can be placed in a TRS 2004 map to allow for future upgrade of that map but TRS 2006 or above is required for correct operation. Then you may either use my Traffic light assets to control the switching, (eg KUID 766565:500002), or just let it switch on the in-built Timer.

See the Properties Dialogue Box for instructions.

Dinorius_Redundicus
March 10th, 2010, 04:30 PM
Here's one example that works, kuid:93677:400477 simply hooked up at its spline points to some roads.

The fire truck came from the bottom of the frame and is turning left. No traffic disappears no matter which leg of the T it comes from. STOP signs are completely ignored just like in real life!

http://img693.imageshack.us/img693/8325/screen088.jpg

railsong
March 11th, 2010, 08:13 PM
:) Thanks for all the imformation. I downloaded the light controller and the switcher asset, but I couldn't figure out how to connect all the splines. The light controller has a US and a UK setup, so it should work correctly with the USA region. I have other work on the route I am building so I will probably work on it more now. In the future when I have other things worked out I will probably come back to the traffic intersections again and try to figure it out more. Thanks again all......
Mel

railsong
March 11th, 2010, 08:16 PM
Thanks Dinorius Redundicus, I will download it and give it a try. It sounds simple enough....
Mel

railsong
March 11th, 2010, 08:26 PM
Say Dinorius Redundicus, I tried to download the kuid:93677:400477 and DLS won't bring it up. Do you know the author name? Maybe I am doing something wrong. Let me know if there is another way of getting the asset...Thanks...
Mel