How can I get a Gameplay Module to load?

It might be extremely early, but I’m trying to figure out how modding is going to work by trying to write an extremely simple and purely scientific Unreal Tournament module.

I have cloned and successfully compiled both the UnrealEngine (4.1) and UnrealTournament. I then tried to follow this article: Gameplay Modules in Unreal Engine | Unreal Engine 5.2 Documentation (many things are left unclear in here, a lot of hunting and pecking through existing code and files followed).

So, in UnrealTournament’s Source directory, I created a directory for my module, called MyModule. I added MyModule to the OutExtraModuleNames in the Target.cs scripts and created a basic blueprintable (and abstract) class called BlueprintMe, deriving UObject. Well, here’s all my C++ code (I used the UnrealTournament module itself as an example):

Private\MyModule.h:

#ifndef __MOD_H__
#define __MOD_H__

#include "Engine.h"
#include "BlueprintMe.h"

#endif

Private\MyModule.cpp:

#include "MyModule.h"
#include "MyModule.generated.inl"

IMPLEMENT_PRIMARY_GAME_MODULE(FDefaultGameModuleImpl, MyModule, "My Module");

Classes\BlueprintMe.h:

#pragma once

#include "BlueprintMe.generated.h"

UCLASS(Abstract, Blueprintable)
class UBlueprintMe : public UObject
{
    GENERATED_UCLASS_BODY()
    
	UPROPERTY(BlueprintReadWrite, Category = "MyModule")
	int SomeValue;
};

Private\BlueprintMe.cpp:

#include "MyModule.h"

UBlueprintMe::UBlueprintMe(const FPostConstructInitializeProperties& PCIP)
    : Super(PCIP)
{
}

I got it to compile and ended up with a DLL file UE4Editor-MyModule.dll in the Binaries directory, accompanied by its debug pdb. All good and well.

Now I’d like to be able to load up this module in the editor when I load the UnrealTournament uproject. However, I have not the slightest idea how to do that. I tried following the article mentioned above and added those INI entries to DefaultEngine.ini. I also added them to DefaultEditor.ini since I am running an editor build.

However, there is no way to see if MyModule has been loaded. All I know is that my BlueprintMe class does not appear in the list of blueprint bases when I create a new blueprint.

What do I need to do to have my module loaded with the UnrealTournament project and my blueprintable class to be recognized as a blueprint base?

Responding to an old post as I just spend an hour on this.

I am not sure what the correct method is, but I ended up editing the module list in the [project].uproject file. Everything seem to work after that. I suggest that Gameplay Modules in Unreal Engine | Unreal Engine 5.2 Documentation be updated to either include that or give the correct mechanism.

Something I’ll add is that in editor Window>Developer Tools>Modules will show you a list of all of the modules loaded. It is also a great way to recompile specific modules without restarting the editor.

I’ll accept this as this works and seems to be the only way at the time. That module screen is very convenient indeed. They should just add an add button there.

Thanks for posting this! It’s crazy that none of the ini settings on the Gameplay modules documentation work. Why are they there? Why hasn’t the documentation been fixed? Epic?

Agreed, this is unnecessarily painful to set up.

I was able to get singleton modules to load themselves. Still having a hard time figuring out the proper way to load a regular module correctly, so it will work across projects.

Same here. Epic update your documentation.