Modding Discussion .Pak files What are they, how do they work?

Discussion in 'Starbound Modding' started by Whitlinger Doodle Do, Dec 19, 2013.

  1. Rainbow Dash

    Rainbow Dash Oxygen Tank

    well this is crappy i cant beleve they killed modding in 1 update =(
     
  2. Karull

    Karull Big Damn Hero

    They didn't kill modding at all...
     
    dante161 likes this.
  3. Rainbow Dash

    Rainbow Dash Oxygen Tank

    well then put all the modable things in a file that you cant open

    so... yah thats kinda killing it =p
     
  4. Wurmheart

    Wurmheart Subatomic Cosmonaut

    seconding rainbow thingy up there, i can't work on mods at all.
     
  5. dante161

    dante161 Title Not Found

    There is hundred of games which can be modded and have shittier assets file (proprietary compression etc). Here, Starbound dev just packed their assets into a single file without any compression or encryption. You will see soon enought tools to extract or read this file
     
  6. bluecollarart

    bluecollarart Big Damn Hero

    The extractor works, it's just finicky and hard to use. The ##starbound-modding people have it working, hopefully there will be a simple guide soon.
     
  7. Karull

    Karull Big Damn Hero

    No, it's not at all, lol. My personal interface modifications work perfectly fine, and I didn't even update them to be pak files.

    Just because you can't simply access Starbounds default assets so easily doesn't mean they killed off modding.
     
  8. Rainbow Dash

    Rainbow Dash Oxygen Tank

    ok fine moding isnt imposable

    its just 1000 times more anooying and irritating
    happy?

    how?
     
  9. Akimoto873

    Akimoto873 Tentacle Wrangler

    I got it to work.
    Just make sure your cmd is run as administrative; and type in the following:

    C:\YOUR\PATH\asset_unpacker.exe C:\YOUR\PATH\HERE\packed.pak C:\YOUR\PATH\HERE\TO\OUTPUT\
     
  10. Miwa

    Miwa Aquatic Astronaut

    The .pak files don't even work with mods, you HAVE to leave them unpacked.

    I just tried to get my own modifications to work again (which in return gave me a string-to-int conversion error on the "price" variables, what the fuck?) and when packed the game just completely ignores them, no matter where I place them. Meanwhile, leaving them like before in their respective directories in the mods folder loads them up just fine and everything works (aside from prices, for some stupid reason).
     
  11. Rainbow Dash

    Rainbow Dash Oxygen Tank

    yah i think its sopost to be like that

    the pak file just makes modding way harder (maybe to keep out people greffers or something idk)
     
  12. arrjaytea

    arrjaytea Sandwich Man

    This whole conversation is hilarious to me because OSX users have had to open the SB package in order to mod from the very beginning (i.e. before this update - it's how OSX applications are packaged to begin with).

    It's just somewhat satisfying to see all this complaining and think "Eh. That's just how you mod shit." :)
     
  13. bluecollarart

    bluecollarart Big Damn Hero

    Once you extract the files, the modding isn't any harder then before. It's a little harder, but it's really just a single step.

    The downside is it's a tiny bit more work for modders, but the upside is that it's easier for players to use and manage mods, since they only have to handle a single file.
     
    arrjaytea and Karull like this.
  14. arrjaytea

    arrjaytea Sandwich Man

    So out of curiosity - have you confirmed that packaging mods as .pak files works?

    I'd just read a couple of conflicting user reports, and as I try to clean up the SW mod today I'm looking at what the options/best practice is going to be moving forward.

    Hoping to get that step cleared up.
     
    AmazonValkyrie likes this.
  15. delegatevoid

    delegatevoid Poptop Tamer

    For those of you having trouble with the asset_unpacker.exe tool, here's what I did.

    I copied the packed.pak file to another location (for example in my case, to the p: \sb\ ) and then opened a new command window in the win32 folder of Starbound (shift + right click in the folder -> open new command window here)
    At first I tried this:

    Code:
    F:\SteamLibrary\SteamApps\common\Starbound\win32>asset_unpacker.exe p:\sb\packed.pak p:\sb\
    However, that didn't work because the output folder argument must not point to a folder that already exists, so I tried this instead:

    Code:
    F:\SteamLibrary\SteamApps\common\Starbound\win32>asset_unpacker.exe p:\sb\packed.pak p:\sb\test
    Which worked and created a new folder called "test" with all the assets in it.

    If you are getting ntdll.dll errors, for example a message that it could not be found, you might want to check your system for corrupted files.

    Update: It's nice they provide the packer and unpacker tools, but it would have been even better if they just told us
    what algorithm they're using to compress/pack and decompress/unpack the files. 7-zip doesn't seem to know what to do with it, so it's not any of the commonly used ones.
     
    Wurmheart and Front Row like this.
  16. Chalky

    Chalky Void-Bound Voyager

    The pak files are not compressed at all from what I can tell, open them in notepad and you can see there's no compression going on, just encoding of some data (such as file locations) it seems. Otherwise, all the file data is as-is from the original files.
     
    Last edited: Jan 26, 2014
  17. delegatevoid

    delegatevoid Poptop Tamer

    I see, that explains why "unpacking" is so damn fast.
    Well then either we have to figure out the file format (as in, does the file start with an index of all the data that is contained within it, or does it add a header with length and type information before the data of each individual file, etc) or they can give it to us.
    This info can then be used to build a set of easier tools to work with the assets. The alternative of course is simply invoking those two commands.
     
  18. Akimoto873

    Akimoto873 Tentacle Wrangler

    I've made a short video tutorial showing you how to unpack the assets. If you have any questions, or if there is anything you want explained, let me know ^^


    (HD processing)
     
    Front Row likes this.
  19. Reekuchan

    Reekuchan Space Hobo

    how do you put that all files back into that packed.pak file? could someone give me a example cmd command? thanks :D
     
  20. Front Row

    Front Row Void-Bound Voyager

    great stuff ! works for me .
    how to pack them again ? (to packed.pak)

    edit:
    Reekuchan was a bit faster ^^
     
    Reekuchan likes this.

Share This Page