villager.dataType
One villager a player can befriend. Every `.data` asset bound to `friendshipKit.villager`, in the kit or anywhere in your world, is a villager friendshipKit finds by itself, so adding a villager is adding one data asset and no code. `Friends.defineVillager(def)` takes the same fi…
villager (friendshipKit dataType)
One villager a player can befriend. Every .data asset bound to friendshipKit.villager, in the kit or anywhere in your world, is a villager friendshipKit finds by itself, so adding a villager is adding one data asset and no code. Friends.defineVillager(def) takes the same fields from code.
| field | what |
|---|---|
id | unique id the game uses (Friends.talk("mira"), Villager.villagerId) |
displayName | the name players read |
bio, personality | a short line about them, one word for their temperament |
birthday | { season = "spring" | "summer" | "autumn" | "winter", day = 1..31 } |
portrait | { color = "#hex", emoji = "🌻", icon = "<texture name, optional>" } |
model, modelScale | the bundle Friends.spawnVillager places for this villager (a bundle name; empty finds models/villager_<id> in the kit) and its size against a grown-up (pip is 0.77) |
loves, likes, dislikes, hates | each { items = { item ids }, tags = { item tags } } |
greetings | { { minLevel = 0, lines = {...} }, { minLevel = 4, lines = {...} } }: the highest minLevel at or below the player's level is used |
giftLines | { love = {...}, like = {...}, neutral = {...}, dislike = {...}, hate = {...} } |
birthdayLines | said on the first chat on their birthday |
birthdayGiftLines | said when a liked or loved gift arrives on their birthday |
repeatLines | said when you chat again the same day |
limitLines | said when they cannot take another gift today or this week |
Lines can hold {player}, {item}, {name} and {level}.
Taste order: the villager's own item lists first (love, hate, like, dislike), then the kit's universal item lists, then the villager's tag lists, then the universal tag lists, else neutral.
Scoped to this part · feeds back into the world's score.