Genetica is a tool for using a simplified genetics system to generate inheritable traits for DnD characters.
npm install -g genetica
Generate DNA from CLI
Follow the prompts for Race and Gender (optional) and your DNA is outputted with information on traits.
Require genetica into your file and create a new Genetica class.
const Genetica = ;const genetica = ;const opts =gender: 'female'race: 'Dragonborn';const DNA = genetica;
Simplified DNA System
Each generated character has a set of DNA with chromosomes. These chromosomes go to applying traits.
Each chromosome has two pairs with dice rolls based on the size of the chromosome: either
d100. So for example, Chromosome 1 has a size of
d8 and the pair rolls for
5=8 which means the mother gave a roll of
5 and the father gave a roll of
- Dominant/Recessive Genetic Rules: A rule of
3means if 3 is the highest rolled then the trait applies. For example: a chromosome pair of
1=3would mean the rule applies as 3 is the highest roll, but for a pair of
8=3it would not.
- Co-dominant Genetic Rules:
1=3means that the roll for the mother must be 1 and the father must be 3 in that order. A
3=1would not apply the rule. This rule is checked BEFORE the dominant/recessive rules.
To develop genetica,
git clone https://github.com/opendnd/genetica.gitcd genetica/npm install
If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are welcome!