Elvas Tower: Route extending Open Rails files - Elvas Tower

Jump to content

  • 13 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Route extending Open Rails files Rate Topic: -----

#11 User is offline   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,866
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 17 April 2021 - 02:58 AM

View PostGenma Saotome, on 16 April 2021 - 08:25 PM, said:

I don't know beans about .json but that said I'd be surprised if it found this phrasing to be unacceptable:

[
{ "Name": "Uhr01_Jm.s", "ClockType": "analog" },
{ "Name": "Uhr02_Jm.s", "ClockType": "analog" },
{ "Name": "Uhr03_Jm.s", "ClockType": "analog" },
{ "Name": "Uhr04_Jm.s", "ClockType": "analog" }
]


JSON is free format so you can add spaces and new lines to suit your taste.

#12 User is offline   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,866
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 17 April 2021 - 03:13 AM

View Postjonas, on 16 April 2021 - 09:06 PM, said:

I don't mean the question in my last post above as a rhetorical one, so once again:
What more information can be transferred by JSON compared to the classic MSTS STFormat?

None at all.

But I don't think that's the right question to be asking. How about, why should the Open Rails project adopt JSON for new data files?

This is not a new discussion - it started back in 2012.

For the developers, JSON gives us a well-understood, dependable, standardised base to work with, whereas parsing STF is a bit dodgy, undocumented and unfamiliar to new talent.

The intention is that content creators will have editors to work with and not spend much time looking into the files.

#13 User is offline   Amtrak115 

  • Fireman
  • Group: Status: Active Member
  • Posts: 201
  • Joined: 04-August 19
  • Gender:Male
  • Location:Parker, TX
  • Simulator:open rails
  • Country:

Posted 17 April 2021 - 03:45 AM

View Postjonas, on 16 April 2021 - 09:06 PM, said:

so once again:
What more information can be transfered by JSON compare
d to the classic MSTS STFormat?





There is no answer to your question, because it depends.... Having users being able to muck with data files from a application standpoint is very bad. MS/Kuju made the decision to use the "classic STFormat" for any data that needed to be stored or persisted between execution sessions. The reason everyone started looking at the data and mucking with it, was the tools used to generate those files either didn't exist or were insufficient to satisfy user needs. In one of the discussions many years back here on Elvas Tower the need for editors such as route editors, activity editors, path editors were deemed essential to the development of OR, however it was decided that making the sim compatible to MSTS was the highest priority and the editors would come later...Well later didn't come along really until GoKu's TSRE editor came along. Route developers were relegated to keeping old MSTS tools running on machines that could support them, thus you have XP machines being utilize to be able to access those tools. Yes I know some have been able to get MSTS Tool/editors running under Windows 10 but the number is few and getting fewer. (While I have a copy of MSTS on my machine, it doesn't work. It's there only to copy required data files that route developers use in the construction of the routes) The use of JSON or other formats provides a readily available storage for data the program needs to be persisted not for a user to muck in. To often discussions of data files get sidetracked into how the data is formatted in storage and not in what are the data requirements needed. While I agree that STFormatted data is easy to read, however you have to be careful modifying that data because in a lot of cases numbers are not always what they seem to be. Ex. In signpost data, there is usually three numbers stored. "238 000030.0 1.0", (totally made up) the first number "238" is not really a value but a representation of bit flags that tells the code how to read the rest the of the data.

having said all this, the premise of your first post is still valid, Is OR going to continue to just expand/cludge the old MSTS data or is there a plan for the future?

#14 User is offline   slipperman 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 760
  • Joined: 09-February 12
  • Gender:Male
  • Location:North Nottinghamshire
  • Simulator:MSTS & ORTS
  • Country:

Posted 17 April 2021 - 05:41 AM

Hi,

View PostAmtrak115, on 17 April 2021 - 03:45 AM, said:

Yes I know some have been able to get MSTS Tool/editors running under Windows 10 but the number is few and getting fewer.

Sorry, but I have to disagree with that comment!
I've been using MSTS (sim, Activity Editor and, occasionally, Route Editor) under Win 10 since it was launched without any problems. OK, a few 'rules' need to be followed, but they are the same as applied to Win 7.

