One way traffic

deighton

Seinpaal
I am looking for a one way road. Preferably two lanes going one way. Any suggestions?
Also, is it possible to change script or config to change a two way road in to one way?

Thanks, Chuck
 
First roads that jumped to mind:
2L highway with guardrail,<kuid2:645812:1012:1>
Road_Freeway_106,<kuid2:82412:804106:1>
Road_Freeway_105,<kuid2:82412:804105:1>​
I am sure there are a lot more.

You can change any spline into a 2 lane 1 way road. Add / change these settings:
Code:
isroad                                  1
isfreeway                               1
numlanes                                2
 
You can add this code to any road.

Don't use CCP as that can cause older assets to become faulty. Instead open up the asset using Explorer and edit the config.txt file using a text editor such as Notepad which should open up for default.

To edit the asset manually, right mouse-click on the asset and choose Edit in Explorer. A Windows File Explorer window will open up displaying the asset's pieces. Edit the config.txt, save, and close the window. When done you need to commit the asset.

John
 
Or try attaching this:

C+ RN TG04 1 Way 2 Lane Traffic Generator Carrate 4,<kuid2:243828:1861:1>

to the end of any 2 lane road spline.
 
Well.......I tried what was suggested: Open for edit in Explorer. Edited the config file. Closed explorer and came back in CMP to commit. After I committed the asset, there were 12 warnings and several other problems. Something to do with the fact that certain things were not allowed in the container "tracks" or something. I reverted the asset to the original.
Any ideas? The asset was "Road with sidewalk on left" by Mgreen48.
I guess older content is not so easily converted. By the way, I am running TS12.

Thanks, Chuck
 
Hi Chuck,

Put these in as single lines as they are tags and not in between any curly brackets ( { } ). The best place to put things like this is at the top and just before any curly bracket.

Hope that helps. Sorry I didn't mention this before.
 
This is what I did in the config file:



kuid <kuid2:52519:37061:1>
kind "track"
region "Roads"
type "Road"
length 4
grounded 0.4
istrack 0
width 11
bendy 1
isroad 1
isfreeway 1
numlanes 2
carrate 8
uncached_alphas 1


obsolete-table
{
}
description "A road with a sidewalk on the left hand side only."
trainz-build 2
category-class "SR"
category-region-0 "UK"
category-era-0 2000
created "by: Michael Green"
asset-filename "Road with Sidewalk Left"
username "Road with Sidewalk Left"
author
organisation
contact-email
contact-website
license
username-fr "Road with Sidewalk Left"
description-fr "A road with a sidewalk on the left hand side only."
username-nl "Road with Sidewalk Left"
description-nl "A road with a sidewalk on the left hand side only."
username-es "Carretera con acera izquierda"
description-es "Una carretera con acera sólo en el lado izquierdo."
description-ru "Дорога с пешеходной дорожкой только слева."
username-it "Strada con marciapiede a sinistra"
description-it "Una strada con un marciapiede solo sul lato sinistro."
username-hu "Út bal oldali járdával"
username-cz "Silnice s chodníkem vlevo"
username-pl "Road with Sidewalk Left"
description-cz "Silnice s chodníkem pouze a levé straně"
description-pl "Droga z chodnikiem dla ruchu lewostronnego."
description-hu "Út, amihez tartozik egy bal oldali járda. "


kuid-table
{
}

Then I saved the file, went back to CMP and committed the asset. CMP showed that there were warnings:

Warning: This asset uses an obsolete trainz-build number. Trainz-build numbers below 2.9 are no longer supported.
Warning: Required container 'thumbnails' is missing.
Warning: The *.texture.txt file is missing for texture resource 'road.texture'.
Warning: The *.texture.txt file is missing for texture resource 'sidewalk 1.texture'.

In order to use this asset, I had to revert it to the original.

Thanks for your help.
Chuck
 
First two warnings are pretty obvious:

Code:
[COLOR=#0000ff]trainz-build 2[/COLOR]
Your asset is trainz-build 2, minimum today is 2.9. Change that.

2nd is because you are missing a thumb. Add this code to the script and an image with the same name (and size) to the folder:
Code:
thumbnails
{
  0
  {
    image                               "thumb.jpg"
    width                               240
    height                              180
  }
}

Cant help you with the others.
However: A warning is... a warning. Asset should usually just work fine.

Yes! Thanks Oknotsen! I guess I learn something every day on these forums!
Happy I could help, although I was a bit surprised that I helped you with this after the load of assets you made already :hehe:.
 
Hi there Chuck,

Only errors stop content from working. An asset with only warnings will still function in-game.

This means you can re-edit the content, apply the same fixes, commit it, have the warnings, and still use the asset.

There are ways to fix the asset so that those warnings are gone and I can go into detail about fixing them if you would like me to.

Kieran.
 
Once I changed the version to 2.9 the following errors came up:

Error: The Tag 'region' is not permitted within a container of type 'track'.
Error: The Tag 'type' is not permitted within a container of type 'track'.
Error: The Tag 'length' is not permitted within a container of type 'track'.
Error: The Tag 'grounded' is not permitted within a container of type 'track'.
Error: The Tag 'width' is not permitted within a container of type 'track'.
Error: The Tag 'bendy' is not permitted within a container of type 'track'.
Error: The Tag 'uncached_alphas' is not permitted within a container of type 'track'.
Error: Tag 'category-region-0' in the container 'track' is obsolete.
Error: Tag 'category-era-0' in the container 'track' is obsolete.
Error: The Tag 'created' is not permitted within a container of type 'track'.
Error: Tag 'asset-filename' in the container 'track' is obsolete.
Error: Required container 'mesh-table' is missing.
Warning: Required container 'track' is missing.
Error: The *.texture.txt file is missing for texture resource 'road.texture'.
Error: The *.texture.txt file is missing for texture resource 'sidewalk 1.texture'.
Error: The tag 'image' in '0' points to a nonexistent file: 'thumb.jpg'.

I am guessing that version 2.9 does not recognize codes from version 2. Is this true also in cases of assets that were created in other countries than the country I am living in? ie versions for different continents?
 
I think I'm right in saying that one way roads were introduced in TC3 so adding the isroad, isfreeway or numlanes tags into the config of any asset of an earlier build will cause problems as you have found out. In these cases you have to completely re-write to config file to more recent standards - which is essentially what all those errors are telling you.

This is possible, but would it not be better for you to use a more recent road asset and re-skin it to your needs ? Or you could even make your own, roads only need a very simple mesh.

Chris
 
I suppose that if it does not work, do it yourself; build it yourself. Will give it a try. I am somewhat frustrated that assets are not updated completely when going from one version to the next.
Chuck
 
Here's one of my roads I changed to provide one-way traffic. You can DLoad it here:


https://app.box.com/s/gqdi45jw8r4391ed1j6j

Permission granted to change the texture to whatever style road you need.

To make a four lane highway with traffic in all four lanes (two going east and two going west for instance) Lay one road one way and the other going to opposite way.

PLEASE NOTE. Even though these are set up for one way traffic, occasionally you may see a lone vehicle going "against the traffic."

Cheers,

Dave
 
Thanks Dave. as far as a lone vehicle going "against the traffic", I have witnessed that in real life. Virtual reality has come a long way!!!:hehe:
 
Traffic will go the wrong way at start of sim or sometimes on intersection assets. There are three invisible road splines on the DLS that will create oneway traffic. I think the title starts C +, sorry cant check it out at present due to computer problem.
 
Back
Top