Skip to content
ShadelessFox edited this page Feb 4, 2024 · 13 revisions

Command-line interface

Decima Workshop comes with a built-in command-line interface.

To use it, you need to open the terminal application in the root directory and type the following command to get started:

Windows

decima --help

Linux

./decima --help

This will show the list of available commands.

Available commands

Name (click for usage) Description
paths Dumps all valid file paths
entry-points Dumps all script entry point names and checksums
file-references Dumps all file references
localization Useful for localization commands
repack Adds or overwrites files in archives
get-oodle Downloads Oodle compression library

Note

Most of the commands require a project. See Getting started for more information.

Once you have a project, grab its identifier (UUID) from the Edit Project dialog.

Repacking

Usage

decima.bat repack [options] <path to archive to repack> <path to files to add>

Options

Names Default Description
-p or --project The working project
-b or --backup false Create a backup of the destination archive if exists
-e or --encrypt false Encrypt the archive (supported by Death Stranding only)
-t or --truncate false Truncate the archive
-l or --level FAST Compression level
--rebuild-prefetch true Rebuild prefetch data. Must be used when files have changed in size; otherwise, the game won't start
--changed-files-only true Update only changed files in the prefetch. Must be used together with --rebuild-prefetch

Use the following command to get a complete overview of each option:

decima.bat repack

Example

You can utilize CLI's capabilities to repack archives without GUI interactions easily.

First, you'll need to prepare a folder with the hierarchical structure of files that you need to add to the archive. For example:

\--ds
   \--artparts
      \--characters
         \--sam_sam
                part_sam_body_naked.core
                part_sam_body_private.core

When everything is ready, you can execute the following command in the terminal:

decima.bat repack --backup --project <project> path/to/archive.bin path/to/files_to_repack

Note

It's always recommended to repack the "patch" archive because of how the game loads resources.

  • For Death Stranding, it's <game directory>/data/59b95a781c9170b0d13773766e27ad90.bin

  • For Horizon Zero Dawn, it's <game directory/Packed_DX12/Patch.bin>, but you can create your own archive called Patch_YourModName.bin.

Getting Oodle

Prerequisites

  1. Follow the provided instructions to access the Unreal Engine repository: https://github.com/EpicGames/Signup
  2. Download the following file: https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Build/Commit.gitdeps.xml

Usage

decima.bat get-oodle get-oodle [options] <path to Commit.gitdeps.xml>

Options

Names Description Default
-o or --output Output directory Current working directory
-d or --default Use default choice or prompt if multiple files were found true
-p or --platform The target platform. Valid values: WINDOWS_64, LINUX_64, DARWIN_64 WINDOWS_64

Localizing the game

Decima Workshop will extract localization resources as a JSON file that can be edited using any text editor.

Workflow

To start localizing the game, you first need to understand the workflow:

  1. Choose the source and target languages
  2. Extract the localization resources from the game
  3. Translate the extracted resources
  4. Compile the translated resources
  5. Pack the compiled resources back into the game

The source language is used as a reference for the localization. The target language is the language you want to edit.

Note

You can't add a new language to the game; you can only translate the existing ones.

Supported languages by Horizon Zero Dawn
  • Arabic
  • Chinese_Simplified
  • Chinese_Traditional
  • Danish
  • Dutch
  • English
  • Finnish
  • French
  • German
  • Italian
  • Japanese
  • Korean
  • LATAMPOR
  • LATAMSP
  • Norwegian
  • Polish
  • Portugese (not a typo)
  • Russian
  • Spanish
  • Swedish
  • Turkish
Supported languages by Death Stranding
  • Arabic
  • Chinese_Simplified
  • Chinese_Traditional
  • Czech
  • Danish
  • Dutch
  • English
  • English_UK
  • Finnish
  • French
  • German
  • Greek
  • Hungarian
  • Italian
  • Japanese
  • Korean
  • LATAMPOR
  • LATAMSP
  • Norwegian
  • Polish
  • Portuguese
  • Russian
  • Spanish
  • Swedish
  • Turkish

Usage

To extract the localization resources, use the following command:

decima localization export --project <project> --output <output file>.json --source <source language> --target <target language>

To compile the localized resources, use the following command:

decima localization import --project <project> --input <output>.json --output <directory for compiled files>

To pack the compiled resources back into the game, use the following command:

decima repack --backup --project <project> <target archive>.bin <directory for compiled files>

Localization format

The format is simple and easy to understand:

{
  "source": "English",
  "target": "Japanese",
  "files": {
    "localized/sentences/ds_lines_cutscene/sq_cs00_s00100/sentences.core": {
      "110c1799-48d4-8f42-8c67-e47aaec4b906": {
        "source": "The \"Rope\", along with the \"Stick\" are two of mankind's oldest tools.",
        "target": "「なわ」は、「棒」とならんで、\nもっとも古い人間の「道具」の一つだった。",
        "show": "always"
      }
    }
  }
}

Important

You must not change the top-level source and target fields. They are used to identify the source and target languages specified during the export by the tool to merge changed lines into the game files correctly.

You are interested in the object with the UUID key.

  • The source field contains the original text that can be used as a reference. You should not edit this field
  • The target field contains the translated text. This is the field you will be editing
  • The show field is used to control the visibility of the subtitle in the game. Valid values are:
    • always - the subtitle will always be shown even if subtitles are turned off in the game settings
    • never - the subtitle will never be shown even if subtitles are turned on in the game settings
    • auto - the subtitle will be shown only if subtitles are turned on in the game settings

Note

You might want to enforce subtitles to be shown for in-game text written in a foreign language. And vice versa, hide subtitles for in-game text written in the same language.

Example

Let's say you want to correct Death Stranding's localization of several lines in English using the Japanese localization as a reference:

decima localization export --project <project> --output localization.json --source English --target Japanese
... edit localization.json ...
decima localization import --project <project> --input localization.json --output compiled
decima repack --backup --project <project> "<game directory>/data/59b95a781c9170b0d13773766e27ad90.bin" compiled

Clone this wiki locally