-
Notifications
You must be signed in to change notification settings - Fork 0
Names
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").
- Previous page: Spawn Condition
- Next page: Chat
Basic Guides
Intermediate Guides
Advanced Guides
- Preliminaries and What are Town NPCs?
- Spriting
- Create Your Town NPC's Class
- Spawn Condition
- Names
- Chat
- Buttons
- Shop
- Attacking
- Bestiary
- Happiness
- Profile
- Gore
- Misc
- Editing Vanilla NPCs with Global NPC