Author Topic: techtree-flowchart  (Read 8238 times)

olaus

  • Guest
techtree-flowchart
« on: 5 January 2011, 22:27:10 »
hi folks,

just to avoid that someone wastes time in documenting the techtrees:
i wrote a perl-script to parse the XML of glest-techtrees and generate a "flowchart" out of it.

example:
Code: [Select]
http://pastebin.de/13576(save as "tech.svg" and drag & drop into firefox)(is there something like pastebin for binarys?)

hopefully i'll find the time to also output HTML-pages with the unit details. it should even be possible to generate basic-tutorials for every faction ("barracks allow you to ... now build a barrack", "well done", ...) out of the techtree :)

regards
olaus

p.s.: is there a tool to produce a jpeg or png from a g3d-model? or any other way to get a picture suitable for a webpage out of the techtree-folders? i found just the icon-bmps.
« Last Edit: 14 April 2016, 15:36:16 by filux »

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: techtree-flowchart
« Reply #1 on: 5 January 2011, 22:43:22 »
This could be interesting unfortunately i dont have time to pursue more projects :).m looks good with these mini tools, allways some fun tool to do something new and smart. :).
WiP Game developer.
I do danish translations.
"i break stuff"

Conzar

  • Guest
Re: techtree-flowchart
« Reply #2 on: 6 January 2011, 05:30:32 »
@olaus  great work!  I think though it might look less complicated if you only do a techtree for the structures.  Then if you want to get fancy, you can add the units the building produces below or to the sides.

