1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Mac Extractor for Assets .fpk files

Discussion in 'Civ4 - Macintosh' started by AlanH, Apr 30, 2008.

  1. AlanH

    AlanH Mac addict, php monkey Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    29,102
    Gender:
    Male
    Location:
    England
    I've replaced he download link in the first post with one to version 1.3.4.

    Here is my test sequence for this version:

    1. I unpacked the fpk files from History Rewritten using PakBuild, and using using Macapaka.

    2. I used BBEdit's Compare Folders option to look for differences between the two expanded Art folders. BBEdit said the two folders were identical.

    3. I used Macapaka to pack new versions of the five fpk files. I compared their sizes in the Finder, and all but one were identical in size to the originals. Macapaka's HR_Structures.fpk was 27 bytes smaller for some reason.

    4. I used Macapaka to unpack the five new fpk files it had created, and compared the new unpacked folder with the original. They were identical.

    5. I replaced the five fpk files in History Rewritten with the new ones created by Macapaka, and installed the mod in my Windows BtS. It loaded and ran and I was able to start a new game.

    I think this version of Macapaka works, at least to the extent verified by the above test sequence.
     
  2. Xyth

    Xyth History Rewritten

    Joined:
    Jul 14, 2004
    Messages:
    3,993
    Location:
    Aotearoa
    Finally had some time to test this properly. Everything I tried seems to be working as it should :)
     
  3. AlanH

    AlanH Mac addict, php monkey Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    29,102
    Gender:
    Male
    Location:
    England
    Thanks for your feedback. I'm relieved to hear Macapaka is improving.

    There are two issues that I am still working on:

    1. Double counted files.
    If you select a folder, and then ALSO select a subfolder or file within it, you will see the file count and size values increase. This is because the subfolder/file is double counted, both as a member of the higher level folder and in its own right. You can triple select a file by highlighting three folders in its hierarchy, and so on.

    This is mainly cosmetic when you are expanding a .FPK file. Each selected file is expanded into its destination folder, so the same file may be selected, and expanded, more than once. However, each copy overwrites the previously expanded one, so you only end up with one copy.

    But ... when packing a folder, any multiply-selected file will end up as multiple copies within the .FPK file. The packed file will be bigger than it needs to be, but it might also confuse software that reads it.

    2. Performance
    The current version of Macapaka takes a little while to open a large folder of source files, such as the complete unpacked assets file set for History Rewritten. I have optimised this process while I was fixing issue #1.

    I have a new fixed version, which just needs some testing before I release it, and I'll try to do so within the next week. Meanwhile, please avoid selecting items more than once when selecting a set of files to pack.
     
  4. AlanH

    AlanH Mac addict, php monkey Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    29,102
    Gender:
    Male
    Location:
    England
    Version 1.3.5 uploaded. See first post.
     
  5. Jarlaxe Baenre

    Jarlaxe Baenre Chieftain

    Joined:
    Feb 17, 2010
    Messages:
    1,940
    Location:
    Calgary, Alberta, Canada
    1.3.5 link is broken.
     
  6. AlanH

    AlanH Mac addict, php monkey Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    29,102
    Gender:
    Male
    Location:
    England
    Thx ... mended.
     
  7. AlanH

    AlanH Mac addict, php monkey Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    29,102
    Gender:
    Male
    Location:
    England
    Version 2.0.0 now released. See first post for a download link. No feature changes for Civ4, but this one can unpack and pack Civ5 .fpk files.
     
  8. Xyth

    Xyth History Rewritten

    Joined:
    Jul 14, 2004
    Messages:
    3,993
    Location:
    Aotearoa
    Good work! I still haven't decided if I want to do anything with Civ5 yet and currently don't have it installed, but if I do I'll let you know if I run into any issues.
     
  9. AlanH

    AlanH Mac addict, php monkey Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    29,102
    Gender:
    Male
    Location:
    England
    Best of luck! I still haven't succeeded in loading a mod into Mac Civ5 yet.
     
  10. Xyth

    Xyth History Rewritten

    Joined:
    Jul 14, 2004
    Messages:
    3,993
    Location:
    Aotearoa
    I'm pretty sure mods are completely disabled until the first patch, I seem to recall RickB mentioning something along those lines in one of his posts.
     
  11. AlanH

    AlanH Mac addict, php monkey Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    29,102
    Gender:
    Male
    Location:
    England
    Looks like it. I tried enabling the main menu Mods option in the .lua script, but that doesn't seem to be enough.
     
  12. J450N

    J450N Chieftain

    Joined:
    Feb 15, 2011
    Messages:
    10
    Location:
    UK
    Hi,

    I'm having a bit of an issue in the sense that nothing seems to happen when I File>Open FPK File in Macapaka 2.0.0

    I have tried this on two seperate computers, and the only difference is that my MacBook gives the Error message "could not open..."

    I did notice that in post #11 the thumbnail you uploaded showed that your Asset FPKs have "fpk package" as their Kind whereas mine are listed as Folders, despite the fact that they have .fpk file extensions.

    What am I doing wrong?

    Thanks in advance for any assistance offered.
     

    Attached Files:

  13. AlanH

    AlanH Mac addict, php monkey Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    29,102
    Gender:
    Male
    Location:
    England
    Hi, welcome :wavey:

    Are you sure that those .fpk files are files? They look a lot like folders to me. What happens if you click the disclosure triangles next to them? A folder can have any name, and it can certainly have '.fpk' tacked on the end.
     
  14. J450N

    J450N Chieftain

    Joined:
    Feb 15, 2011
    Messages:
    10
    Location:
    UK
    They are located in the assets folder where .fpk's should be; but the computer says they are folders, they act like folders, yet when opened there's nothing in them.

    I have searched the harddrive for all files with ".fpk", and those folders are the only items found.
     
  15. AlanH

    AlanH Mac addict, php monkey Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    29,102
    Gender:
    Male
    Location:
    England
    Then they are dummies. How did you install the copy of Civ4 they are in? What folder path are they in?

    [UPDATE] Ahah! I bet they are in ~/Documents/Civilization IV Beyond the Sword/assets/. That's not where you need to look. Try /Applications/Civilization IV/assets/.
     
  16. J450N

    J450N Chieftain

    Joined:
    Feb 15, 2011
    Messages:
    10
    Location:
    UK
    You're right, it was in ~/Docs.

    I installed Civ via Steam, and in Applications all I have is a Steam App, and nothing that even resembles CivIV/assets.
     
  17. AlanH

    AlanH Mac addict, php monkey Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    29,102
    Gender:
    Male
    Location:
    England
    Steam is an important piece of the puzzle. Look in ~/Library/Application Support/Steam/SteamApps/common/ You should find your Civ4 application folder in there, complete with its assets and other key resources.

    That's in the Library folder in your Home folder, not the top level Library folder on the system hard drive.
     
  18. J450N

    J450N Chieftain

    Joined:
    Feb 15, 2011
    Messages:
    10
    Location:
    UK
    *facepalm* I should have figured that myself really, but sometimes you just hit a brick wall face first.

    Thanks a lot for your assistance.
     
  19. AlanH

    AlanH Mac addict, php monkey Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    29,102
    Gender:
    Male
    Location:
    England
    Our FAQ thread is your friend. There's a specific entry explaining where the Steam apps are installed.
     
  20. Ninja Flick

    Ninja Flick Casual Civver

    Joined:
    Dec 18, 2006
    Messages:
    51
    Location:
    California
    Just wanted to send a big 'Thank You!' your way, Alan.

    And not just for this program (which I used today for the first time), but for all of your help to us Mac-users. I think I've lost count of how many times you've improved my Civ-playing experience.
     

Share This Page