Skip to content
Snippets Groups Projects
slave variables documentation - Pregmod.txt 67.5 KiB
Newer Older
energy:

sex drive
0-20  - no sex drive
21-40 - poor sex drive
41-60 - average sex drive
61-80 - good sex drive
81-95 - powerful sex drive
Pregmodder's avatar
Pregmodder committed
96+   - nymphomaniac
Pregmodder's avatar
Pregmodder committed
need:

how badly she needs sex.
klorpa's avatar
klorpa committed
0	 - sated
Pregmodder's avatar
Pregmodder committed

attrXX:

attraction to women
0-5   - disgusted by women
6-15  - turned off by women
15-35 - not attracted to women
36-65 - indifferent to women
66-85 - attracted to women
86-95 - aroused by women
96+   - passionate about women

attrXY:

attraction to men
0-5   - disgusted by men
6-15  - turned off by men
15-35 - not attracted to men
36-65 - indifferent to men
66-85 - attracted to men
86-95 - aroused by men
96+   - passionate about men

*if both attrXX and attrXY > 95, slave will be omnisexual*
klorpa's avatar
klorpa committed
*if energy > 95 and either attrXX or attrXY > 95, slave will be nymphomaniac

attrKnown:

0 - no
1 - yes

fetish:

"none"
"mindbroken"
"submissive"
"cumslut"
"humiliation"
"buttslut"
"boobs"
"sadist"
"masochist"
"dom"
"pregnancy"

fetishStrength:

how strong her fetish is (10-100)

10+ - enjoys fetish
60+ - likes fetish
95+ - loves fetish

fetishKnown:

is fetish known to player
0 - no
1 - yes

behavioralFlaw:

"none"
klorpa's avatar
klorpa committed
"arrogant"		- clings to her dignity, thinks slavery is beneath her
"bitchy"		- can't keep her opinions to herself
"odd"			- says and does odd things
"hates men"		- hates men
"hates women"	- hates women
"gluttonous"	- likes eating, gains weight
"anorexic"		- dislikes eating and being forced to eat, loses weight
"devout"		- resistance through religious faith
"liberated"		- believes slavery is wrong
klorpa's avatar
klorpa committed
"confident"		- believes she has value as a slave
"cutting"		- often has as witty or cunning remark ready, knows when to say it
"funny"			- is funny
"fitness"		- loves working out
"adores women"	- likes spending time with women
"adores men"	- likes spending time with men
"insecure"		- defines herself on the thoughts of others
"sinful"		- breaks cultural norms
"advocate"		- advocates slavery
klorpa's avatar
klorpa committed
"hates oral"		- hates oral sex
"hates anal"		- hates anal sex
"hates penetration" - dislikes penetrative sex
klorpa's avatar
klorpa committed
"shamefast"		 - nervous when naked
"idealistic"		- believes sex should be based on love and consent
"repressed"		 - dislikes sex
"apathetic"		 - inert during sex
"crude"			 - sexually crude and has little sense of what partners find disgusting during sex
"judgemental"	   - sexually judgemental and often judges her sexual partners' performance
"neglectful"		- disregards herself in sex
"cum addict"		- addicted to cum
"anal addict"	   - addicted to anal
"attention whore"   - addicted to being the center of attention
klorpa's avatar
klorpa committed
"breast growth"	 - addicted to her own breasts
"abusive"		   - sexually abusive
"malicious"		 - loves causing pain and suffering
"self hating"	   - hates herself
"breeder"		   - addicted to being pregnant
klorpa's avatar
klorpa committed
"gagfuck queen"	  - can take a facefucking
"painal queen"	   - knows how far she can go without getting hurt
"strugglefuck queen" - knows how much resistance her partners want
klorpa's avatar
klorpa committed
"tease"			  - is a tease
"romantic"		   - enjoys the closeness of sex
"perverted"		  - enjoys breaking sexual boundaries
"caring"			 - enjoys bring her partners to orgasm
"unflinching"		- willing to do anything
"size queen"		 - prefers big cocks
klorpa's avatar
klorpa committed
geneticQuirks:
klorpa's avatar
klorpa committed
3 - inactive (used for triggering macromastia and kin to start growing)
Pregmodder's avatar
Pregmodder committed
macromastia - Oversized breasts. Breasts try to return to oversized state if reduced.
gigantomastia - Greatly oversized breasts. Increased growth rate, reduced shrink rate. Breasts try to return to oversized state if reduced.
macromastia + gigantomastia - Breasts never stop growing. Increased growth rate, no shrink rate.

