Reply
 
Thread Tools
Old August 24, 2005, 07:37   #1
Cyrion
Civilization II PBEMScenario League / Civ2-Creation
King
 
Cyrion's Avatar
 
Local Time: 22:43
Local Date: July 29, 2010
Join Date: Jan 2002
Location: Caught somewhere in time
Posts: 1,944
Tool request for scenario players and designers
I think I remember this being discussed some time ago (if I'm not mistaken, by Yaroslav, before he was sent to Siberia )...

I would really find helpful (when playing a scenario or when designing one) an utility that would be able to read the rules.txt file, extract the tech tree and put it in graphical form!

As I haven't done any programming in 5 years (and don't intend to start again ), this is something I won't do myself...

BUT, if someone is willing to try, I would gladly help with the algorithm and logic of the programm (just NOT the programming itself...).

Would such a tool be welcomed by others?

Anybody interested in doing it?
__________________
Ankh-Morpork, we have an orangutan...
Discworld Scenario: http://apolyton.net/forums/showthrea...8&pagenumber=1
POMARJ Scenario:http://www.apolyton.com/forums/showt...8&pagenumber=1
LOST LEGIONS Scenario:http://www.apolyton.com/forums/showt...hreadid=169464
Cyrion is offline   Reply With Quote
Old August 24, 2005, 07:59   #2
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
Local Time: 15:43
Local Date: July 29, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
The biggest hurdle is the graphical depiction. To see what I mean, take 10 scenarios and draw their trees, using a common format. What works for a linear tree would likely yield spaghetti with a complex tree.
__________________
El Aurens v2 Beta!
Boco is offline   Reply With Quote
Old August 24, 2005, 12:49   #3
fairline
Scenario League / Civ2-Creation
King
 
fairline's Avatar
 
Local Time: 20:43
Local Date: July 29, 2010
Join Date: Sep 2002
Location: of the wing
Posts: 2,013
What a great idea Cyrion

In fact didn't Mercator promise to make such a utility after pulling a nasty April Fool's trick?
fairline is offline   Reply With Quote
Old August 24, 2005, 15:16   #4
Panda
Prince
 
Local Time: 20:43
Local Date: July 29, 2010
Join Date: Dec 1969
Location: Europe
Posts: 744
I remember posting that as an idea for Civ3.

I wonder....

considering that the rules.txt tech section can be so easily transfered to Excel as "comma separated value" data, would it be easy to produce a flow-chart using some clever macro?

Too bad I don't have my old job when I had more time and less supervision: I could have found out!
__________________
"I didn't invent these rules, I'm just going to use them against you."
Panda is offline   Reply With Quote
Old August 24, 2005, 16:56   #5
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
Local Time: 15:43
Local Date: July 29, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
Excel, I have. Likewise, lots of experience with Excel VBA. What I lack is the slightest idea of a 'universal' format for a graphical tech tree. Come up with that, and I'll start coding.

You don't need to be a chip-head to do this part. Start posting ideas of gfx trees, and let's come up with something.
__________________
El Aurens v2 Beta!
Boco is offline   Reply With Quote
Old August 25, 2005, 11:28   #6
Cyrion
Civilization II PBEMScenario League / Civ2-Creation
King
 
Cyrion's Avatar
 
Local Time: 22:43
Local Date: July 29, 2010
Join Date: Jan 2002
Location: Caught somewhere in time
Posts: 1,944
Quote:
Originally posted by Boco
The biggest hurdle is the graphical depiction. To see what I mean, take 10 scenarios and draw their trees, using a common format. What works for a linear tree would likely yield spaghetti with a complex tree.
Yes, the graphical depiction is the main problem!

But a "sub-optimal" tree would already be better than no tree at all!

Anyway, i have some ideas about how to avoid it to be too spaghetti-like!

I'll try to define them on paper and post them here in a few days!

And if by chance they prove worthy, get ready to code...

