I would like to be able to override the stack size of an item using scripting. Stacks over a normal stack size is already a "feature", in how updating mods/versions can decrease a stack size, but already existing stacks are unaffected. It would be useful and convenient to open this feature to scripting.
Currently, LuaItemStack.count() sets the item stack amount equal to the amount parameter or the item stack size, whichever is lower. Therefore, it is impossible to obtain "overstacked" stacks, even through scripting.
I would like LuaItemStack.count() to accept a "override_stack_size" parameter, or a new method along the lines of LuaItemStack.override_count() that does not check if the input count is greater than the item stack size.
example of normal item stack next to overstacked item stack
Override item stack size with stack.override_count()
-
- Filter Inserter
- Posts: 278
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Override item stack size with stack.override_count()
If you need to reach me, message me on discord.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
-
- Filter Inserter
- Posts: 278
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Re: Override item stack size with stack.override_count()
Bringing to the front for 2.0 consideration, I don't see why this would cause many issues in the current engine. Please and thank you
If you need to reach me, message me on discord.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
-
- Filter Inserter
- Posts: 278
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Re: Override item stack size with stack.override_count()
Additionally, I think it should be possible to obtain these overstacked item stacks somehow. Some even partially hacky way to obtain them with scripting.
If you need to reach me, message me on discord.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.