As Win 10 is developed, I'm sure there will come a time when MSTS just will not run. It doesn't have to be changes in Win 10; it could be that support for DirectX 7.0a (currently via DirectX 9.0c) is removed. It could also be that NVIDIA follows AMD and applies changes to their graphics system which makes MSTS unrunnable (is there such a word?!).

I know this is an Open Rails Forum, but felt that Amtrak115's comment should be challenged. However, I also enjoy running routes, both old and new, in OR :)

Cheers,
Ged

#15 User is offline   Amtrak115 

  • Fireman
  • Group: Status: Active Member
  • Posts: 201
  • Joined: 04-August 19
  • Gender:Male
  • Location:Parker, TX
  • Simulator:open rails
  • Country:

Posted 17 April 2021 - 06:39 AM

View Postslipperman, on 17 April 2021 - 05:41 AM, said:


I've been using MSTS (sim, Activity Editor and, occasionally, Route Editor) under Win 10 since it was launched without any problems. OK, a few 'rules' need to be followed, but they are the same as applied to Win 7.


Ged, there are times I wish I could get mine running. mainly to look at how AE worked compared to what I'm doing with TSRE

View Postslipperman, on 17 April 2021 - 05:41 AM, said:

It could also be that NVIDIA follows AMD and applies changes to their graphics system which makes MSTS unrunnable (is there such a word?!).


This is another reason i'm sure my version of MSTS doesn't work....I have AMD Graphics


View Postslipperman, on 17 April 2021 - 05:41 AM, said:

I know this is an Open Rails Forum, but felt that Amtrak115's comment should be challenged. However, I also enjoy running routes, both old and new, in OR :)


No worries sir, I'm am definitely not an expert on OR...I've only scratched the surface of trying to figure out how it all works....having learned programming way back when...terms like inheritance, instantiating a class, among others finds me trying to relate these to the way I was taught and understand....sometimes it's a losing battle...oh well S&*t happens when you get old. BTW..I run 'em Old and New too. I have one directory ORTS on my system, within that ATSF contains just about all Bob Wirth's routes. there's a BNSF, A UP, A SP, and even a MOW directory where I play with TSRE trying to extend routes or create new ones.

later

Barry... AKA Amtrak115

#16 User is offline   jonas 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 548
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 17 April 2021 - 09:47 PM

View Postcjakeman, on 17 April 2021 - 03:13 AM, said:

None at all.

Thanks for the clear answer! I wasn't sure if I knew all of the aspects to take into account.

View Postcjakeman, on 17 April 2021 - 03:13 AM, said:

But I don't think that's the right question to be asking. How about, why should the Open Rails project adopt JSON for new data files?

This is not a new discussion - it started back in 2012.

I didn't know this thread yet, I don't seem to be able to get along with the search here :-). So thank you for that link too. I've read the thread in the meantime. I hope to have the right questions now (no sarcasm) and one or two suggestions. See my next post here.

#17 User is offline   jonas 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 548
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 17 April 2021 - 09:47 PM

View Postcjakeman, on 17 April 2021 - 03:13 AM, said:

... For the developers, JSON gives us a well-understood, dependable, standardised base to work with, whereas parsing STF is a bit dodgy, undocumented and unfamiliar to new talent.

The intention is that content creators will have editors to work with and not spend much time looking into the files.

View PostAmtrak115, on 17 April 2021 - 03:45 AM, said:

... Having users being able to muck with data files from a application standpoint is very bad.
In principle, I agree with that when it comes to bank account data, for example :-), but if you want a user-open system you need interfaces. ...and so far I thought that we want that.

View PostAmtrak115, on 17 April 2021 - 03:45 AM, said:

MS/Kuju made the decision to use the "classic STFormat" for any data that needed to be stored or persisted between execution sessions.
I see it the other way around. Data that are saved between the sessions, such as in the * .sav files, can not simply to be opened and edited with Notepad.exe and are therefore compressed.

View PostAmtrak115, on 17 April 2021 - 03:45 AM, said:

The reason everyone started looking at the data and mucking with it, was the tools used to generate those files either didn't exist or were insufficient to satisfy user needs.
I seriously doubt this point of view, that users only started looking into the external files because of this.
If Kuju had wanted to exclude the user as much as possible in order to protect the application, then all external files would have been delivered compressed and encoded. But I made the effort today and freshly installed MSTS. I actually wanted to show a list of the uncompressed files here, but decided not to because there would have been far too many - the overwhelming majority of file types are uncompressed! When looking through the new installation on the HDD, I was surprised that almost all(!) Files, except for the * .s and * .w files in ROUTES or GLOBAL (and of course dll's and similar) are uncompressed. All possible suffixes like: * .sd, * .dat, *, tdb, * .tit, * .rdb, * .rit, * .haz, * .ref, * .trk, * .srv, * .path, * .act, * .con, * .eng, * .wag, * .ws, * .trf, * .cvf, * .mrk, * .env and * .fbk are available as uncompressed ST format by default and can be opend with Notepad.exe by everyone!
The MSTS TechDoc files also clearly show that MS/Kuju specifically invited to edit and expand the external files of the MSTS. Only three TechDoc files are mentioned here as examples:
• How to Create Marker Files.doc (* .mrk files)
• Conversion of Shapes and Textures 1.01.doc (* .sd files)
• How to Make a Car Spawner.doc (carspawn.dat)
A quote from the last mentioned file:
"The type of traffic spawned is not set up within the Route Editor, but in a file called carspawner.dat which is located in the root directory of the route you are editing. This is a simple file that can be edited in any Unicode text editor. This file is basically a list of shapes you wish to have generated as traffic. Determine the name of the shape you wish to have as traffic (there are many cars, mopeds, vans and trucks supplied within the various routes of Microsoft Train Simulator) and add it to the list. The number at the start of the file is the total number of lines of shapes you have added. If you want a certain shape to appear more frequently than another shape, give it multiple entries, updating the number at the top of the list."
If that doesn't invite you to change external files (without a special editor!), what else way do we expect?
It seems to be a legend that frequently keeps popping up that the user was only forced to "fumble around" in the external files because of the absence of editors. This legend seems to be renewed again and again for years, especially here in the forum in various posts, but also in other places on the Internet. But I say very clearly: MSTS wanted the user to expand external files such as Carspawn.dat etc. without special editors. Certainly only to a smaller extent, but the user should be able to read STF files and, above all, write them.
Kuju would certainly have liked to supply editors too, but the release time pressure that existed for some reason ;-) probably prevented that.
Of course, from Kuju's point of view, the really more complicated files, such as a local * .tdb, should never be fiddled with with Notepad.exe. Most user know that this is the death of any route of course.

View PostAmtrak115, on 17 April 2021 - 03:45 AM, said:

The use of JSON or other formats provides a readily available storage for data the program needs to be persisted not for a user to muck in.
Who apparently decided so casually and when that the user (in contrast to MSTS) should better be excluded from editing files in Open Rails? ... which chapter did I skip?
Hey :-), we support the world's largest range of digital content :-) - it's still a cool thing to read this for me!
Thanks to Chis' tip, after reading this previous thread on the topic, my impression has strengthened that all in all, programmers have agreed on JSON with each other. There were also cautionary voices that feared the exclusion of users, but technical enthusiasm outweighed the discussion.
Among the users of my add-on (now more than 80 people) I get sometimes a feedback from them. I am therefore sure that the less readability of the JSON format will not be well received and that users will feel left out. And the announcement of OR editors for the justification of the JSON format of the external files was more than 10 years ago?
Maybe we need a clarification of terms: By users I mean people who occasionally play an activity and for whom it can mean a whole weekend of joy when they discover how, for example, they can insert a line in a Carspawner.dat in such a way that a "new" car previously downloaded appears during an activity. I often see myself as an user too when I make quick, small changes in all kinds of files while laying tracks in order to test this or that. As a route builder you could of course also call me a developer. But by developers I always mean the Open Rails software programmer here.

View PostAmtrak115, on 17 April 2021 - 03:45 AM, said:

While I agree that STFormatted data is easy to read, however you have to be careful modifying that data because in a lot of cases numbers are not always what they seem to be. Ex. In signpost data, there is usually three numbers stored. "238 000030.0 1.0", (totally made up) the first number "238" is not really a value but a representation of bit flags that tells the code how to read the rest the of the data.
Even in the JSON format you have to be careful with any changes. But I agree with you that by assigning names to each individual date in the JSON format, we have more Clarity.


In your STF example "238 000030.0 1.0" it could be better written like this even in STFormat:
ThisAndThat_Item (
	ThisAndThat_BitFlag (238)
	X(000030.0)
	Y(1.0)
)