fertility - slave is prone to having twins, shorter pregnancy recovery rate
hyperFertility - slave is prone to having multiples, even shorter pregnancy recovery rate
fertility + hyperFertility - slave will have multiples, even shorter pregnancy recovery rate

superfetation - pregnancy does not block ovulation, slave can become pregnant even while pregnant

gigantism - slave is abnormally tall
dwarfism - slave is abnormally short
gigantism + dwarfism - slave is very average

pFace - slave has a flawless face
uFace - slave has a hideous face
pFace + uFace - Depends on carrier status, may swing between average and above/below depending on it

albinism - slave has pale skin, white hair and red eyes

Pregmodder's avatar
Pregmodder committed
heterochromia - slave may have mismatched eye colors (Takes a string if not zero!)

rearLipedema - slave's ass never stops growing. Increased growth rate, reduced shrink rate.

klorpa's avatar
klorpa committed
wellHung - slave has (or will have) a huge dong

wGain - slave constantly gains weight unless dieting, easier to gain weight
klorpa's avatar
klorpa committed
wLoss - slave constantly loses weight unless gaining, easier to lose weight
wGain + wLoss - slave weight gain/loss fluctuates randomly


mGain - slave constantly gains muscle mass, easier to gain muscle.
mLoss - slave constantly loses muscle mass, easier to gain muscle.
klorpa's avatar
klorpa committed
mGain + mLoss - slave muscle gain/loss amplified, passively lose muscle unless building
androgyny - slave's body attempts to normalize to an androgynous state

}

counter:

Tracks slave participation in various actions and their outcomes

counter.milk:

amount of milk given
accepts int

counter.cum:

amount of cum given
accepts int

counter.births:

number of births as your slave
accepts int

counter.birthsTotal:

How many known times the slave has given birth.
accepts int

counter.oral:

oral sex count
accepts int

counter.vaginal:

vaginal sex count
accepts int

counter.anal:

anal sex count
accepts int

counter.mammary:

breast sex count
accepts int

counter.penetrative:

penetrative sex count
accepts int

counter.publicUse:

How many times the slave has had public sex in your arcology. Used to determine if she is your private toy or a lusted after slut.
accepts int

counter.pitKills:

number of slaves killed in pit fights
accepts int

counter.slavesFathered:

How many slaves she has sired under your ownership.

counter.PCChildrenFathered:

How many children she has fucked into you that you later birthed.

counter.slavesKnockedUp:

How many of your slaves she has knocked up.

counter.PCKnockedUp:
klorpa's avatar
klorpa committed

How many times she has knocked you up.

custom:

Encapsulates various custom properties, set by users

klorpa's avatar
klorpa committed
custom.tattoo:

adds a custom tattoo
accepts string


seems to just be a label appended after the slave's name
accepts string


adds a custom description
accepts string


What the slave refers to you as.
accepts string
default ""

custom.titleLisp:

What the slave refers to you as, with a lisp.
accepts string
default ""

rudeTitle:

Does this slave refer to you rudely?
0 - not being rude
1 - insists on calling you a rude title

custom.image:

Custom slave image or null
default is null (no custom image)

custom.image.filename
holds the custom slave image file name (used if images are enabled)
accepts string

custom.image.format:

holds the custom slave image file format.
one of "png", "jpg", "gif" or "webm"
default "png"

custom.hairVector:

holds the custom hair vector base file name (used if vector images are enabled)
accepts string
default 0 (use hardcoded hair styles)

currentRules: []

array that holds active rules for the slave
wouldn't mess with it

bellyTat:

Slave has a tattoo that is only recognizable when she has a big belly.
"a heart"
"a star"
"a butterfly"

abortionTat:

Slave has a series of tattoos to denote how many abortions she has had.
-1: no tattoo
 0: assigned to have tattoo, may not have one yet
1+: number of abortion tattoos she has

birthsTat:

Slave has a series of tattoos to denote how many times she has given birth.
-1: no tattoo
 0: assigned to have tattoo, may not have one yet
1+: number of birth tattoos she has

bellySag:

How saggy her belly is after being distended for too long.
1+ changes belly description

bellySagPreg:

How saggy her belly is from being too pregnant.
klorpa's avatar
klorpa committed
1+ changes belly description and overrides/coincides with bellySag
induce:

Slave will give birth this week.
1 - true
0 - false

mpreg:

Male slave has an anal womb and can get pregnant.
1 - true
0 - false

inflation:

How much fluid is distending the slave.
1 - 2L
2 - 4L
3 - 8L

inflationType:

What kind of fluid is in the slave.
klorpa's avatar
klorpa committed
accepts string
Pregmodder's avatar
Pregmodder committed
"none"
"water"
"cum"
"milk"
Pregmodder's avatar
Pregmodder committed
"food"
"aphrodisiac"
"curative"
"tightener"
klorpa's avatar
klorpa committed
"urine"

inflationMethod:

How she is being filled.
0 - not
1 - oral
2 - anal
3 - orally by another slave

milkSource:

If inflationMethod 3, ID of the slave filling her with milk.
accepts ID

cumSource:

If inflationMethod 3, ID of the slave filling her with cum.
accepts ID

burst:

Slave's internals have ruptured. Used with poor health and overinflation.
1 - true
0 - false

pregKnown:

Do you and the slave know she is pregnant.
0 - no
1 - yes

pregWeek:

Pregmodder's avatar
Pregmodder committed
How long she has been pregnant (used in place of .preg when pregnancy speed up and slow down are used on a slave) (if negative, designates postpartum.)
accepts int

belly:

how big their belly is in CCs
thresholds
klorpa's avatar
klorpa committed
100	- bloated
1500   - early pregnancy
5000   - obviously pregnant
10000  - very pregnant
15000  - full term
30000  - full term twins
45000  - full term triplets
60000  - full term quads
75000  - full term quints
90000  - full term sextuplets
105000 - full term septuplets
120000 - full term octuplets
150000 - oversized pregnancy
300000 - hyperpreg state 1
450000 - hyperpreg state 2
600000 - hyperpreg state 3
750000 - hyperpreg state 4

bellyPreg:

how big their belly is in CCs (pregnancy only)
thresholds
klorpa's avatar
klorpa committed
100	- bloated
1500   - early pregnancy
5000   - obviously pregnant
10000  - very pregnant
15000  - full term
30000  - full term twins
45000  - full term triplets
60000  - full term quads
75000  - full term quints
90000  - full term sextuplets
105000 - full term septuplets
120000 - full term octuplets
150000 - oversized pregnancy (9+ babies)
300000 - hyperpreg state 1 (20+ babies)
450000 - hyperpreg state 2 (30+ babies)
600000 - hyperpreg state 3 (40+ babies)
750000 - hyperpreg state 4 (50+ babies)

bellyFluid: 0

how big their belly is in CCs (fluid distension only)
thresholds
klorpa's avatar
klorpa committed
100	- bloated
2000   - clearly bloated (2L)
5000   - very full (~1gal)
10000  - full to bursting (~2gal)

bellyImplant:

Does the slave have a fillable abdominal implant.
klorpa's avatar
klorpa committed
-1	   - no
0+	   - yes
2000+	- Early pregnancy
4000+	- looks pregnant
8000+	- looks full term
16000+   - hyperpregnant 1
32000+   - hyperpregnant 2

bellyPain:

Has the slave's belly implant been filled this week. Causes health damage for overfilling.
0 - no pain
1 - will experience pain
2 - cannot be filled this week

cervixImplant:

klorpa's avatar
klorpa committed
Does the slave have a cervical implant that slowly feeds cum from being fucked into a fillable implant.
2hu4u's avatar
2hu4u committed
1 - vaginal version only
2 - anal version only
3 - both vaginal and anal
brickode's avatar
brickode committed
counter.birthsTotal:

How many known times the slave has given birth.
accepts int

pubertyAgeXX:

Target .physicalAge for female puberty to occur.
accepts int

pubertyXX:

Has the slave gone through female puberty.
0 - no
1 - yes

pubertyAgeXY:

Target .physicalAge for male puberty to occur.
accepts int

pubertyXY:

Has the slave gone through male puberty.
0 - no
1 - yes

lowercasedonkey's avatar
lowercasedonkey committed
scar:

is an object
lowercasedonkey's avatar
lowercasedonkey committed
keys include any place on a slave body that can receive a scar, values are an object.  This sub-object's keys are the kind of scar, and the property is an int showing how bad it is.

breedingMark:

In a eugenics society, this slave is a designated breeder.
1 - yes
0 - no

underArmHColor:

klorpa's avatar
klorpa committed
color of armpit hair
accepts string

underArmHStyle:

klorpa's avatar
klorpa committed
armpit hair style
accepts string
"hairless"
"waxed"
"shaved"
"neat"
"bushy"
"bald"

klorpa's avatar
klorpa committed
eyebrowHColor:

color of eyebrows
accepts string

eyebrowHStyle:

eyebrow hair style
accepts string

klorpa's avatar
klorpa committed
"bald"
"shaved"
"straight"
"rounded"
"natural"
"slanted inwards"
"slanted outwards"
"high-arched"
"elongated"
"shortened"
"curved"

eyebrowFullness:

eyebrow thickness
accepts string

"pencil-thin"
"thin"
"threaded"
"natural"
"tapered"
"thick"
"bushy"

bodySwap:

Slave is in original body.
0 - yes
Pregmodder's avatar
Pregmodder committed
1+ number of swaps (increases upkeep each time)

mother:

Slave's mother's ID
Accepts ID
Values between 0 and -20 are reserved.
klorpa's avatar
klorpa committed
 0 - unknown
-1 - player
klorpa's avatar
klorpa committed
-2 - citizen of your arcology
-3 - player's former master
-4 - male arc owner
-5 - player's client
-6 - Societal Elite
-7 - designer baby
klorpa's avatar
klorpa committed
-9 - Futanari Sister

father:

Slave's father's ID
Accepts ID
Values between 0 and -20 are reserved.
klorpa's avatar
klorpa committed
 0 - unknown
-1 - player
klorpa's avatar
klorpa committed
-2 - citizen of your arcology
klorpa's avatar
klorpa committed
-4 - male arc owner
-5 - player's client
-6 - Societal Elite
-7 - designer baby
klorpa's avatar
klorpa committed
-9 - Futanari Sister

sisters:

How many sisters the slave has, do not tamper with.

daughters:

How many daughters the slave has, do not tamper with.

canRecruit:

Can the slave recruit. Non-random slaves should be left off.
0 - no
1 - yes

klorpa's avatar
klorpa committed
Is the Head Girl permitted to fuck this slave pregnant.

What species of sperm she produces.
"human"
Pregmodder's avatar
Pregmodder committed
"sterile"
klorpa's avatar
klorpa committed
"horse"
klorpa's avatar
klorpa committed
"cow"

eggType:

What species of ovum she produces.
"human"
"dog"
"pig"
klorpa's avatar
klorpa committed
"horse"
klorpa's avatar
klorpa committed
"cow"

How many of her children are tagged to be incubated. Carefully balanced, do not manually touch.
klorpa's avatar
klorpa committed
! Secondary|legacy. Can be used for caching only, use JS:
pregmodfan's avatar
pregmodfan committed
  WombSetGenericReserve(slave, "incubator", reservedChildren) to setup primary data. Not add count, but set it to reservedChildren
klorpa's avatar
klorpa committed
  WombCleanGenericReserve(slave, "incubator", reservedChildren) to remove reserve. To clean all incubator reserve use 9999 for reservedChildren.
