Order Property?

Place to get help with not working mods / modding interface.
Post Reply
Incinirate
Burner Inserter
Burner Inserter
Posts: 18
Joined: Sun May 03, 2015 9:50 pm
Contact:

Order Property?

Post by Incinirate »

In the item properties, I never quite understood what order meant or how it worked. More specifically, what to put for the order. I mean, a-b-c doesn't mean anything to me. Please explain.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Order Property?

Post by ssilk »

It's nothing else, than a sorting string.

a-b-c comes before a-b-d, a-c-c or b-c-d. If you put all sort-strings into a column in a spreadsheet and click on "sort" for that column, this is the order they appear in the item-chooser.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Wyrm
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Fri Jan 30, 2015 3:56 am
Contact:

Re: Order Property?

Post by Wyrm »

I think we need a more concrete example.

Say we want to put the Better Electric Pole between the medium electric pole and the big electric pole, instead of before the medium electric pole as it does now. How do we change this line of prototypes/item/electric-pole.lua

Code: Select all

order = "a[energy]-b[medium-electric-pole]",
to accomplish this?

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Order Property?

Post by DaveMcW »

medium electric pole order = "a-b"
big electric pole order = "a-c"

So "a-b-a" or "a-b-z" will fit between the two.

The brackets are optional and ignored by the game.

Wyrm
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Fri Jan 30, 2015 3:56 am
Contact:

Re: Order Property?

Post by Wyrm »

Ah! So the brackets are like a comment! Good to know!

Post Reply

Return to “Modding help”