[0.15.1] [Twinsen] Set Stack Size Operation with negative numbers

This subforum contains all the issues which we already resolved.
Megatron
Inserter
Inserter
Posts: 47
Joined: Fri Apr 08, 2016 7:00 pm
Contact:

[0.15.1] [Twinsen] Set Stack Size Operation with negative numbers

Post by Megatron »

When an inserter is given a stack size signal below 0, it does not check it's limit and sets it to (Signal & 0xFF), which allows stack sizes up to 255.

EDIT: Follow up: The inserter only updates it's stack size after it has moved items, not when the signal is actually set, which is probably not desired behavior.
Twinsen
Factorio Staff
Factorio Staff
Posts: 1348
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers

Post by Twinsen »

Thanks for the report.

First part Fixed in Version: 0.15.4

About the second part, it works like that for optimization reasons(since inserters are used very often). It can be changed if it hiders gameplay but I believe most setups can work around this.
Megatron
Inserter
Inserter
Posts: 47
Joined: Fri Apr 08, 2016 7:00 pm
Contact:

Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers

Post by Megatron »

About the second part, it works like that for optimization reasons(since inserters are used very often). It can be changed if it hiders gameplay but I believe most setups can work around this.
I mentioned that because it (still) makes it impossible to move an exact amount of items from one container to another.
Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers

Post by Tekky »

Megatron wrote:When an inserter is given a stack size signal below 0, it does not check it's limit [...]
I believe it could actually be meaningful for an inserter to receive a negative stack size limit. In this thread in the suggestion forum it has been suggested that, in the case of a negative value, the inserter should switch to reverse mode, i.e. move items the other way.
Megatron wrote:I mentioned that because it (still) makes it impossible to move an exact amount of items from one container to another.
I believe I was able to successfully create an experimental setup in which I was able to move a fixed amount of items from one container to another. I programmed a combinator to send a signal to the inserter which specifies the remaining number of items to transfer. I set the inserter to use this signal as stack size and I also set the inserter to disable when this signal is zero. I also programmed the inserter to pulse its hand contents and used this signal to decrement the counter of the number of remaining items to transfer. As far as I can tell, it worked. However, this was only an experimental setup, I haven't actually tested it in production use.
Megatron
Inserter
Inserter
Posts: 47
Joined: Fri Apr 08, 2016 7:00 pm
Contact:

Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers

Post by Megatron »

Tekky wrote:I believe I was able to successfully create an experimental setup in which I was able to move a fixed amount of items from one container to another. I programmed a combinator to send a signal to the inserter which specifies the remaining number of items to transfer. I set the inserter to use this signal as stack size and I also set the inserter to disable when this signal is zero. I also programmed the inserter to pulse its hand contents and used this signal to decrement the counter of the number of remaining items to transfer. As far as I can tell, it worked. However, this was only an experimental setup, I haven't actually tested it in production use.
That's only possible if you want to move more items than the actual stack size of the inserter so you can change it in time.
If, for example, the current stack size is 10 and you want to move 4 items, setting the stack size to 4 will not work as the inserter first moves 10 items and only then updates it's stack size.

The real benefit of setting the stack size with a circuit signal is that you can actually move an exact amount from one container to another. If it worked properly that is.
It should be rather clear that if you want to update the stack size dynamically, say, according to some circuit state, you would want that to happen as the circuit state changes, instead of trying to hope for a situation where you can predict the state one inserter action beforehand.
Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers

Post by Tekky »

Ah, I understand now and agree with you. It would be nice if this issue could be fixed without sacrificing too much performance.
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers

Post by orzelek »

Since this is in resolved bugs we might need to move it back to unsolved ones?

It seems that basic expectation of setting stack size on inserter would be that it will take up to that many items on it's next action not on action after it.
Megatron
Inserter
Inserter
Posts: 47
Joined: Fri Apr 08, 2016 7:00 pm
Contact:

Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers

Post by Megatron »

orzelek wrote:Since this is in resolved bugs we might need to move it back to unsolved ones?
I would make a new thread about it in Suggestions. As Twinsen said it's not a bug. Depends on the implementation whether we see a solution rather sooner than later.
Twinsen
Factorio Staff
Factorio Staff
Posts: 1348
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers

Post by Twinsen »

I put it on my todo to make inserters react faster. But low priority at the moment until most bugs are fixed.
Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers

Post by Tekky »

Thank you very much! You guys are the best. :-)

Really. I mean it. I have never before played a game with such good support. I really feel guilty for only paying 20 Euros for this great game. At least I am doing everything I can to persuade other people to buy it too.

But I don't want to go too much off-topic here, as this is rather something for the thank-you thread (where I have posted already).
Twinsen
Factorio Staff
Factorio Staff
Posts: 1348
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers

Post by Twinsen »

Inserters should react much faster to stack size changes in Version: 0.15.8, so second issue should be resolved.

Edit: I tested and now you can make setups when you can put a precise number of items in a chest.
Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers

Post by Tekky »

Wow, that was fast, especially for something that was low-priority on your todo list. Thank you very much. :-)
Megatron
Inserter
Inserter
Posts: 47
Joined: Fri Apr 08, 2016 7:00 pm
Contact:

Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers

Post by Megatron »

Twinsen wrote:Inserters should react much faster to stack size changes in Version: 0.15.8, so second issue should be resolved.
Edit: I tested and now you can make setups when you can put a precise number of items in a chest.
That's a big deal. Thank you for the really quick fix.
pro5
Inserter
Inserter
Posts: 25
Joined: Sun Aug 21, 2016 3:56 am
Contact:

Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers

Post by pro5 »

(bad english)
The problem is still for express inserters, if angle less than 90 graduses. (bob's mod allow change angle for inserters)
Its not big problem, but remember this.
Post Reply

Return to “Resolved Problems and Bugs”