Skip to content

KodywithaK/dqx-offline-localization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Language Milestone Progress
de GitHub milestone details
en GitHub milestone details
es GitHub milestone details
fr GitHub milestone details
it GitHub milestone details
pt-BR GitHub milestone details

GitHub Actions Workflows (Create_Latest_Release_All.yml status)

GitHub Actions Workflows (Create_Latest_Release.yml status)

GitHub Downloads (all assets, all releases)

Translate StringTables via Unreal Editor (UE4Editor.exe)

0.Prerequisites

For Nintendo Switch:

For Steam:

1.UE4Editor.exe

Create Project

  • Open UE4Editor.exe and create a new project.

  • Select Template Category Blank Project > Select Template Blank > Project Settings Desktop/Console & No Starter Content.

  • Select a location for your project to be stored and its name.
    e.g., Folder C:\Downloads\UE_4.27\Projects
    Name Holiday for Nintendo Switch, Game for Steam.

  • Once your project loads, go to the Content Browser on the bottom and click the Show or hide the sources panel button (left of the Filters▼|Search Content) to ensure you are working in the correct folders.

[!IMPORTANT] Make sure to double-check your spelling and capitalization, to save you from having to troubleshoot later.

Create Folder Structure and StringTables

  1. In the Content Browser:

    • Right-click on the Content folder, select New Folder, and name it StringTables.
    • Right-click on the StringTables folder, select New Folder, and name it Game.
    • Right-click on the Game folder, select New Folder, and name it System_Title.
  2. In the Content > StringTables > Game > System > System_Title folder:

    • Right-click, Miscellaneous > String Table and rename the new file STT_Title_Boukennosho.
  3. Double-click the new STT_Title_Boukennosho file:

    • Import from CSV, then select the STT_Title_Boukennosho.uasset.csv to autofill the Key & Source String sections.

[!NOTE] You can either edit the Source Strings in that window OR edit the .csv and reimport.

  1. Repeat steps 1-3 with other StringTables, as necessary.

  2. Save, then close out the window.

Create Data Asset and Packaging Rules

  • Click the Content folder to be get taken back to the top folder.

  • Right-click in the content browser area, select Miscellaneous > Data Asset > PrimaryAssetLabel, then double-click into it.

  • Chunk ID 30
    Cook Rule Always Cook
    Label Assets in My Directory [x], save and exit the window.

[!NOTE] > Save All for good measure.

Package pakchunk30-WindowsNoEditor.pak

  1. Edit > Project Settings > Project > Packaging > Packaging, enter the following settings:
    • Use Pak File [x]
      Use Io Store [x]
      Generate Chunks [x]
  1. File > Package Project > Windows (64-bit)

    [!NOTE] If you get the Unsupported Platform pop-up, you can ignore it.

  • Click continue, and choose a folder to package your project into.
    e.g., "C:\Program Files (x86)\Steam\steamapps\common\DRAGON QUEST X OFFLINE\Game\Content\Paks\pakchunk30-WindowsNoEditor_<YOUR_MOD_NAME>_<YOUR_MOD_VERSION>_P.pak"
    or
    "C:\Program Files (x86)\Steam\steamapps\common\DRAGON QUEST X OFFLINE\Game\Content\Paks\pakchunk30-Switch_<YOUR_MOD_NAME>_<YOUR_MOD_VERSION>_P.(pak/ucas/utoc)", etc.
  • Your project will begin packaging, and alert when it's finished.
  1. Rename the newly created pakchunk30-WindowsNoEditor_<YOUR_MOD_NAME>_<YOUR_MOD_VERSION>_P.(pak/ucas/utoc) to
    • For Nintendo Switch:
      pakchunk0-Switch_<YOUR_MOD_NAME>_<YOUR_MOD_VERSION>_P.(pak/ucas/utoc)"

    • For Steam:
      pakchunk0-WindowsNoEditor_<YOUR_MOD_NAME>_<YOUR_MOD_VERSION>_P.(pak/ucas/utoc)"

