Skip to content
Rijam edited this page Mar 26, 2024 · 1 revision

All vanilla Town NPCs except Santa and the Old Man have random names that they can spawn with. Adding random names to our Town NPC is very easy. We need to override the SetNPCNameList() hook.

public override List<string> SetNPCNameList() {
	return new List<string>() {
		"blushiemagic",
		"Chicken Bones",
		"jopojelly",
		"Jofairden",
		"Mirsario",
		"Solxan"
	};
}

You can make this list as long or as short as you like.

If you do not want a random name like Santa or the Old Man, simply don't include this hook. The "profession" name will be shown instead.

You can also localize the names by using Language.GetTextValue("Key").



Clone this wiki locally