kopareigns's avatar
kopareigns committed
reservedChildrenNursery:

How many of her children are tagged to be put in the Nursery. Highly likely to break.
klorpa's avatar
klorpa committed
! Secondary|legacy. Can be used for caching only, use JS:
pregmodfan's avatar
pregmodfan committed
  WombSetGenericReserve(slave, "nursery", reservedChildren) to setup primary data. Not add count, but set it to reservedChildren
klorpa's avatar
klorpa committed
  WombCleanGenericReserve(slave, "nursery", reservedChildren) to remove reserve. To clean all nursery reserve use 9999 for reservedChildren.
pregmodfan's avatar
pregmodfan committed

klorpa's avatar
klorpa committed

klorpa's avatar
klorpa committed
  Reserve type ("incubator", "nursery", etc) do not affect each other types, and can be safely used without any checks.
klorpa's avatar
klorpa committed
  Also if you try to reserve more then available and not already reserved fetuses in slave womb, will be reserved only actually existing free fetuses. If you try to clean reserve more then present - will be cleaned only actually existing reserve.
pregmodfan's avatar
pregmodfan committed
  These reserve functions always use first available fetus(es) - this will be most ready to birth fetuses (older).

  WombCleanAllReserve(slave) - will clean all reserves for slave (any type).
  x = WombReserveCount(slave, reserveType) - x will be set to count of fetuses that have reserveType. (reserveType is "incubator", "nursery", etc.)
  x = FetusGlobalReserveCount(reserveType) - x will be set to global count of reserved fetuses of reserveType. Also count PC.womb fetuses.

kopareigns's avatar
kopareigns committed

choosesOwnChastity:

Eugenics variable. Is the slave allowed to choose to wear chastity.
0 - no
1 - yes

pregControl:

Is she on gestation altering drugs?
"none"
"slow gestation"
"speed up"
klorpa's avatar
klorpa committed
"labor suppressors"
kopareigns's avatar
kopareigns committed
Array that holds an amputee's constructed limbs for anon's hotswap mod. Elements of the array should be objects.
.type - type of prosthetic limb, ranges from -1 to -5, see .amp for more information
.armsTat - any string, see .armsTat for standard strings
.legsTat - any string, see .legsTat for standard strings
klorpa's avatar
klorpa committed
Slave has undergone hair removal surgery
0 - no
1 - yes

origBodyOwner:

accepts string
Who, if relevant, the body belonged to.

death:

Cause of slave death.

hormoneBalance:

Slave's current hormonal balance, directs saHormones changes
-500 - -400 - overwhelmingly masculine
-399 - -300 - extremely masculine
-299 - -200 - heavily masculine
-199 - -100 - very masculine
-99  - -21  - masculine
-20  -  20  - neutral
 21  -  99  - feminine
 100 -  199 - very feminine
 200 -  299 - heavily feminine
 300 -  399 - extremely feminine
 400 -  500 - overwhelmingly feminine
onDiet:

Whether a slave is permitted to eat Hedonistic Decadence's specialized slave food.
0 - no
1 - yes

breastMesh:

Does the slave have the breast shape maintaining mesh implant.
0 - no
1 - yes
Pregmodder's avatar
Pregmodder committed
prematureBirth:

Used to denote a slave giving birth prematurely.
0 - no
1 - yes

premature:

Was the slave born prematurely?
0 - no
1 - yes

vasectomy:
Pregmodder's avatar
Pregmodder committed

Has the slave had a vasectomy?
0 - no
1 - yes

haircuts:

klorpa's avatar
klorpa committed
Is the slave's hair under constant maintenance?
0 - no
1 - yes
Pregmodder's avatar
Pregmodder committed

newGamePlus:

Used to tell if the slave is from this game or a previous.
0 - no
1 - yes
tankBaby:
klorpa's avatar
klorpa committed

Whether she was put in the incubator at birth
klorpa's avatar
klorpa committed
accepts int
0 - no
1 - yes, comforting
2 - yes, terrifying

