OpenBVE icon indicating copy to clipboard operation
OpenBVE copied to clipboard

[Request] Add filepath explanation in documentation page

Open adfriz opened this issue 2 years ago • 2 comments

When reading the documentation i didnt see a documentation about filepath on that page. Is this true ? Or its already there but i didnt found it ?

If filepath category have not been made please add it, it will help a user to understand how openbve read a filepath and how to write it.

Especially about ...\ and ..\

adfriz avatar Mar 03 '22 15:03 adfriz

It's nothing special or unique at all, just standard relative file paths.

https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats

Only at all interesting difference is that we accept both the forward slash (UNIX) and backslash (Windows) as the separator character,

leezer3 avatar Mar 04 '22 17:03 leezer3

I know openbve using standard relative file paths but that not what i mean, i mean a short explanation like this:

FilePath Openbve using standard relative filepath for referencing an object file or texture file.

Openbve can use forward and backslash as path separator.

Example Your want to reference a b3d/csv/animated object to extension.cfg with a folder structure like this.

| OBJECT | L_ Loco.animated | TRAIN | L_ extension.cfg

So in extension.cfg you write like this: [Car0] Object = ..\OBJECT\Loco.animated

You can use / or \ to write that filepath. ..\ or ../ it mean you get up 1 folder, in the example extension cfg the TRAIN folder is same level as OBJECT folder and you want to get inside OBJECT folder so you use one ..\ or ../ .

if your target file is in the same folder you dont need to write ..\ or ../ just write like this: [Car0] Object = Loco.animated

Maybe write like that on the documentation.

adfriz avatar Mar 06 '22 07:03 adfriz