Deadlock's Stacking Beltboxes & Compact Loaders


Adds minimalist 1x1 loaders and stacking beltboxes for 5x belt compression for ores, plates and some intermediate products

Content
2 years ago
0.17 - 1.1
90.7K
Logistics

i Icons in public interface call

4 years ago

I just thinking how create all stacked icons for Krastorio 2, they are many, so I suppose that via code is possible create a function that simulate stacked object returing an icons table with icon shifted a bit copied three time over the same icon.
But I discover that public API interface call:
deadlock.add_stack(item_name, graphic_path, target_tech, icon_size, item_type, mipmap_levels)
use directly the icon_path, so is impossible pass an icons.
Is there a possibility of use icons in next updates?
I think that because graphic_path should be a string, if instead is a table, should be easy modify the standard function with an type check without change the old function behaviour.

4 years ago

Good point, the API needs an update for the new icon options. I'll see about working on this soon, thanks!

4 years ago

The current API if no graphics path is provided will generate a stacked icon itself using the default icon of the item it’s been asked to stack.

However with the release of 0.18 the in game icons have been replaced with mipmaps. 4 icons of different resolutions placed beside each other in one png file.

4 years ago

Yup - the devs have forced my hand, will be needing to add this in the initial 0.18 release.

4 years ago

OK, I suppose at this point that the answer is ignore do to this work and leave the work to ur mod setting graphic_path null in deadlock.add_stack(item_name, graphic_path, target_tech, icon_size, item_type, mipmap_levels)

4 years ago

Deadlock gave some sample code in the forum to make stacked icons. I used his code and made some python scripts

https://github.com/billbo99/deadlock_stacked_recipes/tree/master/python/make_stacked_icons.py
I place the icons in a folder called "raw_input" and run the script. For each icon it makes 42 different stacked icons in different layouts. Once I pick the icon that looks best I move the chosen file to "mips_input" and it creates me the icon in its 4 resolutions side by side in a mips file.

I can then tell deadlock to load the icons I have provided when creating some icons.

4 years ago

404

4 years ago

Another problem:
1.151 Script @deadlock-beltboxes-loaders/prototypes/shared.lua:17: DBL: Warning: creating layered stack icon (steel-gear-wheel), this is 4x more rendering effort than a custom icon!

4 years ago
(updated 4 years ago)

https://github.com/billbo99/deadlock_stacked_recipes/blob/master/__python__/make_stacked_icons.py

The error message comes up as a warning .. Deadlock was told by a DEV once that icons with multiple layers placed on a belt could have a performance hit for people on low end graphics cards.

4 years ago

Thanks, I will try it

New response