Tutorial How to successfully pack and unpack .pak files

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

  1. kindlol234

    kindlol234 Void-Bound Voyager

    My command prompt doesnt recognize win32\asset_unpacker.exe as a runable program ect., can anyone help me out?

    Im running Windows 10
     
  2. Iaeyan Elyuex

    Iaeyan Elyuex Cosmic Narwhal

    Okay, but where do I get asset_packer.exe? I'm looking all over the forums trying to find it.

    EDIT: Okay, I got it to do something, but it did this.
    [​IMG]
     
    Last edited: Jan 8, 2017
  3. franki786

    franki786 Yeah, You!

    I tried completing this using the included "unpacker.bat" file, but an error shows up saying, "ERROR: Timed out waiting for extraction to finish. Press any key to continue..."
    I then run the batch file again, and this time, it says that the extraction is successfully completed. If so, where are the files extracted to?
     
  4. Cyel

    Cyel Scruffy Nerf-Herder

    ^They are extracted in the path you gave the tool

    ===
    Just in case, asset_(un)packer.exe can be found in the starbound directory, in the win64 directory

    I was looking at Windows' batch stuff and found out that it's giving the filenames of drag'n'dropped files as arguments: so here's an easy-peasy .bat file to unpack a .pak by simple drag'n'drop (but it requires the .exe, the .bat and the mod files to be in the same directory)
    Code:
    asset_unpacker.exe %1 "%~n1"
    "%1" means "parameter 1", and "%~n1" means "parameter 1, but only the name"

    And here it is for packing:
    Code:
    asset_packer.exe %1 %1.pak

    edit: wellrip this thing seems way more advanced and useful than my basic script http://community.playstarbound.com/threads/all-versions-win-linux-modpackhelper.92473
     
    Last edited: Feb 10, 2017
  5. Raging_Bees

    Raging_Bees Space Hobo

    I typed it all right, but my access is denied?
     
  6. Minerscool

    Minerscool Scruffy Nerf-Herder

    Well, I wrote this:
    "C:\Program Files (x86)\Steam\steamapps\common\Starbound\win32\asset_unpaker.exe" "C:\Program Files (x86)\Steam\steamapps\common\Starbound\assets\packed.pak" "C:\Users\Victor\Desktop\Unpacked Starbound\UnpackedStarbound1"
    But it says that asset_unpaker.exe is not an internal or external program and is not an executable program :wut:
    Si I just can't unpack mah Starbound...
     
  7. xaliber

    xaliber Scruffy Nerf-Herder

    No, that won't work. You have to make sure the command prompt is in your Starbound directory first.

    There are two ways to achieve this:

    First method:
    1. Open command prompt. Type cd .. twice, so you will be located in the drive C:\ root folder.

      [​IMG]

    2. Type the directory of your Starbound folder, with the word cd in front of it (cd means "change directory"). In this case it's cd Program Files (x86)\Steam\steamapps\common\Starbound

      [​IMG]

    3. The command prompt is now in Starbound's directory. So it executes command from this directory. Type "win32\asset_unpacker.exe" "assets\packed.pak" "assets\unpacked". You don't need the C:\Program Files (x86)\blabla... because it's executed from Starbound directory.

      [​IMG]

    4. Done.




    or, you can use the

    Second/alternative method:

    1. Open your Starbound folder. Shift+right click in there. Choose Open command window here.

      [​IMG]
    2. You start directly in Program Files (x86)\Steam\steamapps\common\Starbound. Type "win32\asset_unpacker.exe" "assets\packed.pak" "assets\unpacked".

      [​IMG]

    3. Done.
     
  8. xaliber

    xaliber Scruffy Nerf-Herder

    Just realized this. You wrote asset_unpaker, not asset_unpacker (notice the missing letter c). Of course it won't work. :p
     
  9. Minerscool

    Minerscool Scruffy Nerf-Herder

    Haha... yeah...

    Anyway, many thanks mate. It worked :D
    And I suppose that if I want to pack it I have to do the same but with the packer.exe ?
     
  10. xaliber

    xaliber Scruffy Nerf-Herder

    Good to hear!

    Yup, more or less similar. It should be "win32\asset_packer.exe" "assets\unpacked" "assets\packed.pak" (though there is no reason to pack the vanilla assets)

    Or, if you mean you want to pack your mod files, it should be "win32\asset_packer.exe" "mods\YourModFolder" "mods\YourMod.pak"

    I never pack my mods though. Because, if you want to upload it to Steam, you don't need to pack them (Steam will do it when you upload the mod folder). Meanwhile, if you want to upload it here (in the Chucklefish forums), IMO it's better to leave it unpacked. Compress it with WinZIP instead. So other mod authors can learn/can make compatibilities with your mod easier.

    In case you haven't read the modding ebook, make sure to read it here: http://community.playstarbound.com/resources/unofficial-modding-ebook-2-0.2930/ It helps a lot.
     
  11. Minerscool

    Minerscool Scruffy Nerf-Herder

    Let's say that I would like to modify the texture of a tomb, and would like to see it in-game :wut:
     
  12. xaliber

    xaliber Scruffy Nerf-Herder

    To modify the texture of a tomb, you don't edit the vanilla asset directly. You make a new file that replaces (or patches) the vanilla asset in your /mods/ folder. :)

    If you modify the vanilla asset directly, it will be replaced when the game gets updated. We unpack the assets not to modify it, but to understand which files are located in which folder. The proper way to "modify" vanilla asset is to make a new file - a.k.a. mod it.

    I've written about it before: http://community.playstarbound.com/threads/starbound-the-painful-lisa-music-mod.130784/#post-3123031

    Or you can read the modding ebook for more complete explanation. Don't worry, it's short and easy to understand. http://community.playstarbound.com/resources/unofficial-modding-ebook-2-0.2930/
     
  13. Minerscool

    Minerscool Scruffy Nerf-Herder

    Aye thanks, indeed that's very well explained but what about the .frames ? Does it matter ? I just changed the tombstone9icon and the tombstone9 ...
     
  14. xaliber

    xaliber Scruffy Nerf-Herder

    That applies to all files in Starbound modding, be it .frames, .icon, .monstertype, .object, .png, .ogg, ... anything. (Btw, every files that are not .lua, image graphics, or sound files are actually JSON files).

    If you edit the vanilla assets directly, it will be replaced by newer files when the game updated. That's why we put modified files in the /mods/ folder, because files in /mods/ folder are located in a specialized folder and loaded after the vanilla asset.

    Please read the modding ebook, most of the questions are already answered there. :)
     
  15. Minerscool

    Minerscool Scruffy Nerf-Herder

    In fact when I wrote this I already made this in a mod, anyway it works now. But there's another problem (don't hurt me, pls): https://gfycat.com/ConventionalForsakenDodobird
    :wut:
    (Sorry for asking you all of that :( )
     
  16. xaliber

    xaliber Scruffy Nerf-Herder

    Haha no worries, feel free to ask, but the modding ebook explains it better than me so it's just better to read it there. :p

    Now as for your other problem, it seems there's something wrong with the Mod Uploader tool. I'm not sure how to fix it... but from Googling I found this solution: http://stackoverflow.com/a/20496175/651170 Apparently there's a fault in your Starbound installation, so to fix it you need to download libEGL.dll and place it in \Starbound\win64\ folder.

    I don't know how safe it is to download .dll files in the net so I attached my .dll for you. You can download here http://www.mediafire.com/file/uffhux283v0nyno/libEGL.dll

    Or, if you want to be safe, perhaps you need to reinstall Starbound.
     
  17. Minerscool

    Minerscool Scruffy Nerf-Herder

    Thank you so much,
    I know what to do now...
    http://imgur.com/a/7z9M5
     
  18. Minerscool

    Minerscool Scruffy Nerf-Herder

    Well, thanks for all, whenever you would like to see my "mod". Just search "Clipchip's tombstone" on Starbound's steam workshop.
    This mod has a very sad story... Anyway thanks for all, mate. You deserve some art request. So what do you want ? (People usually ask me their Sb character but ask what ever you want :) ) Here's my DeviantArt, if you wanna see what it's kinda gonna look like :http://minerscool.deviantart.com/ :p
     
  19. Tonko

    Tonko Subatomic Cosmonaut

    I just can't unpack it on Linux... It says there is no such file or directory
     
  20. xaliber

    xaliber Scruffy Nerf-Herder

    Glad to hear it's working. I'm sorry to hear about your friend though.

    As for art request... well, I've been seeing your build in Reddit and I love those. How about a collaboration instead? :) If you're interested maybe I can shoot you a PM.

    Not a Linux user, sorry! Maybe someone else can help you.
     

Share This Page