This guide presents a HUD Toggler blueprint mod for Hogwarts Legacy and describes how it works.
Beginners should read the previous tutorials before this one. They can be found here:
I will assume that you:
The idea here is to give the user the ability to turn individual elements of the HUD on/off at the press of a button. It's already possible to do it in the game by going into the Settings Menu, but that's not something you'll want to do very often. The good news is that because it's possible via the settings, the game functions we need must already exist. As usual we will need to:
How do we toggle elements of the HUD on/off? The answer is in the CXXHeaders
of course.
I tried various things and below are the ones that yielded the most promising results (all in the Phoenix.hpp
file):
You can download the Level Blueprint (.umap file) using the link below.
Remember to rename it to MyHUDToggler.umap
(noting the uppercase letters) and put it in PhoenixUProj\Content\CustomContent\
.
Download the Level Blueprint from here.
Let's take a look at the Event Graph first:
MyMultiToggle
is the Function
I've created to do all the work.
Again no surprises here. We're just:
Variables
we'll need.Initialized
flag. I have used a Sequence
node but that is a mistake. Please make this one long chain in your version!
MyGetPlayer
, MySetTranslatable
and MyDisplayMessage
are all unchanged since the last mod, so let's skip ahead…
This is where all the action is. Rather than have a separate function for each HUD Element, I've put them all under one roof. Notes:
Select on String
node to send execution down the appropriate path, based on what the input parameter string is.And that's it! That's the entire mod.
Give it a try! Cook it, load it (using the name MyHUDToggler
in the modloader) and see if it works! (It does.)