FreeOrion

Forums for the FreeOrion project
It is currently Wed Jun 19, 2013 10:03 am

All times are UTC




Post new topic Reply to topic  [ 71 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: Tue Jan 04, 2005 11:13 pm 
Offline
FreeOrion Lead Emeritus
User avatar

Joined: Thu Jun 26, 2003 6:23 am
Posts: 883
Location: Australia
You can download it here:
http://cvs.sourceforge.net/viewcvs.py/* ... gtable.txt

And browse all the files here:
http://cvs.sourceforge.net/viewcvs.py/freeorion/


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 05, 2005 12:34 am 
Offline
Vacuum Dragon
User avatar

Joined: Fri Jun 27, 2003 12:37 am
Posts: 2159
Location: Auckland, New Zealand
thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 05, 2005 2:50 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8056
Location: Vancouver, BC
I've put all the proposed theory trunks into XML format, which can be seen here:
http://www.freeorion.org/index.php/Tech ... n_progress
and partly made an eng_stringtable.txt file for those techs, which is here (go to edit page to view in raw text un-wiki-mangled format):
http://www.freeorion.org/index.php/Eng_ ... n_progress

Running tech-check on these doesn't give any errors, but generates so much output that it scrolls off the screen past the limit to which I can scroll back in the WinXP cmd interpreter...

tzlaine, if it wouldn't take too long, could you add an option to output to file, rather than the screen?

Alternatively, an option to display just any errors in the tree structure or definition would be good.

Also, I set up other test files with two and three tech dependency cycles, but didn't get any error messages about cycles. All the techs were just listed as having no prerequisites.

Edit: And also also, I'm not sure, due to the limited scrollback thing, but I don't think all my techs are being displayed. The last shown tech is Zero-Point Generation, which is the last tech in the Production category, but not last in techs.xml. The techs aren't being shown in the order I entered them, but they do seem to be shown grouped by category, so if the categories themselves are shown out of order, the problem might just be the scrollback thing...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 05, 2005 3:54 am 
Offline
Designer Emeritus

Joined: Thu Jun 26, 2003 8:07 am
Posts: 935
Geoff the Medio wrote:
tzlaine, if it wouldn't take too long, could you add an option to output to file, rather than the screen?


Under windows command line (and Unix, plain old DOS, every other operating system I've ever touched) you can redirect stdout to a file or pipe it to another program.

Windows command line:
Code:
tech-check > drek.txt


dumps the results into drek.txt (though boost complains about having too many args, it works anyway.)

Code:
tech-check | more


pipes the results to the "more" program, which solves your scrolling problem.

You can also pipe the results to find and sort (grep under unix):

Code:
tech-check | find "Name of a tech" > drek.txt


wherein "name of a tech" is the name of a tech. Find is case sensative.


the docs for windows:
http://www.microsoft.com/resources/docu ... ction.mspx
http://www.microsoft.com/resources/docu ... lters.mspx

EDIT: btw, all of the above is a lot easier if you run command.com in extended mode. try "cmd /x" or "command /x"


Last edited by drek on Wed Jan 05, 2005 4:06 am, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 05, 2005 5:43 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8056
Location: Vancouver, BC
drek wrote:
Windows command line:
Code:
tech-check > drek.txt

Code:
tech-check | more

hrm... I'd never seen > filename before, though I do seem to recall | more from back in the day... I also remembered /p from the dir command, but apparently that's not generally applicable...

Anyway, it appears that all the techs are listed, just in random order of categories.

The circular prereq dependencies issue remains unresolved, however.

Quote:
that last message from "guest" was me. Pressed the wrong damn button again. Someone with mods on this forums please delete it.

If you log in, then edit a post, you can select an option to delete the post if nothing has been posted after it... which I've removed your ability to do by posting this... but FYI for future.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 11, 2005 12:41 am 
Offline
Programming Lead Emeritus
User avatar

Joined: Thu Jun 26, 2003 1:33 pm
Posts: 1092
Geoff the Medio wrote:
Anyway, it appears that all the techs are listed, just in random order of categories.


The tech categories are stored in alphabetical order, and so they are printed out that way as well.

Quote:
The circular prereq dependencies issue remains unresolved, however.


I have cheked this again since you posted this, and it works fine for me.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 11, 2005 3:27 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8056
Location: Vancouver, BC
tzlaine wrote:
Quote:
The circular prereq dependencies issue remains unresolved, however.

I have cheked this again since you posted this, and it works fine for me.

If I run tech-check on this techs.xml,
Code:
<Category>THE_CATEGORY</Category>

<Tech>
  <name>TECH_1</name>
  <description>TECH_1_DESC</description>
  <type>TT_THEORY</type>
  <category>THE_CATEGORY</category>
  <research_cost>10</research_cost>
  <research_turns>5</research_turns>
  <prerequisites>TECH_2</prerequisites>
  <unlocked_items></unlocked_items>
</Tech>

<Tech>
  <name>TECH_2</name>
  <description>TECH_2_DESC</description>
  <type>TT_THEORY</type>
  <category>THE_CATEGORY</category>
  <research_cost>10</research_cost>
  <research_turns>5</research_turns>
  <prerequisites>TECH_1</prerequisites>
  <unlocked_items></unlocked_items>
</Tech>

</GG::XMLDoc>


I get this output:
Code:
C:\FreeOrion>tech-check
Loading tech tree file "default/techs.xml" ...
Tech tree loaded.  Techs are:


**********************************************
ERROR: TECH_1
[Theory tech]
ERROR: TECH_1_DESC
ERROR: THE_CATEGORY
10 RP / 5 turns

[No prerequisites.]

[No unlocked items.]

[No effects.]


**********************************************
ERROR: TECH_2
[Theory tech]
ERROR: TECH_2_DESC
ERROR: THE_CATEGORY
10 RP / 5 turns

[No prerequisites.]

[No unlocked items.]

[No effects.]


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 15, 2005 4:30 am 
Offline
Programming Lead Emeritus
User avatar

Joined: Thu Jun 26, 2003 1:33 pm
Posts: 1092
I have uploaded a new version of tech-check.exe, along with two more apps: building-check.exe and tech-view.exe; they can be found here: http://freeorion.sourceforge.net/designer-tools.zip . Tech-view represents the current progress on the tech screen; as of this writing, only the actual tech tree part is finished. The colors are jacked up. Feel free to experiment with better ones. As mentioned earlier, the latest stringtable file can be found here: http://cvs.sourceforge.net/viewcvs.py/* ... gtable.txt and the latest techs.xml file can be found here: http://cvs.sourceforge.net/viewcvs.py/* ... /techs.xml .
Note these files are on about a 24 delay, and I committed them about 2 hours ago, so if at first you don't succeed, give it a bit and try again.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 15, 2005 4:52 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8056
Location: Vancouver, BC
Oddity: If the first line of techs.xml has a space before <?xml version="1.0"?>, the tech-check.exe crashes and gives this output:
Code:
C:\FreeOrion>tech-check
Loading tech tree file "default/techs.xml" ...
Assertion failed: !m_techs.empty(), file C:\Documents and Settings\tzlaine\Deskt
op\FreeOrion\universe\Tech.cpp, line 336

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

C:\FreeOrion>

You might want to put a warning about that somewhere, or just strip the leading whitespace...

Sometimes, if I put a nonexistant tech as a prerequisite, I get:
Code:
C:\FreeOrion>tech-check
Loading tech tree file "default/techs.xml" ...
main() caught unknown exception.
C:\FreeOrion>

This isn't consistent though... A techs.xml with just a single tech and a nonexistant prereq just lists the single tech as having no prereqs...

In any case, I strongly encourage you to put in some useful output for the case of techs having nonexistant prereqs... It's horridly tedious and time consuming to have to go through the tree taking things out (and removing any new broken prereqs this creates) to find the problematic one.

Also, the circular dependency issue mentioned above is still present with the new tech-check.exe, which gives the same output as in the previous post on the subject.

Also also, I notice you've added the RefineBuildingType effect which can add effects groups to building descriptions. Is there any chance we'll be able to remove effects groups as well?

Edit: I'm getting an error message about redudnant dependencies from tech-check. Why is this disallowed?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 15, 2005 9:30 am 
Offline
Programming Lead Emeritus
User avatar

Joined: Thu Jun 26, 2003 1:33 pm
Posts: 1092
Geoff the Medio wrote:
Oddity: If the first line of techs.xml has a space before <?xml version="1.0"?>, the tech-check.exe crashes and gives this output:
Code:
C:\FreeOrion>tech-check
Loading tech tree file "default/techs.xml" ...
Assertion failed: !m_techs.empty(), file C:\Documents and Settings\tzlaine\Deskt
op\FreeOrion\universe\Tech.cpp, line 336

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

C:\FreeOrion>

You might want to put a warning about that somewhere, or just strip the leading whitespace...


If that causes a problem, don't do that.

Quote:
Sometimes, if I put a nonexistant tech as a prerequisite, I get:
Code:
C:\FreeOrion>tech-check
Loading tech tree file "default/techs.xml" ...
main() caught unknown exception.
C:\FreeOrion>

This isn't consistent though... A techs.xml with just a single tech and a nonexistant prereq just lists the single tech as having no prereqs...

In any case, I strongly encourage you to put in some useful output for the case of techs having nonexistant prereqs... It's horridly tedious and time consuming to have to go through the tree taking things out (and removing any new broken prereqs this creates) to find the problematic one.


Then don't add problematic ones. Adding techs and running tech-check on them one at a time will catch this in a non-"horrid" way. Welcome to programming. This program isn't your mother. It's just supposed to find the most glaring mistakes.

Quote:
Also, the circular dependency issue mentioned above is still present with the new tech-check.exe, which gives the same output as in the previous post on the subject.

Also also, I notice you've added the RefineBuildingType effect which can add effects groups to building descriptions. Is there any chance we'll be able to remove effects groups as well?


No chance. If you want to remove an effect, add its inverse, if that's possible.

Quote:
Edit: I'm getting an error message about redudnant dependencies from tech-check. Why is this disallowed?


Because they're redundant, obviously. It's just plain unnatural to say that tech A requires tech B, twice. If you were to see what the redundant dependency lines look like in the actual tech tree layout, you wouldn't ask this question. It's confusing as hell.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 15, 2005 10:34 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8056
Location: Vancouver, BC
tzlaine wrote:
Welcome to programming. This program isn't your mother. It's just supposed to find the most glaring mistakes.

How is a nonexistant prereq that causes a crash not a glaring mistake?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 15, 2005 12:51 pm 
Offline
Graphics Lead Emeritus
User avatar

Joined: Mon Mar 08, 2004 6:17 pm
Posts: 1933
Location: 52°16'N 10°31'E
i seem to have a problem with the gigi.dll, when starting tech-view.exe...
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 15, 2005 6:20 pm 
Offline
Programming Lead Emeritus
User avatar

Joined: Thu Jun 26, 2003 1:33 pm
Posts: 1092
pd wrote:
i seem to have a problem with the gigi.dll, when starting tech-view.exe...
Image


As it says in the README, you need to drop the .exe and .dll files into the directory where your freeorion.exe file is. You need the other .dlls in that directory, such as gigi.dll.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 15, 2005 6:22 pm 
Offline
Programming Lead Emeritus
User avatar

Joined: Thu Jun 26, 2003 1:33 pm
Posts: 1092
Geoff the Medio wrote:
tzlaine wrote:
Welcome to programming. This program isn't your mother. It's just supposed to find the most glaring mistakes.

How is a nonexistant prereq that causes a crash not a glaring mistake?


There are other things that you can do to cause a crash. The point is that I can't be spending all my time writing this little utility app when I have to write most of the FO code as well. It will never catch everything, and I'm not going to work on it much more, if any.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 15, 2005 6:25 pm 
Offline
Graphics Lead Emeritus
User avatar

Joined: Mon Mar 08, 2004 6:17 pm
Posts: 1933
Location: 52°16'N 10°31'E
tzlaine, i did this of course...

i'm using the gigi.dll from the v0.2 release... maybe there is a new one?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 71 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: AhrefsBot and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group