16

Many strategy games involve researching technologies, and each technology has a set of prerequisites (except the starting technologies). These can either be arranged linearly (tech levels) or in a tree (tech tree) form.

I'm looking to make a diagram of a tech tree for a mod, whether it'd be for technologies from a fictional civilization building game or a course list for a degree program.

If there's a better term for it than "tech tree", I'm all for it. My search for something like it basically led to actually modding Civilization IV or Civilization V in order to have the game itself generate the tech tree, but while that might work it seems like the exact opposite of how I would approach it. That would take a long time for just the game to start up every time you made a change, plus the only way to view it would be open up the game or stitch together several screenshots. When I've modded games usually I had a game plan, but in this case it seems you're using the game to make the game plan?!

Basically, each node on the tree can have any number of prerequisites and corequisites.

I could map it out in Visio, but then I'd have to manually arrange everything. I'd like it to iterate over the requirements a node has and automatically link it.

I have access to Visio, Photoshop, Illustrator, etc but it feels like those tools will just involve a lot of manual effort that could potentially be automated and would be subject to mistakes and later changes.

I'd imagine I could do this myself with about three database tables and some HTML/CSS, but I don't have the time to pick up another programming project. Also it would be nice to know if there are tools out there to do this sort of thing before I venture in that direction.

Requirements:

  • Can run on pretty much on any environment, I personally have Windows 8.1 x64, but I have virtual machines of different configurations available.
  • Needs to be able output some sane format such as HTML with images, or a SVG image, or a PDF. I don't want it to output to some format like XML I wouldn't be able to take and show someone or look at without opening the program.
  • Needs to be able to save it in its native format (whatever that might be) so I can edit it without reconstructing the entire tree.
  • Needs to have a set of "nodes" each which have a set of prerequisites

Nice to haves:

  • Some graphical interface (GUI) to layout and configure nodes. I don't want to be punching into XML files
  • Add descriptive copy and images to each node (not just a title)

Alternatively, if there's a good approach to this in Visio, I'm open to suggestions.

11

Automatically arranging a tree can be done with Graphviz:

  • free and open source (Eclipse Public License)
  • Windows/Linux/Mac
  • Many output formats including SVG and PDF

Example: enter image description here

is generated by:

/* courtesy Ian Darwin and Geoff Collyer, Softquad Inc. */
digraph unix {
    size="6,6";
    node [color=lightblue2, style=filled];
    "5th Edition" -> "6th Edition";
    "5th Edition" -> "PWB 1.0";
    "6th Edition" -> "LSX";
    "6th Edition" -> "1 BSD";
    "6th Edition" -> "Mini Unix";
    "6th Edition" -> "Wollongong";
    "6th Edition" -> "Interdata";
    "Interdata" -> "Unix/TS 3.0";
    "Interdata" -> "PWB 2.0";
    "Interdata" -> "7th Edition";
    "7th Edition" -> "8th Edition";
    "7th Edition" -> "32V";
    "7th Edition" -> "V7M";
    "7th Edition" -> "Ultrix-11";
    "7th Edition" -> "Xenix";
    "7th Edition" -> "UniPlus+";
    "V7M" -> "Ultrix-11";
    "8th Edition" -> "9th Edition";
    "1 BSD" -> "2 BSD";
    "2 BSD" -> "2.8 BSD";
    "2.8 BSD" -> "Ultrix-11";
    "2.8 BSD" -> "2.9 BSD";
    "32V" -> "3 BSD";
    "3 BSD" -> "4 BSD";
    "4 BSD" -> "4.1 BSD";
    "4.1 BSD" -> "4.2 BSD";
    "4.1 BSD" -> "2.8 BSD";
    "4.1 BSD" -> "8th Edition";
    "4.2 BSD" -> "4.3 BSD";
    "4.2 BSD" -> "Ultrix-32";
    "PWB 1.0" -> "PWB 1.2";
    "PWB 1.0" -> "USG 1.0";
    "PWB 1.2" -> "PWB 2.0";
    "USG 1.0" -> "CB Unix 1";
    "USG 1.0" -> "USG 2.0";
    "CB Unix 1" -> "CB Unix 2";
    "CB Unix 2" -> "CB Unix 3";
    "CB Unix 3" -> "Unix/TS++";
    "CB Unix 3" -> "PDP-11 Sys V";
    "USG 2.0" -> "USG 3.0";
    "USG 3.0" -> "Unix/TS 3.0";
    "PWB 2.0" -> "Unix/TS 3.0";
    "Unix/TS 1.0" -> "Unix/TS 3.0";
    "Unix/TS 3.0" -> "TS 4.0";
    "Unix/TS++" -> "TS 4.0";
    "CB Unix 3" -> "TS 4.0";
    "TS 4.0" -> "System V.0";
    "System V.0" -> "System V.2";
    "System V.2" -> "System V.3";
}

