X157 Dev Notes

One simulant attempts to share insight with others.

Create Your Dev Experience

The first time you create an experience is the hardest. It’s much easier for additional ones as you can reuse a lot of the work you do here.

For this reason we’ll start with the “Dev” experience, e.g. one you don’t actually care about except to test that things are working.

Note: Default objects need to be based on Lyra code rather than on vanilla engine code.

The order in which you create these matters; some reference others.

Player Pawn

Data Asset Base Class
Characters/B_XG_Character_Base Lyra.Characters/Heros/B_Hero_Default
Characters/B_XG_Character_Humanoid Characters/B_XG_Character_Base

Make sure you also take an extensive look at ShooterCore.Game/B_Hero_ShooterMannequin to see how Epic set up their player pawn. There are things in there you likely don’t need, but there are also things you’ll most certainly want to copy/extend.

In XistGame, B_XG_Character_Humanoid is the player pawn. It extends from B_XG_Character_Base which contains the pertinent parts of Epic’s ShooterGame character.

If you do copy things from B_Hero_ShooterMannequin, make sure you apply this bug fix. You’ll also have to remove the ShooterCore-specific code and references they use there.

XistGame Player Pawn Inheritance

Things I copied from B_Hero_ShooterMannequin

I found these things to be interesting general-purpose items and decided to add them to B_XG_Character_Base as they apply to all characters in team-based games, not just shooters.

Events

Functions

Things I did not copy from B_Hero_ShooterMannequin

Lyra Ability Set

Data Asset Base Class
Characters/DA_XG_AbilitySet_Humanoid C++ LyraAbilitySet

Copy paste Granted Gameplay Abilities:

((Ability=BlueprintGeneratedClass'"/Game/Characters/Heroes/Abilities/GA_Hero_Jump.GA_Hero_Jump_C"',InputTag=(TagName="InputTag.Jump")))

Lyra Ability Tag Relationship Mapping

Data Asset Base Class
Game/DA_XG_TagRelationships C++ LyraAbilityTagRelationshipMapping

Note that XistGame doesn’t actually use these yet, I’m just having them here as an example of the kinds of relationships tags can have since these actions make sense that they’re cancelling/blocking whatever. Feel free to leave the relationships blank if you really want a blank project, or keep these for the sake of illustration.

Just copy this and paste it into Ability Tag Relationships if you want the default 4.

((AbilityTag=(TagName="Ability.Type.Action"),ActivationBlockedTags=(GameplayTags=((TagName="Status.Death.Dead"),(TagName="Status.Death.Dying")))),(AbilityTag=(TagName="Ability.Type.Action.Melee"),AbilityTagsToBlock=(GameplayTags=((TagName="Ability.Type.Action.Emote"))),AbilityTagsToCancel=(GameplayTags=((TagName="Ability.Type.Action.Emote")))),(AbilityTag=(TagName="Ability.Type.Action.Drop"),AbilityTagsToBlock=(GameplayTags=((TagName="Ability.Type.Action.Emote"))),AbilityTagsToCancel=(GameplayTags=((TagName="Ability.Type.Action.Emote")))),(AbilityTag=(TagName="Ability.Type.Action.Emote"),ActivationBlockedTags=(GameplayTags=((TagName="Movement.Mode.Falling")))))

Lyra Input Config

Data Asset Base Class
Input/DA_XG_InputData_Humanoid C++ LyraInputConfig

Duplicate Lyra.Input/InputData_Hero to your new file name, then edit it and remove any inputs you don’t want.

Lyra Pawn Data

Data Asset Base Class
Characters/DA_XG_PawnData_Humanoid C++ LyraPawnData

Configure this asset:

Input Mapping Context

Data Asset Base Class
Input/IMC_XG_Default_KBM C++ InputMappingContext

Duplicate Lyra.Input/Mappings/IMC_Default_KBM

Edit IMC_XG_Default_KBM and remove any of the default input mappings that you don’t want/need in your game.

Lyra Experience Action Set

Data Asset Base Class
Experiences/LAS_XG_SharedInput C++ LyraExperienceActionSet

Copy+Paste Config Actions to Perform:

(GameFeatureAction_AddInputContextMapping'"/XistGame/Experiences/LAS_XG_SharedInput.LAS_XG_SharedInput:GameFeatureAction_AddInputContextMapping_0"',GameFeatureAction_AddInputBinding'"/XistGame/Experiences/LAS_XG_SharedInput.LAS_XG_SharedInput:GameFeatureAction_AddInputBinding_0"')

Configure this asset:

Lyra Team Creation Component

Data Asset Base Class
Game/B_XG_TeamSetup_TwoTeams C++ LyraTeamCreationComponent

Duplicate ShooterCore.Game/B_TeamSetup_TwoTeams

I changed team 1 to be green instead of red.

Lyra Pick Random Manny or Quinn Character

Data Asset Base Class
Characters/Cosmetics/B_XG_PickRandomCharacter C++ ULyraControllerComponent_CharacterParts

Duplicate ShooterCore.Characters/Cosmetics/B_PickRandomCharacter

Gameplay Experience

Data Asset Base Class
Experiences/B_XG_Experience_Dev C++ LyraExperienceDefinition

Duplicate ShooterCore.Experiences/B_ShooterGame_Elimination

Configure this asset:

Note that B_PickRandomCharacter is being added to the base AController class.

It goes to AController specifically so that both Bots (AAIController) and Players (APlayerController) will get the functionality of randomly spawning as either Manny or Quinn.

Though AController does not support modular gameplay itself, we’re still able to inject components into classes that derive from it, including the modular derivatives that Lyra uses.

World: Dev Map

Data Asset Base Class
Maps/L_XG_DevMap C++ World

Configure this asset (its World Settings):

You don’t need much here right now. A plane, a light and a C++ LyraPlayerStart actor should do it.

Update Project Settings

Now you should update your project settings to use L_XG_DevMap as the default, if that is your desired setup.

Thank you

Quick shout-out to braheem@github who identified an error in the process that has now been fixed above. Thank you!

Process Complete

You now have your own experience that you can modify to suit your needs. All of its dependencies are in your own project so you can change those as well.

Back to LyraStarterGame