Page 1 of 1
Prototype/Item/Order
Posted: Fri Apr 25, 2014 4:42 pm
by ssilk
In the docs it say:
https://forums.factorio.com/wiki/inde ... Item#order
order Is used to order items in inventory (when sorting is enabled) and to sort recipes in crafting screen.
order = "a-b-c"
But in reality there is
order = "a[items]-b[basic-mining-drill]"
What does that in the square brackets mean? Is it a link to the item-subgroup or how does it work?
Re: Prototype/Item/Order
Posted: Fri Apr 25, 2014 8:12 pm
by FreeER
I don't think it's actually changed any from before, though I could be wrong I'll check when I get the chance, it should still just be based on the order of the strings. All characters have a numeric code (since computers only understand 1/0s this is obvious when thought about) and that is what is compared. You can google 'ascii table' if you want to see the actual numbers.
I think the new format is just a 'better' formatting standard, but again I'll check the code when I get the chance to see if it has some special significance in the sorting.
Re: Prototype/Item/Order
Posted: Sat Apr 26, 2014 1:52 pm
by kovarex
Yes, it is still same, but these brackets are just new standard.
Consider this list
- a[items]-b[basic-mining-drill]
- a[items]-c[some-other drill]
- b[x-thing]-a[tralala]
- b[x-thing]-b[some other tralala]
it will sort exactly the same as it was
But the first one is easier to understand, because you can easily see what is the a used for.
There is also other change, the ordering of items is determined by these priorities
- 1) Item group
- 2) Item subgroup
- 3) Item order string
- 4) Item name
So the order string is used just to order things inside one group, this is useful, because I can reorder whole groups or subgroups while keeping the ordering inside the group intact.
Edit: see https://wiki.factorio.com/Types/Order for a better explanation.
Re: Prototype/Item/Order
Posted: Sat Jan 03, 2015 1:20 pm
by McGuten
Hi.
i try to make a mod for factorio but the node order make me crazy.
I do not understand how it works, if someone can explain me... I will be eternally grateful because i can't use it
For example:
I define 4 items and I order just like that:
Code: Select all
order = "a[inserter]-a[item1]",
order = "a[inserter]-b[item2]",
order = "b[fast-inserter]-a[item3]",
order = "b[fast-inserter]-b[item4]",
And when I play, the items are placed just like that:
- Item 1
- Item 3
- Item 4
- Item 2
Re: Prototype/Item/Order
Posted: Tue Jan 06, 2015 7:29 pm
by McGuten
McGuten wrote:Hi.
i try to make a mod for factorio but the node order make me crazy.
I do not understand how it works, if someone can explain me... I will be eternally grateful because i can't use it
For example:
I define 4 items and I order just like that:
Code: Select all
order = "a[inserter]-a[item1]",
order = "a[inserter]-b[item2]",
order = "b[fast-inserter]-a[item3]",
order = "b[fast-inserter]-b[item4]",
And when I play, the items are placed just like that:
- Item 1
- Item 3
- Item 4
- Item 2
Please someone can help me? i don't understand how to work "Order"
Re: Prototype/Item/Order
Posted: Wed Jan 07, 2015 1:48 pm
by YuokiTani
Sort-Order is random or luck however you want to call it.i had different sortings (recipe-screen) in same mod-version and different savegames. (sortings works surely not how you think to know)
you can use the rules, and hope in future this system works better.
make your item/entity-names in correct order and try this out like
name="inserter-a1"
name="inserter-slow1"
name="inserter-fast1"
name="inserter-fast2"
name="ins-n3"
i assume that -slow pops up at last place and "ins-" at first - against other order-rules ... so better avoid disorder from the nameing itself
it's not really clear if factorio uses the entity, item or recipe-order-rules ...
things in [] are ignored ...