klorpa's avatar
klorpa committed
missingEyes:

are eyes missing?
0 - none
1 - yes, left
2 - yes, right
3 - yes, both

missingArms:

are arms missing?
0 - none
1 - yes, left
2 - yes, right
3 - yes, both

missingLegs:

are legs missing?
0 - none
1 - yes, left
2 - yes, right
3 - yes, both
Pregmodder's avatar
Pregmodder committed

Pregmodder's avatar
Pregmodder committed
geneMods:
klorpa's avatar
klorpa committed

Pregmodder's avatar
Pregmodder committed
	NCS:
		Does slave have induced NCS?
		0 - no
		1 - yes
	rapidCellGrowth:
klorpa's avatar
klorpa committed
		Has the slave undergone the elasticity (plasticity) treatment?
Pregmodder's avatar
Pregmodder committed
		0 - no
		1 - yes

Pregmodder's avatar
Pregmodder committed
weightDirection:

erratic weight gain, used by (.geneticQuirks.wGain == 2 && .geneticQuirks.wLoss == 2)
 0 - stable
 1 - gaining weight
-1 - losing weight

klorpa's avatar
klorpa committed

Amount of cash paid to acquire the slave
accepts negative numbers, 0, or 1.
1 - unknown price
0 - free
negative - amount paid

lifetimeCashExpenses:
klorpa's avatar
klorpa committed

Amount of cash you have spent because of this slave
accepts negative numbers or 0

lifetimeCashIncome:
klorpa's avatar
klorpa committed

Total amount of cash you have earned because of this slave
accepts positive numbers or 0

lastWeeksCashIncome:
klorpa's avatar
klorpa committed

Amount of cash you have earned because of this slave last week
accepts positive numbers or 0

lifetimeRepExpenses:
lifetimeRepIncome:
lastWeeksRepIncome:
Not currently used, will work similarly to the cash variables above

How to set up your own hero slave.

-The default slave template used is defined in src/js/SlaveState.js

Making your slave; add their name to the following, then go down the documentation adding in your changes.
klorpa's avatar
klorpa committed
-each variable must be separated from the last by a comma followed by a space
-each variable must be assigned to _HS
-if your slave's variable matches the default, you do not have to list it
-strings MUST be in " or your slave will not compile properly

<<set _HS =  App.Entity.SlaveState.makeSkeleton()>>
<<set _HS.slaveName = "STANDARD", _HS.birthName = "STANDARD", _HS.ID = _i++>>
<<set $heroSlaves.push(_HS)>>

Once finished, add it into "customSlavesDatabase".
klorpa's avatar
klorpa committed
To test if your slave is functioning, start up a normal game, swap to cheat mode, max your rep, and view other slaveowner's stock in the slave market. If you cannot find your slave in the list, and you didn't start the game with your slave, you should double check your slave for errors. If a slave named "Blank" is present, then you likely messed up. Once you find your slave, check their description to make sure it is correct. If it is not, you messed up somewhere in setting them up.
klorpa's avatar
klorpa committed
@@.green;				- something good or health/libido/attraction gain
@@.red;					- something bad or health/libido/attraction loss
@@.hotpink;				- devotion gain
klorpa's avatar
klorpa committed
@@.mediumorchid;		- devotion loss
klorpa's avatar
klorpa committed
@@.mediumaquamarine;	- trust gain with higher devotion
@@.orangered;			- trust gain with lower devotion
@@.gold;				- trust loss
@@.coral;				- notable change and fetish loss
@@.lightcoral;			- fetish strength gain, fetish acquisition and fetish discovery
@@.lime;				- growth/improvement to a body part (reversed in some cases)
@@.orange;				- shrinking/degradation of a body part (reversed in some cases)
@@.lightsalmon;			- rivalry
@@.lightgreen;			- relationship
wombJS.tw subsystem:

klorpa's avatar
klorpa committed
This is a womb processor/simulator script. It takes care of calculation of belly sizes based on individual fetus sizes, with full support of broodmothers implant random turning on and off possibility. Also this can be expanded to store more parents data in each individual fetus in future.
klorpa's avatar
klorpa committed
Should be initialized for all slaves not female only. Currently it's not affect pregnancy mechanic in game directly - it's addon for better sizes calculation, and optional mechanics for future usage.
Design limitations:
- Mother can't gestate children with different speeds at same time. All speed changes apply to all fetuses.
klorpa's avatar
klorpa committed
- Sizes of individual fetuses updated only on call of WombGetVolume - not every time as called WombProgress. This is for better overall 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.

pregmodfan's avatar
pregmodfan committed

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):

klorpa's avatar
klorpa committed
Impregnation:
Blank's avatar
Blank committed
<<set WombImpregnate($activeSlave, 3, -1, 15)>>
pregmodfan's avatar
pregmodfan committed
$activeSlave, 3 fetuses, -1 - player is father, 15 week is initial time for fetuses. Can be used on already pregnant slaves (broodmothers use it).
Blank's avatar
Blank committed
<<SetSlaveBelly $activeSlave>>
klorpa's avatar
klorpa committed
Last line needed only if you need to show description with changed state immediately, an advanced initial pregnancy time set (showing already).
pregmodfan's avatar
pregmodfan committed

Advancing pregnancy:

<<set WombProgress($activeSlave, 1)>>
Advancing 1 week. Normally it's called by End Week processing for all slaves. Old method with using .preg++ on slave supported too, but better to use this new.
pregmodfan's avatar
pregmodfan committed

Birth checking:

<<if WombBirthReady($activeSlave, 40) > 0>>
Check if we have any babies in womb with is at minimum 40 week of gestation age? Age can be any.
pregmodfan's avatar
pregmodfan committed

Birthing:

<<set _babies = WombBirth($activeSlave, 34)>>
klorpa's avatar
klorpa committed
In array _babies will be placed all babies from womb of $activeSlave who gestation age at least 34 weeks (can be any). Others will be leaved in womb.
pregmodfan's avatar
pregmodfan committed
Optionally:
<<set WombFlush($activeSlave)>>
Blank's avatar
Blank committed
Will empty womb. You also still should set .preg .pregType .pregSource .pregWeek to 0, or call WombNormalizePreg.
pregmodfan's avatar
pregmodfan committed
_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. Can generate proper pregnancy based on preg, pregType, and pregSource properties too. Can be little glitchy with broodmothers in this case, if their preg != pregType (or pregType can't be divided by preg with integer result).
klorpa's avatar
klorpa committed
WombImpregnate($Slave, $fetus_count, $fatherID, $initial_age) - should be added after normal impregnation code, with already calculated fetus count. ID of father - can be used in future for processing children from different fathers in one pregnancy. Initial age normally 1 (as .preg normally set to 1), but can be raised if needed. Also should be called at time as broodmother implant add another fetus(es), or if new fetuses added from other sources in future (transplanting maybe?)

WombProgress($slave, $time_to_add_to_fetuses) - after code that update $slave.preg, time to add should be the same.

Blank's avatar
Blank committed
$isReady = WombBirthReady($slave, $birth_ready_age) - how many children ready to be birthed if their time to be ready is $birth_ready_age (40 is for normal length pregnancy). Return int - count of ready to birth children, or 0 if no ready exists.

$children = WombBirth($slave, $birth_ready_age) - for actual birth. Return array with fetuses objects that birthed (can be used in future) and remove them from womb array of $slave. Should be called at actual birth code in sugarcube. fetuses that not ready remained in womb (array).

klorpa's avatar
klorpa committed
WombFlush($slave) - clean womb (array). Can be used at broodmother birthstorm or abortion situations in game. But birthstorm logically should use WombBirth($slave, 35) or so before - some children in this event is live capable, others is not.

$slave.bellyPreg = WombGetWolume($slave) - return double, with current womb volume in CC - for updating $slave.bellyPreg, or if need to update individual fetuses sizes.

pregmodfan's avatar
pregmodfan committed
_time = WombMinPreg($activeSlave) - age of most young fetus in womb.

_time = WombMaxPreg($activeSlave) - age of most old fetus in womb.

klorpa's avatar
klorpa committed
WombUpdatePregVars($activeSlave) - automatically update $activeSlave.preg, $activeSlave.pregType, $activeSlave.bellyPreg to actual values based on womb fetuses.
klorpa's avatar
klorpa committed
WombNormalizePreg($activeSlave) - automatically correct all pregnancy related properties of given $activeSlave. Also it advances pregnancy if detected old .preg++ method used on slave and womb simulation is late. Can be called at any time without conditions checks - function do all needed checks by itself. Call of this function do NOT advance pregnancy by itself.
klorpa's avatar
klorpa committed
WombZeroID($activeSlave, _SlaveID) - automatically scan all fetuses and if their father ID matched - it will be replaced with zero. After it actor pregnancy related variables (like .pregSource) will be updated. Used mainly in process of removing slaves from game, to clean father's ID of unborn children of remaining slaves.
klorpa's avatar
klorpa committed
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 automatically). But in this case many changes in present game code needed, to REMOVE legacy code.
Right now they are set correctly, based on state of .womb object through pregnancy, but not outside. Also old style pregnancy initiation (setting only .preg to >0 and .pregType to >=1 ) working too - WombImpregnation function for proper setup of .womb will be called on next SetBellySize call. Also old style pregnancy progression through using .preg++ is supported too, but can have minor issues with character descriptions in some cases, if SetBellySize widget not called before descriptions widgets.
pregmodfan's avatar
pregmodfan committed