@Gareth: argh, that awful April's fool prank!
__________________
Ankh-Morpork, we have an orangutan...
Discworld Scenario: http://apolyton.net/forums/showthrea...8&pagenumber=1
POMARJ Scenario:http://www.apolyton.com/forums/showt...8&pagenumber=1
LOST LEGIONS Scenario:http://www.apolyton.com/forums/showt...hreadid=169464
Cyrion is offline   Reply With Quote
Old August 25, 2005, 14:19   #7
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 22:43
Local Date: July 29, 2010
Join Date: Dec 1969
Posts: 3,079
Quote:
Originally posted by fairline
In fact didn't Mercator promise to make such a utility after pulling a nasty April Fool's trick?
No.



How do you people like the way Test of Time displays the tech tree? It takes a few steps to simplify the tree to prevent the spaghetti.

Another way would be, say, to only display the direct prerequisites and "descendants" of a tech. Every time you click on a tech, the display changes the center tech to that one. That would simplify the display. It won't give you a big overview of the entire tree, but it will allow you to browse through it.

Unless you calculate the tree every time before you display it, it probably won't just be a matter of displaying either. It would probably be easier to load the tree into some sort of data structure.

And I don't know too much about Excel/spreadsheets, but I don't think a static spreadsheet is the optimal format for displaying a tech tree. Not if you're expecting all sorts of different ones anyway.
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline   Reply With Quote
Old August 25, 2005, 14:29   #8
duke o' york
Civilization II Succession Games
Emperor
 
duke o' york's Avatar
 
Local Time: 21:43
Local Date: July 29, 2010
Join Date: Oct 2001
Location: of home-made blueberry muffins
Posts: 7,109
No, but if a tool is made that allows the designer to put the tech tree into a spreadsheet and then include that file in the zip, then all players will be able to view it when they play.
That way, rather than the player have to run the tool each time they play a different scenario, the designer need only run it once with a new scenario, and everyone will be able to view it.
__________________
"When we grow up we'll both be soldiers, and our horses will not be toys,
And I wonder if we'll remember when we were two little boys!"
duke o' york is offline   Reply With Quote
Old August 25, 2005, 14:57   #9
curtsibling
staff
Scenario League / Civ2-Creation
Moderator
 
curtsibling's Avatar
 
Local Time: 21:43
Local Date: July 29, 2010
Join Date: May 2002
Location: Spamingrad
Posts: 5,693
It would be great to have a new tech tree program like the one in FW, but minus the bugs!

curtsibling is offline   Reply With Quote
Old August 25, 2005, 15:21   #10
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 22:43
Local Date: July 29, 2010
Join Date: Dec 1969
Posts: 3,079
But the whole point of the tool wouldn't be to help the player, but to help the designer!

And the biggest problem isn't so much making a spreadsheet out of a tech tree. I'm sure some designers do that by hand. The hardest problem is making a program that can turn any tech tree it gets into a legible spreadsheet.

Not to mention that not everyone has Excel (e.g. me), so not everyone will be able to view it. It would be much handier to have a "tech tree viewer utility" that can simply load a rules.txt file and display a tech tree (and has tech tree editing/verifying options).
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline   Reply With Quote
Old August 25, 2005, 23:03   #11
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
Local Time: 15:43
Local Date: July 29, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
Quote:
Originally posted by Mercator
The hardest problem is making a program that can turn any tech tree it gets into a legible spreadsheet.
Just to show the point, attached is but one example of medium complexity.

In a 'universal' spreadsheet depiction, the techs would occupy some sort of standardized grid. The spaghetti comes as soon as you connect the nodes on the grid. Actually, Visio (used here) does a nice labor-intensive job, but it is priced solely for the Fortune 500.

Quote:
Originally posted by Mercator Another way would be, say, to only display the direct prerequisites and "descendants" of a tech. Every time you click on a tech, the display changes the center tech to that one. That would simplify the display. It won't give you a big overview of the entire tree, but it will allow you to browse through it.
This seems the most practical suggestion to date, but I'm holding hope for Cyrion.

I even stalled on writing a tech tree validator. A 2D table isn't the optimal good way to hold the preq1, preq2 data. Maybe a suboptimal brute force spreadsheet that does a comprehensive series of descendents lists for each tech, along the lines Merc suggested, would work. It wouldn't be pretty, but it should find dead ends and loops.

