Page 1 of 1
[0.15.1] [Twinsen] Set Stack Size Operation with negative numbers
Posted: Tue Apr 25, 2017 7:36 pm
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.
Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers
Posted: Fri Apr 28, 2017 10:12 am
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.
Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers
Posted: Sat Apr 29, 2017 12:25 am
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.
Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers
Posted: Sun Apr 30, 2017 9:20 am
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.
Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers
Posted: Sun Apr 30, 2017 7:22 pm
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.
Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers
Posted: Sun Apr 30, 2017 7:37 pm
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.
Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers
Posted: Sun Apr 30, 2017 8:25 pm
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.
Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers
Posted: Sun Apr 30, 2017 10:59 pm
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.
Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers
Posted: Mon May 01, 2017 11:21 am
by Twinsen
I put it on my todo to make inserters react faster. But low priority at the moment until most bugs are fixed.
Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers
Posted: Mon May 01, 2017 12:15 pm
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).
Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers
Posted: Fri May 05, 2017 3:52 pm
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.
Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers
Posted: Fri May 05, 2017 4:51 pm
by Tekky
Wow, that was fast, especially for something that was low-priority on your todo list. Thank you very much.
Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers
Posted: Sat May 06, 2017 10:36 pm
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.
Re: [0.15.1] [Twinsen] Set Stack Size Operation with negative numbers
Posted: Fri Dec 21, 2018 6:28 am
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.