Log inGet started
Package

villager.dataType

Newest version

README.md

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.

fieldwhat
idunique id the game uses (Friends.talk("mira"), Villager.villagerId)
displayNamethe name players read
bio, personalitya 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, modelScalethe 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, hateseach { 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 = {...} }
birthdayLinessaid on the first chat on their birthday
birthdayGiftLinessaid when a liked or loved gift arrives on their birthday
repeatLinessaid when you chat again the same day
limitLinessaid 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.