Attached is a 5 minute job, using Advanced Flight in vanilla Civ2. It doesn't yet have all the preqs listed, but it gives me some ideas. If you don't care about looks, it could be done.
Attached Thumbnails:
primitivetree.gif  
__________________
El Aurens v2 Beta!
Boco is offline   Reply With Quote
Old August 25, 2005, 23:41   #12
techumseh
Civilization II PBEMScenario League / Civ2-Creation
Emperor
 
techumseh's Avatar
 
Local Time: 14:43
Local Date: July 29, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,193
This is a great idea. It would certainly be a boon to the tech-tree challenged, such as myself. It would be easy enough to make changes on the Rules txt. file itself if the program could display the resulting changes.
__________________
Tecumseh's Village, Home of Fine Civilization Scenarios

www.tecumseh.150m.com
techumseh is offline   Reply With Quote
Old August 26, 2005, 10:24   #13
Elok
Scenario League / Civ2-Creation
Emperor
 
Elok's Avatar
 
Local Time: 16:43
Local Date: July 29, 2010
Join Date: Mar 2003
Location: Having tea with the Third Man...
Posts: 6,092
The utility Merc promised to think about was a full-fledged scenario designer, after he made a fake one as an april fool's joke. Presumptively that would include a tech tree maker.

I like Boco's prototype. Given the way most tech trees increase drastically in complexity as they advance, would a radial design be a good idea? Granted, that's harder to draw than a "ladder," but it makes more efficient use of space if the tree begins with a small circle of base techs and expands outwards. Meh, probably not, a tech with prereqs from different "generations" would look just plain ugly. But I'll keep the idea here, maybe somebody can use it.

Actually, for a programmed format, how about the format from the original Civ2 chart? I don't know how hard that would be to program, but it prevents a complete spaghetti mess by listing prereqs that aren't close by in parentheses under the tech. Those really out-there linkups are relatively rare anyway.
__________________
"May I be forgiven for the ills that I have done/Friends I have forsaken and strangers I have shunned/Sins I have committed, for which others had to pay/And I haven't met the whiskey that can wash those stains away."
-Brady's Leap, "Wash."
Elok is offline   Reply With Quote
Old September 4, 2005, 16:00   #14
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 22:43
Local Date: July 29, 2010
Join Date: Dec 1969
Posts: 3,079
I actually had a go at a tech tree checking program. Just command-line, I'm afraid, so no trees. It seems to work nicely, though I haven't tested it too much yet.

I wrote it in Perl though, which means you'd need Perl installed to be able to use it, since I haven't figured out yet how I can properly compile it into an executable.

The program can find, bad syntax in the @CIVILIZE section, bad abbreviations, tech loops as well as notice if a path to the future tech is missing.
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline   Reply With Quote
Old September 4, 2005, 16:13   #15
techumseh
Civilization II PBEMScenario League / Civ2-Creation
Emperor
 
techumseh's Avatar
 
Local Time: 14:43
Local Date: July 29, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,193
Merc.
__________________
Tecumseh's Village, Home of Fine Civilization Scenarios

www.tecumseh.150m.com
techumseh is offline   Reply With Quote
Old September 6, 2005, 17:43   #16
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 22:43
Local Date: July 29, 2010
Join Date: Dec 1969
Posts: 3,079
Perl isn't the best programming language when it comes to executables. I got something working though...

Download Civ2tech

Quote:
Bugfix 12-12-2007

Update 11-12-2007:

I've made civ2tech a little more user-friendly for people wary of using the command-line.
  • Unzip the contents of the zip anywhere
  • Create a (desktop) shortcut to civ2tech.exe (Optional)
  • Drag and drop any rules file onto either the civ2tech executable or the civ2tech shortcut to check the technology tree for errors.
  • Repeat the above step until civ2tech can't find any more errors.

For those who want to use the command-line, that still works the same:

It's a command-line utility so you'll have to use a DOS/Command prompt.

Unzip the contents into some folder. Open the command prompt, go to the directory you put civ2tech into and type in something like:

Code:
civ2tech C:\MPS\Civ2\Scenario\Awesome\rules.txt
If there are spaces in the filename, be sure to use double quotes around it, like this:

Code:
civ2tech "C:\Program Files\Civ2\Scenario\Totally Awesome\rules.txt"
It'll give you error messages saying what's wrong and in some cases it will also mention the line in the Rules file the error occured on.

