Mac Extractor for Assets .fpk files

I'm not sure I understand you answer.

There are some Art files that are inside the assetsX.fpk files, there are others that are not. Which ones do you think are missing?

If I run Macapaka on the assets files on my Civ4 DVD, and highlight the Art folder in each of the four files, Macapaka tells me there are the following numbers of packaged files in each one:

assets0.fpk: 1975 files
assets1.fpk: 2594 files
assets2.fpk: 2250 files
assets2.fpk: 739 files

Are you seeing different numbers?
 
You clearly haven't read the Readme/Help that's included in Macapaka!

Here is the part about Running Macapaka:

Macapaka Help File said:
Double click Macapaka to launch it.
Use the File - Open menu to open an AssetsX.fpk file.

When you open a file it is displayed in its own window as an expandable listing. Initially you will just see the top level Art folder. Click the disclosure triangle next to Art to view its subfolders. Expand subfolders to see their contents and so on.

Select one or more files or folders that you want to extract.

If you select any folder then all its contents will also be included in the selection, so if you simply select 'Art' then the entire contents of the file are included.

You can hold the Command key down to make discontinuous multiple selections, or the shift key for multiple continuous selections.

Use the right hand button to open a file selection dialog to choose a destination folder for your extracted files. You only need to do this once if you always use the same destination folder, as Macapaka remembers your choice.

When you have chosen a destination and selected some files to extract, the Extract selection button will be enabled. Click it to extract the files.

The selected files will be copied into the destination folder, in a folder hierarchy that matches the one displayed in the window. Macapaka will create any new folders that are required.
I have emphasised the part that explains how to extract the files. Please let me know whether this answers your question.
 
I see the files, but when I go to macapaka and select to open the asset0.fpk file, nothing happens.

You should see a window with 'Art' in it, with a disclosure triangle to the left. Click the triangle to display the contents of the Art folder. If you don't see the window then there must be some incompatibility. What version of Mac OS are you running, and what Mac hardware?

okay, I found it. thanks for all the help

I thought the above posts meant you were able to see the Art folder :confused:

Flintlock said:
Maybe there is some incompatability issues as I am running An intel imac on running tiger.

I've tested Macapaka on an Intel Mac in Leopard, and on a G4 running Tiger. I think it's very unlikely that Tiger on an Intel Mac would fail. What do you see if you select "About Macapaka" in the Macapaka menu? What do you see if you select "Help" in Macapaka?
 
When you try to open a .fpk file, do you see any messages appear in the system console?

Here is a version that will dump some debug information in the Console when you try to open a file. Please can you run this one, try opening Assets0.fpk, and copy the console output here?

[EDIT] Debug version removed to avoid confusion
 
When I open macapaka I get this

-[NSBundle load]: Error loading code /Library/InputManagers/MagicMenuEnabler/MagicMenuEnabler.bundle/Contents/MacOS/MagicMenuEnabler for bundle /Library/InputManagers/MagicMenuEnabler/MagicMenuEnabler.bundle, error code 2 (link edit error code 0, error number 0 ())

And when I select to open the fpk file I get this

2008-08-11 10:20:01.274 Macapaka[5417] *** -[NSToolbar initWithCoder:]: selector not recognized [self = 0x12b1e140]
2008-08-11 10:20:01.276 Macapaka[5417] *** -[NSToolbar initWithCoder:]: selector not recognized [self = 0x12b1e140]

EDIT: I tried the debug version and it worked!
What did you change?
 
Please can you go into /Library/InputManagers/ and remove MagicMenuEnabler. It is a third party 'Haxie'. I suspect it's PPC-only code.

I don't call NSToolbar anywhere in the code, so I'm hoping that is a secondary effect of the first problem. If not I'll have to investigate ...
 
EDIT: I tried the debug version and it worked!
What did you change?

Jut saw your edit:

The debug version had two changes. They would only have any effect if it got beyond the [NSToolbar initWithCoder:] error you were seeing.

The first was to output some debug details that I thought could have been useful, but they would only be output later. They change no program logic.

The second was a byte order bug fix that should only affect operation on a PowerPC CPU. That is included in the new version I have now put in the first post. Since you said you are on an Intel Mac that should have had no effect for you.
 
Worked fine for me. Are there really no fpk's to unpack in the Warlords folder? I don't believe my own eyes.
 
The .fpk files are simply bundles of art files that were shipped with the original Civ4. They are not even compressed, so I'm really not sure why Firaxis did it. Perhaps they were just concerned about the number of files they were shipping? :hmm:

Warlords still uses the main bulk of the original files, and adds some art of its own. There are way fewer art files for these add-ons. Firaxis clearly didn't bother making them into .fpk files. Maybe they realised it wasn't buying them anything.
 
According to a number of modders at the C&C forum, paking files makes the game load/run faster, so people w/ a lot of art in their mods like to do it.

The only difference for the Civ4 software between having those files separate, or having them bundled is that it would probably have to maintain a lot more separate file handles in memory. Windows used to be notorious for running out of "resources" (aka file handles) when it had to keep track of lots of files, but I very much doubt if this is true of modern versions.
 
This tool has been working well for me for the .FPK files included in Civ, as well as the .FPK files in most mods. However every now and then I come across a mod's .FPK that looks like it is unpacking but when I look at the resulting files they all have a size of 0 kB.

The following appears in Console:

Code:
22/01/10 1:53:52 PM	[0x0-0x197197].uk.org.alanhart.Macapaka[5467]	*** error: can't allocate region
22/01/10 1:53:52 PM	[0x0-0x197197].uk.org.alanhart.Macapaka[5467]	*** set a breakpoint in malloc_error_break to debug
22/01/10 1:54:54 PM	[0x0-0x197197].uk.org.alanhart.Macapaka[5467]	Macapaka(5467,0xa08ec500) malloc: *** mmap(size=1388572672) failed (error code=12)
22/01/10 1:54:54 PM	[0x0-0x197197].uk.org.alanhart.Macapaka[5467]	*** error: can't allocate region
22/01/10 1:54:54 PM	[0x0-0x197197].uk.org.alanhart.Macapaka[5467]	*** set a breakpoint in malloc_error_break to debug
22/01/10 1:54:54 PM	Macapaka[5467]	Macapaka(5467,0xa08ec500) malloc: *** mmap(size=1388572672) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug

This particular .FPK is 1.39GB in size. I'm guessing this means there's not enough memory to unpack it? Unfortunately this happens regardless of trying to extract single files/folders or the entire thing.

Any way to get around this? I can't buy more memory as my MBP already has its maximum of 3GB and this happens even after a fresh restart of my system with no other applications running. On 10.6.3 if that matters, Intel MBP.
 
If you can provide a link to the .fpk file I'll take a look at it. I'm surprised it's trying to allocate 1.3 GBytes. Cocoa's API is supposed to use virtual mapping to read the file, and my code only reads the file data in small chunks. However ...
 
If you can provide a link to the .fpk file I'll take a look at it. I'm surprised it's trying to allocate 1.3 GBytes. Cocoa's API is supposed to use virtual mapping to read the file, and my code only reads the file data in small chunks. However ...

Thanks. I've PMed the link to you as it's not a public playtest.
 
Back
Top Bottom