The question is, can you really make it to the final frontier that quickly? With nearly 200 techs, seems like it woudl require more techs to get there.
A prog that lets you enter TechIDs to determine the actual path? Why not just display the existing valid path using this:
$maxtechno =0;
@targv=@ARGV;
# First, get the list of technologies.
while (($line = <>)) {
if ($line =~ m/TECH *(\d+) *(\w+)/i) {
$techno = $1;
if ($1>$maxtechno) {
$maxtechno = $1;
}
$current_tech = $2;
if ($techno != 999) {
$techlist[$techno] = $current_tech;
$techhash{$current_tech} = $techno;
}
}
}
@ARGV = @targv;
# Build the Technology list tree.
while ($line = <>) {
if ($line =~ m/TECH *(\d+) *(\w+)/i) {
$techno = $1;
$current_tech = $2;
$reqsize=0;
}
if ($techno != 999) {
if ($line =~ m/Tech_Requirement *\"(\w+)/i) {
$requires[$techno][$reqsize] = $techhash{$1};
$reqsize++;
$refcount[$techhash{$1}]++;
}
if ($line =~ m/Tech_Requirement_ID *(\d+)/i) {
$requires[$techno][$reqsize] = $1;
$reqsize++;
$refcount[$1]++;
}
if ($line =~ m/Research_Cost *(\d+)/i) {
$cost[$techlist]=$1;
}
}
}
# Now, strip away unneeded techs.
for ($i=0; $i<$maxtechno; $i++) {
if ($refcount[$i]==0 && $techlist[$i]) {
if ($techlist[$i] ne "FinalFrontier") {
$j = $i + 1;
for ($k=0; $requires[$i][$k] != 0; $k++) {
$refcount[$requires[$i][$k]]--;
if ($requires[$i][$k]-1< $j ) {
$j=$requires[$i][$k] - 1;
}
}
undef $techlist[$i];
$i = $j;
}
}
}
# Now, dump the list of technologies.
display_tech ($techhash{"FinalFrontier"},0);
sub display_tech {
my $k;
if ($shown[$_[0]] != 1) {
#$shown[$_[0]]=1; #Uncomment line to compress tech tree
for ($k=0; $requires[$_[0]][$k] != 0; $k++) {
display_tech ($requires[$_[0]][$k], $_[1]+1);
}
for ($i=0; $i<$_[1]; $i++) {
if ($i % 2) {
print " ";
} else {
print "|";
}
}
print "$techlist[$_[0]] ($_[0])\n";
}
}
If the AI players let you, can research the following 48 techs (down from 54):
118|3|120|2|33|34|49|119|102|54|51|56|53|122|129|63|37|38|39|4|40|41|42|43|24|48|22|44|46|35|78|79|80|81|84|36|64|69|70|76|77|28|30|82|83|85|88|89
If you desire, you could accellerate your tech victory even further by researching the technologies that give an additional boost to Research. Those techs are unlikely to deviate from the smallest path by any significant amount...
BTW, you have a minor mistake in the tech path that was typed in - it's somewhat difficult to research tech #104 after researching tech #104. Same with #41 after #41.