Unpacking Files in RW Tools

General discussion about Train Simulator, your thoughts, questions, news and views!

Moderator: Moderators

shinymac
Very Active Forum Member
Posts: 1187
Joined: Tue Jan 01, 2002 12:00 am

Unpacking Files in RW Tools

Post by shinymac »

Hi

One thing that has always had me baffled, is from time to time I do a check for any files needing unpacked, using RW Tools. I then unpack them in the recommended way.

Then some time later, maybe weeks or months, I do a new check, and find that the files that I had previously Unpacked, are now showing as needing Unpacked AGAIN.

Can anyone explain why this happens ? In other words, why do unpacked files, become repacked again ?

Thanks

Derek
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Unpacking Files in RW Tools

Post by gptech »

If the contents of the .ap archive are updated then you'll get the update. That will remove any files duplicated outside of the archive---in other words all that you've unpacked.
Are you unpacking the whole .ap, and why are you doing it? (not a trick question, I know why it's done and just want to see what your reason is)
shinymac
Very Active Forum Member
Posts: 1187
Joined: Tue Jan 01, 2002 12:00 am

Re: Unpacking Files in RW Tools

Post by shinymac »

Hi Gary

Well actually its my old friend again that's noticed this effect !

He seems to have a whole list of assets showing as partially unpacked (ie in black print), and 4 or 5 showing as packed (in red print). So I do what I do with my own files in this situation...I select them all, and use the option on the far left of the screen to unpack using 7-zip etc.

Hope this helps ?

Derek
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Unpacking Files in RW Tools

Post by gptech »

shinymac wrote:Hope this helps ?
Doesn't help me, but it might help the pair of you... :)

Assets, and routes, don't need unpacking/extracting from the .ap archives for the game to use them---we do it ONLY to allow RW Tools (and name my route, RSBinTool etc) to be able to see those items we need/would like to edit.
So, for assets all you need duplicating outside of the archive is the .bin file for that asset---in the same directory structure as that that is in the .ap archive. As an example, if you wanted to make the BR Blue Class 03 from the BRBluePack01 'visible' to RW Tools you only need to create the correct folder tree of

..\Assets\DTG\BRBluePack01\RailVehicles\Diesel\Class03\BR Blue\Engine

and into that Engine folder extract the Class03 Engine.bin (and it's _ND sibling)

No need to waste disc space with unnecessary duplication. Files outside of the archive are read in preference to the copies within it, and it would seem to now be a case of archived content loading quicker than when it's in the 'old fashioned' format--meaning that there's a possibility that unpacking/extracting everything could be having an adverse impact on the performance of the PC/game.

For routes, all that's needed outside of the archive is the route's RouteProperties.xml file, oncae again in the right folder tree---in the case of a route this is the same folder that the .ap itself lives in.

For scenarios, it's really not worth drilling through the archive to pull out the required files as there's very little else, so just unpack/extract the whole Scenarios folder, once more into the right place in the tree which is the same folder that the .ap lives in.

"Partially unpacked" is all that's needed in other words; for 99% of us, 99% of the time, all we want is to be able to swap stock with RW Tools, so just the .bin files does the job perfectly.
shinymac
Very Active Forum Member
Posts: 1187
Joined: Tue Jan 01, 2002 12:00 am

Re: Unpacking Files in RW Tools

Post by shinymac »

Hi Gary

"Thanks"

Clear as................................................................................................................................Mud !

Derek
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Unpacking Files in RW Tools

Post by gptech »

Which bits near passing through a filter Derek? :) How far into it did you manage before it got murky?
User avatar
mikesimpson
Very Active Forum Member
Posts: 6361
Joined: Mon Dec 03, 2001 12:00 am
Location: Southern Hemisphere Penal Colonies
Contact:

Re: Unpacking Files in RW Tools

Post by mikesimpson »

Just to elaborate a bit, I have an installation of Railworks here which contains virtually all the .ap files ever released, along with everything, including 3rd party stuff ever since 2007.

As a test, I then extracted in full, every .ap file I had. This gave me a folder of around 600 gigabytes.

TS2017 now takes 10 to 15 mins to start up as it has to read through every folder looking for scenarios and PreLoad files which are read every time TS2017 starts.

So it is NOT worth your while unpacking all .ap files. The game still works, but it takes a looooong time to start up the first time of each day.
Mike in OZ - Author of TS-Tools & Route-Riter.
http://www.agenetools.com
I'm not arguing (just explaining why I'm right).
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Unpacking Files in RW Tools

