View Full Version : Tech tree viewer in the works...
Lemmy
May 22nd, 2002, 12:47 PM
...by me http://forum.shrapnelgames.com/images/icons/icon7.gif
shamanblues asked if there is something like this made here (http://www.shrapnelgames.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=23;t=005593), it looks like there wasn't , and there isn't someone already working on it.
The idea is too make a program which allows you to view the tech tree like in Civ.
Here's what i had in mind,
You got your basic window, inside there is one main view, in which the tree is shown, each tech is shown as a button, clicking on it will bring up a new window with information about the tech.
The new window will tell you all new components, facilities, and spy ops gained upon completion of this tech.
At the moment i'm not sure if one button should represent an entire tech area, or only one lvl in a tech area.
ideas/thought?
feature requests?
oh, about features, i will not make this an editor, just a viewer...at least for now.
And all of this will be written in Java.
Richard
May 22nd, 2002, 04:22 PM
I like the ideas http://forum.shrapnelgames.com/images/icons/icon7.gif .
DirectorTsaarx
May 22nd, 2002, 04:28 PM
Originally posted by LemmyM:
[QB<snip>
The idea is too make a program which allows you to view the tech tree like in Civ.
Here's what i had in mind,
You got your basic window, inside there is one main view, in which the tree is shown, each tech is shown as a button, clicking on it will bring up a new window with information about the tech.
The new window will tell you all new components, facilities, and spy ops gained upon completion of this tech.
At the moment i'm not sure if one button should represent an entire tech area, or only one lvl in a tech area.
<snip>
[/QB]<font size="2" face="Verdana, Helvetica, sans-serif">I vote for one button = 1 tech level.
This is going to be a vey complex tree, isn't it?
Lemmy
May 22nd, 2002, 04:57 PM
Originally posted by DirectorTsaarx:
I vote for one button = 1 tech level.
<font size="2" face="Verdana, Helvetica, sans-serif">you're right, 1 button = 1 lvl is best.
This is going to be a vey complex tree, isn't it?<font size="2" face="Verdana, Helvetica, sans-serif">a little...the algorithm to place all the buttons is probably the hardest part, but i already made it for a civ3 techviewer...and if i hadn't lost the source to that, it would be a lot easier http://forum.shrapnelgames.com/images/icons/icon9.gif
[ May 22, 2002, 16:12: Message edited by: LemmyM ]
Lemmy
May 22nd, 2002, 05:39 PM
i was also thinking about a search function by name, there is a textfield, and you must choose to search for a component, spy op, facility, or tech area, and then the main view would center in the corresponding tech button
Gryphin
May 22nd, 2002, 06:02 PM
I don't know if this helps.
I was able using Word to take the Tech Tree created by, um, was it you? and reduce it to a Tab Delimeted file.. From there I was able to port it to MicroSponge Access. A few preliminary efforts indicated I could do pretty defined searches on just a flat file.
I could send you the results or the seriess of macros I used to do the "parsing".
I realize not everyone has MicroSponge Access but ...
I'm not a programmer but if this helps, please let me know.
I will have guest for the next 6 days.. I may still be able to send it or upload it.
Lemmy
May 22nd, 2002, 09:55 PM
It wasn't me who created that file.
I'm writing my own parser in Java and store the data in Java classes, figuring out how to connect with acces in Java (if possible) would take too much time.
Hank
May 23rd, 2002, 09:24 PM
The JDBC/ODBC bridge connects Java to Access fairly quickly. But the better design is to do as you are planning, parse the SEIV files themselves for the data you need that way your techtree will be able to pickup patch changes and probably even mod changes easily.
Ransack
May 24th, 2002, 12:18 AM
I was thinking of doing something like this too. One difference is that I am planning to use SVG as the output format. This would allow you to just point at a tech-level node and see in a floating window exactly what became available at that point.
Sound like a good idea?
Lemmy
May 24th, 2002, 09:39 AM
Originally posted by Hank:
The JDBC/ODBC bridge connects Java to Access fairly quickly. But the better design is to do as you are planning, parse the SEIV files themselves for the data you need that way your techtree will be able to pickup patch changes and probably even mod changes easily.<font size="2" face="Verdana, Helvetica, sans-serif">yep, that's right, i'm writing a seperate Loader class, so that any patch changes will be easily updated.
Originally posted by Ransack:
I was thinking of doing something like this too. One difference is that I am planning to use SVG as the output format. This would allow you to just point at a tech-level node and see in a floating window exactly what became available at that point.
Sound like a good idea? <font size="2" face="Verdana, Helvetica, sans-serif">hmm, don't know much about SVG, other that it's based on xml?
Skulky
May 25th, 2002, 07:03 AM
I'm kinda confused, woudl this tech viewer be for only the "vanilla" mod or for any tech tree? Cool either way though, i have trouble planning my sneaky research schemes when im not at a computer with my game open.
Lemmy
May 25th, 2002, 06:25 PM
This will be for any mod, all you have to do is specify the mod directory, and it will create graphical tech tree out of it.
raynor
May 28th, 2002, 03:57 AM
Here is a link to a very, very, very simple tech cost program for weapons I wrote Last year sometime:
Download techview 0.13 (http://forum.shrapnelgames.com/ubbuploads/raynor/techview.zip)
You tell it where to find the components.txt file, and it tries to read that file and the techarea.txt in the same directory. Except for being pretty unforgiving of errors in those files, it will display the info for the default files or modded files.
The program displays a list of weapons on the left and the cost to research each weapon in the family on the right. You can choose low, medium or high tech cost.
I always hoped to someday expand this program to show tech costs for all the components but RL got in the way (that and RTCW).
[ May 28, 2002, 03:08: Message edited by: raynor ]
Andrés
May 28th, 2002, 06:10 AM
Excellent program raynor.
I'm trying to find what's the error in my modded files to make it run with them. Any suggestion. What common mistake can be overseen by the game but not by this program?
Showing total tech cost of all tech areas should be more like removing a filter not like adding a new feature.
raynor
May 28th, 2002, 07:53 AM
Excellent program raynor.
I'm trying to find what's the error in my modded files to make it run with them. Any suggestion. What common mistake can be overseen by the game but not by this program?
<font size="2" face="Verdana, Helvetica, sans-serif">Thanks. Mainly, the program is particular about blank lines. The game accepts blank lines inside components and techareas and multiple blank lines between components and techareas. But this simple code doesn't have error checking to check for that. It assumes no blank lines inside components/techareas and just a single blank line between components/techareas.
Showing total tech cost of all tech areas should be more like removing a filter not like adding a new feature.<font size="2" face="Verdana, Helvetica, sans-serif">I agree. If I include every component in one big list, then it should be fairly simple. I may have gotten bogged down trying to get a little fancier by adding a tabbed interface to show a tab for each component class such as weapons, engines, etc. We shall see.
Lemmy
May 28th, 2002, 10:30 AM
Originally posted by Andrés Lescano:
Excellent program raynor.
I'm trying to find what's the error in my modded files to make it run with them. Any suggestion. What common mistake can be overseen by the game but not by this program?
<font size="2" face="Verdana, Helvetica, sans-serif">i just finished my loader class, and like Raynors program it's also unforgiving about errors, but it does tell you in what file and at what line the error is, if you want i can upload it.
It is written in Java, so if you don't have the Java Virtual Machine installed, you would download that too, i think it's not larger than 5 MB's.
i also noticed that certain weapons have a double "Weapon Displyay" field, it will cause an error in my program, maybe also in Raynors...
Andrés
May 28th, 2002, 08:05 PM
No I don't think that the game accepts blank lines in the middle of a component definition or multiple blank lines (or it interpretes that like a premature EOF).
IIRC the double weapon display was a bug in components.txt fixed many patchs ago, the file I'm trying to load (sci-fi x-over mod's) does not have any of those errors.
Lemmy I'd like to see your program too. I think that windows or IE install a java vm, so you can expect most Users to have it.
Lemmy
May 28th, 2002, 09:23 PM
posted here (http://www.shrapnelgames.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=50;t=000004)
don't forget to edit se4tv.ini first...
Phoenix-D
May 30th, 2002, 04:35 AM
Can't get the loader to do anything. It goes Java Main- Bad command and file name, then farts out.. I edited the .ini file, and I think I have Java installed.
EDIT: just downloaded and installed the MS java VM. no effect.
Phoenix-D
[ May 30, 2002, 04:01: Message edited by: Phoenix-D ]
Lemmy
May 30th, 2002, 09:52 AM
hmm, i know what wrong with that, the MS JVM odesn't have the java command, but "jview", that file is located in the c:\windows dir, so all you have to do is replace "java" with "c:\windows\jview" in the bat file.
(eidt: jview could be somewhere else if you downloaded it, just serach for it then)
But then you'll get another error, called java.lang.NoClassDefFoundError, for which i got no solution yet...
I suggest downloading the Sun JVM..i can't find the link yet...it's somwhere on java.sun.com, i'll post it when i find it..
[ May 30, 2002, 08:58: Message edited by: Lemmy ]
Lemmy
May 30th, 2002, 09:56 AM
ok, here it is..
http://java.sun.com/products/archive/j2se/1.3.1_02/jre/index.html
Gandalph
May 30th, 2002, 07:31 PM
I am getting an error when attempting to use this. Here is the error error1.bmp (http://home.attbi.com/~ericd173/error1.bmp) Here is the line it refers to error2.bmp (http://home.attbi.com/~ericd173/error2.bmp)
Phoenix-D
May 31st, 2002, 01:46 AM
Getting the same error, but according to Metapad line 429 is..
"Name := Space Port
Description := Facility which processes all generated resources in its system and makes them available for the empire.
Facility Group := Resource Extraction
Facility Family := 7
Roman Numeral := 0
Restrictions := None
Pic Num := 7
Cost Minerals := 6000
Cost Organics := 0
Cost Radioactives := 0 <-- right here
Number of Tech Req := 1
Tech Area Req 1 := Cargo
Tech Level Req 1 := 1
Number of Abilities := 1
Ability 1 Type := Spaceport
Ability 1 Descr := Acts as a spaceport for this system.
Ability 1 Val 1 := 0
Ability 1 Val 2 := 0
Ability 2 Type := None"
also, tried loading Proportions data. no go, "required tech area greater than max tech area". That's intential in Proportions, but looks like your loader doesn't like the concept. http://forum.shrapnelgames.com/images/icons/icon7.gif
Phoenix-D
Hank
May 31st, 2002, 02:31 AM
Hey Lemmy,
As an alternative to distributing the app as plain Java consider performing a native compile and distributing it as an exe.
I perform win32 native compiles with Excelsior JET (http://www.excelsior-usa.com/jet.html). It has a free Version that works quite well.
Hank
May 31st, 2002, 02:57 AM
Oh and to answer why the error is occurring. You posted it right below!
Number of Abilities := 1
Ability 1 Type := Spaceport
Ability 1 Descr := Acts as a spaceport for this system.
Ability 1 Val 1 := 0
Ability 1 Val 2 := 0
Ability 2 Type := None"
Note the Number of Abilities says "1". There is a "Ability 2 Type" in there. So technically, the data file has an error in it. Since the parser is very unforgiving, it registers that as an error.
Edit: The workaround is of course to remove the "Ability 2 Type := None" line from the facility.txt file.
[ May 31, 2002, 01:59: Message edited by: Hank ]
Lemmy
May 31st, 2002, 03:59 PM
Edit: The workaround is of course to remove the "Ability 2 Type := None" line from the facility.txt file.<font size="2" face="Verdana, Helvetica, sans-serif">exactly...when it says "Numberof abilities := 1" the program expects only 1 ability, that is four lines.
also, tried loading Proportions data. no go, "required tech area greater than max tech area". That's intential in Proportions, but looks like your loader doesn't like the concept.<font size="2" face="Verdana, Helvetica, sans-serif">hmm...i'll have to think about that one...
it's true that my program only allows compononts with "real" tech levels reqs...i'll see if i can chabnge that.
[ May 31, 2002, 15:00: Message edited by: Lemmy ]
geoschmo
May 31st, 2002, 04:14 PM
Originally posted by Lemmy:
ok, here it is..
http://java.sun.com/products/archive/j2se/1.3.1_02/jre/index.html<font size="2" face="Verdana, Helvetica, sans-serif">F.Y.I. for people on a slow modem, if you have the SEIV Gold Version, the Java jre is included on the CD. They included it for us because it needed for the PBW RTC program.
Geoschmo
Gandalph
May 31st, 2002, 07:23 PM
I haven't seen a reply to my error so I am listing it again.
I am getting an error when attempting to use this. Here is the error error1.bmp (http://home.attbi.com/~ericd173/error1.bmp) Here is the line it refers to error2.bmp (http://home.attbi.com/~ericd173/error2.bmp)
Lemmy
May 31st, 2002, 09:52 PM
Gandalph:
I don't see what's wrong with that particular facility, the error could be somwhere in the previous facility, maybe there's a double line in there, that usually messes the program up...
it is weird though...it really shouldn't be able to give that error at that particular line.
Phoenix-D
May 31st, 2002, 10:12 PM
Gandalph, are you sure you have the right line? Metapad said line 429 in the same file was an entry in the SPACE PORT, not what you posted..and when I changed it got past that file
Gandalph
June 1st, 2002, 01:38 AM
Phoenix - I used Word to find the line number several times (after I saw your post), perhaps MS is wrong.
[edit] I downloaded Metapad and used it. Got past the first error and am now getting error in line 668 of vehiclesize.txt which is this;
Requirement Must Have Bridge := True
Requirement Can Have Aux Con := False
Requirement Min Life Support := 1
Requirement Min Crew Quarters := 0
Requirement Uses Engines := True
Requirement Max Engines := 9
Requirement Pct Fighter Bays := 0
Requirement Pct Colony Mods := 0
Requirement Pct Cargo := 0
<--- line 668
Name := Medium Fighter
Short Name := Medium Fighter
Description :=
Code := FM
Primary Bitmap Name := FighterMedium
Alternate Bitmap Name := FighterMedium
Vehicle Type := Fighter
[ June 01, 2002, 01:01: Message edited by: Gandalph ]
Phoenix-D
June 1st, 2002, 04:54 AM
Same problem here. I removed all the units, and it loaded the file successfully.. but it then goes through, loads everything, and doesn't DO anything. Goes to a Pause, and if I press a button the program termintes. Never goes off the pause.
Lemmy
June 1st, 2002, 09:54 AM
Gandalph:
Is that vehicle size a unit?
then it should have 2 more fields called Launched from planet and Launched from ship.
Phoenix:
It's supposed to do that, it's only the loader of the program i'm working on. So no user interface yet.
Andrés
June 1st, 2002, 05:54 PM
Originally posted by Lemmy:
Gandalph:
Is that vehicle size a unit?
then it should have 2 more fields called Launched from planet and Launched from ship.
<font size="2" face="Verdana, Helvetica, sans-serif">Those two lines were removed in Last Version, since they were not working anyway.
Lemmy
June 1st, 2002, 06:18 PM
oh..didn't know that...i'll have to change my program then...
Lemmy
June 3rd, 2002, 10:52 PM
i changed the program so that it is no longer necessary to have those two line at the end of each unit size, i haven't added the ability to have higher tech requirements that max yet, that will probably have to wait till next week or so, and i didn't want to keep you waiting to long...
get it here (http://www.shrapnelgames.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=50;t=000004)
Gandalph
June 3rd, 2002, 11:07 PM
OK, it now goes through without any errors, gets to the end, press any key to finish, then what? I did not see any new file created, so what does it do?
PS - Not trying to sound impatient, just curious.
Lemmy
June 3rd, 2002, 11:17 PM
lol...well that's it... http://forum.shrapnelgames.com/images/icons/icon10.gif
it just checks if all the components etc have valid tech requirements...
it's only one part of the tech viewer i'm working on.
Lemmy
June 6th, 2002, 07:26 PM
hmm, i just realized how big this tech tree really is, maybe i'll only show the techareas in the viewer, instead of all the levels..
this is a screenshot with only the starting techlevels shown
http://planetlemmy.virtualave.net/screen1.JPG
Hank
June 6th, 2002, 08:39 PM
Use a JTree!
Lemmy
June 6th, 2002, 09:05 PM
i don't think that will work, since one techarea can have multiple parents.
Lemmy
June 6th, 2002, 09:07 PM
well, it could work...but then it won't be what i had in mind
jimbob
June 11th, 2002, 01:01 AM
Hey Lemmy,
1st, good work! I'm glad that someone with computer skill is taking this project on. It seems like a big project IMIO (In My not so Informed Opinion).
I'm curious though... the full names of the technologies are very long, and so are difficult to get onto one page. Could your program rip the associated picture out of the pics folder instead? Then each tech would represented by basically an icon. Then if the player wants more info, have the hanging "about" window hover over the icon.
Hmmm.. actually, does each tech have a picture, or is that each component and facility? Crappy, well maybe have one of the components or facilities mini-pic act as an iconographic representation of the technology?
Lemmy
June 12th, 2002, 12:49 PM
I've been thinking about adding the icons to the buttons, but i don't know how to read bmp files in Java yet, but techs don't have icons, so what i had in mind was showing the full name, and below that all the icons of components and facilities gained upon completion, but then this would make the tree even bigger.
Oh, and i've decided to only show the techareas, and put a number at each line to show what level is required for another techarea.....hmm, am i making any sense here?
Lemmy
July 7th, 2002, 11:59 AM
a new screenshot can be found here (http://planetlemmy.virtualave.net/techviewer1.gif)
Lemmy
July 7th, 2002, 12:20 PM
Oh, and i've decided to only show the techareas, and put a number at each line to show what level is required for another techarea.....hmm, am i making any sense here?<font size="2" face="Verdana, Helvetica, sans-serif">as you can see, i decided to show all the techlevels after all http://forum.shrapnelgames.com/images/icons/icon7.gif
pathfinder
July 7th, 2002, 03:03 PM
Looks super Lemmy!
Wish I had that when I was doing the Shadows AI for the B5 MOD http://forum.shrapnelgames.com/images/icons/icon12.gif
DavidG
July 7th, 2002, 03:58 PM
Originally posted by Lemmy:
And IIRC there are also mods which have tech level req > max level, i still have to find a way to store that in my program, and show them in the tree.<font size="2" face="Verdana, Helvetica, sans-serif">Seems to be it wouldn't really need to be in the tree since you can never get to a tech level higher than the max. Those components with req tech higher than max are unbuildable and presumable just left in for a future umod.
DavidG
July 8th, 2002, 01:34 AM
Wow just checked out the screen shot. Looks pretty cool.
Minor point maybe but shouldn't the tech levels start at number 1 instead of 0??
Lemmy
July 8th, 2002, 01:50 AM
yeah, it should, but i think in one of the mods that i saw a components with "tech level req := 0", but i can't seem to find it right now.
And IIRC there are also mods which have tech level req > max level, i still have to find a way to store that in my program, and show them in the tree.
vBulletin® v3.8.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.