Perhaps for me it is simply a matter of avoiding the two different types of brackets, the colon and the comma at the end of the line in the JSON format for the usual better readability of the STF files:
For new files created by OR, a kind of strict STF-OR standard instead of JSON:

A classic MSTS STF entry like this one:
Object (
	UiD ( 27 )
	FileName ( Uhr03_OR_Jm.s )
	Position ( -119.654 1 241.807 )
	VDbId ( 4294967295 )
)

would look like this for new OR files:
Object (
	UiD ( 27 )
	FileName ( Uhr03_OR_Jm.s )
	Position (
		X ( -119.654 )
		Z ( 1 )
		Y ( 241.807 )
	)
	VDbId ( 4294967295 )
)


What should definitely be forbidden are proper names that follow identifiers without brackets, such as the proper name House here and unnamed lines of numbers such as (1 0 0 0)
matrices ( 1
	matrix House ( 1 0 0 0 )
)

Correct would then be:
matrices (
	matrix ( 
		Name ( House )
		VectorX ( 1 )
		VectorY ( 0 )
		VectorZ ( 0 )
		VectorQ ( 0 )
)


That would still be better than real JSON for readability:
matrices : [
	matrix : {
		"Name" : " House",
		"Vector01X" : "1",
		"Vector01Y" : "0",
		"Vector01Z" : "0",
		"Vector01Q" : "0",
	}
[

Because if you can do without the apostrophe in JSON format (seen here), we end up with:
matrices : [
	matrix : {
		Name :  House,
		Vector01X : 1,
		Vector01Y : 0,
		Vector01Z : 0,
		Vector01Q : 0,
	}
[

Now replace the colon and curly brackets with normal brackets and replace the comma with closeing brackets, we end up here again:
matrices (
	matrix ( 
		Name ( House )
		VectorX ( 1 )
		VectorY ( 0 )
		VectorZ ( 0 )
		VectorQ ( 0 )
)

It's just calmer and more familiar to read.

But I guess it is too late for such proposals, despite objections like that at the time. That was at least three years before I started at ET.

So...

View PostAmtrak115, on 17 April 2021 - 03:45 AM, said:

having said all this, the premise of your first post is still valid, Is OR going to continue to just expand/cludge the old MSTS data or is there a plan for the future?


#18 User is offline   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,866
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 18 April 2021 - 12:10 AM

View PostAmtrak115, on 17 April 2021 - 03:45 AM, said:

having said all this, the premise of your first post is still valid, Is OR going to continue to just expand/cludge the old MSTS data or is there a plan for the future?

You can get to the plans from the website. They were also set out in the Trello Roadmap but the milestones there are no longer clearly visible because of all the many (and welcome) suggestions that have been submitted.

So it is high time that the plans were updated, clarified and perhaps made more prominent. That's something ORMT is currently working on.

Now that the port to Monogame is done (barring a performance issue for integrated graphics), the next step is the virtual file system which will help us organise our existing content better and provide a home for OR-specific content.

#19 User is offline   Amtrak115 

  • Fireman
  • Group: Status: Active Member
  • Posts: 201
  • Joined: 04-August 19
  • Gender:Male
  • Location:Parker, TX
  • Simulator:open rails
  • Country:

Posted 18 April 2021 - 06:27 AM

View Postjonas, on 17 April 2021 - 09:47 PM, said:


Among the users of my add-on (now more than 80 people)


What's your "Add-on". I might already be using it...lol. Just curious.

Barry...AKA amtrak115

#20 User is offline   Amtrak115 

  • Fireman
  • Group: Status: Active Member
  • Posts: 201
  • Joined: 04-August 19
  • Gender:Male
  • Location:Parker, TX
  • Simulator:open rails
  • Country:

Posted 18 April 2021 - 06:32 AM

View Postcjakeman, on 18 April 2021 - 12:10 AM, said:


Now that the port to Monogame is done (barring a performance issue for integrated graphics), the next step is the virtual file system which will help us organise our existing content better and provide a home for OR-specific content.


Chris, Look forward to the implementation. I read the thread on this, and my head is still throbbing from trying to figure out the advantages, however the implementation my straighten me out.

Barry

  • 13 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users