Tutorial How to successfully pack and unpack .pak files

Discussion in 'Starbound Modding' started by SexualRhinoceros, Jan 26, 2014.

  1. SexualRhinoceros

    SexualRhinoceros Existential Complex

    Haven't seen a tutorial and people keep asking so I figured I'd make one. This guide will assume you know what you're doing and are a competent computer user.

    [MODERATOR EDIT]
    For paking - the code is now simply
    Code:
    "<location of asset_packer.exe>" "<folder to pack>" "<location to place>filename.pak" 
    The "name" parameter has been removed.
    _________________________________________________________________________________
    Windows



    tutorial video by @aMannus

    Unpacking

    Step 1: Navigate to your Starbound directory and (using SHIFT + RIGHT CLICK) open command prompt
    [​IMG]
    Step 2: Type into Command Prompt "win32\asset_unpacker.exe", "assets\packed.pak", and the path to where you want to extract the stuff to.

    Mine looks like this
    Code:
    "win32\asset_unpacker.exe" "assets\packed.pak" "UnpackedAssets"

    Step 3:
    Wait until the process is finished. You'll know its finished when the command prompt brings up a new line for you to type on.

    Now your stuff is all unpacked!

    Packing

    This works almost exactly the same as unpacking.

    Step 1: Navigate to your Starbound directory and (using SHIFT + RIGHT CLICK) open command prompt
    [​IMG]
    Step 2: Type into Command Prompt "win32\asset_packer.exe", the name of what is being packed(this doesn't change anything about it), the path to the folder that you want packed, and the path to where you want the .pak to go
    Mine looks like this
    Code:
    "win32\asset_packer.exe"  "butts" "giraffe_storage\mods\MOD2PAC" "packedmod.pak"
    Step 3: Wait until the process is finished. You'll know its finished when the command prompt brings up a new line for you to type on.

    Now your stuff is all packed!



    Mac Packing/Unpacking

    if this doesn't work, follow this post below which is mostly the same as the Window's process but paths and syntax are different.



    Linux Packing/Unpacking

    The process is mostly the same as above but paths and syntax are different.
    If this doesn't work, the old method is put below!



    _____________________________________________________________________________________________
    Programs to do this for you

    Windows


    Mac

    -Needs done-

    Linux

    -Needs done-


    _____________________________________________________________________________________________
    Using .pak files with mods

     
    Last edited by a moderator: Jul 22, 2016
  2. Skizot

    Skizot Zero Gravity Genie

    mmmmm so nice.
     
  3. Bert John

    Bert John Big Damn Hero

    [if you place those peices of code into a .txt, save the txt, and convert the .txt to a .cmd, you can cut all the typing and just run the cmd files]
     
    Yoseiri, SnowDog67, PoeShmoe and 10 others like this.
  4. Patchumz

    Patchumz Pangalactic Porcupine

    For OS X, the location of the unpacker/packer is in the Starbound.app file. So you'll wanna do something like
    Code:
    cd ~/Library/Application\ Support/Steam/SteamApps/common/Starbound/
    Starbound.app/Contents/MacOS/asset_unpacker assets/packed.pak assets/test
     
    PXLForce, anew742, Julyuary and 2 others like this.
  5. Game³oid

    Game³oid Big Damn Hero

    what about creating mods? how would you do that the same as normal but .pak it
     
  6. ArunawayNERD

    ArunawayNERD Space Spelunker

    Thanks for the guide I was trying to figure it out.

    On thing though why not do this command first
    Code:
    cd C:\Program Files (x86)\Steam\SteamApps\common\Starbound
    then you only need to put this
    Code:
     "win32\asset_unpacker.exe" "assets\packed.pak" "assets\test"
    oh also I didn't need a command prompt run as the admistrator
     
  7. Shadow Wolf TJC

    Shadow Wolf TJC Spaceman Spiff

    Question: how do I start a command prompt? I'm using a Windows 7 operating system.

    Edit: And why is my username orange in this thread alone?
     
  8. SexualRhinoceros

    SexualRhinoceros Existential Complex

    the game currently doesn't scan for .pak files in the mod directory so just keep the mods how they were before
    Just being safe with the running as admin, also I was trying for the easiest approach. Explaining how to change directories would create 2 more steps:3
    click the big blue windows orb, search for "cmd" and open it.
     
    Hamsolito, NerArth and Annuschka like this.
  9. Darkestra

    Darkestra Void-Bound Voyager

    What do I do with the files after I unpack them >_> just wondering
     
  10. SexualRhinoceros

    SexualRhinoceros Existential Complex

    whatever you want! You can mod them, delete them, add files... ANYTHING :D
     
  11. RvLesh

    RvLesh Parsec Taste Tester

    Linux (assuming you're in the right Linux32/Linux64 dir)

    Code:
    ./asset_unpacker ../assets/packed.pak ../assets/unpacked
    
     
    Kirashi likes this.
  12. esporta

    esporta Yeah, You!

    Thank you but what about the linux?
     
  13. SexualRhinoceros

    SexualRhinoceros Existential Complex

    added!
     
  14. Shadow Wolf TJC

    Shadow Wolf TJC Spaceman Spiff

    Thanks for the help. It takes some time to unpack everything, but it works. I'll add a shortcut to this program in my Starbound folder for quicker finding.

    For those of you who want to know which "cmd.exe" you're supposed to open (since some of them may be trojans), go to "C:\Windows\System32\cmd.exe" (for Windows 7 users, though I'm not sure if it's different for Vista or XP users).
     
    SexualRhinoceros likes this.
  15. FluffyKraken

    FluffyKraken Intergalactic Tourist

    Can you create a .bat file, where when you edit something in your /test assets then you can create a new .pak with just only running the .bat?
    Thanks for the help anyway!
     
  16. AmazonValkyrie

    AmazonValkyrie Spaceman Spiff

    Everytime I try and unpack the files it says this in the command prompt:"Exception caught: I0Exception: remove error: Permission denied 0043F4F4 asset_unpacker.exe
    00413CEA asset_unpacker.exe
    004168E9 asset_unpacker.exe
    004B65E3 asset_unpacker.exe
    004010FD asset_unpacker.exe
    77099F72 ntdll.dll
    77099F5 ntdll.dll"

    Perhaps I'm doing something wrong? Any help is greatly appreciated.
     
  17. Magician Xy

    Magician Xy Ketchup Robot

    Assuming that I just downloaded a mod from the site in order to add it to my game, is there a reason to unpack a mod? Or can I just put it in my mods folder and have the game run normally?
     
  18. SexualRhinoceros

    SexualRhinoceros Existential Complex

    close command prompt and reopen it. I got errors like that too and that fixed it

    mods dont work with .pak files so you'd have to unpack it for it to work.
    In order for them to work, you'd have to manually add them to the bootstrap config.
     
  19. RvLesh

    RvLesh Parsec Taste Tester

    That "IOException: remove error" was what it was throwing when I attempted to unpack to an existing directory earlier.
     
  20. SexualRhinoceros

    SexualRhinoceros Existential Complex

    like I said, just reopen cmd and it should work as mine did.
     

Share This Page