Children
Children are people of the town. They are born or adopted, live at home, go to nursery and school, grow on a faster clock than adults, and become who their parents and their upbringing made them.
A child in Underlives is a person like any other, under 18. A baby born of a pregnancy, a child adopted, a child of a household in town, a child in a dependent record (Actor:addDependent, see Sharing a home): each one lives with a parent or a guardian, spends the day at nursery or school, sleeps in their room at night and has a personality from birth.
lua-- A child for your story: lives with the player, age 1, with the player's share of personality.
local kid = Childhood:haveChild({ parents = { Player }, age = 1, name = "Robin" })
-- Later: how they are raised changes who they become.
Childhood:shape(kid, "trust", 0.03, "a parent who came looking all night")
-- At 18, read it back.
for _, t in ipairs(Childhood:traits(kid)) do Game:Log(t) end
for _, e in ipairs(Childhood:upbringing(kid)) do Game:Log(e.reason) end
Every call is listed in the generated Lua API, under Childhood.
The rules no mod can change
Children are in the game for realism: pregnancies, parenthood, costs, worry, loss. Nothing sexual ever involves a minor. The engine enforces it in C++, whatever a mod writes:
- A minor wears the child body, never the adult one, and is never undressed below a base layer, never in a sexual scene, never on screen during one (other people in the room become shadows).
- A minor never holds an adult-only personality trait (the
depravitygroup, any trait marked"adultOnly": trueor weighing a sexual facet), and the sexual facets and behaviours read 0 for them. - An activity marked
"adult": truein a.ulactivity(a cigarette, a beer, a gun) is never played by a minor. - A minor in a private room (bathroom, bedroom at night) locks the door, and nobody walks in.
Writing about children follows the same line: a child is never described sexually, never near the erotic part of a scene, never the hook. They can interrupt their parents (a knock, a bad dream), always off screen, and only appear once everyone is dressed.
Growing up: the childhood clock
Adults age with the calendar. A minor grows one year every daysPerChildYear game days (25 by default), so a baby born in play is grown in about a game year and a quarter. At 18 the calendar takes over. Everything about it is mod data, in Family/childhood.json (ul_Base's, overridden field by field by any mod's):
json{
"daysPerChildYear": 25,
"stages": [
{ "id": "baby", "from": 0, "name": "Baby" },
{ "id": "toddler", "from": 2, "name": "Toddler" },
{ "id": "child", "from": 5, "name": "Child" },
{ "id": "preteen", "from": 10, "name": "Preteen" },
{ "id": "teen", "from": 13, "name": "Teenager" },
{ "id": "adult", "from": 18, "name": "Adult" }
],
"heritability": 0.4,
"plasticity": [ { "until": 6, "factor": 1.0 }, { "until": 12, "factor": 0.75 }, { "until": 18, "factor": 0.5 }, { "until": 999, "factor": 0.15 } ],
"traitsSettle": true,
"bedtimeByAge": [ { "age": 0, "at": 19 }, { "age": 6, "at": 20 }, { "age": 11, "at": 21 }, { "age": 14, "at": 22.5 } ],
"wakeHour": 7,
"bodyFromAge": 3,
"heightByAge": [ { "age": 3, "scale": 0.60 }, { "age": 6, "scale": 0.72 }, { "age": 9, "scale": 0.82 }, { "age": 12, "scale": 0.92 }, { "age": 15, "scale": 0.98 }, { "age": 18, "scale": 1.0 } ]
}
- stages: the ids
Childhood:stageanswers.adultalways starts at 18. - heritability: the share of each personality facet a child takes from their parents' average at birth.
- plasticity: how much
Childhood:shapemoves a facet at each age. - traitsSettle: a minor's defining traits are drawn again from their facets at every stage, then kept at 18. A child raised gently and a child left alone, born alike, do not end up with the same traits.
- bedtimeByAge / wakeHour: when a child at home goes to their bedroom for the night.
- bodyFromAge: younger than this a child is not drawn as a body.
- heightByAge: how tall the child body stands at each age.
Events
Two events tell your mod when a child moves on:
luaEvents:on(M, "childStage", function(id, stage, previous)
local kid = People:get(id)
-- first steps, first day at school, the closed bedroom door...
end)
Events:on(M, "comingOfAge", function(id)
-- 18 today: who did they become?
end)
They fire for every child of the town (Childhood:parents(kid) says whose), once per change.
Leaving home
At 18 nothing forces a child out. Childhood:moveOut(person) gives them a place of their own or a flatshare in town; until then they live where they grew up.
The official mods
- ul_Parenthood: the player's children as people (
Services.parenting): the child the day's scenes are about, the bond each one keeps, the school gate, adoption. - ul_GrowingUp: the life of a childhood. Stage milestones, coming of age, everyday moments told by the child's temperament, a baby's nights, illness, accidents, bullies on both sides, the school, running away, a ransom. Every choice leaves its mark through
Childhood:shape; itsGrowingUp.EVENTStable takes rows from other mods. - ul_Custody: what children need and what happens when they do not get it.