Csantucci, on 19 October 2016 - 11:58 PM, said:
OR already and successfully provides extensions for following file types:
- .eng
- .cvf
- .sms
- .act
- .trk
- sigscr.dat
- sigcfg.dat
- in some way, tsection.dat
and maybe I've forgotten something.
The proposed extension does not damage MSTS operation.
The proposed extension does not even need manual editing of .w files (even if that remains easy and possible - I proceeded that way), because TSRE may handle extensions to .w files, and in this case does already handle this extension.
So in my mind implementing controlled extensions to .w files is within the OR development path.
My primary concern, and it is a diminishing one with TSRE around, is that world files (.w) are files with complex interactions with other files - like Dave says, it's basically a database stored across multiple different files (.w, .tdb, etc.) - and so I believe tools will be the only way many content creators can change them.
The file types above are either completely hand-made (e.g. engine/wagon files [.eng, .wag]) or relatively simple and mostly self-contained (e.g. track files [.trk]). Activity files are a little problematic, however, they can be hand-edited and individually avoided in the tools. If you have customisations in any world files, you lock out the entire RE functionality, unless you keep copies of your changes and reapply them manually each time (assuming of course they don't somehow break the RE during loading).
I would suggest something more like this:
...\World\w-001234+001234.w
CarSpawner ( UiD ( 532 ) CarFrequency ( 11 ) CarAvSpeed ( 20 ) TrItemId ( 1 0 ) TrItemId ( 1 1 ) StaticFlags ( 00000100 ) Position ( -601.849 15.6006 -929.784 ) QDirection ( 0 0 0 1 ) VDbId ( 4294967295 ) )
...\World\OpenRails\w-001234+001234.w
CarSpawner ( UiD ( 532 ) ORTSListName ( "List1" ) )
The two files are then merged when loaded, and we can discard the OpenRails version if the type doesn't match for that UiD.
This has the downside that the two may get out of sync if UiDs change (but we can detect some of that and log warnings), but benefits that the MSTS RE won't be out-of-bounds and that you could override any property in the OpenRails version (such as using higher-quality versions of shapes).