Skip to content

With this App it is planned to make it userfriendly to create a new or modify the contents of an existing .packed file for the Game Scrapland.

License

Notifications You must be signed in to change notification settings

romibi/Scrap-Packed-Explorer

Repository files navigation

Scrap Packed Explorer

This App allows you to create or modify the contents of .packed files for the Game Scrapland.

See also the Scrap Hacks Project by Earthnuker (on gitdab) for an alternative implementation using python


Table of contents


About "packed" files

.packed Files are used by the Game Scrapland to have most of the game data merged into one big data container. The contents are neither encrypted nor compressed. Therefore modifying it is relatively straight forward.

But before this project there was no real userfriendly way to do that and the goal of this project was to enable modding for users who do not really want to think about the details of this filetype.


How to use

The App can work in 2 different modes: GUI and CLI. (Graphical User Interface vs Command Line Interface) To run App with GUI you run ScrapPackedExplorer.exe or ScrapPackedExplorerCombined.exe (or their 32-Bit variants). To run App with CLI you must run ScrapPackedExplorerCli.exe or ScrapPackedExplorerCombined.exe (or their 32-Bit variants) with command line arguments.

Although the Combined version also contains the whole GUI, a separate GUI-only version is distributed, because when you launch the GUI from the Combinded-Version (by not providing any command line arguments) a cmd window flashes for a split second. If you are ok with this you can use the Combined version for both GUI and CLI mode.

The Version without Cli or Combined in its name supports only the GUI mode but also has no flashing cmd window on startup.


GUI

