Terraria – How does NPC naming work

terraria

Prior to the 1.1 release, my friends and I always referred to the guide as Brian. When we generated our new world, the guide had a name: Trent. This was sub-optimal, but we didn't try to do anything about it.

Later, Trent had an unfortunate accident involving a lot of lava. A new guide appeared: Maxwell. This was a new name. This leads us to the question: how many times must we murder our guide before we get Brian? Is Brian even a possible name? I couldn't find a list online. Alternatively, is there a world editor that will allow us to rename our guide?

Best Answer

NPC names are saved as text in the world file. I'm not aware of any save editor that can rename NPCs at this point.

However: There are currently* 35 possible names for the Guide, and — one of them is, in fact, Brian. Since the name is completely random each time, there's no telling how many of the gentle Guides you'll have to mercilessly eviscerate before finally getting a Brian.

Although, at about the 24th slain Guide, your chances of having gotten at least one Brian will approach 50%.


Hex editing

If you really want to rename your NPCs badly, you can do so by editing your raw save file with a hex editor like HxD. This should go without saying, but make a backup first because it's very easy to fry your save file.

Currently*, the NPC names are at the very end of the save file. They're saved as strings with length prefixes, so edit the name to be whatever you want, then edit the byte before it to reflect the length. For example, "Brian" has 5 characters, so you'd edit the preceding character to be \x05 (ENQ).

The maximum length for NPC names is 22, and obviously they will reset if the NPC dies.

* Terraria 1.1

Related Topic