[0.15.37]Iconsistent sorting of research ingredients SOLVED

Place to get help with not working mods / modding interface.
Post Reply
Bilka
Factorio Staff
Factorio Staff
Posts: 3157
Joined: Sat Aug 13, 2016 9:20 am
Contact:

[0.15.37]Iconsistent sorting of research ingredients SOLVED

Post by Bilka »

The ingredients of research are not sorted by their order string, instead they seem to be sorted first by whether they are vanilla or not, and then by order string. Due to this, the sorting on the left of the research screen breaks, it will show research with the high tech science pack and two modded science packs of the order a and b before research with only modded science packs of the order a and c. This is because the sorting there looks through the ingredients from the back and sorts by the first difference it encounters, so th high tech science pack is comßpletely ignored. I however expect the research with the high tech science pack to show after the other research with ingredients with lower order strings. For this to work, the ingredients need to be sorted by order string.

so in short: Research ingredients are sorted inconsistently (not by order string or prototype name) -> Research screen sorting breaks
Last edited by Bilka on Sun Oct 29, 2017 7:42 pm, edited 1 time in total.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Bilka
Factorio Staff
Factorio Staff
Posts: 3157
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [0.15.37]Iconsistent sorting of research ingredients

Post by Bilka »

Please mark this as solved, I found the issue.

For modders looking at this thread in the future: The research ingredients are also sorted by item SUBGROUP, and if two ingredients have the same subgroup, they are sorted by their order string. I was able to fix my problem with the modded science packs by putting all of them in the same subgroup as the vanilla science packs. Then the packs were sorted in front of the high tech science pack as expected and the research was ordered correctly. Since the order of the item does not affect the crafting screen, I was able to change the subgroup without any side-effects.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Modding help”