2.Move new pakchunk0-(Switch|WindowsNoEditor).(pak|ucas|utoc)

  • For Steam:
    "C:\Program Files (x86)\Steam\steamapps\common\DRAGON QUEST X OFFLINE\Game\Content\Paks\pakchunk0-WindowsNoEditor*<YOUR_MOD_NAME>*<YOUR_MOD_VERSION>_P.(pak|ucas|utoc)"
    or similar, if you have a custom steam library location.

  • For Nintendo Switch:
    mods/Dragon Quest X Offline/<YOUR_MOD_NAME>_<YOUR_MOD_VERSION>/contents/0100E2E0152E4000/romfs/Holiday/Content/Paks/pakchunk0-Switch_P.(pak|ucas|utoc)

3.Start up the game

  • All of your edited String Tables will now be loaded ingame.
  • Have fun!

Translate Game.locmeta/Game.locres files
via LocRes-Builder (Chinese/Korean versions only)

0.Prerequisites

1.FModel.exe

  • Download from 4sval's github repo, and extract all files.
  • At the Directory Selector window:
    • select ADD UNDETECTED GAME
    • Name it anything, e.g. DRAGON QUEST X OFFLINE
    • Choose where the game's paks are installed, e.g.:
      • C:\Program Files (x86)\Steam\steamapps\common\DRAGON QUEST X OFFLINE Demo\Game\Content\Paks
    • Click the Add Game + button, then OK
  • Inside the main window:
    • Settings > General > ADVANCED
      • Local Mapping File [x] Enabled
      • Mapping File Path Choose where the DRAGON QUEST X OFFLINE Demo Mappings.usmap is installed.
    • Directory > AES > Input the game's Main Static Key (AES Key), and click OK

[!Note] The pakchunks that were grayed out can now be opened.

  • Double-click pakchunk0-WindowsNoEditor.pak to open archive, from there:
    • Right-click Game/Content/Localization/Game and select Export Folder's Packages Raw Data (.uasset)

[!Note] Console will log: Successfully exported Game/Content/Localization/Game

Click that highlighted part to open where it was exported for the following step.

