Using Action RPG sample with UE 5.3

As LucaSouza H2A mentioned in his reply, this subject has already have a tutorial. I’ll leave this in case (I think corrections are a little differents here and there, anyway, principles are the same).

Hi,

I’ve been trying to use Action RPG sample (Action RPG in Epic Content - UE Marketplace) with UE 5.3 recently, and encountered a few migration problems, and found no solutions on internet, so I tried to come up with mines.

Context:
This project might be outdated, so I suggest looking for newer sample projects to learn, but it might still be usefull for some (get animated characters as a starter for your own project, code study, inspiration and what not).
I personnally decided to use it as it was suggested in an online course I follow where they suggest using the characters of this course, or use echo from valley of the ancient, or others. I Chose this one cause it’s “lightweight” compared to the others.

Result:
Port seems overall functional, I didn’t find a bug up till now, but there might be some, IDK. I just did the port to be able to open the project, and study how things are done, but it happens to still work very well for me.

I publish my walkthrough to make the migration, for those interested.
Enjoy <3

Step 1:

Get the project from the marketplace: It’s free. Action RPG in Epic Content - UE Marketplace

Create a new project. I only have UE 5.3 installed, and as the project requires UE 4 version, it warns you. Select to install for UE 4.27 version even if you don’t have it.

Step 2:
Go to the install dir. Edit ActionRPG.uproject
Remove the 4 lines (for me, it was line 119-124, but I don’t guaranty this will be the same for you):

	{
		"Name": "SlateRemote",
		"Enabled": true
	},

Step 3:
Right click ActionRPG.uproject and select “Generate Visual Studio project files”
Select 5.3 version

Step 4:
Open the solution with VS 2022: Double click ActionRPG.sln

Step 5:
In solution explorer, go to Games → ActionRPG

Step 6:
Edit : ‘Config\DefaultGame.ini’
Replace all: IniKeyBlacklist by IniKeyDenylist

Step 7:
Edit both Source\ActionRPG.Target.cs and Source\ActionRPGEditor.Target.cs, and in both replace:

	DefaultBuildSettings = BuildSettingsVersion.V2;

with:

	DefaultBuildSettings = BuildSettingsVersion.Latest;
	IncludeOrderVersion = EngineIncludeOrderVersion.Latest;

Step 8:
Edit Source\ActionRPG\Private\Abilities\RPGTargetType.cpp

Replace ligne 26:

	OutActors.Add(const_cast<AActor*>(EventData.Target));

with:

	OutActors.Add(const_cast<AActor*>(EventData.Target.Get()));

Step 9:
Edit Source\ActionRPG\Private\Abilities\RPGAbilityTask_PlayMontageAndWaitForEvent.cpp
Replace line 180:

check(AbilitySystemComponent);

with:

check(AbilitySystemComponent.IsValid());

Replace line 228:

if (AbilitySystemComponent && Ability)

with:

if (AbilitySystemComponent.IsValid() && Ability)

Finally, in this file, the macro ABILITY_LOG is used 3 times, and Visual Studio can’t find where it is defined.
As LucaSouza H2A mentioned in his reply, it is now included in:

#include "AbilitySystemLog.h"

Copy paste this line at the top of the file, with the other includes (not the first include that should remain unchanged). You should have something like:

#include "Abilities/RPGAbilityTask_PlayMontageAndWaitForEvent.h"
#include "Abilities/RPGAbilitySystemComponent.h"
#include "GameFramework/Character.h"
#include "AbilitySystemComponent.h"
#include "AbilitySystemGlobals.h"
#include "AbilitySystemLog.h"
#include "Animation/AnimInstance.h"

Step 10:
I’m not really sure about thi solution. Basically, as to implement FGCObject, FRPGLoadingScreenBrush must implement GetReferencerName(). I don’t know what name it is supposed to return, and I used the texture name passed as parameter as Name for this object… Might be bad solution, let me know it you have better solution.

Edit Source\ActionRPGLoadingScreen\Private\ActionRPGLoadingScreen.cpp
And add to struct FRPGLoadingScreenBrush:

FName TextureName;
virtual FString GetReferencerName() const override
{
	return TextureName.ToString();
}

and add in its constructor:

	TextureName = InTextureName;

So, the whole struct become:

struct FRPGLoadingScreenBrush : public FSlateDynamicImageBrush, public FGCObject
{
	FRPGLoadingScreenBrush(const FName InTextureName, const FVector2D& InImageSize)
		: FSlateDynamicImageBrush(InTextureName, InImageSize)
	{
		TextureName = InTextureName;
		SetResourceObject(LoadObject<UObject>(NULL, *InTextureName.ToString()));
	}

	virtual void AddReferencedObjects(FReferenceCollector& Collector)
	{
		if (UObject* CachedResourceObject = GetResourceObject())
		{
			Collector.AddReferencedObject(CachedResourceObject);
		}
	}
	FName TextureName;
	virtual FString GetReferencerName() const override
	{
		return TextureName.ToString();
	}
};

Step 11:
Generate the solution

Step 12:
Open the project with UE by double clicking the ActionRPG.uproject

Step 13:
Press Play and enjoy

Step 14:
Send some love or suggestions (Which name can be registered for the GC, which macro should replace ABILITY_LOG… where is it defined ??? Oo)

Hope it helps <3

7 Likes

Thank you for your soluction, its work nice!
Have is soluction of 5.2v and work very well with your soluction!

“RPGAbilityTask_PlayMontageAndWaitForEvent.cpp”
For the “ABILITY_LOG(Warning,” you need only Insert a new line between 7 and 8: (hashtag)include “AbilitySystemLog.h” of Include?
I guess it´s working, you can confirm this?
Sem título

It’s not my solution, it’s from the colleague who created the solution for version 5.2

1 Like

Hi, Thanks for your feedback Luca. I didn’t know someone already did a tutorial about this. Feels I’ve just wasted time :confused:

Anyway, the include you mentioned for ABILITY_LOG does the job. I don’t know why I assumed the macro was defined in the project and did not even think it could be defined in the ability system.
I’ll update my initial post to reflect this.

Thanks :slight_smile:

1 Like

You did well; the part you solved about the loading screen helped a lot! And your solution is very good. The more references, the better it is for the development of the community!
Thanks for your post!

1 Like

Nope, you’ve not wasted your time. The other tutorial has errors in it and misses a few things that you covered. Thank you for very much!

1 Like

Thank you for sharing your Experience, it made my day. :heart_decoration:

1 Like

Thanks a lot! You didn’t waste your time, the more, the better.

On Unreal Marketplace it says “Not for Sale” and there seems to be no way to download it anymore.

It works perfectly on UE5.3.2, Thank you,

Hi,
Sorry for the late answer, didn’t connect for a long time.

Make sur you are logged in market place. It’s a different log procdure from the forum (even with the same user login/password). You can be logged in in forum, on not in market place.
If you’re not sure, you can use the launcher.

However, I can’t tell if the product is still available as I already have it in my library. Can someone confirm if it is still available ?

I’m having a problem I never had when I was working on this in UE4, I hear the reason has to do with “child” actors being deprecated possibly?

Every actor I attempt to duplicate randomly has missing attack registration and hit registration like those functions don’t even exist after duplicating, sometimes even less animations properly link.

I know animations seem to be completely different in UE5, maybe that has to do with this bug, being able to use a different skeleton sometimes and sometimes not at random.

Update: When compiling these new enemy actors become completely removed? I have no idea if there is somewhere these new actors need to be added (in a table? add a variable somewhere? increase an array size?) to what’s actually “functioning” in whatever sense…

About Step 10,there are some example:

struct FRPGLoadingScreenBrush : public FSlateDynamicImageBrush, public FGCObject
{
	FRPGLoadingScreenBrush(const FName InTextureName, const FVector2D& InImageSize)
		: FSlateDynamicImageBrush(InTextureName, InImageSize)
	{
		SetResourceObject(LoadObject<UObject>(NULL, *InTextureName.ToString()));
	}

	virtual void AddReferencedObjects(FReferenceCollector& Collector) override
	{
		if (TObjectPtr<UObject> CachedResourceObject = GetResourceObject())//Step 14: UObject* <==> TObjectPtr<UObject>
		{
			Collector.AddReferencedObject(CachedResourceObject);
		}
	}
	
	virtual FString GetReferencerName() const override {
		return TEXT("FRPGLoadingScreenBrush");
	}
};
namespace CanvasWidget {
FString FRenderResources::GetReferencerName() const
{
	return "CanvasWidget::FRenderResources";
}

void FRenderResources::AddReferencedObjects(FReferenceCollector& gc)
{
	gc.AddReferencedObject(m_RenderTarget);
}

} // namespace CanvasWidget

from:

1 Like