I've tried looking around, so apologies in advance if this has been answered and/or if it's an obvious answer. I'm pretty new to twine.
I'm trying to add romance elements to my story, including making a family with an npc. I followed along with the following threads (gregorian date and time, access pregnancy progression, how to trigger birthing) and had everything working as it should, no problem. I even made minor edits to account for randomized multiples
:: StoryInit
<<if $fertility gte 75>>
<<set $multipleChance = {
quadruplets: 0.1,
triplets: 0.2,
twins: 0.4,
singleton: 0.6
}>>
<<elseif $fertility gte 50>>
<<set $multipleChance = {
quadruplets: 0.05,
triplets: 0.15,
twins: 0.3,
singleton: 0.5
}>>
<<else>>
<<set $multipleChance = {
quadruplets: 0,
triplets: 0.1,
twins: 0.2,
singleton: 0.4
}>>
<</if>>
<<if $random <= $multipleChance.quadruples>>
<<set $multiples to "quadruplets">>
<<elseif $random <= ($multipleChance.quadruplets + $multipleChance.triplets)>>
<<set $multiples to "triplets">>
<<elseif $random <= ($multipleChance.quadruplets + $multipleChance.triplets + $multipleChance.twins)>>
<<set $multiples to "twins">>
<<else>>
<<set $multiples to "singleton">>
<</if>>
:: conception act
<<if ndef $birth and visitedTags("pregnancy") is 3>>
<<if $emotion is "happy" or $emotion is "content">>
action!
<<set $pregnant to true>>
<<set $conception to clone($gameDate)>>\
<<set $birth to clone($gameDate)>>
<<if $multiples is "singleton">>
<<set $birth.setDate($birth.getDate() + 266 + random(-21, 14))>>
<<elseif $multiples is "twins">>
<<set $birth.setDate($birth.getDate() + 266 + random(-28, 7))>>
<<elseif $multiples is "triplets">>
<<set $birth.setDate($birth.getDate() + 266 + random(-35, 0))>>
<<elseif $multiples is "quadruplets">>
<<set $birth.setDate($birth.getDate() + 266 + random(-42, -7))>>
<</if>>
<<silently>>
gameDate: $gameDate
birth: $birth
<<set _pregnant to setup.isPregnant()>>
<<set _due to setup.estimatedDueDate()>>
<<set _weeks to setup.weeksPregnant()>>
\conception: <<= $conception>>
birth: <<= $birth>>
\fetus count: <<= $multiples>>
<</silently>>
<</if>>
<<else>>
<</if>>
My issue comes when the character has done everything necessary to conceive a second child.
<<if def $birth and $birth lte $gameDate>>
Whatever to describe what happens in the hospital
<<unset $birth>>
<<set $kids to $kids + 1>>
<<set $Status to "Happy">>
<</if>>
<<if def $birth and $birth lte $gameDate>>\
It's time for the birthing event!\
<<unset $birth>>
<<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>>
<<set $Status to "Happy">>
<</if>>
(how to trigger birthing)
Unsetting the birth variable doesn't seem to do anything? When I cycle through the passages to simulate the character's second pregnancy, the due date doesn't change. Considering it is based on a cloned conception date that has a randomized threshold, I don't think I'm just randomly getting the same due date. Plus, the due date is 9+ months behind the current game date. I've put some passages between the first labor and second conception attempt and have even used the "add days" widget in case the game had to have a day change in between, but nothing I do seems to alter the variables the way I need them to. I have no idea what to do to make it change.
Any help is super appreciated! c: thanks in advance.