Is there a way to read .000 files in VB?

General discussions

Moderator: senjer

Post Reply
User avatar
PostTEB
Posts: 6
Joined: 31 Oct 2016, 17:37

Is there a way to read .000 files in VB?

Post by PostTEB »

I was making an IDE for an .ACT editor
Since I dont really want to hard code the train xml files in my document, is there a way of getting my code to read the .000 file

Where I wish to use it
diag_import.PNG
diag_import.PNG (13.58 KiB) Viewed 5038 times
By the way, if it was created in C/C++, I would be fine (sort of)
I’m alive again yeet
me being here wondering about the editor
User avatar
Jim2016
Posts: 890
Joined: 04 Jan 2016, 14:42

Re: Is there a way to read .000 files in VB?

Post by Jim2016 »

.000 files are read-only files for the simulator. They contain the maps, the trains, the objects etc. So you can't open them. Unless, you can find a 3rd party program to extract the train files from the .000 files, but I'm not sure if Metro Simulator is going to work if you do this.
User avatar
Jim2016
Posts: 890
Joined: 04 Jan 2016, 14:42

Re: Is there a way to read .000 files in VB?

Post by Jim2016 »

However, look if this is possible: You can add all the possible choices of trains as simple text in this dialog window and when you choose an option it is going to be added in a variable. When the .act file is constructed you can make your activity editor to load the train that it's in the variable with an ".xml" added to the end.
User avatar
PostTEB
Posts: 6
Joined: 31 Oct 2016, 17:37

Re: Is there a way to read .000 files in VB?

Post by PostTEB »

Jim2016 wrote:.000 files are read-only files for the simulator. They contain the maps, the trains, the objects etc. So you can't open them. Unless, you can find a 3rd party program to extract the train files from the .000 files, but I'm not sure if Metro Simulator is going to work if you do this.
.000 files are a form of archive
I’m alive again yeet
me being here wondering about the editor
User avatar
MetroSimGermany
Posts: 405
Joined: 08 Mar 2016, 14:41
Location: Berlin, Germany
Contact:

Re: Is there a way to read .000 files in VB?

Post by MetroSimGermany »

Basically .000 is not reserved for anything. Its a tarned file. It is in this case an archive I assume as the can be for example .xml files be located in it. But tests with a program thats really good at recognizing tarned archives did not find any know archive type on this file. But might be a little trick where there is just a line inserted that is later removed by the Sim itself for reading of the archive and it just exists to trick archive programs. Who knows. The big spaces at the beginning do look suspicious. Mayb try deleting those with Notepad and look if the file system can be read by a system utility/archive checker then? But do a backup first unless you want to repeat the whole installation.
Also ctrl+F is a great help around halfway through there is actually a readable passage with all the train data. Maybe you can use this section to automaticly add trains into your program?

Your program would have to search for a line of code like this
<train name="Trains\RET\5200-RR" xmlns:res="ResourceManager" icon="TRRIcon.png" stopmarker="hv30">
In this case the file name is 5200-RR.xml and Train Pack "RET", but trainpack does not have to match the file path inside the archive, as the trainpack value might be set seperately in the .xml file itself. Also, the repaintable version exist as own trains in the .000 file, but are in the sim managed via the trainnumber. This means you would need to write at least 12 exceptions in your program (4 MG2, 4 1982 SG2, 4 2006 SG2)



Greets, Mika
Support auf Deutsch? Kein Problem! Ich helfe gerne per PM. ;)
Image
User avatar
Michiel
Site Admin
Posts: 2469
Joined: 11 Sep 2011, 13:32

Re: Is there a way to read .000 files in VB?

Post by Michiel »

There are no filenames stored in the .000 archive, only the hashes of the original filename and the file data. So no, you cannot read filenames from it.
User avatar
PostTEB
Posts: 6
Joined: 31 Oct 2016, 17:37

Re: Is there a way to read .000 files in VB?

Post by PostTEB »

MetroSimGermany wrote:Basically .000 is not reserved for anything. Its a tarned file. It is in this case an archive I assume as the can be for example .xml files be located in it. But tests with a program thats really good at recognizing tarned archives did not find any know archive type on this file. But might be a little trick where there is just a line inserted that is later removed by the Sim itself for reading of the archive and it just exists to trick archive programs. Who knows. The big spaces at the beginning do look suspicious. Mayb try deleting those with Notepad and look if the file system can be read by a system utility/archive checker then? But do a backup first unless you want to repeat the whole installation.
Also ctrl+F is a great help around halfway through there is actually a readable passage with all the train data. Maybe you can use this section to automaticly add trains into your program?

Your program would have to search for a line of code like this
<train name="Trains\RET\5200-RR" xmlns:res="ResourceManager" icon="TRRIcon.png" stopmarker="hv30">
In this case the file name is 5200-RR.xml and Train Pack "RET", but trainpack does not have to match the file path inside the archive, as the trainpack value might be set seperately in the .xml file itself. Also, the repaintable version exist as own trains in the .000 file, but are in the sim managed via the trainnumber. This means you would need to write at least 12 exceptions in your program (4 MG2, 4 1982 SG2, 4 2006 SG2)



Greets, Mika
Thanks for the tip
I’m alive again yeet
me being here wondering about the editor
Post Reply