How Do You Create the Tree-Like Representation of Attributes in the KULT TTRPG?

I’d like to recreate the attribute tree from the “Kult: Divinity Lost” TTRPG in Typst for a custom-built character sheet. Could someone give me a push in the right direction? Is this even possible using Typst’s built-in tools?

1 Like

Depends a bit on what “using Typst’s built-in tools” means to you :stuck_out_tongue: you can definitely draw all the shapes here, worst case it’s just very manual.

This is a graph, so the natural choice is fletcher – Typst Universe. It usually expects labels within notes, I’m not sure if anything has changed there, so labels below might need some tweaking.

However, I’m not sure about the edges. I would attempt to draw those as edges with no strokes and elongated, inverted arrow marks at both ends; that should work, I think.

Edit: got a tiny demo working :slight_smile:

#import "@preview/fletcher:0.5.8" as fletcher: diagram, node, edge

#set page(width: auto, height: auto, margin: (top: 5mm, rest: 12mm))

#diagram(node-stroke: 2pt, edge-stroke: white, {
  import fletcher.shapes: diamond

  let tree-node(..args, body) = {
    node(width: 8mm, height: 8mm, shape: circle, ..args, {
      show: place.with(center, dy: 11mm)
      show: box.with(width: 5cm)
      set align(center)
      body
    })
  }
  
  tree-node((0, 0), shape: diamond)[*Fortitude*\ _Endure Injury_]
  tree-node((1, 2))[*Perception*\ _Observe a Situation_]
  edge((0, 0), (1, 2), marks: (
    (inherit: "|>", size: 20, fill: black, sharpness: 10deg),
    (inherit: "<|", size: 50, fill: black, sharpness: 4deg),
  ))
})

the edge length is indirectly specified by the sharpness; if you don’t want to guess fitting values, you’ll have to do some light trigonometry.

3 Likes

Hi @Olaf, I see you liked the response you got; if you feel it has sufficiently answered your question, be sure to give it a checkmark :ballot_box_with_check:. This will help others find the solution in the future. If something is missing, please let us know what so we can resolve your issue. Thanks!

That looks really good, what you did there. With this, I should be able to render the complete tree. Many thanks.

1 Like