You can group nodes:

enter image description here

digraph G {

    subgraph cluster_0 {
        style=filled;
        color=lightgrey;
        node [style=filled,color=white];
        a0 -> a1 -> a2 -> a3;
        label = "process #1";
    }

    subgraph cluster_1 {
        node [style=filled];
        b0 -> b1 -> b2 -> b3;
        label = "process #2";
        color=blue
    }
    start -> a0;
    start -> b0;
    a1 -> b3;
    b2 -> a3;
    a3 -> a0;
    a3 -> end;
    b3 -> end;

    start [shape=Mdiamond];
    end [shape=Msquare];
}
  • I'll have to try it, thanks! – Julia McGuigan Aug 10 '14 at 1:50
  • Okay - marking as answer (for now). I was able to get it to work with a test: imgur.com/2p0ELe6 . It has a simple enough input I might be able to generate it programmatically and then add to it and it (optionally) outputs SVG so I can either do the formatting in the dot language or in SVG with post processing code generation and CSS. Thanks Only issue I see is that I don't immediately see a way to syntactically denote something as optional. The the sample image (above), any one of three techs allows research into Writing. That's a clear must for this, but I'll work around it for now. – Julia McGuigan Aug 10 '14 at 2:28
  • How about changing node shapes (graphviz.org/doc/info/shapes.html), color, etc., to denote they are optional? – Franck Dernoncourt Aug 10 '14 at 6:15
  • The links are optional, not the technology. For example, Writing is unlocked by Priesthood, Pottery, or Animal Husbandry in base game Civilization IV. You'll still want to research all three of those for techs down the road, but only one is required to start researching writing. Does that change your suggestion? – Julia McGuigan Aug 10 '14 at 14:06
  • 1. We can change edge shapes too (graphviz.org/doc/info/attrs.html) 2. It sounds like you might want to add AND or OR gates (en.wikipedia.org/wiki/Logic_gate) to distinguish whether you need all pre-requisites or just one. – Franck Dernoncourt Aug 10 '14 at 16:54
11

yEd meets the listed requirements, is powerful and easy to use. It is freeware and runs cross-platform (requires Java).

See its features.

Here’s my building tree made with it:

enter image description here

  • Interesting. I'll take a look. – Julia McGuigan Aug 10 '14 at 14:07
  • @Krom where did you get those icons? – user23772 May 18 '16 at 4:26
  • @SAxworthy Images were taken from RTS game Knights and Merchants. On a second thought, I'd better replace them with something neutral. – Kromster says support Monica May 18 '16 at 5:34
  • It works well, and allows custom properties on nodes, edges or a graph in general. The export to GraphML preserves custom properties, but GML format does not. I will using this to design my games tech trees. I almost started writing my own tech tree editor. Glad I found this post. – DataMania Feb 10 '17 at 3:47
4

FreePlane is a free and simple tool to create trees and mind maps. I use it to brainstorm almost all of my programming projects.

  • Runs on Windows, Mac, or Linux
  • Can export to several formats, including PDF and Latex
  • Saves in a native format *.mm for future editing
  • Has a parent/child node system
  • Offers the option to work both in GUI or in script
  • Supports images + description

Here are a couple examples provided by the developer:

enter image description here enter image description here

  • 1
    Hmm, I tried this and I wasn't really fond of it's interface. I tried to create five "root" notes (I guess they would technically be free nodes) but it was being stubborn and it was grouping them together and it seemed to insist that everything map back to the root. From the example image it looks like this would be possible, but it actually may be easier to do it in Graphviz, using a text editor, command line, data scraping, and code generation rather than muck around a difficult to grasp GUI. Thanks though! – Julia McGuigan Aug 10 '14 at 2:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.