mbartelsman-dev / dynasties

0 stars 0 forks source link

Dynasties

Dynasties is a procedural family tree generator

Family

A family is a collection of Person's who are all directly or indirectly related to a family root.

A family is initialized by generating a core. A core is composed of a root and its two back-generated parents. The root is the only person in a family to be generated this way. Afterwards, the family is simulated season by season by going through every active person in the collection and simulating one season of their lives.

graph LR
    p1[Parent 1]
    p2[Parent 2]
    r[root]

    p1 --- r
    p2 --- r
    r --> ...

    classDef reg fill: #0000, stroke: #fff, color: #fff
    class r,p1,p2,... reg

Potentially, a family could also be started from an imported set of people, provided that they can be reasonably integrated. Unintegrated people in a family are undefined behaviour and should be avoided. (Perhaps a verifier could be made in the future?)

graph LR
    p1[Spouse]
    p2[Spouse]
    r[Child]
    u[Unintegrated]

    p1 --- r
    p2 --- r
    r --> ...
    u

    classDef reg fill: #0000, stroke: #fff, color: #fff
    classDef dash fill: #0000, stroke: #fff, stroke-dasharray: 2, color: #fff
    class r,... reg
    class p1,p2,u dash

At it's most basic, the model would only track births, deaths, and offspring, using a general probability model to calculate these events. As development goes on, this can be expanded by ways of new events, relations and feats for each person, as well as with family-wide modifiers.

The result of the simulation is then saved into a database containing the data of every person involved.

Person

A Person is a data object which represents a person and their entire life in the context of a Family.

A sample person:

[[Person]]
id = 24
name = [
    { given = "Jay" },
    { family = "Random" },
]
events = [
    { birth = 1900 },
    { marriage = 1930 },
    { death = 1980 },
    # ...
]
relations = [
    { parent = 0009 },
    { parent = 0012 },
    { spouse = 0028 },
    # ...
]
feats = [
    "chaotic",
    "evil",
    # ...
]

The creation of a person requires access to:

The simulation of a person's life requires access to:

root

A root is the initial Person in a given family, it is also the person to which all other people in the family are related, wether directly or indirectly.