Advanced pregnancy control structure:

Now, with support of human-animal pregnancy, there is need for ability to change values that been constant before. New structure designed for it.

klorpa's avatar
klorpa committed
.pregData property for slave should now contain object with describable pregnancy process. By default it will be set to human data. Templates stored in setup.pregData.x where "x" - name of species.
pregmodfan's avatar
pregmodfan committed

<<set slave.pregData = setup.pregData.human>>

klorpa's avatar
klorpa committed
In code at any time properties that contain data can be accessed now. Properties is RW, so slaves can be changed individually later. Example:
pregmodfan's avatar
pregmodfan committed

<<if slave.pregData.type == "human">>
or
<<set slave.pregData.normalOvaMin = 2, slave.pregData.normalOvaMax = 4>> (setting normal ova count 2-4 on every ovulation).

klorpa's avatar
klorpa committed
	Property list:
pregmodfan's avatar
pregmodfan committed

klorpa's avatar
klorpa committed
	type			- name of species. Should math slave.ovaType
	normalOvaMin	- normal/base ova count on ovulation (minimal)
pregmodfan's avatar
pregmodfan committed
	normalOvaMax	- normal/base ova count on ovulation (maximal)
	normalBirth		- typical normal pregnancy length in weeks
	minLiveBirth	- typical weeks that guarantee at least 90% chance to fetus survival if normal birth occur.
	fetusWeek		- array with weeks control points.
	fetusSize		- array with size control points.
	fetusCTR		- array with CTR control points.

	These three array is linked, and values in second and third should be in the same order as in first. (Week of .fetusWeek[i] is correspond to .fetusSize[i] and fetusCTR[i])
klorpa's avatar
klorpa committed
	Control points - it's points of graph as if it built on paper (one axis - fetusWeek, other - fetusSize/fetusCTR). This graph data is used to get actual size of fetus, so no need for manual setting of every week data in array.
pregmodfan's avatar
pregmodfan committed

klorpa's avatar
klorpa committed
	What is CTR? In most medical data, human fetus size (length) measured as "crown to rump" from 1 to 20 weeks, and "crown to heel" later. Formula that calculate volume of womb should get data in single format. So there is need CTR rate - value that describe difference between full "crown to heel" and "crown to rump" length of fetus (also it's can be used to control approximation of legs, hands and tails volume). For most animal fetus data it's always 1 as they are not bipedal and "crown to rump" is natural measurements for them. But CTR rate changes might be needed to get more accurate results for volume calculations, as fetus is not sphere and length - not always have the same relation to it's volume.