View Full Version : Mac Extractor for Assets .fpk files
AlanH Apr 30, 2008, 08:34 PM I have put together a Mac OS X extraction utility for the Assets archives installed with Civ4.
Macapaka may be of interest to mod makers who don't have access to a Windows system to run the PakBuild utility provided by Firaxis. It only does file extraction, and will not rebuild .fpk files, but that should be enough to allow modders to get at the original Art content installed in Civ4.
Download version 1.1.1 here (http://gotm.civfanatics.net/civ4games/Macapaka.dmg), and please let me know if it works for you. There's a help file in the disk image, and that is also the built-in Help information, but it should be pretty straightforward to use.
[UPDATED: May 2, 2008] Version 1.1.0 released at the above link. Now compatible with Tiger, and tested on PowerPC G4.
[UPDATED: Aug 11, 2008] Version 1.1.1 released at the above link to fix a byte order bug on PowerPC Macs.
Welnic May 02, 2008, 12:27 PM I tried this on a dual G5 tower and it seemed to work fine.
AlanH May 02, 2008, 12:42 PM Thx for the feedback. Was it any use to you?
Note that it will probably not run in Panther or earlier versions of OS X, as there are some items in the user interface that were not introduced until Tiger. If this is a problem for anyone. please let me know.
dojoboy May 02, 2008, 03:58 PM Very cool Alan. I will extract some files tomorrow. :D
kkmo May 29, 2008, 01:14 AM Alan, just noticed this. This is amazing. Easy to use and works perfectly for me, even on my MacBook. :D Thanks very much.
Flintlock1415 Jun 01, 2008, 05:22 PM The link isn't working for me! Why??????
AlanH Jun 01, 2008, 05:49 PM Because the file server is down.
Flintlock1415 Jul 26, 2008, 08:44 PM I think somehow I corrupted my art assets files in an earlier attempt to unpak them.
Could anyone post a copy of their files so that I could use them?
AlanH Jul 27, 2008, 06:11 AM They should be on your DVD.
Flintlock1415 Jul 27, 2008, 11:20 AM I tried redownloading my game files, but the art files still wont show up in the application.
AlanH Jul 27, 2008, 12:12 PM On the DVD there's a folder called Civilization IV. That's the one you copy to your hard drive when you install Civ4. Inside that folder is a folder called Assets. Inside Assets are four files called:
Assets0.fpk
Assets1.fpk
Assets2.fpk
Assets3.fpk
Here is a screenshot of my DVD contents ...
Flintlock1415 Jul 27, 2008, 05:29 PM I see the files, but when I go to macapaka and select to open the asset0.fpk file, nothing happens.
AlanH Jul 27, 2008, 06:31 PM 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?
Flintlock1415 Jul 28, 2008, 09:04 AM okay, I found it. thanks for all the help
AlanH Jul 28, 2008, 09:21 AM Glad to hear you are OK. What should I do to make the Readme clearer?
Flintlock1415 Jul 29, 2008, 07:58 AM tell people to check the art folder
AlanH Jul 29, 2008, 12:39 PM Erm! The following is Paragraph 3 of the "Running Macapaka" section of the Readme/Help info:
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.
I'm not sure how I can make that any clearer.
Flintlock1415 Aug 09, 2008, 11:36 PM I feel so stupid...
After deciding to try adding a new unit I looked at the files in the art folder and there seems to be numerous missing files. I did, well attempted, to unpak all of the art asset files.
Maybe there is some incompatability issues as I am running An intel imac on running tiger.
AlanH Aug 10, 2008, 05:49 AM What do you mean by "attempted to unpak"? Did the extractor fail?
Which assets files do you think are missing? The assetsX.fpk files only contain a basic set of art assets. There are some extra units in Civ4/Assets/Art/Units/ and Civ4/Warlords/Assets/Art/Units/.
Flintlock1415 Aug 10, 2008, 10:48 AM It must have because there are only some of the art files under the civ4 Art folder and the warlords art folder.
AlanH Aug 10, 2008, 11:16 AM 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?
Flintlock1415 Aug 10, 2008, 03:06 PM Thats the thing, when I open macapaka and open the files, nothing happens. I guess I thought once you open the files they would appear under the art folder.
AlanH Aug 10, 2008, 05:40 PM You clearly haven't read the Readme/Help that's included in Macapaka!
Here is the part about Running Macapaka:
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.
Flintlock1415 Aug 10, 2008, 08:37 PM When I go to the file - open menu and select one of the Assets.fpk files, nothing happens. I dont get the window with the expandable listing.
AlanH Aug 11, 2008, 02:34 AM 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:
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?
Flintlock1415 Aug 11, 2008, 08:18 AM Macapaka version 1.1.0
produced and tested by Alan Hart
The help window shows up as it should
AlanH Aug 11, 2008, 09:50 AM 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
Flintlock1415 Aug 11, 2008, 10:31 AM 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?
AlanH Aug 11, 2008, 10:50 AM 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 ...
Flintlock1415 Aug 11, 2008, 02:10 PM Okay. Both of the errors are gone now.
AlanH Aug 11, 2008, 02:17 PM Okay. Both of the errors are gone now.
Great!
So can you extract the files now?
Flintlock1415 Aug 11, 2008, 03:50 PM Yes it worked perfectly :banana:
AlanH Aug 11, 2008, 04:18 PM 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.
|
|