!TBD! GUI is nearly usuable but some key features are missing for fully functional usage. Updating this README chapter is part of the GUI issue (#2)


CLI

A basic call looks like this:

ScrapPackedExplorerCli.exe <path-to-the-packed-file> <subcommand> <options>

You can also specify the subcommand before the path to the packed file.

List of the subcommands:

Subcommand Description
add Add file to the container
remove Remove a file from the container
rename rename a file or folder inside the container
extract Extract/unpack a file from the container
list List or search files and folders in the container
cat Print content of file inside of containerist or search files and folders in the container
help Display more information on a specific command.
version Display version information.

Add

Add a file or folder to a given container. If the container does not exists the App will create new one.

Option Description
Packed file (pos. 0) Required. The .packed file to use as basis
-s, --source-path Required. What file or folder to add to the .packed file
-d, --packed-path (Default: ) What path to put the source file(s) into
-o, --output-packed-file (Default: ) Where to store the new .packed file. Modify input if not provided.
-k, --keep-backup (Default: false) Keep the backup file that gets created during saving even after successful processing.
--overwrite-old-backup (Default: false) Allow overwriting existing .bak files
--help Display this help screen.
--version Display version information.
ScrapPackedExplorerCli.exe exapmle.packed add -s file1.txt -p folder/file.txt
ScrapPackedExplorerCli.exe exapmle.packed add -s folder\subfolder -p folder/

Remove

Removes a file or folder from the given container.

Option Description
Packed file (pos. 0) Required. The .packed file to use as basis
-d, --packed-path Required. What path to remove from the container
-o, --output-packed-file (Default: ) Where to store the new .packed file. Modify input if not provided.
-k, --keep-backup (Default: false) Keep the backup file that gets created during saving even after successful processing.
--overwrite-old-backup (Default: false) Allow overwriting existing .bak files
--help Display this help screen.
--version Display version information.
ScrapPackedExplorerCli.exe exapmle.packed remove -p file.txt
ScrapPackedExplorerCli.exe exapmle.packed remove -p folder/file.txt
ScrapPackedExplorerCli.exe exapmle.packed remove -p folder/

Rename

Renames file or folder inside the given container. Also used to change the path of the file (to basicaly move it).

Option Description
Packed file (pos. 0) Required. The .packed file to use as basis
-s, --old-packed-path Required. (Default: /) What path to rename inside the container
-d, --new-packed-path Required. The new path to use for the files to rename
-o, --output-packed-file (Default: ) Where to store the new .packed file. Modify input if not provided.
-k, --keep-backup (Default: false) Keep the backup file that gets created during saving even after successful processing.
--overwrite-old-backup (Default: false) Allow overwriting existing .bak files
--help Display this help screen.
--version Display version information.
ScrapPackedExplorerCli.exe exapmle.packed rename -s file1.txt -d file2.txt
ScrapPackedExplorerCli.exe exapmle.packed rename -s file1.txt -d folder/file1.txt

Extract

Extracts a file or folder from the given container to a given path. If option -s is not specified, the App will extract everything.

Option Description
Packed file (pos. 0) Required. The .packed file to use as basis
-s, --packed-path (Default: ) What path to extract from the container
-d, --destination-path Required. The path to extract the files from the container to
--help Display this help screen.
--version Display version information.
ScrapPackedExplorerCli.exe exapmle.packed extract -s file1.txt -d file.txt
ScrapPackedExplorerCli.exe exapmle.packed extract -s file1.txt -d out\
ScrapPackedExplorerCli.exe exapmle.packed extract -s folder/subfolder -d outFolder\
ScrapPackedExplorerCli.exe exapmle.packed extract -d out\

List

Lists files and folders in the given container.

Option Description
Packed file (pos. 0) Required. The .packed file to use as basis
-l, --output-style (Default: List) Output list (default) or tree view. Valid values: None, List, Tree, Name
-s, --show-file-size (Default: false) Show files sizes
-o, --show-file-offset (Default: false) Show files offsets
--no-errors (Default: false) Disable error messages
-q, --search-string (Default: ) A Search string to filter the output with
-r, --regex (Default: false) Defines if the search string is a regular expression
-b, --match-beginning (Default: false) Apply search query only to beginnng of the files path. By default applies everywhere
-f, --match-filename (Default: false) Search only by files. By default search includes folders
--help Display this help screen.
--version Display version information.
ScrapPackedExplorerCli.exe exapmle.packed list
ScrapPackedExplorerCli.exe exapmle.packed list -rfq file\.(txt|png) -sol name

Cat

Print content of file inside of containerist or search files and folders in the container

Option Description
Packed file (pos. 0) Required. The .packed file to use as basis
-s, --packed-path Required. (Default: ) What file to print
-x, --as-hex (Default: false) Display file content as hex dump
-f, --byte-format (Default: X2) Format of printed bytes
-l, --line-format (Default: X8) Format of lines numbers
-g, --bytes-per-group (Default: 2) How much bytes should print before printing space
-r, --groups-per-row (Default: 16) How much groups should print in one line
-p, --no-print-lines-numbers (Default: false) Do not print lines numbers
--help Display this help screen.
--version Display version information.

Help

Prints a help message on the screen. Without further parameters it shows the available subcommands. If after help another subcommand is provided it will show avilible options for that subcommand.

ScrapPackedExplorerCli.exe help
ScrapPackedExplorerCli.exe help list

Version

Display the current version of the App

ScrapPackedExplorerCli.exe version

Dependencies

This App is using .NET Core 6.0 which is often already installed on modern windows computers. If you have problems launching the App, make sure that it is installed on your computer. No other dependencies are needed.


Todo (not strictly ordered by priority)

  • Command Line Interface
    • mostly done, see issue #1
  • Graphical User Interface (see also issue #2)
    • directory tree
    • folder content view
    • add file/folder
    • remove file/folder
    • extract file/folder
    • GUI Milestone 1 "Minimal Usable GUI"
      • icons
      • Open file with ScrapPackedExplorer #4
      • add empty folder for adding file
      • replace warning
      • rename file/folder
      • Update README.MD GUI chapter
    • GUI Milestone 2 "Basic GUI finished"
      • search name
      • drag & drop
    • GUI Milestone 2 or later
      • dark theme
      • nice loading animation
      • direct vs prepare modes Re-create container on each change or prepare changes and then save
      • drag & drop between 2 packed (maybe)
      • search content (maybe)
    • Later
      • "modding" mode (maybe) Have huge gaps between files edited to not move around bits much inside container while constantly editing
      • file preview (maybe)
  • Misc: see other issues

About

With this App it is planned to make it userfriendly to create a new or modify the contents of an existing .packed file for the Game Scrapland.

Resources

License

Stars

Watchers

Forks

Packages

No packages published