# Replication

MicroBuddies can self-replicate and pass on their traits when fed a sufficient amount of [GOO](https://docs.microbuddies.io/goo-token/tokenomics).

## Replication Fee

Replicating a MicroBuddy at the [GRC](#artificial-selection) requires paying a replication fee equal to $$3 \* GrossGPD + RecessiveBonus$$. Where RecessiveBonus is:&#x20;

For each recessive trait which would score a dominant value above 17 in [GOO production](https://docs.microbuddies.io/goo-production#dominant-value), add: $$DominantValue^2/2$$&#x20;

Replicating a MicroBuddy at the standard replicator without access to artificial selection costs simply $$GrossGPD$$.

99% of all replication fees (including artificial selection fees) are burnt. The remaining 1% is distributed equally between the [founder MicroBuddies](https://docs.microbuddies.io/microbuddies/species).

[Learn more about GPD and Goo Production](https://docs.microbuddies.io/microbuddies/goo-production).

{% hint style="info" %}
&#x20;If your MicroBuddy doesn't have enough GOO, you can pay for replication fees with the GOO of your other Buddies.
{% endhint %}

## Generations

The MicroBuddy that is minted from a replication event is always exactly one generation higher than its parent. For example, when a Generation 0 MicroBuddy replicates, it creates a Generation 1 MicroBuddy. When a Generation 1 MicroBuddy replicates, it creates a Generation 2 MicroBuddy, and so on. The max generation is 250.

{% hint style="info" %}
There will never be more than 2500 Generation 0 MicroBuddies.
{% endhint %}

## Inheritance

During replication, 6 traits, one from each type, are selected from a MicroBuddy's genome. The probability of a MicroBuddy inheriting its parent's dominant trait is always 40% (except when guaranteed by artificial selection).

The odds of receiving a particular recessive trait is entirely determined by its position in the parent's genome. The percentage chance for this can be calculated as:

$$
100(Position/10)
$$

Where position is a number between 1 and 4, with 4 being the trait highest on the list of recessive traits in a parent's genome, and 1 being the lowest.&#x20;

![An in-game example of the traits list and their position values.](https://176642536-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MWoR6ZTP0WNgn3Z0urE%2F-Mjja9E42Dy_C4EPogb8%2F-Mjje327svKvbZ8ra_kb%2Fpositions.png?alt=media\&token=6c3a6e96-f56e-417f-9a42-8a64dabb9f25)

### Mutations

Some trait combos, when the rarest is present as the dominant trait in the genome, are guaranteed to produce a new, highly productive mutated trait as a dominant trait in the next generation. Players will have to hunt down which trait combos produce mutations.

## Artificial Selection

Before initiating a replication, a MicroBuddy may receive any of the following at the Genetic Recombobulator (GRC) for extra replication fees:

### Dominant Lock

For an additional payment of the replication fee, a single trait may be locked in as guaranteed dominant for the next replication. This action may be repeated up to three times per replication.

### Recessive Reroll

For an additional payment of 35% of the replication fee, a single recessive trait may be rerolled into a trait of the same rarity or better for the next generation. This action may be repeated up to four times per replication.

During a reroll, a random is first drawn to determine trait rarity, as follows:

* 50% chance for Common
* 38% chance for Rare
* 8% chance for Legendary
* 4% chance for Exalted

Next, a trait ID from the chosen rarity is randomly selected, weighted so that lower IDs are more likely than higher IDs. Below is the formula for determining the probability of a given trait ID, where min is the lowest trait ID for the rarity, and max is the highest.

$$
(max-(ID-min))/(((max - (min - 1)) \* (min + max)) / 2)
$$

Note: For common Tops, Body Patterns, and Bottoms, there is an additional 10% chance to grant a null.

Each new recessive trait is sent to the furthest position in the genome (less likely to become dominant right away).

{% hint style="info" %}
A trait with rarity higher than common inherits the odds of all the rarities below it. I.e. a Legendary trait has a 95% chance to be Legendary (49 + 38 + 8), and a 5% chance to be Exalted.
{% endhint %}

## Fertility

Every MicroBuddy has a finite amount of replications, between 0 and 6, determined at birth. The higher the generation, the more likely the replications will be lower. Additionally, with each replication a MicroBuddy becomes less GOO productive, something you can read about [here](https://docs.microbuddies.io/goo-production#fertility-gpd). When a MicroBuddy has depleted all of its replications, it becomes [barren](https://docs.microbuddies.io/more-info/glossary#barren).&#x20;

{% hint style="info" %}
Other than Founder MicroBuddies, Generation 0 MicroBuddies all have exactly 5 replications, which means there can be a maximum of 12,450 Generation 1 MicroBuddies.
{% endhint %}

##
