Ludeon Forums

Ludeon Forums

  • April 21, 2019, 12:55:11 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [Tool] Tech Tree Graph Generator  (Read 3262 times)

shala

  • Muffalo
  • *
  • Posts: 2
  • Refugee
    • View Profile
[Tool] Tech Tree Graph Generator
« on: November 08, 2014, 05:56:14 AM »

I wrote this tool for the TechTreeMinami mod version 3.2 for Rimworld version 7, but it should also work for other mods, or mod packs.

It consists of a python script, that parses through the files in ResearchProjectDefs, ThingDefs, and TerrainDefs directories, and generates output in the *.dot format.

Instructions
1. Download the script form the attachment. Modify the MOD variable to contain all of the folder names of the mods you want included, in their correct load order. The script expects to be run inside the Rimworld<version> folder, but you can change that by modifying MODS_PATH.
2. Make sure you have something to render the *.dot file, under Linux/Ubuntu the functionality comes with the package graphviz.
3. Under Linux, you generate the graph like this:
Code: [Select]
$ python tech_tree.py > tech_tree.dot
$ dot -Tpng tech_tree.dot > tech_tree.png

Notes
1. I only tested this under Linux, modifications might be needed for other OSes.
2. If there are errors while parsing, those can be found in the *.dot file (they are commented out, to not affect the rendering).

I hope some of you will find this useful :D
Cheers
Shala

[attachment deleted by admin: too old]
Logged