To be more precise, it will give you just one error message; the first error it finds. You'll have to fix that error before running civ2tech again to see if there are any more errors.

If it can't find any errors it will say so. E.g. "Everything seems OK for D:\Games\Civ2\rules.txt."

Could anyone try it out with some (intentionally) screwed up tech trees?
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

Last edited by Mercator; December 12, 2007 at 17:23.
Mercator is offline   Reply With Quote
Old September 28, 2005, 14:09   #17
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 22:43
Local Date: July 29, 2010
Join Date: Dec 1969
Posts: 3,079
Well, it's good to know that no-one really cares after all. That'll save me a lot of trouble in the future.
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline   Reply With Quote
Old September 29, 2005, 00:02   #18
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
Local Time: 15:43
Local Date: July 29, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
Whoa! I am definitely interested in this, but I haven't been able to Civ for over 3 weeks! Give me until Sunday before you walk away in disgust.

I strongly suspect that September is very slow month for Civving in general. RL kicks into high gear for many. Add to that the upcoming Civ4 release (anyone heard from Exile?), and you've got a recipe for a slow response.

Still, does no one have time to test this sooner?
__________________
El Aurens v2 Beta!
Boco is offline   Reply With Quote
Old September 29, 2005, 02:01   #19
Cyrion
Civilization II PBEMScenario League / Civ2-Creation
King
 
Cyrion's Avatar
 
Local Time: 22:43
Local Date: July 29, 2010
Join Date: Jan 2002
Location: Caught somewhere in time
Posts: 1,944
Quote:
Originally posted by Mercator
Well, it's good to know that no-one really cares after all. That'll save me a lot of trouble in the future.
Sorry for not posting anymore on this (my own!) thread!

Of course I'm really interested, and I really intend to start working on it in the coming weeks, but RL has been awfully complicated of late, and so my Civ time has been drastically reduced!

But no fear, it'll all be settled soon...
__________________
Ankh-Morpork, we have an orangutan...
Discworld Scenario: http://apolyton.net/forums/showthrea...8&pagenumber=1
POMARJ Scenario:http://www.apolyton.com/forums/showt...8&pagenumber=1
LOST LEGIONS Scenario:http://www.apolyton.com/forums/showt...hreadid=169464
Cyrion is offline   Reply With Quote
Old September 29, 2005, 02:07   #20
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 22:43
Local Date: July 29, 2010
Join Date: Dec 1969
Posts: 3,079
Ok then. Just trying to get some attention back to this thread.
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline   Reply With Quote
Old September 29, 2005, 06:03   #21
Catfish
Prince
 
Local Time: 06:43
Local Date: July 30, 2010
Join Date: Aug 2000
Location: Wollongong, Australia
Posts: 365
No thorough testing here, but I found that it returns a 'Failed to find path to the future technology' error when the future tech is 'nil, nil'.
Catfish is offline   Reply With Quote
Old September 29, 2005, 08:07   #22
curtsibling
staff
Scenario League / Civ2-Creation
Moderator
 
curtsibling's Avatar
 
Local Time: 21:43
Local Date: July 29, 2010
Join Date: May 2002
Location: Spamingrad
Posts: 5,693
Quote:
Originally posted by Mercator
Well, it's good to know that no-one really cares after all. That'll save me a lot of trouble in the future.
Now, now!

Stop sulking!

I have been busy making civ2 graphics and not been on the forums for some days.

But your work on this on is 100% appreciated, and I am going to test it this instant!

curtsibling is offline   Reply With Quote
Old September 29, 2005, 08:11   #23
curtsibling
staff
Scenario League / Civ2-Creation
Moderator
 
curtsibling's Avatar
 
Local Time: 21:43
Local Date: July 29, 2010
Join Date: May 2002
Location: Spamingrad
Posts: 5,693
Now the trick is trying to open a DOS window!
curtsibling is offline   Reply With Quote
Old September 29, 2005, 08:14   #24
curtsibling
staff
Scenario League / Civ2-Creation
Moderator
 
curtsibling's Avatar
 
Local Time: 21:43
Local Date: July 29, 2010
Join Date: May 2002
Location: Spamingrad
Posts: 5,693
Followed your instructions to the letter:

But - The DOS does not recognise 'civ2tech' as a legal/operable batch command.

curtsibling is offline   Reply With Quote
Old September 29, 2005, 14:25   #25
Broken_Erika
Scenario League / Civ2-Creation
Prince
 
Broken_Erika's Avatar
 
Local Time: 16:43
Local Date: July 29, 2010
Join Date: Oct 2004
Location: -ess Hopelessly Addicted to Fallout3
Posts: 457
Quote:
Originally posted by curtsibling
Followed your instructions to the letter:

But - The DOS does not recognise 'civ2tech' as a legal/operable batch command.

what os do you use?
__________________
Instructions for quick wash:
Tie clothes in bundle, drop in toilet and flush 5-times
then tie damp clothes around neck in capelike fashion
and run around block yelling "I am normal!" until clothes are air-dried.
Broken_Erika is offline   Reply With Quote
Old September 29, 2005, 14:38   #26
Broken_Erika
Scenario League / Civ2-Creation
Prince
 
Broken_Erika's Avatar
 
Local Time: 16:43
Local Date: July 29, 2010
Join Date: Oct 2004
Location: -ess Hopelessly Addicted to Fallout3
Posts: 457
Quote:
Originally posted by Mercator

Could anyone try it out with some (intentionally) screwed up tech trees?
like this?
oh, and it only posts one error at a time,
Attached Thumbnails:
screenie.jpg  
__________________
Instructions for quick wash:
Tie clothes in bundle, drop in toilet and flush 5-times
then tie damp clothes around neck in capelike fashion
and run around block yelling "I am normal!" until clothes are air-dried.
Broken_Erika is offline   Reply With Quote
Old September 29, 2005, 15:08   #27
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 22:43
Local Date: July 29, 2010
Join Date: Dec 1969
Posts: 3,079
@Catfish: Thanks! It's been fixed (I think). I've updated the file I uploaded:
http://apolyton.net/upload/view.php?...9_civ2tech.zip

@Curt:
Are you using the Command Prompt, or the "Run" thingy in the start menu? You should be using the Command Prompt.

Secondly, make sure that you are in the same folder as civ2tech. E.g. if you unzipped the stuff into C:\WINDOWS\Desktop, then the command prompt should be saying:
Code:
C:\WINDOWS\Desktop>
If it isn't the same, you have 2 options:

(1) Type in the full path to civ2tech (including the ".exe", followed by the full path to the rules.txt file). E.g.
Code:
C:\WINDOWS\Desktop\civ2tech.exe "D:\Games\Civ2\Scenario\MyScenario\rules.txt"

(2) If it says something different from the folder with civ2tech in it, change the directory first. You can do that using the CD command. Another example, if you put civ2tech in D:\Program Files\Civ2tech, and the command prompt looks like this:
Code:
C:\WINDOWS>
Type in the following:

Code:
cd /d "D:\Program Files\Civ2tech"
Then follow the example as in my previous post.
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline   Reply With Quote
Old September 29, 2005, 15:10   #28
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 22:43
Local Date: July 29, 2010
Join Date: Dec 1969
Posts: 3,079
Quote:
Originally posted by Broken_Erika
like this?
oh, and it only posts one error at a time,
Excellent!
Was it correct as well?

Yep, that's how it's supposed to work. One error at a time. It's a little cumbersome, but it was the easiest to program.
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline   Reply With Quote
Old September 29, 2005, 15:37   #29
techumseh
Civilization II PBEMScenario League / Civ2-Creation
Emperor
 
techumseh's Avatar
 
Local Time: 14:43
Local Date: July 29, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,193
I'm sorry, Merc. I don't have tme to help test this right now, but I'll certainly be interested in using it.
__________________
Tecumseh's Village, Home of Fine Civilization Scenarios

www.tecumseh.150m.com
techumseh is offline   Reply With Quote
Old September 29, 2005, 20:11   #30
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
Local Time: 15:43
Local Date: July 29, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
Merc, were you planning on a VB interface? If not, I'd be interested in calling your program from a spreadsheet that imports/exports @sections from Rules.txt.
__________________
El Aurens v2 Beta!
Boco is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 16:43.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team