NPC Verse API is Deprecated but no guide on site on what to do about it

Summary

In v43.00 NPC navigateable and movement types etc have been deprecated but online docs still point to doing it that way instead of whatever way it should be done now. This is confusing to users and docs should have been updated with release of v43

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Documentation

Steps to Reproduce

Go here Create Custom NPC Behavior in Unreal Editor for Fortnite | Fortnite Documentation | Epic Developer Community

Build that

Expected Result

Should compile fine and be the latest and greatest way to do such a thing

Observed Result

Will give compile warnings and deprecation warnings all over the place

Platform(s)

irrelevant

I agree that it should’ve been made more clear before.

In the digest, it’s recommended to replace these interfaces with the npc_actions_component.
So instead of calling focus_interface.Focus, you do npc_behavior.GetEntity[].GetComponent[npc_actions_component].Focus and it’ll work the same

Thanks for the flag, I’ll see what we can do about getting this updated.

Thanks for the report!
Here is how to move off the deprecated interfaces:

  1. navigatable → npc_actions_component

Before:

if (Navigatable :=  GetAgent[].GetFortCharacter[].GetNavigatable[]):
    Result := Navigatable.NavigateTo(MakeNavigationTarget(Destination), ?MovementType := movement_types.Walking)
    if (Result = navigation_result.Reached):
       Navigatable.Wait(?Duration := 5.0)

After:

if (NPCActions := GetEntity[].GetComponent[npc_actions_component]):
    Result := NPCActions.NavigateTo(MakeNavigationTarget(Destination), ?MovementType := movement_type.Walking)
    if (Result.GetSuccess[]):
        NPCActions.Idle(?Duration := 5.0)
  1. focus_interface → npc_actions_component

Before:

if (Focus := GetAgent[].GetFortCharacter[].GetFocusInterface[]):
    Focus.MaintainFocus(LookAtPoint)

After:

if (NPCActions := GetEntity[].GetComponent[npc_actions_component]):
    NPCActions.Focus(LookAtPoint)
  1. fort_leashable → guard_actions_component (guards only)

Before:

if (Leashable := GetAgent[].GetFortCharacter[].GetFortLeashable[]):
    Leashable.SetLeashPosition(SpawnPoint, 500.0, 1000.0)
    Leashable.SetLeashAgent(AgentToFollow, 500.0, 1000.0)
    Leashable.ClearLeash()

After:

if (GuardActions := GetEntity[].GetComponent[guard_actions_component]):
    GuardActions.Tether(SpawnPoint, 1000.0)
    GuardActions.Tether(AgentToFollow, 1000.0)
    GuardActions.Untether()

The deprecated calls still work for now. Internally, they forward to these components, so behavior does not change when you migrate.

The status of FORT-1185472 changed to ‘Needs Triage’. We are routing this to the appropriate team for investigation.