Hogwarts Legacy is an ARPG video game developed by Avalanche Software and published by Warner Bros. Games. It was released on 10 February 2023 for PlayStation 5, Nintendo Switch, PlayStation 4, Xbox Series X and Series S, Xbox One, and Microsoft Windows.
This guide will walk you through building the Level Loader and ModActor Loader for UE4SS and Apparate ModLoader. Then we will start by building our custom blueprint to simply add a User Tag to the Screen for view inside the game.
With Unreal Engine 4.27.2 select Launch
Select the Games option from the Categories and then click Next
Select the Blank Template and then select Next
Select the No Starter Content from the dropdown
Name the Project as Phoenix
TIP: Hogwarts Legacy was build under the Phoenix project name so this is required
Go to Settings > Project Settings
Select Packaging on the left sidebar
Make sure to check these options before closing the window:
Use Pak File
User Io Store
Generate Chunks
Go to Edit > Editor Preferences
Select Experimental on the left sidebar
Make sure to check this option before closing the window:
Allow ChunkID Assignments
Select Shipping option under
File > Package Project > Build Configuration
Root Directory will be Phoenix\Content
Right click in "CustomContent" folder and add a Level from the options.
Name this Level the Name that Apparate Modloader will trigger your mod with.
TIP: Once Modloader is install the End User will press F8 and type the Name of this level to activate your mod initially
In our example we named the level "UserTagMod"
So in Apparate Modloader they will press F8 and type in UserTagMod to trigger the mod
Double click your named level such as "UserTagMod" to open it
Next we will prepare for UE4SS entry point.
Create a folder with same name as your mod.
In this example we will name our William_UserTagMod_P
TIP: This will be the same name of your Pak, Utoc, and Ucas files later
Right click in your New Mod folder such as "William_UserTagMod_P" and select Blueprint Class
This will open the Blueprint Class window
Select "Actor" from the Blueprint Class window and name it "ModActor"
In our example we created a ModActor for our William_UserTagMod_P mod package
Under your folder we will begin making our assets for the mod.
Right click and create a Widget Blueprint under the Widgets Folder
Double Click your Widget to open it.
TIP: In this case we named our widget UserTag to use in the class definition but the name doesn't particularly matter for these assets
Within your Widget you will add 2 pieces:
Create another Canvas to act as your anchor
Create some text within the Canvas so we know it is working
Create your custom blueprint just like the ModActor
TIP: This will house all your custom logic for the mod
This piece will change from Mod to Mod as you add different functionality to the mod.
In this example we will just be loading our Widget "UserTag" to the Viewport on the screen
Simply drag the ModActor into the Level we created earlier.
TIP: This creates a common entry point for both UE4SS and Apparate Modloader
Build the ModActor to look like below using Event BeginPlay
Make sure to set the Class to match your Custom Blueprint
For each file in your Mod:
Right click the file and go to Asset Actions > Assign to Chunk
TIP: This is needed on each files used such as the Level, ModActor, Wdigets, Blueprints, etc...
Select a ChunkID from 30 to 300
In this example we will use 300 for each of our mod files
In this example we used ChunkID 300 so it created the files as pakchunk300
Rename your files to match the name of the mod used for the folder earlier.
We used William_UserTagMod_P so we renamed the packchunk300 files to this name.