Jump to content

Changing NPCs Name


Recommended Posts

I was looking into if there was a way to change a placed NPCs name, Basically given you an option to change the name, So I was thinking it would work something like this:

        ObjectReference rPlaced = None
        ; ---- Guard Pick ----
        iButton = MessageGuard.Show()
        If(iButton == 0)
            Return ;
        ElseIf(iButton == 1)
            rPlaced = Player.PlaceAtMe(GuardM, 1)
                iButton = MessageNamesList.Show()
                If(iButton == 0)
                (rPlaced as Actor).SetActorFullName(Allison)
                ElseIf(iButton == 1)
                (rPlaced as Actor).SetActorFullName(Aaliyah)

Using the SetActorFullName that is used in-game I would think it would work... But it won't, Says SetActorFullName isn't a function, anyone know of a different way to work around this ?

 

The only other option I could think of was making a bunch of NPCs with different names, and doing it like this:

        ObjectReference rPlaced = None
        ; ---- Guard Pick ----
        iButton = MessageGuard.Show()
        If(iButton == 0)
            Return ;
        ElseIf(iButton == 1)
                iButton = MessageNamesList.Show()
                If(iButton == 0)
                rPlaced = Player.PlaceAtMe(Allison, 1)
                ElseIf(iButton == 1)
                rPlaced = Player.PlaceAtMe(Aaliyah, 1)
Edited by Karel2015
Link to comment
Share on other sites

Heh. I was curious so I tracked down where dogmeat's name is changed. I'll save others the trouble. It's in the dogmeatQuest. It's changed when the stage is set to 20 and the alias for his name is forced. I'm using the wrong terms but that should get anyone interested to see how it's down in the right place.

Link to comment
Share on other sites

What about re-using code/scripts from the DLC01 Robotworkbench? From what little I can understand from the files the "create a new automatron" seems to spawn a barbones default version and then apply changes/mods to it, namechange included. If you can find its interface and what it does/hooks into you might be able to extend the namechange functionality to work on any spawned npc.

Link to comment
Share on other sites

What about re-using code/scripts from the DLC01 Robotworkbench? From what little I can understand from the files the "create a new automatron" seems to spawn a barbones default version and then apply changes/mods to it, namechange included. If you can find its interface and what it does/hooks into you might be able to extend the namechange functionality to work on any spawned npc.

Those are done via Scaleform / Flash and don't easily interact with Papyrus.

Link to comment
Share on other sites

 

What about re-using code/scripts from the DLC01 Robotworkbench? From what little I can understand from the files the "create a new automatron" seems to spawn a barbones default version and then apply changes/mods to it, namechange included. If you can find its interface and what it does/hooks into you might be able to extend the namechange functionality to work on any spawned npc.

Those are done via Scaleform / Flash and don't easily interact with Papyrus.

 

Thanks for the information, that's really interesting! You wouldn't happen to how do the scaleform / flash modifies in game data, does it have direct access with vanilla actionscript/shockwave functions on the game world/objects or is it through some sort of API that translates everything into something more simple the game engine understands, papyrus or other? Something one might be able to talk to directly, having to create swf files and scripts just to change a name value sounds really complicated :sweat:

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...