public class SomeNPC : ModNPC
{
public override void SetStaticDefaults()
{
// Your code
//...
//...
// happiness
NPC.Happiness
.SetBiomeAffection<ForestBiome>(AffectionLevel.Like) // prefers the forest.
.SetBiomeAffection<SnowBiome>(AffectionLevel.Dislike) // dislikes the snow.
.SetBiomeAffection<ExampleSurfaceBiome>(AffectionLevel.Love) // likes the Example Surface Biome
.SetNPCAffection(NPCID.Dryad, AffectionLevel.Love) // Loves living near the dryad.
.SetNPCAffection(NPCID.Guide, AffectionLevel.Like) // Likes living near the guide.
.SetNPCAffection(NPCID.Merchant, AffectionLevel.Dislike) // Dislikes living near the merchant.
.SetNPCAffection(NPCID.Demolitionist, AffectionLevel.Hate); // Hates living near the demolitionist. // < Mind the semicolon!
}