Page 1 of 1

[.16] "Recursive technology prerequisites detected." useless

Posted: Sat Jan 27, 2018 7:20 am
by mrvn
Some mod here introduces a recursive technology prerequisites. Instead of making that technology loop simply unreachable the game aborts with a basically useless error message listing all technologies.

Here is what is wrong with this:
  • The game is probably still playable. Give the option to simply continue.
  • The error message seems to output all technologies instead of just those involved in the recursion.
  • The error message should highlight the loop, e.g. list prerequisites with + and those in the recursion with #.
  • The error message should indicate the origin of each technology like it does when hovering over an entity.
ps: allowed subjects are too short

Re: [.16] "Recursive technology prerequisites detected." useless

Posted: Sat Jan 27, 2018 7:29 am
by Rseding91
mrvn wrote:The game is probably still playable. Give the option to simply continue.
It's not, it will crash - which is why the check exists.
mrvn wrote:The error message seems to output all technologies instead of just those involved in the recursion.
It doesn't, it includes the technologies in the loop.

I'm all for making the error better but as it is now it simply lists the technologies which when you follow each ones prerequisite will find itself again.

Re: [.16] "Recursive technology prerequisites detected." useless

Posted: Mon Jan 29, 2018 9:17 am
by mrvn
Say you have the following:

Code: Select all

#---#---#---#---#---#---#---#---#---#
|       |
#---#---#
[code]

where # denotes a technology. Does it list only the 6 techs in the loop or everything behind the loop too? The list I got is miles long from different tech branches that I can't believe they all are in one giant loop. The mod that causes the problem is AAI Industries, which changes fundamental things like gears. So it's likely a loop at the very base of the tech tree. But having it link a tech way down the tree to one way up is highly unlikely.

I don't have the log accessible at the moment but should the techs be reported in order of the loop?

Re: [.16] "Recursive technology prerequisites detected." useless

Posted: Mon Jan 29, 2018 1:16 pm
by Oxyd
The error message did print a lot of junk not related to the cycle in question, yes. I fixed that for 0.16.21.

Re: [.16] "Recursive technology prerequisites detected." useless

Posted: Tue Jan 30, 2018 10:29 am
by mrvn
Oxyd wrote:The error message did print a lot of junk not related to the cycle in question, yes. I fixed that for 0.16.21.
Thanks. I will see if that makes this debugable and otherwise attach a log of the actual output.