Dangermuse is neither dangerous nor amusing

RPG relationship mapping with Graphviz

Scribbled  · PDF · ◊Pollen source

Interrupting my train of thought

Lines of longitude and latitude

Define and refine my altitude

Wire, Map Ref. 41°N 93°W

Introduction

I recently started running a Burning WheelBurning Wheel HQ game after about two decades away from GMing role-playing games. We are calling our game Burning Locusts.

The Situation revolves around a spooky mercenary company who returns every 17 years to wreak havoc (there is a joke in there if you look for it). It is set in a city called Scintallante that is modelled after Italian city states during the Renaissance period. The city resembles Milan geographically, with an ancient dwarven stronghold in the center called Hartheld. In reality it is two cities: the dwarven city of Hartheld and the human city of Scintallante.

There are three player characters in the game:

For more background, one of the players has written excellent session notes. They can be found hereBurning Locusts: Character Creation, hereBurning Locusts: Session 1, and hereBurning Locusts: Session 2.

As detailed in the Character creation post, the players created characters with a number of interesting relationships and Beliefs right off the bat. To make the most out of this, I wanted to find some way to visualize the connections and observe how they change over time.

Mapping the relationships

I am not a visual thinker so I find that I benefit from forcing myself into that mindset. I also wanted to adopt better organizational habits as a GM. My previous organizational habits from 20 years ago involved writing things down on napkins, so there is certainly room for improvement. So I created a relationship mapAFAIK, Sorcerer by Ron Edwards was the first game to introduce relationship maps as a tool for role-playing games in the The Sorcerer’s Soul supplement to better understand all of the interesting things happening in our game.

To create the map, I evaluated a few options but I didn’t want to use a graphical or a web-based application to do it. I also wanted something relatively easy to use. I settled on GraphvizGraphviz, open-source graph visualization software. Graphviz includes a programming language called DOT that can be used to describe a graph in plaintext using any text editor and turn it into an image.

The graph

Concepts

A minimal amount of background knowledge is needed to start using the basic features of Graphviz. The lines on the graph are called edges. The lines connect nodes or vertices. That’s all we need to know to begin.

The Graphviz DOT language provides a simple shorthand for expressing connections:

graph G {
    ansidora -- charles [label = "family"]
}

I have chosen to use an undirected graph for our relationship map because it is easier, ie: the edges do not point in any direction, they are just connections between nodes. In the code example above, this choice is denoted by the keyword graph. A directed graph would use the keyword digraph instead.

If this were directed graph, we would use "->" instead of "--" to express these connections. The label tag should be obvious but to further elaborate–we are labelling this connection as a family connection. Family is not a special concept in Graphviz, it is just an arbitrary label for our relationship map.

Please refer to the documentationDOT Language documentation for information on how to use the language.

Subgraphs

When I made the graph, I decided to put each player character in a subgraph to represented who is inside or outside of that character’s circle. This also had the benefit of showing that the marriage between Lord Jade and Lady Jade crossed different character subgraphs via the affair between Lady Jade and Frederico.

Coloring

I wanted colors to represented the following:

I chose a set of Brewer colorsGraphviz Brewer colorschemes to have a range of colors that will stand out from each other. The particular set I chose is puor11.

The following is a minimal example to demonstrate coloring and styling nodes in a graph:

graph G {
   node [colorscheme=puor11 color=4 margin=0.2 fontsize=12 width=0.5 shape=box style=filled];
   lord_jade -- lady_jade [label = "married"]
}

There are the attributes from the code example:

Generating the graph

Graphviz can be installed on Windows, Mac OS X, and Linux. Instructions can be found on the website that is linked above.

Any text editor can be used to create a graph file in DOT and some code editors provide extensions to automatically preview the source code.

There are also a few online Graphviz editors such as this oneGraphvizOnline.

This is the complete dot source code for the Burning Locusts relationship map (burning-locusts-1.dot):

graph G {
  size = 10.5;
  colorscheme=puor11;
  node [colorscheme=puor11 color=4 margin=0.2 fontsize=12 width=0.5 shape=box style=filled];
  nodesep=0.8;
  ranksep=1.9;

  subgraph cluster_1 {
    style=rounded;
    bgcolor=6;
    antonius [color=8]
    antonius -- maccio [label = "family"]
    antonius -- biagio [label = "friend"]
    antonius -- fiego [label = "teaching"]
    antonius -- hinterland_players [label = "member"]
  }

  hinterland_players [color=2]
  biagio -- hinterland_players [label = "member"]
  lord_jade -- hinterland_players [label = "member"]
  lord_jade -- lady_jade [label = "married"]
  fiego [color=3]
  fiego -- lord_jade [label = "work"]
  thieves_guild [color=2]

  subgraph cluster_2 {
    style=rounded;
    bgcolor=6;
    frederico [color=8]
    frederico -- antonius [label = "teaching"]
    frederico -- lady_jade [label = "affair"]
    frederico -- thieves_guild [label = "member"]
  }

  subgraph cluster_3 {
    style=rounded;
    bgcolor=6;
    ansidora [color=9]
    ansidora -- charles [label = "family"]
    ansidora -- tumoll [label = "family"]
    ansidora -- vadam [label = "divorced"]
    ansidora -- frederico [label = "work"]
    ansidora -- antonius [label = "work"]
    ansidora -- silas [label = "oath"]
    ansidora -- silas [label = "enmity"]
  }

  vadam [color=3]
  silas [color=3]
  tumoll [color=3]
  charles [color=3]
  vadam -- tumoll [label = "family"]
  charles -- tumoll [label = "family"]
  tumoll -- ginna [label = "dating"]
  ginna -- silas [label = "ex"]
}

To generate the relationship map, run the following command:

$ dot -Tsvg burning-locusts-1.dot -o burning-locust-1.svg

Other work

PlantUMLPlantUML can also be used to the same effect. Jeremy at the Take on Rules blogTake on Rules blog has an example for another Burning Wheel game that I am playing in hereUsing PlantUML to Model RPG Relationship Maps.