Tutorial How to successfully pack and unpack .pak files

Discussion in 'Mod Releases & Modding Help' started by SexualRhinoceros, Jan 26, 2014.

Tutorial How to successfully pack and unpack .pak files

  1. SexualRhinoceros

    SexualRhinoceros Void-Bound Voyager

    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.
    Video Tutorial(Windows)

    _________________________________________________________________________________

    Unpacking(Windows)

    Step 1: Start Command Prompt as an administrator.

    Step 2:Find asset_unpacker.exe in the Starbound directory, being a Windows User, mine was in "C:\Program Files (x86)\Steam\SteamApps\common\Starbound\win32"

    Step 3: Find the path to your "packed.pak" file. I used the main file located in the assets folder ("C:\Program Files (x86)\Steam\SteamApps\common\Starbound\assets")

    Step 4: Type into Command Prompt the path to asset_unpacker.exe, the path to the packed.pak file, and the path to where you want to extract the stuff to.
    *note* The path to where you extract it to MUST point to a non existing folder or it'll error out on you.
    Mine looks like this
    Code:
    "C:\Program Files (x86)\Steam\SteamApps\common\Starbound\win32\asset_unpacker.exe" "C:\Program Files (x86)\Steam\SteamApps\common\Starbound\assets\packed.pak" "C:\Program Files (x86)\Steam\SteamApps\common\Starbound\assets\test"
    Now your stuff is all unpacked!

    Packing(Windows)
    This works almost exactly the same as unpacking.

    Step 1: Start Command Prompt as an administrator.

    Step 2:Find asset_packer.exe in the Starbound directory, being a Windows User, mine was in "C:\Program Files (x86)\Steam\SteamApps\common\Starbound\win32"

    Step 3: Find the path to the directory where you want to create a packed.pak file from. I used the directory from the unpacking tutorial ("C:\Program Files (x86)\Steam\SteamApps\common\Starbound\assets\test")

    Step 4: Type into Command Prompt the path to asset_packer.exe, the path to the directory, and the path to where you want the new packed.pak file to go to along with its name. Mine looks like this
    Code:
    "C:\Program Files (x86)\Steam\SteamApps\common\Starbound\win32\asset_packer.exe" "C:\Program Files (x86)\Steam\SteamApps\common\Starbound\assets\test" "C:\Program Files (x86)\Steam\SteamApps\common\Starbound\assets\test\packed.pak"
    Now your stuff is all packed!
    _____________________________________________________________________________________________

    Packing/Unpacking(Mac)
    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.
    _____________________________________________________________________________________________
    Packing/Unpacking(Linux)

    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
    Show Spoiler

    Ran a VirusTotal scan and it found nothing so its clean!

    Mac
    Show Spoiler

    -Needs done-

    Linux
    Show Spoiler

    -Needs done-

    _____________________________________________________________________________________________

    Using .pak files with mods
    Show Spoiler

      Last edited: Mar 16, 2014
    • Skizot

      Skizot Space Penguin Leader

      mmmmm so nice.
      • Bert John

        Bert John Starship Captain

        [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]
          Ruko, Daimoth, Cgeta and 6 others like this.
        • Patchumz

          Patchumz Big Damn Hero

          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.
          • Game³oid

            Game³oid Sandwich Man

            what about creating mods? how would you do that the same as normal but .pak it
            • 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
              • Shadow Wolf TJC

                Shadow Wolf TJC Big Damn Hero

                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?
                • SexualRhinoceros

                  SexualRhinoceros Void-Bound Voyager

                  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.
                    NerArth and Annuschka like this.
                  • Darkestra

                    Darkestra Astral Cartographer

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

                      SexualRhinoceros Void-Bound Voyager

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

                        RvLesh Cosmic Narwhal

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

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

                          esporta Yeah, you!

                          Thank you but what about the linux?
                          • SexualRhinoceros

                            SexualRhinoceros Void-Bound Voyager

                            added!
                            • Shadow Wolf TJC

                              Shadow Wolf TJC Big Damn Hero

                              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.
                              • 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!
                                • AmazonValkyrie

                                  AmazonValkyrie Big Damn Hero

                                  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.
                                  • Magician Xy

                                    Magician Xy Pangalactic Porcupine

                                    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?
                                    • SexualRhinoceros

                                      SexualRhinoceros Void-Bound Voyager

                                      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.
                                      • RvLesh

                                        RvLesh Cosmic Narwhal

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

                                          SexualRhinoceros Void-Bound Voyager

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

                                          Share This Page