Page 1 of 1

[0.17.23]Incorrect technology naming (not contiguous)

Posted: Fri Mar 29, 2019 8:06 pm
by clampi
According to 0.17.23 change-log
  • The game now checks that technology levels are contiguous.
  • Non-upgrade technologies are now considered to be level 1; previously they were level 0.
Here is a list:
  • "energy-shield-equipment" logically followed by "energy-shield-mk2-equipment". "energy-shield-mk2-equipment" should be "energy-shield-equipment-2". This causes problems with mods that number their internal technologies in logical order ("energy-shield-equipment-3" would cause 20.916 Error ModManager.cpp:1294: Technology battery-equipment: Non-contiguous levels: 1, followed by 3). And yes, addressing as suggested will break the mods that updated to adjust for 0.17.23 change.
  • "battery-equipment" logically followed by "battery-mk2-equipment". "battery-mk2-equipment" should be "battery-equipment-2" with the same explanation as above.

Re: [0.17.23]Incorrect technology naming (not contiguous)

Posted: Fri Mar 29, 2019 9:05 pm
by Rseding91
I don't understand what the problem is. If you're making a technology that isn't an upgrade of a previous technology then don't mark it as an upgrade technology and simply list it as having a dependency.

If it is an upgrade, then mark it as such and it will work as an upgrade technology.

Re: [0.17.23]Incorrect technology naming (not contiguous)

Posted: Sat Mar 30, 2019 3:42 am
by dragontuar
I have something similar in that I can't load any mods [after I fix the tech naming error and I only was fixing my local files of other's mods (did place a pull request for 5dim energy )]

the error was for a tech called basic mining but I have no mod problem info and as such the program wishes for me to disable all mods even though it would not give me any problems before this update and it says in the error the non-contiguous levels 1, followed by 1

edit:

here is a line of code of the log output

Code: Select all

 Error ModManager.cpp:1294: Technology basic-mining: Non-contiguous levels: 1, followed by 1

Re: [0.17.23]Incorrect technology naming (not contiguous)

Posted: Sat Mar 30, 2019 6:21 am
by clampi
Let's try to explain better.

I would argue that enforcing rule "technology levels are contiguous" really boils down to enforcing a naming convention. I would further argue that such a rule might make sense for a unified, goal-bound team (such as Wube developer team), but enforcing it in an "open project", which is the Factorio code + mods, the latter being composed of folks of different backgrounds and mindsets, would cause unnecessary grief. There is a simple solution, for each technology, make a name list, sort in lexical order, use the index in sorted list as technology level. In this way modders can have flexibility in naming and can offer better choices in regards with cross-mod support for technologies that would compete for a naming scheme and level.

However, if said naming convention is here to stay, despite above argument, it would be nice if it would be enforced inside "base mod" also, when it makes sense. As Factorio is built with modding support from the start, I would argue that technologies in base mod should be named following the convention, when it makes sense, when a technology is an extension of another technology and cannot be regarded as just having a dependency. Example of technologies which already follow the convention are logistics[1-3], inserter-capacity-bonus [1-7] and so on. I argue that the convention applies to other technologies, such as electronics[1 - advanced-2], energy-shield-equipment[1-2], battery-equipment[1-2] and so on.

Re: [0.17.23]Incorrect technology naming (not contiguous)

Posted: Sat Mar 30, 2019 7:17 am
by Bilka
The continuous naming is enforced inside the base mod, otherwise the game wouldn't load. Technologies like the battery and shield equipment aren't upgrades. Whether we are right or wrong in saying that they aren't upgrades goes much beyond the scope of any bug report - right now they aren't so right now the naming is correct.

Since the current behavior is correct, I am moving this to not a bug. If you want to discuss what should and shouldn't be an upgrade, please make a post in the appropriate forum, not the bug forum.

Re: [0.17.23]Incorrect technology naming (not contiguous)

Posted: Sat Mar 30, 2019 1:07 pm
by mrvn
Sorry, but this a regression from previous version and just plain stupid. STUPID I SCREAM. (sorry).

First of why is this suddenly a critical problem? The game worked just fine before and suddenly you break a ton of mods. Why make this a fatal error without any advanced warning? You could just make the game output a warning when this happens, even with a popup on load. But why not give the user the option to ignore this so they can still play? Give modders a chance to clean up their prototypes instead of breaking the game for most users.


