Giter Site home page Giter Site logo

opendnd / genetica Goto Github PK

View Code? Open in Web Editor NEW
19.0 6.0 2.0 1.83 MB

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

Home Page: http://opendnd.org

License: MIT License

JavaScript 24.04% TypeScript 75.96%
dnd dnd5e dnd-tools dnd-characters chromosome dna inheritable-traits simplified-genetics trait roll

genetica's Introduction

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

genetica's People

Contributors

drewry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

genetica's Issues

Genetica should output the DNA of a person as an option

It would be nice to render the DNA of a Person instead of having an input DNA only.

For example, I could do something like:

genetica render --person my-person.per

Which would grab from person: person.DNA and use that as the input for the Renderer output.

Genetica is not a constructor

When testing this out doesnt see to work. With error "Genetica is not a constructor"

`const Genetica = require('genetica');

const genetica = new Genetica();

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

const DNA = genetica.generate(opts);
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.