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?