Secondly the check is stupid. As in: It fails when it should detect a continuation of technologies.

For example boblogistics has

Code: Select all

  {
    type = "technology",
    name = "bob-logistics-4",
    icon = "__base__/graphics/technology/logistics.png",
    icon_size = 128,
    prerequisites = {
      "logistics-3",
      "advanced-electronics-2"
    },
For the user this clearly is a continuation from logistics-1, logistics-2, logistics-3. The name is chosen so it will not conflict with other mods, which is a good style.

BUT: 19.093 Error ModManager.cpp:1294: Technology bob-logistics: Non-contiguous levels: 0, followed by 4

Because "bob-logistics-" != "logistics-" this fails your check.

This new check forces every mod that extends belts now to have a technology "logistics-4" causing them to break each other. Or they have to use something like "bob-logistics-4-this-check-is-stupid" and break that the tech is an upgrade of "logistics-3".

PLEASE reconsider this issue.

If you want to keep checking the continuity of technologies then use a naming convention that allows for mods to have non conflicting names. An alternative would be to make the technology progression more explicit, like entities have a "next_upgrade". Technologies could have a field "upgrade_for" and you check that the level of the tech is one larger than the level for "upgrade_for".

Re: [0.17.23]Incorrect technology naming (not contiguous)

Posted: Sun Mar 31, 2019 12:53 am
by dragontuar
I am sorry game devs but I agree because I was not able to load any mod with the prerequisites of basic mining
mrvn wrote: Sat Mar 30, 2019 1:07 pm Sorry, but this a regression from the previous version and just plain stupid. STUPID I SCREAM. (sorry).

First of why is this suddenly a critical problem? The game worked just fine before and suddenly you break a ton of mods. Why make this a fatal error without any advanced warning? You could just make the game output a warning when this happens, even with a popup on load. But why not give the user the option to ignore this so they can still play? Give modders a chance to clean up their prototypes instead of breaking the game for most users.


Secondly the check is stupid. As in: It fails when it should detect a continuation of technologies.

For example boblogistics has

Code: Select all

  {
    type = "technology",
    name = "bob-logistics-4",
    icon = "__base__/graphics/technology/logistics.png",
    icon_size = 128,
    prerequisites = {
      "logistics-3",
      "advanced-electronics-2"
    },
For the user this clearly is a continuation from logistics-1, logistics-2, logistics-3. The name is chosen so it will not conflict with other mods, which is a good style.

BUT: 19.093 Error ModManager.cpp:1294: Technology bob-logistics: Non-contiguous levels: 0, followed by 4

Because "bob-logistics-" != "logistics-" this fails your check.

This new check forces every mod that extends belts now to have a technology "logistics-4" causing them to break each other. Or they have to use something like "bob-logistics-4-this-check-is-stupid" and break that the tech is an upgrade of "logistics-3".

PLEASE reconsider this issue.

If you want to keep checking the continuity of technologies then use a naming convention that allows for mods to have non conflicting names. An alternative would be to make the technology progression more explicit, like entities have a "next_upgrade". Technologies could have a field "upgrade_for" and you check that the level of the tech is one larger than the level for "upgrade_for".

Re: [0.17.23]Incorrect technology naming (not contiguous)

Posted: Sun Mar 31, 2019 10:22 am
by mrvn
It gets worse. The technology "deadlock-stacking" has Non-contiguous levels: 1, followed by 1. What is it talking about there?

"deadlock-stacking" is a prerequisite for "deadlock-stacking--automation-science-pack", "deadlock-stacking--logistic-science-pack" and "deadlock-stacking--military-science-pack" for example. Those technologies are auto generated and unlock stacking recipes for items that can be built after research using nothing, automation-science-pack, logistic-science-pack and military-science-pack respectively. There is also "deadlock-stacking--automation-science-pack--logistic-science-pack" and lots of other combinations. They build a directed, non-cyclic graph but don't fit into the simple contiguous level view of techs.

Now I had to rename "deadlock-stacking" to "deadlock-stacking-none".

Note: There is also "deadlock-stacking-1" which unlocks the actual stacking box entity. Is "deadlock-stacking" and "deadlock-stacking-1" causing the conflict? The error message isn't clear about what technology entry it actually complains about.