[Sidekicks / SceneGraph] ApplyEquippedSidekickCosmetic[] doesn't update description_component

Summary

Trying to get sidekick name, icon and description for my game HUD, using npc sidekick’s description_component.


if(Char := Behavior.GetBotCharacter[]){ 
                    SetupCharacterBindings(Char); 
                    if(DescComp := Char.GetEntity[].GetDescendantComponent[description_component]){
                        if(SC := Behavior.GetBotCharacterEntity[].GetDescendantComponent[npc_sidekick_component]){ 
                            if(SC.ApplyEquippedSidekickCosmetic[GetOwner[].GetAgent()]){
                                set DescComp.Description = ToMessage("Sidekick Lv. {GetLevel()}");
                                set DescComp.ShortDescription = ToMessage("Sidekick Lv. {GetLevel()}");
                            }else{
                                set DescComp.Name = LocalizedName; 
                                set DescComp.Description = ToMessage("Sidekick Lv. {GetLevel()}");
                                set DescComp.ShortDescription = ToMessage("Sidekick Lv. {GetLevel()}");
                            }
                        }else{
                            set DescComp.Name = LocalizedName; 
                            set DescComp.Description = ToMessage("Creature Lv. {GetLevel()}");
                            set DescComp.ShortDescription = ToMessage("Creature Lv. {GetLevel()}");
                        }                        
                    }
                }

                if(CUI := IPetControllerUI[Behavior.GetOwner[].GetControllerUI[]]){ 
                    #LogConfirm("UI Pet should update here!");
                    #CUI.UpdateAllPetStats(); 
                    spawn{ DelayedUIUpdate() }
                }

This code is part of my framework and uses a bit of custom global functions I made:

  • GetDescendantComponent: Returns first descendant component of type t
  • GetBotCharacterEntity: pretty much npc_behavior.GetAgent.GetFortCharacter.GetEntity

This portion of code runs on spawn, it checks if the npc is a sidekick or not, if it’s a sidekick, it will check if it has a owner. If it does, it won’t try to override the description_component name, because I’m expecting the system to update the component after I call .ApplyEquippedSidekickCosmetic


I even tried implementing a little delay, just in case the npc takes time to update those information, but it’s the same result

DelayedUIUpdate<protected>()<suspends>:void={
            Sleep(0.1);
            if(CUI := IPetControllerUI[GetCreatureBehavior[].GetOwner[].GetControllerUI[]]){ 
                #LogConfirm("UI Pet should update here!");
                CUI.UpdateAllPetStats(); 
            }
        }

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

Scene Graph

Steps to Reproduce

  • Spawn a Sidekick NPC
  • Use ApplyEquippedSidekickCosmetic to apply the look
  • Use SceneGraph system to find npc’s description_component (or use has_description interface), check name, description and icon to see if it changed (mainly UI purpose I think)

Expected Result

  • Sidekick’s description_component name and icon changed accordingly

Observed Result

  • Sidekick’s description_component remains the same (default NPC definition)

Platform(s)

Windows UEFN

Island Code

Private Code

Upload an image

Additional Notes

Not sure if it’s by design, but I’d really like to get access to, at least, the name since it’s given by the player and I’d love to see it on the UI. (Especially because anyone can inspect your pet on this island)

FORT-1125530’s status has changed to ‘Ready for QA’. A member of the QA department is investigating the issue.