Elvas Tower: Clarity for Giving FIle Paths.. - Elvas Tower

Jump to content

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

Clarity for Giving FIle Paths.. Rate Topic: -----

#1 User is offline   देव 

  • Hostler
  • Group: Status: Active Member
  • Posts: 55
  • Joined: 06-December 20
  • Gender:Male
  • Simulator:msts
  • Country:

Posted 19 February 2024 - 10:43 AM

1) Sound ( "../../COMMON.SOUND/ARS_LHB_V4/ARS_LHB_V4/SOUND/lhbwag.sms" )

2) Sound ( "../COMMON.SOUND/ARS_LHB_V4/ARS_LHB_V4/SOUND/lhbwag.sms" )



For the above parameters I want a detailed explanation of how the path system works in OR, what's the difference between these two, as from my understanding the "../" means the parent directory of the current directory. My Confusion is: This .wag file is present in "TRAINSET/XYZ-FOLDER", so for this .wag giving a single "../" in the path will refer to the parent directory of the directory in which this .wag file is present(XYZ-FOLDER) which is the TRAINSET directory. Now the "COMMON.SOUND" folder (mentioned in the above Sound Parameter) is present in the trainset directory then why OR is unable to detect that folder with single "../". It does detect the folder with double that is "../../". Why this difference? I am confused where to give single "../" and double "../../", please help me to clarify this confusion.

#2 User is online   steved 

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

Posted 19 February 2024 - 10:56 AM

A single ":/." goes up one folder level, two, ":/:/." go up two folder levels.

Randy


#3 User is offline   ErickC 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,001
  • Joined: 18-July 17
  • Gender:Male
  • Location:Hastings, MN, US
  • Simulator:ORTS
  • Country:

Posted 19 February 2024 - 01:05 PM

The default sound path (when only an SMS file is named) is a subfolder of the locomotive/car folder, titled SOUND. Therefore, to go up to the TRAINSET folder, you have to go up two levels, and then to the appropriate folder in TRAINSET. The whole path that OR effectively follows is as such:

LOCOMOTIVE FOLDER (start)
/SOUND
../LOCOMOTIVE FOLDER
../TRAINSET FOLDER
/COMMON.SND (or whatever) folder
/SMS FILE FOLDER

OR, like MSTS, follows this logic even when there is no SOUND folder present - which is why error messages in the log tend to look like "Cannot find file TRAINSET/LOCOMOTIVE/SOUND../COMMON.SOUND/ARS_LHB_V4/ARS_LHB_V4/SOUND/lhbwag.sms".

#4 User is offline   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 1,774
  • Joined: 26-February 08
  • Gender:Male
  • Location:Eltham, Victoria, Australia
  • Simulator:ORNYMG
  • Country:

Posted 19 February 2024 - 04:39 PM

>Why this difference?

Dev,

This system is the standard file system usage that started with unix in 1970.
This is not something specific to open rails.

https://www.geeksfor...ix-file-system/

This is the start of file systems.

The file system that is used in windows is based on the unix file system.
Unfortunately microsoft changed the / to a \ which has caused trouble for a lot of people.

#5 User is online   Genma Saotome 

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

Posted 19 February 2024 - 05:34 PM

One way to keep it all straight is "../" means going up the tree and any "actual verbiage/" means going back down. The concept of going over doesn't apply.

Example: "../../COMMON.SOUND/ARS_LHB_V4/ARS_LHB_V4/SOUND/lhbwag.sms" is up 2 directories then down 4 directories to find therein lhbwag.sms.

#6 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,932
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 19 February 2024 - 05:41 PM

gpz said:

Script's search begins with <Installation>/TRAINS/Trainset/<Stock>/Script/,
Files search begins with <Installation>/TRAINS/Trainset/<Stock>/

So, sound and cab files are expected to be in <Stock>/ subfolder, as Erick have said - therefore, 2 levels up is needed to go to Trainset directory, if external files are needed.

#7 User is offline   Amtrak115 

  • Fireman
  • Group: Status: Active Member
  • Posts: 201
  • Joined: 04-August 19
  • Gender:Male
  • Location:Parker, TX
  • Simulator:open rails
  • Country:

Posted 20 February 2024 - 07:11 AM

ok.....i guess I'll open myself up to the slings and arrows...... Couldn't you use ...D:\ORTS\Trains\Trainsets\common.snd\.... vs relative urls...ie... ..\..\ (too many .'s....lol)

amtrak115

#8 User is offline   देव 

  • Hostler
  • Group: Status: Active Member
  • Posts: 55
  • Joined: 06-December 20
  • Gender:Male
  • Simulator:msts
  • Country:

Posted 22 February 2024 - 02:55 AM

View PostAmtrak115, on 20 February 2024 - 07:11 AM, said:

ok.....i guess I'll open myself up to the slings and arrows...... Couldn't you use ...D:\ORTS\Trains\Trainsets\common.snd\.... vs relative urls...ie... ..\..\ (too many .'s....lol)

amtrak115


I've tried using that way, but OR doesnt follows it :/

#9 User is offline   eric from trainsim 

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

Posted 22 February 2024 - 08:24 AM

Should we perhaps think about defining a environment variable for the currently selected ORTS content path?

Setting %ORTSROUTE% and %ORTSTRAIN% at runtime might make pathing a little more bulletproof and possibly less confusing.

Having a separate path for Route and Train would allow trains in one folder and routes in another.

#10 User is offline   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 1,774
  • Joined: 26-February 08
  • Gender:Male
  • Location:Eltham, Victoria, Australia
  • Simulator:ORNYMG
  • Country:

Posted 22 February 2024 - 10:56 AM

View Postdev, on 22 February 2024 - 02:55 AM, said:

I've tried using that way, but OR doesnt follows it :/


You would need to supply an example of this if you want help.

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