Construction Files Documentation - TobiIchiro/RtoM-ArmorBuildings-Mod GitHub Wiki

Needed Software

Unpacking

  1. Download Retoc and extract .zip file on working directory i.e WorkingDirectory/Retoc
  2. Open a terminal where Retoc.exe is located
  3. Type this command in terminal:<br> .\retoc.exe to-legacy --version UE4_27 [path to Moria-WindowsNoEditor] [path to unpack]
    Example:
    .\retoc.exe to-legacy --version UE4_27 E:\Juegos\Epic\ReturnToMoria\Moria\Content\Paks F:\RtoM\retocExports

Add Custom Recipe

Existing Blueprint

FModel

  1. Open FModel and go to Directory->Selector
  2. Add Undetected Game, click in the alt text button, and look for the games instalation folter folder, then click the alt text alt text
  3. Change detected game to Return To Moria
  4. FModel will restart
  5. Double-click on Moria-WindowsNoEditor.utoc
  6. Go Inside Moria/Content

Looking for meshes

There are different places to look for meshes, but the two most important are

Moria/Content/Art/Assets/Kits
Moria/Content/Environments

Each directory has more directories inside them. So you need to search inside them to look for what you are looking for. Double click on mesh will open the 3D Viewer. If you want to save your mesh name right-click on your mesh package Copy->Package Name without extension alt text

Looking for blueprints

Important

If you havent save everything as .json using FModel do it. You can view/change your output directory in Settings->General->Output directory
alt text
In folders right-click on Moria/Content and click on save Folder's Packages Properties (.json). It'll take a while
alt text

  1. After exporting everything, open the output directory with Visual Sturio Code, using the search sidebar option look for your mesh.

Tip

Look for files that start with BP_ and avoid Blueprint files located inside Moria/Content/Environments/Models/Architecture/Blocks because these items can't be deconstructed if placed. alt text

  1. You will need these two stings:
[PathToBlueprint]/[BlueprintName]
[PathToBlueprint]/[BlueprintName].[BlueprintName]_C

Example:

/Game/LevelDesign/Architecture/Suburbs/BP_Column_1x1m_A_Base_Player
/Game/LevelDesign/Architecture/Suburbs/BP_Column_1x1m_A_Base_Player.BP_Column_1x1m_A_Base_Player_C

Adding New Icons

  1. Create utoc, ucas, pak files using Unreal Engine
  2. In DT_Constructions.json add needed NameMaps
  3. Add new entry for Package in Imports and modify ObjectName
{
    "$type": "UAssetAPI.Import, UAssetAPI",
    "ObjectName": "",
    "OuterIndex": 0,
    "ClassPackage": "/Script/CoreUObject",
    "ClassName": "Package",
    "PackageName": null,
    "bImportOptional": false
}
  1. Add new entry for Texture2D in Imports modify ObjectName and OuterIndex to match your package position
{
    "$type": "UAssetAPI.Import, UAssetAPI",
    "ObjectName": "",
    "OuterIndex": ,
    "ClassPackage": "/Script/Engine",
    "ClassName": "Texture2D",
    "PackageName": null,
    "bImportOptional": false
}
  1. Look for SerializationBeforeCreateDependencies and add your Texture2D position at the botom

Example: -1007

Important

Add them at the end of import section, first add Package, then Texture2D If you add this way you will have OuterIndex for your package starting in -1006 for Game Version 1.5.2 So, every Package should be -1006 + 2 * i where i is the number of new icons added starting in 0

⚠️ **GitHub.com Fallback** ⚠️