Loader that changes items and counts?

Place to get help with not working mods / modding interface.
Post Reply
ravenbs
Inserter
Inserter
Posts: 49
Joined: Wed Jun 13, 2018 11:07 am
Contact:

Loader that changes items and counts?

Post by ravenbs »

Hi,

searching for a way to:

Pick up items from a belt (like a Loader) and place different items in a chest.
I also need to count those converted items by type.
Something like a "converting & counting loader".

Same in reverse for an unloader. Pick up from a chest and with a condition in lua make another item out of it and place it on a belt.

Think this can not be done with loaders or inserters and need to pe an perTick lua script.
But is there a more UPS Friendly way to do this?

This mod does it with 3 entitys: Loader - furnace - loader
https://mods.factorio.com/mod/deadlock- ... es-loaders
But also no counter there.

User avatar
Linver
Fast Inserter
Fast Inserter
Posts: 158
Joined: Wed Jan 09, 2019 2:28 pm
Contact:

Re: Loader that changes items and counts?

Post by Linver »

The solution that I have in mind is something like: simulate this using three entities, but is a long code:
Two inserters and one furnace, for examples the position where the furnace will built is the position 0.
One inserter take from -1 position and drop the item on position 0 (in the furnace), the second inserter take from position 0 and drop position +1 (from the furnace), the two inserters are invisible and will be placed over or under the furnace via on_built event (on position 0), and removed with reverse event.
The furnace take the item and convert it in the other wanted with some hidden recipes.

This solution isn't much UPS expensive because the only scripting part is some entity placing and removing using only two events, also u can use event filters on the events too for reduce the lua cheking.

Otherwise u can create a special inserter that u check over time, but I think this will be more UPS expensive.

ravenbs
Inserter
Inserter
Posts: 49
Joined: Wed Jun 13, 2018 11:07 am
Contact:

Re: Loader that changes items and counts?

Post by ravenbs »

Converting is possible this way, but not cunting. Or do I get a trigger how many of which recipie a furnace has done?

PyroFire
Filter Inserter
Filter Inserter
Posts: 356
Joined: Tue Mar 08, 2016 8:18 am
Contact:

Re: Loader that changes items and counts?

Post by PyroFire »

basically until you can answer these: "how do you get a mixed belt running smoothly with items on it that you aren't using?", "what makes this different from a market mod where you just "sell" an item into a global inventory and "buy" it back elsewhere, eliminating the point of the packages to start with as well as introducing a global instant item teleportation exploit", and "if you already have a solution to getting a mixed belt running smoothly with unused items on it, why is that solution not sufficient?", it would not seem like a good idea to pursue this mod idea

of course that is just my opinion, i try to flesh everything out before i start a mod.

As for counting items, you cannot directly count them as this would be too expensive, but it's relatively easy using the market.
i'm thinking you wouldn't have any money involved, sort of like the item is the currency you need to buy that specific item.

e.g. iron gears cost 1 iron gear, which you can only get by selling 1 iron gear.

but like, then you still end up with an exploit that lets you teleport items from one side of the map to the other with zero cost.

I personally don't see a way out of the contradictions.
you fix one and contradict yourself in the next step

idk man
That's the thing about trying to count items - its just impractical.
And odds are whatever you're trying to do by counting items is probably better done another way, or couldn't be done at all to begin with

Post Reply

Return to “Modding help”