Page 2 of 2

Re: Alphabetise item icons in rich text by inventory order

Posted: Tue Oct 31, 2023 2:32 am
by mmmPI
Sachertorte wrote:
Wed Oct 25, 2023 10:40 pm
I've added an image to the OP with a visual example of what I'm hoping for, to hopefully make it crystal clear to everyone (and any devs who happen to stumble across this post) what this suggestion is about :)

The title says "Alphabetise" , but the picture shows "Electronic Circuits" before "Advanced Circuits". That is confusing me.

"Do not alphabetise icon in rich text , use the ordering from inventory to sort them in list like train schedule" ?

Then yes +1 to the suggestion !

Re: Sort item icons in rich text by where they would appear in the inventory

Posted: Tue Oct 31, 2023 2:43 am
by Sachertorte
mmmPI wrote:
Tue Oct 31, 2023 2:32 am
The title says "Alphabetise" , but the picture shows "Electronic Circuits" before "Advanced Circuits". That is confusing me.
Good point! Have updated the thread title to amend.

Re: Sort item icons in rich text by where they would appear in the inventory

Posted: Tue Oct 31, 2023 3:04 am
by mmmPI
This way the locale langage doesn't interfere, the order is not alphabetic it is the same in the inventory for everyone :)

Re: Sort item icons in rich text by where they would appear in the inventory

Posted: Tue Oct 31, 2023 1:31 pm
by SupplyDepoo
+1

Looked at Sachertorte's mod code, doesn't seem too difficult. Good job figuring that out!

Re: Sort item icons in rich text by where they would appear in the inventory

Posted: Fri Jan 05, 2024 5:55 pm
by ElderAxe
Sorting by the order in crafting menu would be best.

Adding a prefix in front of each material is my hacky half baked solution for this right now. I'd love to get rid of those prefixes.

[O] for Ores
[F] for Fluids
[ I ] for Intermediates
[R] for Science
...
Screenshot 2024-01-05 205319.png
Screenshot 2024-01-05 205319.png (95.06 KiB) Viewed 558 times

Re: Sort item icons in rich text by where they would appear in the inventory

Posted: Fri Jan 05, 2024 9:34 pm
by mmmPI
ElderAxe wrote:
Fri Jan 05, 2024 5:55 pm
Sorting by the order in crafting menu would be best.
I think that's the same as the suggestion , the order in the crafting menu is the order in which items shows up in the inventory, it is related to the internal ID of the item so that green circuit red circuit and blue circuit are shown in this order no matter the alphabet or translation used for the circuit and as they are intermediate product from the 3rd tab (?) of the inventory , they would be shown after belts that are on the first tab of the crafting menu, belts themselves ordered in tier not thanks to alphabet but internal ID

raw material like ores would also be on the "intermediate" page i think, the signals for them i think are on this page, or maybe it's just what mods having receipe for "iron ore" are often doing and i can no longer tell

Re: Sort item icons in rich text by where they would appear in the inventory

Posted: Sat Jan 06, 2024 9:47 am
by Qon
mmmPI wrote:
Fri Jan 05, 2024 9:34 pm
the order in the crafting menu is the order in which items shows up in the inventory, it is related to the internal ID of the item
Not related to their internal ID at all. Crafting tabs, recipes and items (and pretty much everything else since the parent prototype for most things defines it) are sorted on their "order" property.

Re: Sort item icons in rich text by where they would appear in the inventory

Posted: Sat Jan 06, 2024 12:15 pm
by mmmPI
Qon wrote:
Sat Jan 06, 2024 9:47 am
mmmPI wrote:
Fri Jan 05, 2024 9:34 pm
the order in the crafting menu is the order in which items shows up in the inventory, it is related to the internal ID of the item
Not related to their internal ID at all. Crafting tabs, recipes and items (and pretty much everything else since the parent prototype for most things defines it) are sorted on their "order" property.
Ok i corrected.

What i meant was to asnwer this earlier quote
Sorting by the order in crafting menu would be best.
So it's related to their "order" property, but the same order is used for crafting tabs and for how item show up in the inventory right ?

And we all agree that it would be the best order to order train stop name that contain rich text tag ? that was my point, if there is a debate between different things it's not clear one is more logical or better, but really it's just different name to the same thing ?

Re: Sort item icons in rich text by where they would appear in the inventory

Posted: Fri Jan 26, 2024 1:35 pm
by SandyVaJJ
After reading the PrototypeBase docs, the description for order says,
Used to order prototypes in inventory, recipes and GUIs. May not exceed a length of 200 characters.
To me this seems to point at the current sorting being a bug as the list is not using that order?

Also I am for the change proposed.