Hi,
I am developing a singleplayer narrative single experience third-person game (with inventory and skill tree) in kind of a solo project (UE 5.2). I already learned a lot about Unreal, GameplayAbilities and Lyra during the past 1,5 years. I’d really like to have my game based on a decent software design.
A couple of weeks ago I started implementing my own basic ability system getting inspiration from the official GAS. In the end I created a new (3rd) repository from scratch using the offical GAS. I successfully isolated a copy of the Lyra enhanced input to native/ability GameplayTag system and integrated it into my project.
Questions
- Should I create a 4th repo based on Lyra with own subclasses getting updates through git? Or
- Should I stick to my 3rd repo and only take what I need from Lyra?
What is your opinion about this regarding the scope of my solo game project (already using GAS and Enhanced Input to GameplayTags), considering me being kind of a perfectionist with limited time?
See https://x157.github.io/UE5/LyraStarterGame/Development-Considerations
Appendix: Example Inventory System
IMHO Lyra uses far to many abstraction layers for what I’d like to achieve. The inventory system for example:
ULyraInventoryManagerComponent
class LYRAGAME_API ULyraInventoryManagerComponent : public UActorComponent
└─FLyraInventoryList InventoryList;
└─TArray<FLyraInventoryEntry> Entries;
├─int32 StackCount = 0;
└─TObjectPtr<ULyraInventoryItemInstance> Instance = nullptr;
└─TSubclassOf<ULyraInventoryItemDefinition> ItemDef;
└─TArray<TObjectPtr<ULyraInventoryItemFragment>> Fragments;
ULyraInventoryItemDefinition
TSubclassOf<ULyraInventoryItemDefinition> ItemDef;
└─TArray<TObjectPtr<ULyraInventoryItemFragment>> Fragments;
└─UInventoryFragment_EquippableItem
└─TSubclassOf<ULyraEquipmentDefinition> EquipmentDefinition;
├─TSubclassOf<ULyraEquipmentInstance> InstanceType;
| └───TArray<TObjectPtr<AActor>> SpawnedActors;
|
├─TArray<TObjectPtr<const ULyraAbilitySet>> AbilitySetsToGrant;
|
└─TArray<FLyraEquipmentActorToSpawn> ActorsToSpawn;
├─TSubclassOf<AActor> ActorToSpawn;
├─FName AttachSocket
└─FTransform AttachTransform;
I was thinking about creating my own inventory system using ItemDefinitions but not Instrances, EquipmentDefintions etc.:
class UMyInventoryComponent: public UActorComponent
└─TArray<FMyInventorySlot> InventorySlots;
└─FMyInventorySlot
├─int Count = 0;
└─TSubclassOf<UMyInventoryItemDefinition> ItemDef;
└─TArray<TObjectPtr<UMyInventoryItemFragment>> Fragments;
...
└─UInventoryFragment_EquippableItem
├─TArray<TObjectPtr<const UMyAbilitySet>> AbilitySetsToGrant;
├─TSubclassOf<AActor> ActorToSpawn;
├─FName AttachSocket;
└─FTransform AttachTransform;
Btw. I already tried to isolate the lyra inventory system (see https://x157.github.io/UE5/LyraStarterGame/Inventory/) without success. Seems to be to depended on other parts of Lyra.
Thanks in advance for your thoughts.