Scripting in Surnames?

I think I already know the answer, but can we add a surname to player yet? Not to their Vault, but more as a cosmetic thing while in the world running around.
Buddywarrior to Sir Buddywarrior

Um, that’s adding a title not a surname :slight_smile:

You can script it making a basic assumption that it’s “firstname lastname” pretty easily. But it’s not built in. There is just the name field.

If you think of it in this context as Prefix, Name, Suffix, you can do one or the other, but not both, with what we have on hand.

It’s not terribly hard to add your own variables to the PC that you use for this, however.

Lol, I dunno what my brain was thinking.

Do you know what function I could use as a starting place ?

StringParse() in a loop until there are no words left.

If players have followed the firstname / lastname structure encouraged by Chargen, you will get two words.

Of course, if they’re called “Dame Ursula de Holloway” you will get 4 words with no easy way to determine which is which.

Isn’t there a way to put a variable on the PC that is the Title or honorific (Mr., Miss, etc.), and then use that to change the PC name to include that before the actual name?
Ah, you can’t use SetName on a PC?

I think this may depend on where you want the name to appear. For conversations you could use custom tokens but the full name will not appear above the name when the mouse pointer hovers over them.


Best to have it in seperate variables for that reason, I’d think.

Ideally just when we mouse over the player.

Only way to make it appear on mouseover is to have it all in firstname/lastname. It’s an engine limitation.

I can conceive of swapping in and out proper firstname/lastname and that with the titles but that is going to be awkward at the best of times.

1 Like