Tutorial How to successfully pack and unpack .pak files

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

  1. RavenDust

    RavenDust Scruffy Nerf-Herder

    Put both pak and modinfo in a folder in mods/, and inside the modinfo change the "path" : "." to "path" : "nameofyourmod.pakfile.pak"

    |
    +-mods
    +-YourMod
    |-mod.pak
    |-mod.modinfo

    Should work.
     
    Last edited: Feb 1, 2014
  2. Asatrix

    Asatrix Guest

    Rhino I just Have to say I've been doing this manually and kind of enjoy doing so, since someone previously showed me how to run mods through .pak files its been a real blast I still use your provided codes to start it and then alter the codes following the pack unpack command to wherever I'm working from works like a dream. <3 great work glad you started this topic and have a gregarious understanding of such things compared to my near lack.
     
  3. NanoPi

    NanoPi Scruffy Nerf-Herder

    here's an example: I packed my copy of CreativeMode and the resulting CreativeMode folder contains 2 files:

    cm.pak
    CreativeMode.modinfo

    the contents of CreativeMode.modinfo was changed to this:

    Code:
    {
    "name" : "CreativeMode",
    "version" : "Beta v. Furious Koala",
    "path" : "cm.pak",
    "dependencies" : []
    }
     
  4. SexualRhinoceros

    SexualRhinoceros Existential Complex

    I added this to the OP as its pretty important info! Thanks!
     
    DarkerCloud likes this.
  5. Mechageno

    Mechageno Starship Captain

    Mr. Rhino the vigorous, you should add my noob friendly guide to your guide ^_^ a lot of people found it helpful :)
     
  6. Airavj

    Airavj Void-Bound Voyager

    Question: Why the hell do we have to do this?

    Previously, the assets were already unpacked, making use of those lovely folders filling the assets directory. Now those folders are all empty, dead, useless, and we have to go through the complicated procedure of unpacking and repacking files just to alter one line of code.

    I just wanted to remove meteors from a few biomes. Just a few lines of code to delete. But instead of the five minutes it should have taken, it took me nearly an hour. I wasted some time downloading and trying to use the GUI on the first post to unpack the files, but it didn't work, no matter what I did. Absolutely nothing happened every time. Finally I gave up, loaded the DOS prompt, started typing. It took me 3 tries to get all the long paths typed in there correctly, then another 10 minutes of waiting for all the assets to unpack. Then the 5 minutes of changing code, which should have been the only thing I needed to do in a game supposedly easy to mod (look at Dwarf Fortress for an example of how it should be done). Then I had to wait for it all to re-pack. And I'm still not even sure if my mod worked. If I made any mistakes, I have to do this all over again.

    So... why? Why did they do this? What purpose does it serve to have all the assets packed and require everyone to manually unpack them? Is it going to stay this way, or is there some planned future release where they will make modding easy again?
     
  7. RavenDust

    RavenDust Scruffy Nerf-Herder

    *Maybe* You should read the patch notes again.
    1. Most probably it's going to stay that way.
    2. They did it to improve loading times.
    If you're in the CMD, you can also cd to the path where Starbound resides and use relative instead of absolute paths (or just drag/drop the folder to the cmd, which will type the path for you.)

    Tl;dr:
    Read the patch notes
     
  8. TheGuillotine

    TheGuillotine And Do the MONKEY!

    THANK YOU SO MUCH! I have been searching everywhere!
     
  9. chrisgbk

    chrisgbk Subatomic Cosmonaut

    You don't need to repack. Just make a simple mod that either overwrites the whole file, or uses __modify to overwrite specific portions with what you want to change. It's super easy. See my post here for a simple example of modifying the matter manipulator: http://community.playstarbound.com/...-do-you-change-values-now.67870/#post-1748558
     
  10. Solar's Wrath

    Solar's Wrath Scruffy Nerf-Herder

    I try to unpack, i double click the unpacker and it open but then close instantly, i don't know what to do...
     
  11. RavenDust

    RavenDust Scruffy Nerf-Herder

     
    intervencion likes this.
  12. SexualRhinoceros

    SexualRhinoceros Existential Complex

    lol thanks dude :rofl:
     
    RavenDust likes this.
  13. Arucard

    Arucard Aquatic Astronaut

    -As stated already, it seems the main reason was to speed up the game loading and such, it does run a bit faster now, which is good whether you mod or not.

    -Copy/paste. No reason to type out that whole path, you might have to right click to paste it in, but yeah, you should really use that. :p
    (DF is a very different game obviously, and has been in development for well over 10 years, plus the file system is actually very similar, not to mention the fluid mechanics.)

    -This is just the modding process man, sometimes you'll have to jump in and out of the game a dozen times in 20 minutes, changing one line after another, adding a comma or parenthesis you missed. There's probably a simpler way, using _merge than repacking all that though.

    In the end this will be better than the previous method, at least you only have to unpack once and save that. Elder Scrolls was the same way and that even had an editor, but you still had to unpack the compressed files.
     
  14. Marxon

    Marxon Supernova

    I made batch files to automate the process, but what I want to know is why this file requires the asset_packer.exe in the first place. Did the devs do something with how it's built so editors like winrar and gcfscape can't read it?

    On another note, if you change the files too much and you start freezing when loading multiplayer, use sbdiagnose, get the value the check gives (not it's expected value), copy the value, open sb.checksum, and replace the first line's value with new #. Viola your game works.

    (Please excuse any errors as this was typed on a smartphone)
     
  15. Solar's Wrath

    Solar's Wrath Scruffy Nerf-Herder

    Well I did that and it still does the same thing. It appear and disappear instantly.
     
  16. intervencion

    intervencion Existential Complex

    Are you following all the steps of the tutorial?
     
  17. Solar's Wrath

    Solar's Wrath Scruffy Nerf-Herder

    Yes i am and even if i launch it as administrator, it just doesn't work. It still pop up and disappear instantly... And i need these sprites and i can't find them anywhere on the net... so i'm screwed...
     
  18. intervencion

    intervencion Existential Complex

    Did you open the MSDOS Terminal (aka cmd)?
     
  19. You are launching the program directly DONT DO THAT. Follow the instructions given through command prompt.
     
  20. Solar's Wrath

    Solar's Wrath Scruffy Nerf-Herder

    Well then i clearly don't understand how this work...
     

Share This Page