Elvas Tower: Track pieces in REF File - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Track pieces in REF File Rate Topic: -----

#1 User is offline   NZ_JOHN 

  • Fireman
  • Group: Status: Active Member
  • Posts: 183
  • Joined: 15-September 16
  • Gender:Male
  • Location:New Zealand
  • Simulator:OR
  • Country:

Posted 05 June 2022 - 05:09 PM

How can I put my favorite track files (ie A1T100mtrConcrete etc ) in a seperate REF file
Like
Dyntrack (
Class ( TRACK )
Filename ( A1T10m.strt )
Align ( None )
Description ( "10 Mtr track piece" )
)
Dyntrack (
Class ( TRACK )
Filename ( A1T50m.strt )
Align ( None )
Description ( "50 Mtr track piece" )
)
Dyntrack (
Class ( TRACK )
Filename ( A1T100m.strt )
Align ( None )
Description ( "100 Mtr track piece" )
)

#2 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,363
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 05 June 2022 - 05:13 PM

IIRC TSRE lets you have multiple .ref files. There is no requirement for the name of each. In TSRE you do have to specify which one to use at any given time.

#3 User is offline   steved 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,871
  • Joined: 19-December 09
  • Gender:Male
  • Location:South of here
  • Simulator:ORMG
  • Country:

Posted 05 June 2022 - 06:16 PM

To be usable as a track piece it has to be in the tsection.dat file.
If you're just going to be using them as a scenery item you can add them to the .ref file like any other shape.
In order to be used as a shape you'll need to copy the .s and .sd files to the routes shapes folder.
They won't work as a Dyntrack so they need to be a static item. You can put them in any Class you want.
Like this,

Static (
FileName (A1T10mstrt.S)
Class ("Dummy Tracks")
Description ("10 M Strt")
)

Randy


#4 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,363
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 05 June 2022 - 06:28 PM

View Poststeved, on 05 June 2022 - 06:16 PM, said:

To be usable as a track piece it has to be in the tsection.dat file.
Randy


It depends on what you are trying to do. For example, I have many shapes defined in my .ref files that look like this:

Static ( Class ( "Static 066c_2L Streets" ) Filename ( SLW_066c_2LS_010m.s ) Shadow ( None ) Description ( " SLW_066c_2LS_010m " ) )

That's a non functional (i.e., a static road shape). It could also be a track shape.

In other situations I have this in the world file:

TrackObj (
UiD ( 231 )
SectionIdx ( 25162 )
Elevation ( 0.00151844 )
CollideFlags ( 519 )
FileName ( ../../routes/Goose_Island/shapes/SLW_066c_2LS_080m.s )
StaticFlags ( 00200100 )
Position ( 1018.67 180.282 -460.344 )
QDirection ( 0.000759205 0.00550684 4.14917e-06 0.999985 )
VDbId ( 4294967294 )
StaticDetailLevel ( 1 )
)

In this case I'm substituting that static shape for a real road shape of an identical length. The original shape was defined in the tsection file but the substitution shape isn't.

I'll describe both of these as advanced methods that break the rules w/o breaking the software.

#5 User is offline   eric from trainsim 

  • Waste Disposal Engineer
  • Group: Private - Open Rails Developer
  • Posts: 1,583
  • Joined: 30-October 10
  • Gender:Male
  • Simulator:ORTS
  • Country:

Posted 06 June 2022 - 02:12 PM

If the goal is to have a smaller list to sift thru when laying track, you'd need to pare down the TSECTION.Dat that gets loaded into TSRE, as track sections don't come from the REF unless you're placing them as static objects not loaded into the TDB to run on.

I believe Route Riter or TSUtils had a function which would create a custom TSECTION that only includes pieces used within a given route or that exist in your Global Shapes directory (I forget which).

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users