conductorchris, on 22 August 2020 - 05:57 PM, said:
Ryan, I am very pleased to see your work and clear thinking. I think this is very important. I appreciate your knowledge and experience that you bring to your suggestions.
Christopher
Thanks; you're too kind. :D
Genma Saotome, on 22 August 2020 - 08:45 PM, said:
I've expressed reservations about this... perhaps I'm not grasping the benefits, so whenever possible examples would be helpful.
Certainly.
Scenario A: A pair of native OR content packages in ZIP format.
=YoRyan_SuperlinerInteriors.zip=
ORTS/
YoRyan_SuperlinerInteriors/
Shapes/
supercoach.s
superdiner.s
superlounge.s
Textures/
supercoach.ace
superdiner.ace
superlounge.ace
=YoRyan_DerailFlag.zip=
ORTS/
YoRyan_DerailFlag/
Shapes/
derailflag.s
Textures/
derailflag.ace
The simulator would combine both of them into a single virtual filesystem.
ORTS/
YoRyan_SuperlinerInteriors/
Shapes/
supercoach.s
superdiner.s
superlounge.s
Textures/
supercoach.ace
superdiner.ace
superlounge.ace
YoRyan_DerailFlag/
Shapes/
derailflag.s
Textures/
derailflag.ace
Scenario B: The monkey patch. You want to customize my Superliner coach interior texture, so you add a new package that overrides my texture. (Put aside how a "proper" reskin with a separate wagon specification would be defined, as that is outside of the scope of this proposal.)
=YoRyan_SuperlinerInteriors.zip=
ORTS/
YoRyan_SuperlinerInteriors/
Shapes/
supercoach.s
superdiner.s
superlounge.s
Textures/
supercoach.ace
superdiner.ace
superlounge.ace
=You_SupercoachReplacementSeats=
ORTS/
YoRyan_SuperlinerInteriors/
Textures/
supercoach.ace
With the following load order (this would be a user preference),
- YoRyan_SuperlinerInteriors.zip
- You_SupercoachReplacementSeats.zip
the result is that your texture is loaded in place of my original.
ORTS/
YoRyan_SuperlinerInteriors/
Shapes/
supercoach.s
superdiner.s
superlounge.s
Textures/
supercoach.ace *from You_SupercoachReplacementSeats.zip
superdiner.ace
superlounge.ace
Scenario C: Now, imagine you have your MSTS content organized as packages instead of uncompressed files in a single directory. You can have a base package for the Kuju stock stuff, an XTracks package, packages for activities and timetables, etc., and all shareable by multiple installation profiles to boot. Upon loading, Open Rails would combine all of them into a single, virtual installation directory. Very elegant, if I do say so myself.
=MicrosoftTrainSimulator1.2.zip=
MSTS/
GLOBAL/
...
SOUND/
...
ROUTES/
...
TRAINS/
...
=YoRyan_MSTSTimetables.zip=
MSTS/
ROUTES/
USA1/
ACTIVITIES/
YoRyan_USA1_Amtrak.timetable-or
PATHS/
...
USA2/
ACTIVITIES/
YoRyan_USA2_EmpireBuilder.timetable-or
PATHS/
...
TRAINS/
CONSISTS/
...
=XTracks_Nov2019.zip=
MSTS/
GLOBAL/
SHAPES/
...
=Surfliner2.zip=
MSTS/
ROUTES/
Surfliner2/
...
Packages further down in the load order would also be able to override previously loaded files, as in scenario B.
Genma Saotome, on 22 August 2020 - 08:45 PM, said:
Why the insistence on the unix forward slash?
Two reasons. First, it further differentiates an Open Rails virtual path from a real Windows file path. Second, backslash is the escape character in JSON strings, so our file formats would look rather silly with every backslash separator doubled up ("\\ORTS\\SomePackage\\Shapes\\SomeShape.s").