How to use SetNPCCharacterDefinition?

You don’t load the asset from the digest. Epic closed that as working as intended:

NPC Character Definitions are assigned in the editor through @editable, then handed to the spawner at runtime.

using { /Fortnite.com/Devices }

npc_def_switcher := class(creative_device):
    @editable
    NPCSpawner : npc_spawner_device = npc_spawner_device{}

    @editable
    DefinitionA : npc_character_definition = npc_character_definition{}

    @editable
    DefinitionB : npc_character_definition = npc_character_definition{}

    SwapToB():void=
        if (NPCSpawner.SetNPCCharacterDefinition[DefinitionB]):
            # same character type — ok
        else:
            # failed — character type changed (guard vs wildlife vs custom)

Setup:

  1. Create the NPC Character Definition assets in the Content Browser as usual.
  2. Place this device, assign Definition A / B and the spawner in Details.
  3. Call SetNPCCharacterDefinition before spawn. If something is already out, despawn first, then set, then spawn.

The call is <decides>, so it has to sit in an if. Docs: it fails when the new definition’s character type doesn’t match the current one. Guard → guard is fine. Guard → custom wildlife is not.

You can’t construct an npc_character_definition from a path string. No /Assets/... handle. Editor reference is the whole API.