Route extending Open Rails files
#91
Posted 27 April 2021 - 06:33 PM
I am trying to program an editor for the clocks files. I have to read the JSON animated.clocks-or and the STF clocks.dat. So I just realize what a considerable effort is required for this.
Best regards
Jonas
#92
Posted 27 April 2021 - 06:38 PM
#93
Posted 27 April 2021 - 06:55 PM
YoRyan, on 27 April 2021 - 06:38 PM, said:
#94
Posted 27 April 2021 - 07:08 PM
#96
Posted 27 April 2021 - 11:10 PM
By the way, do you mean SD40 or SD40-2? The latter loads here.
#97
Posted 27 April 2021 - 11:47 PM
https://msts.steam4m...ls/gantlet.html
https://msts.steam4m..._dbl_slips.html
OR does not handle this to date. TSRE is already yes but not complete. This is when manual editing comes in.
There will always be something in the situation that the app creator does not think about.
Mindig kíváncsian figyelem az újdonságokat, mert ezek viszik előbbre az Open Railst.
#98
Posted 28 April 2021 - 08:11 AM
Genma Saotome, on 27 April 2021 - 05:12 PM, said:
. . .
I'm checking out.
Dave, I think the message has become muddled. We are not taking away the parsing of STF for existing types of file. JSON is only for new types of file.
Our policy is that "Open Rails will continue to maintain compatibility with content from previous official versions of Open Rails."
I will be publishing this and other policies on the Open Rails website shortly.
#99
Posted 28 April 2021 - 08:52 AM
YoRyan, on 27 April 2021 - 06:13 PM, said:
If you decide to use custom fast libs for JSON loading, then different libs can treat this kind of bugs differently too.
I don't think that pointing to bugs in some STF files is any reasonable argument against STF file format.
#100
Posted 28 April 2021 - 08:57 AM
Csantucci, on 27 April 2021 - 11:10 PM, said:
By the way, do you mean SD40 or SD40-2? The latter loads here.
The SD40-2. Here's the file that doesn't load; it's straight from the MSTS 1.2 update. I have just tested it on master and on NewYear and it doesn't work on either. It's possible you've already repaired your own copy.
SD402.zip (12.14MB)
Number of downloads: 259
It's the syntax that's badly defined about STF, not the names of the properties. In the case of the SD40-2, there's a backslash at the end of one of the lines. What is that supposed to mean to the parser? Kuju apparently just ignores it, but Open Rails doesn't. Should we change the behavior to match MSTS's? If we do, does this break any existing OR files that assume our current behavior?
You don't have these kinds of problems with JSON. If your data doesn't load correctly in your web browser, then it's not valid JSON.
Goku, on 28 April 2021 - 08:52 AM, said:
Actually, they don't. There's one and only one way to parse JSON. This information does not exist for STF.
Goku, on 28 April 2021 - 08:52 AM, said:
But it's a file produced by Kuju themselves. It's not a bug - it was intentional. The bug is in Open Rails itself, a consequence of the extreme difficulty of writing a consistent STF parser.