Renameing and uploading a *.cdp file

NWHY6

NWHY6
I use 132# rail by Storknest in my route.
I have noticed that the rail used on most of the bridges is at a different rail height.
I have edited and saved the asset “Bridge Steel 2t”(kuid -24:275, user Auran) in Explorer.
I renamed this file as ‘Bridge Steel 2t v02’. I want to keep the original file.
How do I update and rename a *.cdp file?

John Swann
NWHY6
 
Do you mean that the rail used in most of the bridges is "Bridge Steel 2t” (<kuid:-24:275>) and it is this track that is at the wrong height, so therefore you have edited the height and name of this track and now you want to use it in your route, but you do not want to replace the original "Bridge Steel 2t” (<kuid:-24:275>) with your edited version?

If so, then you have started with the wrong procedure. There are ways to recover from what you have done already, but they are more complex than just starting over with the correct procedure.

You should start by reverting the existing "Bridge Steel 2t” (<kuid:-24:275>) to original. Then clone the existing "Bridge Steel 2t” (<kuid:-24:275>). Then edit the clone in explorer and change the height and the name. Then submit the edits for the clone.
 
Last edited:
I cloned 'Bridge Steel 2t'. I deleted 'bridgetrack" kuid 100609 and relpaced it with Kuid: 85324:38001:1 '132# 2t US Wood Gravel'.
I am seeing 3 track instead of two. Do I need to deleted Asset- filename in the clone?

John (NWHY6)
 
I deleted 'bridgetrack" kuid 100609 and relpaced it with Kuid: 85324:38001:1 '132# 2t US Wood Gravel'.
You haven't confirmed that what you mean is that the rail used in most of the bridges is "Bridge Steel 2t” (<kuid:-24:275>) and it is this track that is at the wrong height, so therefore you have edited the height and name of this track and now you want to use it in your route, but you do not want to replace the original "Bridge Steel 2t” (<kuid:-24:275>) with your edited version?

If that is not what you mean, then is it possible that what you mean is that the rail used in the bridge 'Bridge Steel 2t' (<kuid:-24:275>) is not suitable and you want to replace it with 132# rail by Storknest. That would explain why you have cloned 'Bridge Steel 2t' and the reference to '132# 2t US Wood Gravel' (<kuid: 85324:38001:1>) .

If that's what you mean then you should show the exact changes you have made to the config.txt in your cloned version of 'Bridge Steel 2t' (<kuid:-24:275>).

 
Here is the orginal asst:
username "Bridge_Brick_Steel_2t"
trackoffsets -2.5,2.5
height -15
rgb 200,100,0
region "Britain"
kuid <kuid:-25:275>


obsolete-table
{
0 <kuid:-1:1023>
}
length 40
istrack 1
kind "bridge"
casts_shadows 1
type "Bridges"
username-de "Bridge_Brick_Steel_2t"
username-pl "most_stal_2tory"
username-fr "Pont_acier_brique_2v"
username-nl "Bridge_Brick_Steel_2t"
username-cz "most_ocelový_2k"
username-es "Puente_Ladrillo_Acero_2v"
username-it "Ponte_struttura acciaio_2t"
asset-filename "brsteelframe_2t"
username-hu "Bridge_Brick_Steel_2t"
username-ru "Мост_кирпич_сталь_2_пути"
username-jp "橋_レンガ_鋼鉄_2t"


kuid-table
{
0 <kuid:-1:15>
}

Here is the one I made changes in:


username "Bridge_Steel_2t v02"
length 20
istrack 1
kind "bridge"
trackoffsets -2.5,2.5
height -15
bridgetrack "85324:38001"
rgb 200,100,0
casts_shadows 1
region "USA"
type "Bridges"
username-de "Stahlbrücke_2t"
username-pl "Most_Stal_2tory"
username-fr "Pont_acier_2v"
username-nl "Bridge_Steel_2t"
username-cz "železný_most_2k"
username-es "Puente_Acero_2v"
username-it "ponte_acciaio_2t"
asset-filename "steel_bridge_2t v02"
username-hu "Bridge_Steel_2t"
username-ru "Мост_стальной_2_пути"


kuid-table
{
0 <kuid:85324:38001>
}
kuid <kuid:107182:100405>


All I basically want to do is change the track, everything else works fine.
 
That should work if the original bridge used an attached track.

What concerns me is this kuid <kuid:-25:275> being on a line all by its self without any reference. If this is in the original, then there's an error in the config.txt file. Being an old asset, these kinds of things weren't caught.

Asset-filename tag is obsolete, but unless you create a mesh-table to replace this and update the asset build, you'll have an error if you remove the reference.

There are some bridges that have a hard-coded track as part of the mesh and that doesn't work like it should, and with the track part of the mesh, no matter what you do, you can't update it.

I'm going to take a look at this asset myself when I get a chance and see what's going on before I can confirm this, but my gut is telling me this is so because I've run into this situation before.
 
All I basically want to do is change the track, everything else works fine.
The problem is you have is that you have chosen a built-in asset as the starting point, and it is a very old asset. Built-in assets are not subject to the same stringent validation rules as other assets, but if you copy it so it is no longer built-in then a lot of errors that were previously suppressed suddenly become apparent, and need to be fixed. You may be able to get this asset to work with the change you want, but your specification of the new track is incorrect. Instead of
bridgetrack "85324:38001"
it should be
bridgetrack <kuid2:85324:38001:1>
and the kuid-table should match.
That will work, but of course it is a bridge with four tracks, because <kuid2:85324:38001:1> is a double track. If you want a bridge with two tracks then your replacement track must be a single track. An alternative that might work is to specify that the bridge is single track. Change
trackoffsets -2.5,2.5
to
trackoffsets 2.5
and then adjust '2.5' until you get the effect you want. However, I am not sure that you can specify an offset for a single track bridge.
 
The Orignal asst is named "Bridge Steel 2t".
I am new to writing or modifying script.
i have not seen anything about modifying or script writing in Trainz Wiki or in other tutorials.

John (NWHY6)
 
The Orignal asst is named "Bridge Steel 2t".
I am new to writing or modifying script.
i have not seen anything about modifying or script writing in Trainz Wiki or in other tutorials.
There is no scripting involved with that asset.
 
Back
Top