2.LocRes-Builder-v0.1.2

  • Download from matyalatte's github repo, and extract all files.

  • Drag and drop Game.locmeta onto convert.bat

    • A command prompt will open and start saving out to: ./out/Game/*json, for example:
    ./out/Game/locmeta.json
    ./out/Game/en.json
    ./out/Game/ja.json
    ./out/Game/ko.json
    ./out/Game/zh-Hans.json
    ./out/Game/zh-Hant.json
    
    • Edit the values in the .json file for your specified language
  • Drag and drop locmeta.json back onto the same convert.bat from previous step

    • A command prompt will open and start saving out to:
    ./out/Game/Game.locmeta
    ./out/Game/en/Game.locres
    ./out/Game/ja/Game.locres
    ./out/Game/ko/Game.locres
    ./out/Game/zh-Hans/Game.locres
    ./out/Game/zh-Hant/Game.locres
    

3.UnrealPak.exe

  • Make a response file (responsefile.txt), edit to include where your new .locmeta/.locres files were created and where in the .pak they need to go, e.g.:

    "<LOCMETA/LOCRES_LOCATION>" "../../../<LOCATION_IN_PAK>"

[!IMPORTANT] The double-quotes, space, and ../../../ are required for the .pak to be created properly.

"C:\Downloads\LocRes-Builder-v0.1.2\out\Game\Game.locmeta" "../../../Game/Content/Localization/Game/Game.locmeta"
"C:\Downloads\LocRes-Builder-v0.1.2\out\Game\en\Game.locres" "../../../Game/Content/Localization/Game/en/Game.locres"
"C:\Downloads\LocRes-Builder-v0.1.2\out\Game\ja\Game.locres" "../../../Game/Content/Localization/Game/ja/Game.locres"
"C:\Downloads\LocRes-Builder-v0.1.2\out\Game\ko\Game.locres" "../../../Game/Content/Localization/Game/ko/Game.locres"
"C:\Downloads\LocRes-Builder-v0.1.2\out\Game\zh-Hans\Game.locres" "../../../Game/Content/Localization/Game/zh-Hans/Game.locres"
"C:\Downloads\LocRes-Builder-v0.1.2\out\Game\zh-Hant\Game.locres" "../../../Game/Content/Localization/Game/zh-Hant/Game.locres"
  • Open another command prompt, change to UnrealPak's directory, and input: UnrealPak <PakFilename> -Create=<ResponseFile> For example, UnrealPak "C:\Program Files (x86)\Steam\steamapps\common\DRAGON QUEST X OFFLINE Demo\Game\Content\Paks\pakchunk0-WindowsNoEditor_<YOUR_MOD_NAME>_<YOUR_MOD_VERSION>_P.pak" -Create="C:\Downloads\responsefile.txt"

    [!IMPORTANT] The _P is required for the patch _P.pak to be work properly.

4. Start up the game

  • All of your edited translations from Step 2 will now be loaded ingame, as long as you have the corresponding langauge selected.
  • Have fun!

Replace Fonts via UE4Editor

0.Prerequisites

1.UE4Editor.exe

  • Open UE4Editor.exe and create a new project.

    • Select Template Category Blank Project > Select Template Blank > Project Settings Desktop/Console & No Starter Content
      • Select a location for your project to be stored and its name, e.g., Folder C:\Downloads\UE_4.27\Projects, Name Game
  • Once your project loads, go to the Content Browser on the bottom and click the Show or hide the sources panel to ensure you are working in the correct folders.

    [!IMPORTANT] Make sure to double-check your spelling and capitalization, to save you from having to troubleshoot later.

  • Right-click on the Content folder, select New Folder, and name it UI.

  • Right-click on the UI folder, select New Folder, and name it Font. - In the Content > UI > Font folder, you can drag and drop your preferred .ttf font file into the marked area to begin the font import process. - A window will pop-up asking if you would like to create a new Font asset using the imported Font Face as its default font; click yes. - 2 files will appear—if you hover over them, they will display (Font) & (Font Face)—double-click the (Font) to set up the fonts you want to show up in game. - The Default Font Family will be filled in already because of the yes prompt earlier, but you can change it after importing another (Font Face) with the dropdown menu next to the font's name, if you prefer. - For the Fallback Font Family, I would recommend a font for whichever region of the game you are going to be playing on, so that if there is untranslated text, it will fallback to that instead of disappearing from the screen entirely. - Click Add Sub-Font Family and in the Cultures: box you can put the ISO-639 language code (ja = Japan, ko = Korean, zh-Hans = Simplified Chinese, etc.) of the region(s) you will be playing. Multiple regions can be joined by using semicolons (;, e.g., ko; zh-Hans; zh-Hant).

    [!NOTE] Later on—once you are playing the game—if the font looks too small, you can increase its size by using the Scaling Factor: number, and repackaging everything again, like in the following steps.

  • Exit the Composite Font editor window, right-click, and rename your (Font) to IW4D3_Font.

  • Double-click your (Font Face), and the change its settings:

    • Hinting None, Loading Policy Inline, Show Advanced > Layout Method Bounding Box. Repeat the same step for each imported (Font Face).
    • Exit the Font Details window, then Save All.
  • Click the Content folder to be get taken back to the top folder.

    • Right-click in the content browser area, select Miscellaneous > Data Asset > PrimaryAssetLabel, then double-click into it.
      • Chunk ID 30, Cook Rule Always Cook, Label Assets in My Directory [x], save and exit the window.
  • Edit > Project Settings > Project > Packaging > Packaging, enter the following settings:

    • Use Pak File [x], Use Io Store [x], Generate Chunks [x]
  • Exit to Content Browser window, then right-click your Content folder, select Show in Explorer to open up the file explorer.

    • Go up 1 level to your <PROJECT_NAME> folder, enter Config, and make a new text document named DefaultPakFileRules.ini.

      • Inside of it, enter the following:
      [bExcludeFromPaks_Engine]
      bExcludeFromPaks=true
      bOverrideChunkManifest=true
      +Files=".../Engine/..."
      +Files="...Game.uproject"
      +Files="...Game/*"
      +Files="...Game/Config/..."
      +Files="...Game/Content/Shader*"
      +Files="...Game/Platforms/..."
      +Files=".../*.upluginmanifest"
      • With this, the packaged project will be slimmed down to only the imported fonts.
  • Go back to the Content Browser window, then click File > Package Project > Windows (64-bit)

    [!NOTE] If you get the Unsupported Platform pop-up, you can ignore it. Click continue, and choose a folder to package your project into, e.g., "C:\Program Files (x86)\Steam\steamapps\common\DRAGON QUEST X OFFLINE Demo\Game\Content\Paks\pakchunk30-WindowsNoEditor_<YOUR_MOD_NAME>_<YOUR_MOD_VERSION>_P.pak"

  • Your project will begin packaging, and alert when it's finished.

  • Rename the newly created pakchunk30-WindowsNoEditor_<YOUR_MOD_NAME>_<YOUR_MOD_VERSION>_P.(pak/ucas/utoc) to "C:\Program Files (x86)\Steam\steamapps\common\DRAGON QUEST X OFFLINE Demo\Game\Content\Paks\pakchunk0-WindowsNoEditor_<YOUR_MOD_NAME>_<YOUR_MOD_VERSION>_P.(pak/ucas/utoc)"

2.Start up the game

  • All of your edited fonts from Step 1 will now be loaded ingame, as long as you have the corresponding langauge selected.
  • Have fun!

Edit Fonts via GlyphrStudio

0.Prequisites

  • A font of your choice

1.GlyphrStudio.com/app/

  • Following the Replace Fonts via UE4Editor tutorial, if your fonts don't look correct ingame (too wide/narrow, line gaps cutting off text, etc.):
  • Go to GlypherStudio, and edit it to your liking, e.g.:
  • Landing page > Load > drag-and-drop your font file, then wait for it to import into the editor.
    • Text too wide/narrow:
      • Page Overview > Page Global Actions > Move and resize
        • Horizontally scale all glyphs > Scale Value > choose a value (narrower < 1 > wider) > Scale All Glyphs
    • Line Gaps cutting off/smashing into other text:
      • Page Settings > Font > Font Metrics > Other Metrics > Line Gap:
        • choose a value (smaller gaps < current > bigger gaps)
          • [!NOTE] You may have to increase by a 100 Em at a time, to see any noticeable changes.
    • Finished editing:
      • File > Export OTF File
        • [!NOTE] With that, your edited font is ready to be put back into UE4Editor

2.UE4Editor.exe

  • Follow the steps outlined in the above tutorial, to test out your new font.
  • Have fun!

Translate .ETP files via dqx_dat_dump

0.Prerequisites

1.FModel.exe

  • Download from 4sval's github repo, and extract all files.
  • At the Directory Selector window:
    • select ADD UNDETECTED GAME
    • Name it anything, e.g. DRAGON QUEST X OFFLINE
    • Choose where the game's paks are installed, e.g.:
      • C:\Program Files (x86)\Steam\steamapps\common\DRAGON QUEST X OFFLINE Demo\Game\Content\Paks
    • Click the Add Game + button, then OK
  • Inside the main window:
    • Settings > General > ADVANCED
      • Local Mapping File [x] Enabled
      • Mapping File Path Choose where the DRAGON QUEST X OFFLINE Demo Mappings.usmap is installed.
    • Directory > AES > Input the game's Main Static Key (AES Key), and click OK

[!Note] The pakchunks that were grayed out can now be opened.

  • Double-click pakchunk0-WindowsNoEditor.pak to open archive, from there:
    • Right-click Game/Content/NonAssets/ETP (or ETP_ko, ETP_zh_hans, etc.) and select Export Folder's Packages Raw Data (.uasset)

[!Note] Console will log: Successfully exported Game/Content/NonAssets/ETP (or ETP_ko, ETP_zh_hans, etc.)

Click that highlighted part to open where it was exported for the following step.

2.dqx_dat_dump

  • Install Dragon Quest X Online - Windows (free) Version, if not installed already.
  • Open a command prompt and change directories to where dqx_dat_dump was installed, e.g.,
    C:\Downloads\dqx-translation-project\dqx_dat_dump\, and enter the following:
>> python -m venv venv
>> .\venv\Scripts\activate
>> (venv) pip install -r requirements.txt
  • Leave the command prompt open, start and log into Dragon Quest X Online's main menu, then switch back to the command prompt:
>> (venv) cd .\tools\dump_etps\
>> (venv) python .\dump_etps.py -u

[!NOTE] Dumps .ETP's from Dragon Quest X Online to C:\Downloads\dqx-translation-project\dqx_dat_dump\tools\dump_etps\etps

[!IMPORTANT] If you receive an error: Verify that GAME_DATA_DIR in <Working_Directory>\dqx-translation-project\dqx_dat_dump\tools\globals.py matches the install location you chose for Dragon Quest X Online, e.g., "C:/Program Files (x86)/SquareEnix/DRAGON QUEST X/Game/Content/Data"

  • Leave the command prompt open, copy and paste the contents of the ETP (or ETP_ko, ETP_zh_hans, etc.) folder into the ...\dump_etps\etps—overwriting existing files—then switch back to the command prompt.
>> (venv) cd ..\packing
>> (venv) python .\unpack_etp.py -a

[!NOTE] Unpacks .ETP's from ...\dump_etps\etps to C:\Downloads\dqx-translation-project\dqx_dat_dump\tools\packing\json\

  • Leave the command prompt open, edit the .json files in C:\Downloads\dqx-translation-project\dqx_dat_dump\tools\packing\json\en, save them to C:\Downloads\dqx-translation-project\dqx_dat_dump\tools\packing\new_json\en, then switch back to the command prompt:
>> (venv) cd ..\packing
>> (venv) python .\pack_etp.py -a

[!NOTE] Packs .json's from ...\new_json\en to C:\Downloads\dqx-translation-project\dqx_dat_dump\tools\packing\new_etps\

  • You may close out that command prompt.

3.UnrealPak.exe

  • Make a response file (responsefile.txt), edit to include where your new .etp files were created and where in the .pak they need to go, e.g.: "<NEW_ETPS_LOCATION>" "../../../<LOCATION_IN_PAK>" or
"C:\Downloads\dqx-translation-project\dqx_dat_dump\tools\packing\new_etps\*" "../../../Game/Content/NonAssets/ETP/"

[!IMPORTANT] The double-quotes, space, and ../../../ are required for the .pak to be created properly.

  • Open another command prompt, go to the directory where UnrealPak.exe is installed, e.g., "C:\Downloads\UE_4.27\Engine\Binaries\Win64\", then input the following:
UnrealPak.exe "<DRAGON_QUEST_X_OFFLINE_(or_Demo)_Install_Location>\pakchunk0-WindowsNoEditor_{ModName}_{ModVersion}_P.pak" -Create="<responsefile_location>"

or

UnrealPak.exe "C:\Program Files (x86)\Steam\steamapps\common\DRAGON QUEST X OFFLINE Demo\Game\Content\Paks\pakchunk30-WindowsNoEditor_<YOUR_MOD_NAME>_<YOUR_MOD_VERSION>_P.pak" -Create="C:\Downloads\dqx-translation-project\dqx_dat_dump\tools\packing\responsefile.txt"

4.Start up the game

  • All of your edited .etp's from Step 1 will now be loaded ingame, as long as you have the corresponding langauge selected.
  • Have fun!

Build UnrealEngine4.27.2-release for
GitHub Actions Linux self-hosted runner

01.Create GitHub Actions Self-Hosted Runner (SHR)

  • github.com/{YourUsername}/{YourRepo} > Settings > Actions > Runners > New Self-Hosted Runner
  • select Linux, then follow the instructions listed below the buttons.
    • See GitHub's Documentation1 for more details.

02.Setup Unreal Engine

  1. Open a Linux bash under your new created SHR user's root directory (cd ~), for the following steps:

  2. git clone --depth 1 -b 4.27.2-release --single-branch https://github.com/EpicGames/UnrealEngine.git

    • clones just the latest commit of UnrealEngine 4.27.2

      [!NOTE] or download Source Code (zip or tar.gz) and Commit.gitdeps.xml from EpicGames' GitHub repo

  3. cd ./UnrealEngine2

    1. Replace "./UnrealEngine/Engine/Build/Commit.gitdeps.xml"3.

      • fixes Failed to download '...dependencies...' error in next step
    2. sudo chmod +x :

      ./Engine/Build/BatchFiles/Linux/GitDependencies.sh

      ./Engine/Binaries/ThirdParty/Mono/Linux/bin/mono

      ./Engine/Build/BatchFiles/Linux/Setup.sh

      ./Engine/Build/BatchFiles/Linux/SetupToolchain.sh

      • Fixes permission denied errors.
    3. sudo apt-get install xdg-utils

      • fixes /bin/bash: xdg-mime: No such file or directory error.
    4. ./setup.sh -exclude=Android -exclude=Dingo -exclude=Documentation -exclude=HTML5 -exclude=IOS -exclude=Mac -exclude=MacOS -exclude=MacOSX -exclude=osx -exclude=osx32 -exclude=osx64 -exclude=PS4 -exclude=Samples -exclude=Switch -exclude=Templates -exclude=TVOS -exclude=Win32 -exclude=Win64 -exclude=Windows -exclude=WinRT -exclude=XboxOne > [!IMPORTANT] DotNET is required for ./GenerateProjectFiles.sh step, DO NOT ADD -exclude=DotNET - excludes unnecessary builds aka less space taken up. - After successful run, ./Binaries/Linux/* will be created

    1. ./GenerateProjectFiles.sh
      • generates makefiles and CMakelists.txt
    2. make UnrealPak
      • makes Unrealpak and its dependencies in ~210s

Glossary

  • global file is an offline computed dependency graph for your assets.
  • {TargetName}.locmeta45
    • LocMeta are custom binary files that store the compiled target meta-data (currently only the native culture for the target) for use at runtime.
    • LocMeta files are regenerated each time the localization data is compiled, and is staged into a packaged build.
  • {TargetName}.locres4
    • LocRes are custom binary files that store the compiled per-culture translations for use at runtime.
    • LocRes files are re-generated each time the localization compile step is run, and get staged into a packaged build.
    • LocRes are the only files that your project will load localization data from at runtime (including in the editor), so any edits or changes to your source data (such as from importing a PO file) must be compiled before they take effect.
  • .pak
    • When using this setup the file will store loose files such as fonts.
  • .ucas
    • is a Content Addressable Store, used by Zen Loader to contain all the assets.
  • .ufont
    • is a .ttf font file
  • .utoc
    • is a Table Of Contents, used by Zen Loader to describe the .ucas file, including chunk size and offset, compression format, and whether the chunks are encrypted.
  • The upside to using the io store is a noticeable improvement to loading times.

External Links

ドラゴンクエスト X  目覚めし五つの種族 オフライン - Purchase on Android

ドラゴンクエスト X  目覚めし五つの種族 オフライン - Purchase on iOS

ドラゴンクエスト X  目覚めし五つの種族 オフライン - Purchase on PlayStation

ドラゴンクエスト X  目覚めし五つの種族 オフライン - Purchase on Steam

ドラゴンクエスト X  目覚めし五つの種族 オフライン - Purchase on Switch

Footnotes

  1. GitHub Docs - Hosting your own runners

  2. This tutorial roughly follows the Linux Native compilation guide from github.com/EpicGames/UnrealEngine

  3. Correct Commit.gitdeps.xml to prevent (403) Forbidden errors during updating dependencies step

  4. Unreal Engine - Documentation - Localization Overview 2

  5. Unreal Engine - Documentation - Localization Overview