Post by gptech »

mikesimpson wrote:As a test, I then extracted in full, every .ap file I had. This gave me a folder of around 600 gigabytes.TS2017 now takes 10 to 15 mins to start up
Was that with the .ap archives still in place or removed Mike? It would be interesting to see if there's a difference depending on whether they're still in the game or not.
shinymac
Very Active Forum Member
Posts: 1187
Joined: Tue Jan 01, 2002 12:00 am

Re: Unpacking Files in RW Tools

Post by shinymac »

Its a difficult decision then, to decide whether to unpack all the ap files that RW Tools finds, or to leave them.

The problem is of course, that, as with my friend, certain scenarios were failing to load, stating that this was due to missing assets, which my friend DID own. So I assume this is because RW Tools couldn't find them as they were still packed ?

To be fair, its all subjective. I did a check last night with my OWN ap files, and didn't have many showing as still packed,but still went ahead and unpacked everything, meaning RW Tools now doesn't show ANY packed ap files. I have a HUGE inventory of routes and assets, and a high end system. TS still loads very quickly !
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Unpacking Files in RW Tools

Post by gptech »

shinymac wrote:certain scenarios were failing to load, stating that this was due to missing assets, which my friend DID own. So I assume this is because RW Tools couldn't find them as they were still packed
A scenario not loading in the game is never because RW Tools can't find the assets. If you own the items then the game will load, but if you have the items but not the reskin used in the scenario then it won't.
Also, if the scenario writer has unpacked his .ap archives and done it wrong, getting an extra directory in the path, problems will ensue.
shinymac
Very Active Forum Member
Posts: 1187
Joined: Tue Jan 01, 2002 12:00 am

Re: Unpacking Files in RW Tools

Post by shinymac »

Thanks for explaining Gary

Derek
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Unpacking Files in RW Tools

Post by gptech »

You're welcome. Unfortunately many still think that because RW Tools can't see something, neither can the game--as daft as DTG may appear to be at times, they wouldn't supply things we can't use!
User avatar
ttjph
Very Active Forum Member
Posts: 1454
Joined: Mon Jun 27, 2011 11:54 am
Location: Warwickshire

Re: Unpacking Files in RW Tools

Post by ttjph »

This has now prompted me to try *packing* a number of my routes *into* .ap files - using 7zip to compress everything up, and renaming the resulting file to MainContent.ap.

A test on WCML-N suggests that it works just fine! Whether or not there's a performance advantage I haven't confirmed, but Mike's test above suggests that there might be... subject to Gary's question of course! There is definitely a disk space advantage, and if I were to take the time to do it on assets where I'm modifing a small number of files, it would make backing up modified files rather easier.
i5-4690k | 16 GB | GTX970 | Win 10 64bit | h/k SoundSticks | 1680x1050
User avatar
ttjph
Very Active Forum Member
Posts: 1454
Joined: Mon Jun 27, 2011 11:54 am
Location: Warwickshire

Re: Unpacking Files in RW Tools

Post by ttjph »

Hmm... further testing on assets (specifically Kuju\RailSimulator) suggests that while they compress extremely well (and the principle works), there's a big hit on scenario loading time when packed into an .ap. Scenario loading appears to be CPU-bound, so perhaps the extra overhead of decompressing is significant...
i5-4690k | 16 GB | GTX970 | Win 10 64bit | h/k SoundSticks | 1680x1050
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Unpacking Files in RW Tools

Post by gptech »

.ap archives aren't compressed, or at least not by much. I don't know how 7-Zip does it but WinRAR allows creation of an uncompressed archive. Try using a copy of an existing .ap archive and delete everything but a single file, then add your content using just the "store" (WinRAR's name for the option)
method, and lastly delete that remaining single file. The .ap system isn't really about space saving disc space, but to provide a more efficient delivery/checking system.
Locked

Return to “[TS] General Discussion”