Here are some examples that illustrate this point.
Blizzard's Terran TechTree
Code: [Select]
[url=http://sc2pod.com/wiki/Tech_Trees]SC2Pod's Techtree[/url]
Also, what program are you using to generate the flow charts?

I was thinking of incorporating auto-generated flow charts for another software I am developing (its for designing build orders for sc2).  I was thinking that I would extend this program to work with glest.
« Last Edit: 14 April 2016, 15:37:13 by filux »

olaus

  • Guest
Re: techtree-flowchart
« Reply #3 on: 7 January 2011, 22:48:57 »
here's the new stuff:
HTML-export:
Code: [Select]
http://rupp.de/mg_factions/persian_techtree.html
http://rupp.de/gae_factions/magic_techtree.html

clickable map:
Code: [Select]
http://rupp.de/mg_factions/experimental_image_map_diagram.html
i'm using just this perl-module:
http://search.cpan.org/~lbrocard/GraphViz-2.04/lib/GraphViz.pm

putting the units below the buildings is a good idea and the module has a feature for grouping nodes. but in glest lots of units are produced by other units (summoner, technician, ...) , lets see how this works out. the module can export to like 15 formats. if the result still sucks someone might import it to inkscape or whatever and make a nice version (with the drawback that it won't automatically adopt to changes.)

« Last Edit: 14 April 2016, 15:25:27 by filux »

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: techtree-flowchart
« Reply #4 on: 7 January 2011, 23:21:59 »
What a useful reference!  I'll be sure to use these on my own work. :thumbup:

I see it doesn't like the tip values for the Initiate, though:
Code: [Select]
[URL=http://img508.imageshack.us/i/82216791.png/][IMG]http://img508.imageshack.us/img508/219/82216791.th.png[/img][/URL]
« Last Edit: 14 April 2016, 15:25:44 by filux »

Conzar

  • Guest
Re: techtree-flowchart
« Reply #5 on: 8 January 2011, 02:16:58 »
@olaus  Great work!  Could you maybe make 2 versions?  1 with buildings only, and one with everything? 
Would it be possible to add icons for the resources: meaning instead of G for gold, there is a gold icon? 
Also for the skills, would it be possible to add icons for each skill?


John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: techtree-flowchart
« Reply #6 on: 8 January 2011, 02:59:40 »
As a side note, it might be more intuitive if the zero values were shown as such, since the '-' character seems to imply something like "not applicable".  Also, some of the "enables to build" and "required to build" items show up twice (such as for the Summoner).

I also noticed your image tag for the Magic loading screen had an error in it.  It should be spelled "height", not "heigth".  I don't know if it actually causes an error, though.

This might be only me, but I think it would look a little cleaner if some of the attack info was included in the same box as the skill, as currently the numbers clash with the words.  In this image, I also added a "morphed from" cell and moved "Battlemage" to there, since that's more helpful to the reader.
Code: [Select]
[URL=http://img191.imageshack.us/i/67387912.png/][IMG]http://img191.imageshack.us/img191/333/67387912.th.png[/img][/URL]
« Last Edit: 14 April 2016, 15:31:47 by filux »

olaus

  • Guest
Re: techtree-flowchart
« Reply #7 on: 11 January 2011, 21:12:25 »
@olaus  Great work!  Could you maybe make 2 versions?  1 with buildings only, and one with everything?  

good idea to leave out some stuff, i guess building + units would be the most useful and skip the upgrades.

Would it be possible to add icons for the resources: meaning instead of G for gold, there is a gold icon?  

done (not visible on the web yet because i moved development to my laptop)

Also for the skills, would it be possible to add icons for each skill?

i put it on the wishlist

Mr War

  • Guest
Re: techtree-flowchart
« Reply #8 on: 11 January 2011, 22:44:37 »
Very nice work. Good to see Graphviz being used too :)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: techtree-flowchart
« Reply #9 on: 11 January 2011, 23:04:16 »
I'd be really interested in seeing the source for your perl script posted here. I couldn't find it, only links to the library being used and examples...
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

olaus

  • Guest
Re: techtree-flowchart
« Reply #10 on: 15 January 2011, 00:26:24 »
Very nice work. Good to see Graphviz being used too :)

do you know how to arrange the nodes? i guess
Code: [Select]
http://rupp.de/mg_factions/tech_techtree_clickable_map_all.html would look a lot better if the worker would be in the middle not on top.
« Last Edit: 14 April 2016, 15:32:42 by filux »

Mr War

  • Guest
Re: techtree-flowchart
« Reply #11 on: 16 January 2011, 22:43:09 »
I don't, I know of and respect Graphviz but for reasons outside my control I've never got to use it. There are a lot of layouts http://www.graphviz.org/Gallery.php.

http://www.graphviz.org/Gallery/twopi/twopi2.html is the one that impresses the hell out of me

« Last Edit: 14 April 2016, 15:33:12 by filux »

olaus

  • Guest
Re: techtree-flowchart
« Reply #12 on: 17 January 2011, 00:42:27 »
http://www.graphviz.org/Gallery/twopi/twopi2.html is the one that impresses the hell out of me


good hint, but it looks like twopi doesn't bend the arrows around the nodes as dot does so the result doesn't look as good as it could:

Code: [Select]
http://rupp.de/tech_techtree_graph_all_twopi.png
maybe i should stop spending time on the graph and leave it to someone to do draw them nicely by hand, shouldn't be too much work after importing the SVGs.
« Last Edit: 14 April 2016, 15:33:42 by filux »

Conzar

  • Guest
Re: techtree-flowchart
« Reply #13 on: 20 January 2011, 01:09:37 »
maybe i should stop spending time on the graph and leave it to someone to do draw them nicely by hand, shouldn't be too much work after importing the SVGs.
I was looking through the glest main web site (for background images, anyone have good glest backgrounds images?) and came across these awesome tech trees.

Have you seen these?
Tech Tree
Magic Tree

I think the format of these tech trees is great and it would be good to expand them with the other mega-pack factions.


titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: techtree-flowchart
« Reply #14 on: 20 January 2011, 10:11:11 »
Uh I somehow missed the switch to the tools section for this   :'(

What I wrote in the old thread:
Quote
In your faction overview you also had also samething called "Unit Details for persian".
First one you show here is the blacksmith for example. What I had in mind is not to have all on one html page, but to have the details on seperate html pages which is referenced from the overview tables on top. When you click on a unit there you get the unit overview ( on a seperate page ) showing details about the unit.
And this is the place where the animated gifs might be nice! You show the icon there too and below the animation....

Are there any plans to create a faction overview with several subpages?
And when can we try these cool scripts too?  :D :D
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

olaus

  • Guest
Re: techtree-flowchart
« Reply #15 on: 21 January 2011, 00:15:49 »
hi,

i'm finally complete with my data-structure so here's the code (and new example output):

http://rupp.de/glest/

new stuff:
* now handles all commands, skills and upgrades properly
* includes the tips from GAE
* produces single pages for each unit (but doesn't link to it from the overview, should make that configurable)

i still need to finish some stuff with the output like a more simplified techtree (someone posted an exmaple from sc2).

too bad g3d_thumbs.py doesn't run on my system, it just dumps core (g3d_stats.py works). anyone with more luck on ubuntu 10.04 ? i really would like to include the proper pictures instead of just the icons.

me bed
olaus

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: techtree-flowchart
« Reply #16 on: 21 January 2011, 03:57:16 »
Looks great! Thanks for finally publishing it for us all.

I think it should link to the single unit pages by default. For example, have the map as the "home", a link at the top of that page to see the list of units, whereas clicking the units name on the map opens their individual page, and those can be further interconnected by having production, morphing, etc that is mentioned on the individual page link to the page for that unit they will morph into, etc;
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: techtree-flowchart
« Reply #17 on: 21 January 2011, 16:40:21 »
Thanks Olaus I have included your scripts in the MG source tree in svn (And made a few minro changes so it runs out of the box in our svn folder sctructure on all factions in our data folder.

Great work!

olaus

  • Guest
Re: techtree-flowchart
« Reply #18 on: 23 January 2011, 22:03:40 »
I was looking through the glest main web site (for background images, anyone have good glest backgrounds images?) and came across these awesome tech trees.

Have you seen these?
Tech Tree
Magic Tree

I think the format of these tech trees is great and it would be good to expand them with the other mega-pack factions.

i know those, but that can't ever be automated. someone would have to use the generated trees as blueprints and draw that with gimp, inkscape or whatever.

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: techtree-flowchart
« Reply #19 on: 27 January 2011, 10:24:12 »
It would be a challenge but graphviz 'dot' and imagemagick could do these pretty techtrees automated.

You might have to put up with the arrows being basic lines rather than nice arrows, unless you were to render just the arrows in one pass and then do some magic in imagemagick to stencil them etc at a pixel level.

And finally you'd use imagemagick's compose to flatten all the intermediate layers you'd created onto a nice parchment background....

(I am not volunteering to do it)

olaus

  • Guest
Re: techtree-flowchart
« Reply #20 on: 30 January 2011, 16:56:37 »
new version 0.5:
Code: [Select]
http://rupp.de/glest/convert_faction_xml2html.pl
(the unchanged files are in http://rupp.de/glest/convert_faction_xml2html.tgz , was too lazy ;)

# DONE
# 0.5:
# - allow relative & absolut path at the same time (relative can't start with / )
# - show what levels (f.e. elite after x kills) add to sight, armor, ...
# - show what available upgrades add to stats in each unit
# 0.4:
# - show updates available in each unit
# - fix paths with spaces
# 0.3
# - @all_html_pages with with page-title, sort by faction, special pages (keys & armor/attack)
# - fixed morph cost of thor/thortotem
# - pass http://validator.w3.org
# - images path per unit for romans (5 times guard.bmp with different content)
# - <NOBR> in cost
# - included levels
« Last Edit: 14 April 2016, 15:35:18 by filux »

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: techtree-flowchart
« Reply #21 on: 2 May 2011, 07:35:03 »
Code: [Select]
http://rupp.de/glest/convert_faction_xml2html.pl seems to be a dead link;

any chance this finds it's way onto github perhaps?

(if it was added to a fork of GlestTools, I'd be happy to pull it back; maintaining it is another thing though)
« Last Edit: 14 April 2016, 15:35:48 by filux »

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: techtree-flowchart
« Reply #22 on: 2 May 2011, 18:59:15 »
The latest script for this is in mg's source/tools folder