Page 1 of 1

Tech tree generator

Posted: 09 Jan 2019, 20:17
by Berserk Cyborg
Introduced a decade ago in ticket #423, a little python script was made to generate a visual graphic of a research tree. Somehow got the tech tree generator to work with the JSON stat files (been years since I last did something in python, lol).

Don't know if it can be used anymore to update the beta guide research graphic, but if not, oh well. Requires pydot and graphviz. I used python 3 (3.6.7 is on my system) and it seemed to generate everything fine.

patch_and_graphic.zip
(77 KiB) Downloaded 420 times

Edit: Cleaned it up and linted it to remove several warnings. Accidentally used researchPower instead of researchPoints with the first patch, so fixed.

Edit2: Fixed plasma-cannon and emp weapon edge colors.
Edit3: Should generate the graph a little bit quicker now.

Re: Tech tree generator

Posted: 10 Jan 2019, 05:22
by Berg
Berserk Cyborg wrote: 09 Jan 2019, 20:17 Introduced a decade ago in ticket #423, a little python script was made to generate a visual graphic of a research tree. Somehow got the tech tree generator to work with the JSON stat files (been years since I last did something in python, lol).

Don't know if it can be used anymore to update the beta guide research graphic, but if not, oh well. Requires pydot and graphviz. I used python 3 (3.6.7 is on my system) and it seemed to generate everything fine.


patch_and_graphic.zip
Well done mister

Re: Tech tree generator

Posted: 02 Mar 2019, 22:10
by crab_
Berserk Cyborg wrote: 09 Jan 2019, 20:17 Don't know if it can be used anymore to update the beta guide research graphic
Betaguide uses js to generate research tree on client machine. I think python generator can run only on server, so it need another architecture . Currently betaguide is pure js and all is calculated on client.
Also it can generate interactive tree http://betaguide.wz2100.net/Research.php?tree=1
Also it can generate parts of tree http://betaguide.wz2100.net/Research.ph ... Prop-Hover