Okay, I'm not sure if this is possible, but I wanted to know if there was a way to create and name an individual child after a player's character gives birth. (according to this code)
As I have it, there I can increase the $kids variable, which reflects the total number of children.
<<if def $birth and $birth lte $gameDate>>\
It's time for the birthing event!\
<<if $health gte 50 and $multiples is "singleton">>
<<set $kids to $kids += 1>>
<<elseif $health gte 50 and $multiples is "twins">>
<<set $kids to $kids += 2>>
<<elseif $health gte 50 and $multiples is "triplets">>
<<set $kids to $kids += 3>>
<<elseif $health gte 50 and $multiples is "quadruplets">>
<<set $kids to $kids += 4>>
<</if>>
Congratulations!\
<<if $health lt 50>>
<<set $kids to $kids += 0>>
The baby didn't make it.
<</if>>
<<unset $birth>>
<</if>>
What I'd like to do, in addition to that, is automatically create a new variable that the user then renames to reflect the name of the child and be able to list all the children by name w/ links to their own specific pages in a "home" passage. I also wanted to attach certain characteristics to that variable so they might take after the player's character and/or the npc the player chose to reproduce with. Eye color, hair color, and skin color are some things the player can choose for their character and some things that are defined in the npc parent.
NPC coding
<<set $companion1 to {}>>
<<set $companion1.name to "sebastian",
$companion1.skinColor to "olive",
$companion1.eyeColor to "black",
$companion1.hairColor to "black",
$companion1.persona to "quiet"
>>
Example of what I wanted to try:
(birthing event) > $kids +1 > $kid1 (randomized gender and appearance taken from parents) > congratulations, it's a boy! > rename $kid1 to jim > "Jim was born healthy, and has (his mother's eyes) and (his father's hair)!"
Then the next time the character is pregnant and gives birth, it would be like:
(birthing event) > $kids +1 > $kid2 (randomized gender and appearance taken from parents) > congratulations, it's a girl! > rename $kid2 to jane > "Jane was born healthy, and has (his father's eyes) and (his father's hair)!" (if all traits from single parent) "She looks just like her father."
Is that too much for twine to manage? I have no clue what macro I should go for, if there is one.