Page 1 of 1

[0.16] Small technology prototype bug (visible in 0.17)

Posted: Sun Apr 15, 2018 4:25 pm
by lovely_santa
Hi,

I'm currently working on a mod that alters the technology research. It became to my attention the way 'upgrades' work.

As of now, an upgrade is just defined by the technology name: for example:

Code: Select all

  {
    type = "technology",
    name = "laser-turret-damage-1",
    ...
  },
  {
    type = "technology",
    name = "laser-turret-damage-2",
    ...
  },
  ...
It has the same local translations, it (could) have different items (not my point), but its an upgrade becose its name has an extra number at the end of its name. It will also have a protoype setting "upgrade = true".

Now the bug:

Code: Select all

  {
    type = "technology",
    name = "electric-energy-accumulators-1",
    ...
  }
On the accumulator it is also displaying the extra number. This results ingame in the local translation it will add the 1 at the end of the technology name. The best way to take care of this, is by setting "upgrade = false" in this case. As I assume this is already the default value, its just getting ignored, it's still displaying the 1 at the end.

I know, it's just a small detail... But in 0.17 this gets even worse (refering to the preview image, as shown below). The icons also show the number of upgrade, and for accumulators it also shows the '1', but it has no extra updates...
Image

Thats not all, for other upgrades its not showing the number 1 as its not defined in the prototype name:

Code: Select all

  {
    type = "technology",
    name = "automation",
    ...
  },
  ...
This is also visible in the picture above: the automation 1 is not showing the '1' in the image (and also not in the name), but it does for automation 2 and 3. In tehse cases the upgrade = true doesn't affect this either.



So in my oppinion the upgrade parameter of the prototypes aren't working as (as I think) there should. On the other hand with 0.17 in the background I would suggest renaming following prototypes to add the '-1' in the name:
  • military
  • automation
  • logistics
  • advanced-material-processing
Also remove the '-1' from the "electric-energy-accumulators-1" prototype
And as last a fix on the upgrade attribute of the technology prototype to take effect in the localized naming of technologies.

I know it's not a big issue, but then, isn't 0.17 about perfection for 0.1.0 release? ;)

Kind regards,
lovely_santa

Re: [0.16] Small technology prototype bug (visible in 0.17)

Posted: Tue Apr 17, 2018 1:50 pm
by Klonan
Technically, this is working as intended

I will move to minor issues,
renaming the tehcnology is not hard, but comes with a lot of potential migration problems

Re: [0.16] Small technology prototype bug (visible in 0.17)

Posted: Tue Apr 17, 2018 3:46 pm
by mrvn
Also consider that mods do have accumulator mk2.

Maybe the "upgrade" parameter shouldn't be true/false but rather name the technology they upgrade. The GUI can then work backwards to number them 1, 2, 3, ...

Re: [0.16] Small technology prototype bug (visible in 0.17)

Posted: Wed Apr 18, 2018 8:03 pm
by lovely_santa
mrvn wrote:Also consider that mods do have accumulator mk2.

Maybe the "upgrade" parameter shouldn't be true/false but rather name the technology they upgrade. The GUI can then work backwards to number them 1, 2, 3, ...
Yes there are mods that have accumulator mk2's, but they can change the prototype of the base game then...

Re: [0.16] Small technology prototype bug (visible in 0.17)

Posted: Thu Apr 19, 2018 10:04 am
by mrvn
lovely_santa wrote:
mrvn wrote:Also consider that mods do have accumulator mk2.

Maybe the "upgrade" parameter shouldn't be true/false but rather name the technology they upgrade. The GUI can then work backwards to number them 1, 2, 3, ...
Yes there are mods that have accumulator mk2's, but they can change the prototype of the base game then...
If they do that then they break any other mod that uses the original tech name.

Re: [0.16] Small technology prototype bug (visible in 0.17)

Posted: Mon Apr 23, 2018 6:02 pm
by lovely_santa
mrvn wrote: ...

If they do that then they break any other mod that uses the original tech name.
Let me quote the last line of the Factorio Friday Fact #216:
FFF #216 wrote:but it wouldn't be us if we didn't break mod compatibility in a new release.
I guess that says enough ;)

Re: [0.16] Small technology prototype bug (visible in 0.17)

Posted: Tue Apr 24, 2018 8:20 am
by mrvn
lovely_santa wrote:
mrvn wrote: ...

If they do that then they break any other mod that uses the original tech name.
Let me quote the last line of the Factorio Friday Fact #216:
FFF #216 wrote:but it wouldn't be us if we didn't break mod compatibility in a new release.
I guess that says enough ;)
I mend if one mod changes the name so it has a "1" then it breaks any other mod using the original tech.

Re: [0.16] Small technology prototype bug (visible in 0.17)

Posted: Tue Apr 24, 2018 11:05 pm
by lovely_santa
mrvn wrote: I mend if one mod changes the name so it has a "1" then it breaks any other mod using the original tech.
Thats why there is a data-final-fixes.lua or data-updates.lua to take care of those things, so you can fix the other mods becose you changed the base game...