Wikipedia has a nice section on JSON syntax. It isn't very complicated - just collections of keys and values that map to JavaScript data types.
OR consist format Let's talk details
#32
Posted 12 July 2020 - 11:17 AM
#33
Posted 12 July 2020 - 11:36 AM
#34
Posted 13 July 2020 - 01:43 PM
Implemented the ability to load rolling stock from other installation directories. Consists can now reference other consists.
{ "Name": "Fake Acela", "Durability": 1.0, "List": [ { "Engine": "3DTS_SJVRR_GP9_1754/3DTS_SJVRR_GP9_1754", "Profile": "Tehachapi Pass" }, { "Engine": "3DTS_SJVRR_GP9_1754/3DTS_SJVRR_GP9_1754", "Flip": true, "Profile": "Tehachapi Pass" }, { "Wagon": "3DTS_GATXTANKER/3dts_gatxtanker", "Profile": "Tehachapi Pass", "Count": 3 }, { "Consist": "kiha31a" } ] }
#35
Posted 13 July 2020 - 02:40 PM
I'm trying to understand this thread...I'm liking what I see, but not completely comprehending it ( much like my first encounter some years ago wiith concept of include files. ). Eventually will there be a set of standard templates ( like your examples in this thread ) that will present a visual template for the end user?
Thanks for all your time and effort --- http://www.elvastower.com/forums/public/style_emoticons/default/sign_rockon.gif http://www.elvastower.com/forums/public/style_emoticons/default/hi.gif--- Regards, Gerry
Thanks for all your time and effort --- http://www.elvastower.com/forums/public/style_emoticons/default/sign_rockon.gif http://www.elvastower.com/forums/public/style_emoticons/default/hi.gif--- Regards, Gerry
#36
Posted 13 July 2020 - 03:13 PM
There will certainly be a written manual section. If the stars align, I might also be able to crank out some kind of consist editor. Have to learn WinForms, though...
#37
Posted 13 July 2020 - 03:14 PM
I see that the consist still has a 'name' field, additional to the filename.
When referencing the consist, e.g. in timetable or indeed in another consist, does one have to use the filename or the 'name'?
Having to use the name can be confusing as the name is not shown on the 'outside'.
If one has to use the filename, than what purpose does the name field serve?
MSTS data was littered with these double (or even triple) names. My view is that any new datastructure should eliminate these doubles and triples.
Unless a consist file can hold more than one consist definition, I do not see any usefull purpose for a name field, as one can just as well use the filename as reference.
Regards,
Rob Roeterdink
When referencing the consist, e.g. in timetable or indeed in another consist, does one have to use the filename or the 'name'?
Having to use the name can be confusing as the name is not shown on the 'outside'.
If one has to use the filename, than what purpose does the name field serve?
MSTS data was littered with these double (or even triple) names. My view is that any new datastructure should eliminate these doubles and triples.
Unless a consist file can hold more than one consist definition, I do not see any usefull purpose for a name field, as one can just as well use the filename as reference.
Regards,
Rob Roeterdink
#38
Posted 13 July 2020 - 04:12 PM
That is a good point. Note that the .con format actually has three names:
The first two are usually interchangeable, but this is not necessarily true, which can lead to ambiguities. (For the record, OR always uses the filename.)
The new format drops the TrainCfg field, leaving the filename and the Name field. I think there is still value in retaining both, because the Name field is used by the launcher to present a friendly name in the consist menu, and sometimes you want to use different semantics for these names. For example, I prepend all of my personal consists' filenames with "YoRyan_"; I wouldn't want that to show up in the launcher list.
- The filename before .con
- The "TrainCfg" name
- The "Name" name
The first two are usually interchangeable, but this is not necessarily true, which can lead to ambiguities. (For the record, OR always uses the filename.)
The new format drops the TrainCfg field, leaving the filename and the Name field. I think there is still value in retaining both, because the Name field is used by the launcher to present a friendly name in the consist menu, and sometimes you want to use different semantics for these names. For example, I prepend all of my personal consists' filenames with "YoRyan_"; I wouldn't want that to show up in the launcher list.
#39
Posted 14 July 2020 - 08:13 AM
Consist randomization is working!
...but I do not yet have the locomotive picker implemented, which will require more code and some launcher changes.
{ "DisplayName": "1x Marias Pass Yellow Beam Car", "Durability": 1.0, "Random": [ { "Wagon": "US2FCARYE2/us2fcarye2", "Probability": 0.3 }, { "Wagon": "US2FCARYF2/us2fcaryf2", "Probability": 0.7 } ] }
{ "DisplayName": "Fake Acela", "Durability": 1.0, "List": [ { "Engine": "3DTS_SJVRR_GP9_1754/3DTS_SJVRR_GP9_1754", "Profile": "Tehachapi Pass" }, { "Engine": "3DTS_SJVRR_GP9_1754/3DTS_SJVRR_GP9_1754", "Flip": true, "Profile": "Tehachapi Pass" }, { "Consist": "beamcar", "Count": 16 } ] }
...but I do not yet have the locomotive picker implemented, which will require more code and some launcher changes.
#40
Posted 14 July 2020 - 02:27 PM
congratulations. Always great to experience progress when you are working a project.