Marriage

Working on the circle of life, I decided to tackle marriages first. It’s as good spot to start as any. I hashed out various different implementations as I wrote down some things that I wanted to capture:

  • development over time (engagement, marriage, divorce, widow)
  • history
  • choosing dynasty of offspring

Information is stored in Marriage table in database:

Marriage json
    person1Id PersonId
    person2Id PersonId
    offspringDynasty PersonId
    status MarriageStatus
    validFrom StarDate
    validTo StarDate Maybe
    deriving Show Read Eq

and MarriageStatus is just a simple enumeration:

data MarriageStatus =
    Engaged
    | Married
    | Divorced
    | Widowed

Relations and opinions

Why such a system that stores duplicated information? The answer is complexity of code used to handle relations, opinions and intel. Everytime a person report is generated, the system checks what kind of information the observer has in their disposal and tailors the report accordingly. Marriages are such relation and the system would have to load data from two different sources, filter it based on the intel and combine it together to form a coherent report. Initial implementation showed that such code is somewhat complex and when new relations are added, turns into even more complex. Thus, Marriage is used to track the legal details of marriages, but relations are stored in Relation table. This of course means that whenever Marriage info changes, Relation info needs to be updated too.

Intel

Marriages are always considered public. Everybody automatically has full knowledge about marriages of people they have public intel about. Maybe there’s a particularly good filing system with open access at the galactical level or something that enables this.