> For the complete documentation index, see [llms.txt](https://docs.hogwarp.com/hogwarp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hogwarp.com/hogwarp/scripting/client-side/setting-up-mods/local-cooking-building.md).

# Local Cooking / Building

## Preparation

Before starting a local cooking process, confirm that you have directory for your mod at. If it is missing, create a new directory:

`HogwartsLegacyCreatorKit\WindowsNoEditor\Phoenix\Mods\{ModName}`

## Creating the .pak file(s)

Open a terminal and navigate to your `HogwartsLegacyCreatorKit\Engine\Binaries\DotNET` installation directory. In it you should find an `AutomationTool.exe` executeable, that needs to be called with several arguments:

```powershell
.\AutomationTool.exe packageugc -Project="PATH TO Phoenix.uproject" -PluginPath="PATH TO MOD.uplugin" -CookLocal="true" -Version="PhoenixGameUGC_v1" -BasedOnReleaseVersion="PhoenixGameUGC_v1"
```

Change the `Project` and `PluginPath` values according to your environment and run the command.

Grab a coffee :coffee: , this may take a while.

{% hint style="danger" %}
If an error message gets shown that states `Could not find a part of the path: ...` , the directory from the preparation step is missing.
{% endhint %}

The final output can be found in&#x20;

`HogwartsLegacyCreatorKit\PhoenixGame\Mods\{ModName}\Saved\StagedBuilds\WindowsNoEditor\Phoenix\Mods\{ModName}\Content\Paks\WindowsNoEditor`

You can copy the contents of the folder into your `Hogwarp/Mods` folder.

## Reducing the .pak file size

By default, the cooked mod includes some additional *DevelopmentAssetRegistry* binary which increase the output file by several megabytes but is not needed. You can manually unpak the file and repack without the binary.

You can use the following [Batch file](https://gist.github.com/ToeKneeRED/63a8867a2b6f028cab4562171e57ebfc) (credits to Toe Knee) and provide the `.pak` file (e.g. via Drag & Drop). This will remove the unnecessary binary and reduce the file size.
