Recipe components showing in random order

Place to get help with not working mods / modding interface.
Post Reply
jchardin64
Inserter
Inserter
Posts: 38
Joined: Mon Apr 30, 2018 6:00 pm
Contact:

Recipe components showing in random order

Post by jchardin64 »

I'm working on a mod, and I noticed the components listen in-game are often not in the same order as I typed them in the lua files.

So if a recipe takes 25 iron plates, 10 gears, and 50 bricks, when I look in the game it shows 10 gears, 50 bricks, and 25 iron plates.

Just wondering if there's a way to control what order the recipe is listed in-game.

Thanks!

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Recipe components showing in random order

Post by Ranakastrasz »

You should check the sorting string for those items. Odds are it uses that as the order.

Admittedly I never checked, so it might be the item's internal name or something else.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Recipe components showing in random order

Post by eradicator »

Version: 0.16.31
Date: 19. 03. 2018
Changes:
- Ingredients in recipes are automatically sorted. (58757)
kovarex wrote:
Fri Mar 16, 2018 4:12 pm
It is sorted the same way as items, with the exception that intermediates group is first.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

jchardin64
Inserter
Inserter
Posts: 38
Joined: Mon Apr 30, 2018 6:00 pm
Contact:

Re: Recipe components showing in random order

Post by jchardin64 »

eradicator wrote:
Tue Oct 15, 2019 11:43 am
Version: 0.16.31
Date: 19. 03. 2018
Changes:
- Ingredients in recipes are automatically sorted. (58757)
kovarex wrote:
Fri Mar 16, 2018 4:12 pm
It is sorted the same way as items, with the exception that intermediates group is first.
Ah, I see.

The mod I'm working on is supposed to be used with bob's. I'd like all the recipes to be in the order Plate, Gear, Bearing, Circuit, but some of the gear, bearing, and circuit types sort in the wrong order. So, I'll go investigate how they're sorting and see if I can tweak it.

Post Reply

Return to “Modding help”