Skip to content

This is a tool for using a simplified genetics system to generate inheritable traits for DnD characters.

License

Notifications You must be signed in to change notification settings

opendnd/genetica

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 1, 2020
7af637e · Mar 1, 2020

History

93 Commits
Nov 1, 2018
Jul 8, 2018
Nov 24, 2018
Nov 24, 2018
Jan 26, 2018
Dec 21, 2017
Mar 1, 2020
Dec 21, 2017
Dec 21, 2017
Jan 27, 2018
Dec 22, 2017
Mar 1, 2020
Mar 1, 2020
Nov 1, 2018
Nov 24, 2018

Repository files navigation

genetica

Genetica is a tool for using a simplified genetics system to generate inheritable traits for DnD characters.

NPM

Build Status

Installation

You will need node and npm installed. Then run the command:

npm install -g genetica

Generate DNA from CLI

genetica

Follow the prompts for Race and Gender (optional) and your DNA is outputted with information on traits.

Module Usage

Require genetica into your file and create a new Genetica class.

const Genetica = require('genetica');

const genetica = new Genetica();

const opts = {
  gender: 'female',
  race: 'Dragonborn'
};

const DNA = genetica.generate(opts);

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 d2, d4, d6, d8, d12, d20, or 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 8.

Rules

  • Dominant/Recessive Genetic Rules: A rule of 3 means if 3 is the highest rolled then the trait applies. For example: a chromosome pair of 1=3 would mean the rule applies as 3 is the highest roll, but for a pair of 8=3 it would not.
  • Co-dominant Genetic Rules: 1=3 means that the roll for the mother must be 1 and the father must be 3 in that order. A 3=1 would not apply the rule. This rule is checked BEFORE the dominant/recessive rules.

Inspiration: http://www.chromosomewalk.ch/en/list-of-chromosomes/

Developing

To develop genetica,

git clone https://github.com/opendnd/genetica.git
cd genetica/
npm install

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are welcome!

Genetica uses the Airbnb javascript style.

Licensing

MIT