Making your slave; add their name to the following, then go down the documentation adding in your changes.
Making your slave; add their name to the following, then go down the documentation adding in your changes.
-each variable must be seperated from the last by a comma followed by a space
-each variable must be seperated from the last by a comma followed by a space
...
@@ -2681,7 +2691,41 @@ Design limitations:
...
@@ -2681,7 +2691,41 @@ Design limitations:
- Sizes of inividual fetuses updated only on call of WombGetVolume - not every time as called WombProgress. This is for better overail code speed.
- Sizes of inividual fetuses updated only on call of WombGetVolume - not every time as called WombProgress. This is for better overail code speed.
- For broodmothers we need actual "new ova release" code now. But it's possible to control how many children will be added each time, and so - how much children is ready to birth each time.
- For broodmothers we need actual "new ova release" code now. But it's possible to control how many children will be added each time, and so - how much children is ready to birth each time.
Usage form sugarcube code (samples):
For new generated slaves automatically called WombInit function to do initial setup. But it's can be called at any time "just in case", if code need to be completely sure that womb exists and correctly initialized. If .preg and pregType is set above 0 at time of call with empty womb array - fetuses will be generated too.
Pregnancy control, best practices ($activeSlave used as sample, can be any slave related variable or $PC for player character):
Impregnantion:
<<set WombImpregnate($activeSlave, 3, -1, 15)>>
$activeSlave, 3 fetuses, -1 - player is father, 15 week is initial time for fetuses. Can be used on already pregnant slaves (broodmothers use it).
<<set $activeSlave.preg = 1>>
to mark slave as pregnant for advancing at End Week code.
<<SetSlaveBelly $activeSlave>>
Last line needed only if you need to show description with changed state immidiately, an advanced initial pernancy time set (showing already).
Advancing pregnancy:
<<set WombProgress($activeSlave, 1)>>
Advancing 1 week. Normally it's called by End Week processing for all slaves.
Birth checking:
<<if WombBirthReady($activeSlave, 40) > 0>>
Check if we have any babies in womb with is 40 week gestation age?
Birthing:
<<set _babies = WombBirth($activeSlave, 34)>>
In array _babies will be placed all babyies from womb of $activeSlave who gestation age at least 34 weeks. Others will be leaved in womb.
Optionally:
<<set WombFlush($activeSlave)>>
Will empty womb. You also still should set .preg .pregType .pregSource .pregWeek to 0.
_babies here become normal array - we can do with it as with any other array in sugarcube. _babies.length - size, _babies[0] - first element, etc. Contains all babies object, with their age, sex, volume/size, and father ID. Right now - not used anywhere but useful for possible incubator improvements in future at least.
Usage reference without sugarcube code (samples):
WombInit($slave) - before first pregnancy, at slave creation, of as backward compatibility update.
WombInit($slave) - before first pregnancy, at slave creation, of as backward compatibility update.
...
@@ -2697,3 +2741,10 @@ WombFlush($slave) - clean womb (array). Can be used at broodmother birthstorm or
...
@@ -2697,3 +2741,10 @@ WombFlush($slave) - clean womb (array). Can be used at broodmother birthstorm or
$slave.bellyPreg = WombGetWolume($slave) - return double, with current womb volume in CC - for updating $slave.bellyPreg, or if need to update individual fetuses sizes.
$slave.bellyPreg = WombGetWolume($slave) - return double, with current womb volume in CC - for updating $slave.bellyPreg, or if need to update individual fetuses sizes.
_time = WombMinPreg($activeSlave) - age of most young fetus in womb.
_time = WombMaxPreg($activeSlave) - age of most old fetus in womb.
WombUpdatePregVars($activeSlave) - automaticaly update $activeSlave.preg, $activeSlave.pregType, $activeSlave.bellyPreg to actual values based on womb fetuses.
P.S. All this womb system can be much more automated (.preg .pregType .pregSource .pregWeek may have to be done in a way, that they will have no need to be controlled manually anywhere at all. Just will be set fully automatially). But in this case many changes in present game code needed, to REMOVE legacy code.