Tutorial How to successfully pack and unpack .pak files

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

  1. kik4444

    kik4444 Existential Complex

    Oh, ok, thx, so apparently the new command is only slightly different: Between the packer.exe location & folder location you have to input a name.
     
  2. SexualRhinoceros

    SexualRhinoceros Existential Complex

    so what do I need to change in the OP?
     
  3. That has always been the case?
     
  4. Olxinos

    Olxinos Scruffy Nerf-Herder

    Not really, now it's "./asset_packer foobar source destination" whereas it was "./asset_packer source destination" before.
     
  5. I don't know about that... I don't ever remember my scripts only being 2 arguments for the packer. But then again, I haven't packed anything up in a long time, so I totally could be remembering incorrectly. What was the default name of the .pak before this "new format" if that was the case?
     
  6. Olxinos

    Olxinos Scruffy Nerf-Herder

    There wasn't any default name, it was "destination" in my latest post. Here are the usage help messages of both the "old" version (two days ago or before) and the new version of the asset_packer to clarify things:
    old
    Code:
    Usage: ./Starbound.app/Contents/MacOS/asset_packer [-i ignoreFile] [-s] [-d] <assets folder path> <output filename>
    ignoreFile expects a json map with a key containing a string list named: "globalIgnore"
    If server mode is enabled with -s then ignoreFile must also contain a string list named "serverIgnore"
    If -d is given, pak will be generated with a digest that must match from server to clientExample: { "globalIgnore" : [ "/ignore_file.config", "some.*regex[here]" ], "serverIgnore" : ["/sfx/irrelevantMusic.ogg"] }
    Exact paths are assumed to start with a /, all other strings are treated as regex.
    
    new
    Code:
    Usage: ./Starbound.app/Contents/MacOS/asset_packer [-i ignoreFile] [-s] [-d] <assets source name> <assets folder path> <output filename>
    ignoreFile expects a json map with a key containing a string list named: "globalIgnore"
    If server mode is enabled with -s then ignoreFile must also contain a string list named "serverIgnore"
    If -d is given, pak will be generated with a digest that must match from server to clientExample: { "globalIgnore" : [ "/ignore_file.config", "some.*regex[here]" ], "serverIgnore" : ["/sfx/irrelevantMusic.ogg"] }
    Exact paths are assumed to start with a /, all other strings are treated as regex.
    (well of course, replace "./Starbound.app/Contents/MacOS/asset_packer" with whatever argv[0] is, but that's not relevant here)

    The "foobar" in my latest post refers to the new <assets source name> which doesn't seem to change the output.
     
  7. I guess I was wrong then. :oops:
     
  8. Sketch2347

    Sketch2347 Phantasmal Quasar

    ok, so the batch file i created from Olxinos actually is packing the assets, buuuuut ive run into another error when i go to launch the game i get an error message and it wont let me load the game.
    What i actually am doing.

    1. unpack, i name unpacked assets test
    2. Editing Daggers.
    3.Editing malebody
    4.I use Olxinos batch file, the packed.pak goes to my actual asset folder i cut and paste into the ACTUAL asset folder and overwrite the initial one.
    5.Try to load game, get this error, its saying assets are missing? the packed fil gets moved to correct place but once i remove the original one it says that. HALP MY FACE!!!
     

    Attached Files:

    Last edited: Jan 30, 2015
  9. NO NO NO NO NO! Don't overwrite the original PAK! The ONLY reason you need to Pak is if you want your Mod to be compressed. You dont merge your modded assets with the original. Use the mod format.
     
  10. Sketch2347

    Sketch2347 Phantasmal Quasar

    to be honest, im a creature of habit, and i do see you saying this a lot on here, ive thought about it, i just edit the base assets and leave them. i fele like making a mod everytime i want to change something will be tedious, not to mention what do i do jsut take out, daggertier1 and humamale torso and put them in a separate folder? it just seems like this WAS easier. What do i do if i dont overwrite the PAK the original is there, i used to have my batch file automatically overwrite it everytime i would edit a something then just pack it back up again.
     
  11. And as a consequence, if you screw up, youve completely destroyed the game. Want to remove the changes you made? Better have the original pak saved or you have to re-download the game.

    Mods are easier. They are easy to make, easy to install, and easy to remove. AND, you dont have to wait 10 to 15 mins to repack after making a change. As I said earlier... the ONLY, and i mean ONLY reason that you should be re-packing is to compress your assets for distribution. And even then, you dont overwrite the vanilla assets.

    Not only are you corrupting your assets, but Steam will overwrite your changes each time there is an update to the pack. Good luck remembering your changes for each update.

    That's a habit you better break quickly.
     
  12. Sketch2347

    Sketch2347 Phantasmal Quasar

    Can i get a mod to replace the default textures like have it replace each tier of daggers, can i make a mod to edit 2 arms on a male body, i mean come on i see what you are saying and i need help but this is just silly i have to learn modding in the 2 hours i have to game and eat before sleep and work, this is infuriating its like waiting for stable plus just a little bit more tedious wok for my OCD.
    Please can you really believe that learning how to mod with limited time is easier than: copy tier 1 dagger, open in paint.net, overwrite dagger texture, pack and play. DONE, then beta sector, back to dagger file, insert old dagger 1 from backup file and replace dagger tier 2. Repeat waiting 5 mins while i get a drink is no biggie...To make mods for that seems counter productive, im a moron.
     
    Last edited: Jan 30, 2015
  13. Just duplicate the folder structure, drop in your images, add in a .modinfo and you're done.

    Say the image you want to replace is in
    assets/objects/testobject/image.png

    You would set it up as
    Mods/yourmod/objects/testobject/image.png

    Your modinfo file would be in the "yourmod" folder
     
  14. Sketch2347

    Sketch2347 Phantasmal Quasar

    So my mods would be:
    mods/knife/items/human/dagger/daggertier1
    mods/armsandlegs/humanoid/human/frontarms
    mods/legs?humanoid/human/malebody

    can all these go in one folder? do i have to make 3 mods? to overwrite once i get to tier 2 do i just rename dagger to tier 2? will crafting recips be the same? what is a mod info file? is it just the file that says Upbeat giraffe blah blah blah.
     
  15. They can all go inside the same mod folder. So Yes. Just match the paths.

    I can't do it for you as I'm in class with no computer... only a phone.
     
  16. AstralGhost

    AstralGhost Pangalactic Porcupine

    Yes, you can have it all in one mod if you want.
    However, if the functionality is different and you want to release the mod to others then it would be best to separate them. Since the only difference is requiring a very tiny modinfo file it shouldn't be a big deal to split up pieces that are changing unique things.
    Definitely keep things which are related to the same thing together in one mod, though.
     
  17. Sketch2347

    Sketch2347 Phantasmal Quasar

    ok last couple of questions, so that modinfo file, its like 4 lines right? is it completely case sensitive? can i copy any old generic one from a newer mod instead of writing my own? So below is me improvising i figure if im changing the textures of a body ill need some info? i also copied the file under the dagger texture so it crafts normally? right?
     

    Attached Files:

  18. AstralGhost

    AstralGhost Pangalactic Porcupine

    It's actually just one line required now. "name" is the only necessary field, the name of your mod.
    The other fields are just for reference for people who might use your mod, such as for example, listing your name and website so others can look inside and see who made that mod if they forget where they got it or something.

    You can indeed copy anyone else's modinfo file. It is just a regular text file with the extension .txt changed into .modinfo. As long as you change the name in the file from the other person's mod to your own you'll be fine.
     
  19. Post your log. You have a malformed JSON somewhere. The screenshot isn't telling me which file.

    I'm not trying to be rude here, but perhaps take a look over some of the tutorials for creating a mod in the meantime.
     
  20. Sketch2347

    Sketch2347 Phantasmal Quasar

    Hey guys got everything working wondering if for keepingthis thread in neat condition can we delete any messages we went back and forth with that you guys could see not helping others, or that already ahsnt been dealt with. Thank you Severedskuilz, you were indeed right it is WAY easier doing is the mod way, seriously im sorry for getting testy earlier you and your job you dont need that shit, and AstralGhost thank you for all that clarification you helped greatly, and a very special thanks to Olxinos for writing me a file that packs and to going all that trouble to figure out why it wasnt working, you guys have saved my sanity. THANK YOU ALL!!
     

Share This Page