PK4 unpacking?

Stop by here for help with RRT3 Editor problems and tips.
low_grade
Dispatcher
Posts: 438
Joined: Sun May 17, 2009 3:02 pm
Location: Cleveland, OH

PK4 unpacking? Unread post

So I gather that only Poptop and the makers of Doom have ever used the PK4 extension, and for some reason WinRAR and WinZip won't recognize it. So what do you guys use to make the user extra content archives?
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: PK4 unpacking? Unread post

Someone wrote a java utility for unpacking, I'll post it this evening when I get a chance, or if you download the Trainmaster passenger carriages off the extras page, it's got the files and instructions for packing and unpacking pk4

http://hawkdawg.com/cgi-bin/counter/dow ... l?file=060

Note...this package is different from what is released with TM since it expands to two more eras. I will be replacing this file when I have a complete express set put together. But the extras are nice.
User avatar
Wolverine@MSU
CEO
Posts: 1166
Joined: Fri Nov 10, 2006 2:14 pm
Location: East Lansing, MI

Re: PK4 unpacking? Unread post

PK4 files can be unpacked by using PJay's "PK4unpack" utility, a JAVA script, that I think is available in the Archive. PK4 files can be packed with the utility provided by PopTop in the CtoC expansion. I'm pretty sure that instructions for packing and unpacking PK4 files have been posted on the Forum somewhere. Do a search, and you should be able to find them.
low_grade
Dispatcher
Posts: 438
Joined: Sun May 17, 2009 3:02 pm
Location: Cleveland, OH

Re: PK4 unpacking? Unread post

So, I see the PK4pack and PK4unpack directories, and in the PDF it says that in order to unpack a pk4 you enter java pk4unpack <file> from a command prompt, but when I do this from the directory that has the pk4 file, java returns the error java.lang.classnotfoundexception, which leads me to believe that there's some kind of installation I need to do in order to make this work.

So, please, what else do I have to do?
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: PK4 unpacking? Unread post

there's no installation, you just need to have all the files in the same folder, and type the command exactly. It is case sensitive.

I use a batch file to do it because It's a pain to type out each time, and so much easier to paste into editor. The last time I used the batch it had this as its only line.

java PK4unpack glenaldencoalco.pk4

Works every time.
User avatar
WPandP
Engineer
Posts: 762
Joined: Tue Sep 11, 2007 5:16 pm
Location: Cincinnati, Ohio
Contact:

Re: PK4 unpacking? Unread post

If you're looking for something with a GUI rather than command-line interface, I've been using Watto Studios Game Extractor, which can handle RRT3's PK4 files. It'll let you examine the contents of a PK4 and just extract the file(s) that you need, which can be helpful. For packing, though, you still need to use the command line utility.
=Winchester, Paston & Portsmouth=
====== We Provide Pride! ======
low_grade
Dispatcher
Posts: 438
Joined: Sun May 17, 2009 3:02 pm
Location: Cleveland, OH

Re: PK4 unpacking? Unread post

Thanks a million!

I'm probably not going to go gung ho on modifying images, but I wanted to try adding a few locomotives. The first one would be an 0-6-0 in 1842 for European campaigns, the GWR Hercules Class, that's roughly equivalent to the Baldwin, useful for grade and freight hauling. Wish me luck!
User avatar
Hawk
The Big Dawg
Posts: 6503
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: PK4 unpacking? Unread post

Is that pk4 utility still available somewhere?

Edit 1: Never mind. I found it. It's in the Trainmaster Rolling Stock Developers Kit, found in the Extras section of the archives in the 'Tips, Tutorials, Utilities, etc.' section.
Hawk
User avatar
Gumboots
CEO
Posts: 4817
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: PK4 unpacking? Unread post

nedfumpkin wrote:there's no installation, you just need to have all the files in the same folder, and type the command exactly. It is case sensitive.

I use a batch file to do it because It's a pain to type out each time, and so much easier to paste into editor. The last time I used the batch it had this as its only line.

java PK4unpack glenaldencoalco.pk4

Works every time.
Not every time.

Code: Select all

'java' is not recognized as an internal or external command,
operable program or batch file.
Ha.
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: PK4 unpacking? Unread post

I think you need sun java installed, but I just read that it has a major security flaw so I'm not sure what to say. Look it up and it's a free install.
User avatar
Gumboots
CEO
Posts: 4817
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: PK4 unpacking? Unread post

I already had Java installed. ;-) The problem and the fix is described here: How do you stop the error 'java' is not recognized as an internal or external command operable program or batch file?

I found that after a bit of Googling, and it fixed the error for me. !*th_up*!

They reckon the exploit has been patched, but I've disconnected Java from my browser anyway, for the time being at least. Using it for desktop scripts is still safe.
Post Reply