Lineage System

From Rain World Wiki
Jump to navigation Jump to search

This is a technical page, which may have unmarked spoilers.

Technical pages document the mechanics of Rain World in much greater detail than is necessary to know for most purposes.

Technical pages may also make use of terms defined in the technical glossary.

Other languages:

Some dens use a lineage system wherein killing a creature has a chance to replace it permanently with a different creature.

Overview

When a creature is killed by Slugcat, there is a 33% chance (50% chance for Hunter, Artificer, and Spearmaster) per cycle for that creature to respawn in the parent den. For lineage dens, when that respawn chance passes, there is an additional chance that a different (usually stronger) type of creature spawns instead, based on a predefined lineage list. When this chance passes, the den or creature is said to have lineaged.

The lineage chance is rolled immediately when the creature is killed,[1] but the result is only saved when Slugcat successfully hibernates.

If a creature is killed and Slugcat is not the cause of death, it does not lineage.

Dens that do not have a lineage list always spawn the same creature (subject to the respawn chance if killed by Slugcat).

Examples

A lineage den is defined internally in a region's world.txt. Each lineage specifies a room, a den number, and a list of creatures, each with a probability to lineage when killed.

For instance, Outskirts has the following lineage den:

LINEAGE : SU_A40 : 2 : Green-0.1, Pink-0.5, Blue-0.2, Red-0

The first time Outskirts is loaded, a Green Lizard spawns from this den. Each time this Green Lizard is killed, there is a 10% chance that it lineages to a Pink Lizard which permanently replaces the Green Lizard for this campaign. The Pink Lizard has a 50% chance per kill to be replaced by a Blue Lizard, which has a 20% chance per kill to be replaced by a Red Lizard. The Red Lizard has a 0% chance to lineage and thus is never replaced.

A lineage den may have an empty spawn in its list:

LINEAGE : SU_A02 : 3 : NONE-0.05, Mimic-{18}-0.4, Mimic-{14}-0.4, TentaclePlant-0

Empty spawns roll their chance to lineage every cycle. When this den is first loaded, nothing spawns, and there is a 5% chance each cycle that the den lineages to a size 18 Pole Plant.

Cumulative probability

If a creature has some individual probability PI to lineage, the chance that it lineages in n kills or fewer is . For instance, killing a creature with a 1% individual chance to lineage 100 times gives a cumulative probability to lineage.

The number of kills needed to reach some target cumulative lineage probability PT is . For instance, a creature with a 1% individual chance to lineage has to be killed times to have a 50% cumulative probability to lineage - that is, there is about a 50% chance that it will take more than 69 kills to lineage.

The median number of cycles to lineage a den depends on the current creature respawning when it does not lineage. If the respawn chance is 33%, then the average number of cycles between lineage rolls is about 3, and the median number of cycles to cause a 1% individual lineage chance to pass is about 69 * 3 = 207.

Unless the individual lineage chance is 100%, lineage is never guaranteed for any number of kills, although the cumulative lineage chance grows arbitrarily close to 100% with each kill.

Trivia

  • Lineaging is the only way to encounter Red Lizards, King Vultures and Red Centipedes as Survivor and Monk.
  • In game versions between v1.5 and v1.8, injured creatures do not regain health at the end of a cycle and so remain in their den indefinitely. It is possible to despawn entire regions this way. This glitch was fixed in the v1.9 update.
  • If a region is multi-spawned, each creature belonging to a given lineage den rolls a separate chance to advance the same lineage (that is, they do not belong to two separate lineages).
  • Lineages are depicted in the interactive maps for vanilla and Downpour as vertical lists of creature icons with lineage chances printed on top.

Notes

  1. The console log receives Lineage <DEN_ID> progressed to <NEW_CREATURE_TYPE>. See World.Lineage.ChanceToProgress().