PSARC Decompile tool

Mods chevron_right chevron_right PSARC Decompile tool
  • descriptionDescription

    ^^^ Tutorial above ^^^

    This is used to decompile the .PAK files located within the game. They are actually just renamed .PSARC files. More documentation about these kinds of files can be found HERE.

     

    Below are the params for using this utility. Remember, its command line, and a modders resource. You CAN mess up your game with this.

    • usage:
      psarc verb [options] [file...]
      psarc --xml=XMLFILE
    • verbs:
      create Create an archive. (default)
      extract Extract contents of an existing archive.
      list List contents of an existing archive.
      dump Print detailed info about archive for unit testing.
      verify Verify an existing archive's structural integrity and
      ensure that all files can be decompressed.
      dtd Display a DTD describing psarc's XML input syntax.
    • general options:
      -h, --help Show this help message and exit.
      --version Display version and exit.
      -d, --debug Debug: Show debug messages.
      -v, --verbose Verbose: Show additional progress. (default)
      -q, --quiet Quiet: Don't show any progress.
      -y, --overwrite Overwrite existing files when creating/extracting.
      --xml=XMLFILE XML list of actions to perform.
    • create options:
      -oFILE, --output=FILE Archive filename to create.
      -IINPUTFILE, --inputfile=INPUTFILE
      Inputfile listing files to archive. Consider
      --xml instead, which gives you more control.
      -m, --mself Create a PSARC-MSELF hybrid file for PS3, which can contain
      encrypted special files like SDATA, SPRX, and SPU SELF.
    • --zlib Use zlib when compressing. (default)
      --lzma Use LZMA when compressing. (usually for PS3 PSN)
      --level=N Compression quality. 1 is fastest, 9 is best. (default = 9)
      -N, --nocompress Store all files uncompressed in the archive.
      -bBS, --blocksize=BS Use blocks of size BS. (default = 64KiB)
      -jJOBS, --jobs=JOBS Compression threads to run at a time. (default = number of CPUs)
    • -sREGEX, --strip=REGEX Perl-compatible regex specifying a prefix to strip
      from the pathnames stored in the archive. This may be
      specified more than once. (default = current dir)
      -S, --strip-all Strip all paths from files stored in the archive.
      -a, --absolute Make the paths within the archive absolute.
      -R, --relative Make the paths within the archive relative. (default)
      -i, --ignorecase Make the archive directory case-insensitive.
      --exclude=WILDCARD Wildcard specifying files to exclude.
      --skip-missing-files If set then ignore it when a file cannot be found.
      --mergedups Compare the content of all files, and merge identical
      files so that only one copy of the data is included.
    • extract options:
      --input=FILE Archive to extract files from. (default is first file argument)
      --to=DIRECTORY Directory to write extracted files to. (default is current directory)
  • speaker_notesInstallation

    No installation, its a command line tool.

     

    Recompiling would be done with a command like this:

    psarc.exe create -a --skip-missing-files --inputfile=input.txt --output=SOMEPSARC.PSARC

     

    Whereas input defines the files that are going to be compressed (IE the output when decompressing without numbers):

    MATERIALS/ATMOSPHERE.MATERIAL.MBIN
    MATERIALS/BACKGROUNDFROMTEXTURE.MATERIAL.MBIN
    MATERIALS/BASIC.MATERIAL.MBIN
    MATERIALS/BUILDBLOCK.MATERIAL.MBIN
    MATERIALS/BUILDREMOVEBLOCK.MATERIAL.MBIN
    MATERIALS/CLOUD.MATERIAL.MBIN
    MATERIALS/COMBINEDIFFUSEMAPS.MATERIAL.MBIN
    MATERIALS/COMBINEMAPS.MATERIAL.MBIN
    MATERIALS/COMPUTENOISE.MATERIAL.MBIN
    MATERIALS/DEBUG.MATERIAL.MBIN
    MATERIALS/DEFAULT.MATERIAL.MBIN
    MATERIALS/DEPTHOFFIELD.MATERIAL.MBIN
    MATERIALS/GALACTICFSFX.MATERIAL.MBIN
    MATERIALS/GENMIPMAP.MATERIAL.MBIN
    MATERIALS/IMAGEBASEDLIGHTING.MATERIAL.MBIN
    MATERIALS/IMMEDIATEMODE.MATERIAL.MBIN
    MATERIALS/LENSFLARE.MATERIAL.MBIN
    MATERIALS/LIGHT.MATERIAL.MBIN
    MATERIALS/LINE3D.MATERIAL.MBIN
    MATERIALS/NANOVG.MATERIAL.MBIN
    MATERIALS/POSTPROCESS.MATERIAL.MBIN
    MATERIALS/PSTREAM.MATERIAL.MBIN
    MATERIALS/RENDERSCREEN.MATERIAL.MBIN
    MATERIALS/SKY.MATERIAL.MBIN
    MATERIALS/SPACEMAPOBJECT.MATERIAL.MBIN
    MATERIALS/SPACEMAPOBJECTVERTEXCOLOURS.MATERIAL.MBIN
    MATERIALS/TARGETSCREENBACKGROUND.MATERIAL.MBIN
    MATERIALS/TRANSPARENTSPACEMAPOBJECT.MATERIAL.MBIN
    MATERIALS/UI.MATERIAL.MBIN
    MATERIALS/WATER.MATERIAL.MBIN
    MODELS/COMMON/CHARACTERS/ASTRONAUT/ASTRONAUT01/BODYMAT.MATERIAL.MBIN
    MODELS/COMMON/CHARACTERS/ASTRONAUT/ASTRONAUT01/LASERSWORD.MATERIAL.MBIN
    MODELS/COMMON/CHARACTERS/ASTRONAUT/ASTRONAUT01/PACKMAT.MATERIAL.MBIN
    MODELS/COMMON/CHARACTERS/ASTRONAUT/ASTRONAUT01/PHONG17.MATERIAL.MBIN
    MODELS/COMMON/CHARACTERS/ASTRONAUT/ASTRONAUT01/PHONG18.MATERIAL.MBIN
    MODELS/COMMON/CHARACTERS/ASTRONAUT/HELMETHUD/INTERIORMAT.MATERIAL.MBIN
    MODELS/COMMON/CHARACTERS/ASTRONAUT/HUDELEMENTS/HEALTHBAR/HEALTHBARMAT.MATERIAL.MBIN
    MODELS/COMMON/CHARACTERS/ASTRONAUT/HUDELEMENTS/HEALTHBAR/HEALTHMAT.MATERIAL.MBIN
    MODELS/COMMON/CHARACTERS/ASTRONAUT/HUDELEMENTS/HEALTHBAR/HUDLINESMAT.MATERIAL.MBIN
    MODELS/COMMON/CHARACTERS/ASTRONAUT/HUDELEMENTS/RESOURCEBAR/HUDLINESMAT.MATERIAL.MBIN
    MODELS/COMMON/CHARACTERS/ASTRONAUT/HUDELEMENTS/RESOURCEBAR/RESOURCEMAT.MATERIAL.MBIN
    MODELS/COMMON/CHARACTERS/BACKPACK/BACKPACK_MAT.MATERIAL.MBIN
    MODELS/COMMON/CHARACTERS/BACKPACK_HOLOGRAM/SCANLINES_MAT.MATERIAL.MBIN
    MODELS/COMMON/CHARACTERS/BACKPACK_HOLOGRAM/TRANSBACKGROND_MAT.MATERIAL.MBIN
    MODELS/COMMON/DEMOS/E32015/MODELS/FLOATINGSPHERE/FLOATINGSPHERE.MATERIAL.MBIN
    MODELS/COMMON/DEMOS/E32015/MODELS/RESOURCEFRAGMENTSALT/MINERALFRAGMAT.MATERIAL.MBIN

    ....

  • Report