Time to get serious.
The key thing here is that it is not necessary to go into pornographic detail in order to add sex into the game. Such detail creates problems because the genitals of the various creatures and how they 'have sex' are rather variable in nature and it would take a huge amount of time for the devs to add in the huge variety of genitals that there are and simulate the mechanics as to how they all work. The best way to do is to add sex in as a set of general activities (aka jobs) that two creatures engage in for a length of time and get certain subjective feelings as a result of engaging in. The exact variables of the activities are determined by the personality values as are the conditions/probability of them happening.
Sex activities are controlled by the
relationship value which is established between two creatures that are eligible to have sex given their sexual orientation and relationship status. Relationships are either hierarchical or egalitarian, in the former case one partner is the dominant and their own values become the
relationship value without the submissive partner's values not being taken into account. In an egalitarian relationship the
relationship value is determined as the
average of the partners own individual personality values. For creatures without
[CAN_SPEAK] or
[INTELLIGENT] this is decided by a comparison of the
[ASSERTIVENESS] values, the most assertive partner becomes the dominant, the less assertive the submissive and the relationship is egalitarian if the two values are exactly equal in both parties. For creatures with
[CAN_SPEAK/INTELLIGENT] things are determined by the average of their values for
[POWER], if the result is below 0 then the relationship is always egalitarian while if the result is above 0 we end up with a hierarchical relationship. The most high ranking partner becomes the dominant, (so noble outranks non-noble, higher priority noble lower priority), otherwise things work as they do with animals with the partner with the highest
[ASSERTIVENESS] becoming the dominant, the lowest submissive and the relationship becoming egalitarian if the values are equal.
Sexual activitiesThe length of all activities is determined by a separate timer that can be set in the raws but defaults to 10 for all activities. All the activities involve two creatures being on the same square for a period of time. Creatures will try to make their way to a bed, table or chair within an owned room if possible, not giving dwarves private rooms that are sealed off with doors and walls risks being witnessed feelings (see below).
MatingThis is the only sexual activity available for creatures that lack
[CAN_SPEAK/INTELLIGENT] and is unavailable for all creatures with such tags. The
relationship value for
[LUST_PROPENSITY] determines the probability of this happening and the length of the activity is always what is defined in the raws with no modifiers. It cannot happen if the child limit is reached.
Conceiving ChildThis represents sexual behavior that is carried out for deliberately reproductive ends rather than for reasons of passion; this activity is never available if the couple are unable to conceive such as when they are of the same gender. As such the probability of this occurring is controlled by the relationship value for
[FAMILY] and it can only occur if the child population limit has not yet been reached. The length of time taken is the default modified upwards by the
relationship value for
[IMMODERATION] and downwards by
[SINGLEMINDED] and
[ACTIVITY_LEVEL].
Having SexThis represents sexual behavior that is driven by desire as opposed to any deliberate end. The chance of this occurring is determined by the
relationship value for
[LUST_PROPENSITY]. The length of time taken is the default increased by
IMMODERATION and decreased by
[ACTIVITY_LEVEL].
Embracing LoverThis represents sexual behavior that is driven by a desire for intimacy and closeness. This does not in itself ever result in procreation, instead it lasts for a period of time at which point depending upon their relationship value for
[FAMILY] and
[LUST_PROPENSITY] the couple will upon the conclusion of this activity switch with a high probability to either having sex or conceiving a child, but if the
relationship values or circumstances do not allow this to happen this will simply end without anything else happening. The probability of this happening is governed by the
relationship value for
[LOVE_PROPENSITY] and the length of time this goes on for is increased by the
relationship value for
[EMOTIONALLY_OBSESSIVE] and reduced by the
relationship value for
[ACTIVITY_LEVEL].
ProcreationProcreation happens upon the completion of the
Mating,
Conceiving child and
Having Sex activities for couples able to reproduce, the completion of
Embracing Lover never directly results in procreation. The odds of procreation are 20% by default but can be defined as higher or lower in the raws and
Mating and
Conceiving Child simply use these values. Having Sex on the other has an inherently reduced odds of conceiving a child since it includes things that do not result in procreation, always reducing odds by 25% from the raw defined values; if these are the default this means the values are 15%. The
relationship value for
[FAMILY] then lowers the procreation odds based upon how far that is below 50; if the population/child limit prevents new children from being born this is assumed to be -50. At -50
[FAMILY] there is a 0% chance of
Having Sex resulting in children, however the
relationship value for
[PERFECTIONIST] reduces the fertility penalty for low
[FAMILY] so there is a small chance of accidentally producing children for low
[PERFECTIONIST] value.
EmotionsAll the sexual activities that happen cause feelings to trigger at three points. The first trigger is when the creature switches to doing the activity, the second trigger is when the activity clock timer starts and the last trigger happens when the clock is finished freeing the creatures to do other activities. The nature of the feelings depend upon the nature of the activity and the personality of the bearer (not the
relationship value). In addition there are two special feelings that can be triggered, one of these is what happens if the two creatures are witnessed during the
Concieving Child and
Having Sex activities depending upon their
[PRIVACY]. The other is what happens if the activities are interrupted by something like an attack or a threat from an enemy for instance and brought to an end.
As an example I will show how people feel based upon their privacy about being witnessed and how they would feel at the three trigger stages based upon their [LUST_PROPENSITY] during the
Having Sex activity.
Being witnessed trigger:PRIVACY91-100:
Apathy76-90:
Irritation61-75:
Embarrassment40-60:
Humiliation25-39:
Distress0-9:
PanicHave Sex Initiation trigger:LUST_PROPENSITY91-100:
Lust76-90:
Passion61-75:
Eagerness40-60:
Arousal25-39:
Ambivalence0-9:
UneasinessHave Sex Start trigger:LUST_PROPENSITY91-100:
Delight76-90:
Elation61-75:
Passion40-60:
Pleasure25-39:
Boredom0-9:
DisgustHave Sex End trigger:LUST_PROPENSITY91-100:
Rapture76-90:
Relief61-75:
Exhilaration40-60:
Satisfaction25-39:
Restless0-9:
Emptiness