It would be nice if you could draw alt-mode like icons with luarendering, LuaRendering::draw_sprite() exists but it is insufficient, it cannot:
- draw those sdf/shadow things neatly around icons like alt mode would
- draw quality (tbh just add another draw_sprite() for that, but this request is aimed for the shadow effect, but if we get that this would be nice too)
So i would like a way to request that with luarendering we can get those outlines/shadows so we can draw realistic looking alt-mode's ourselves,
currently we modders are limited to shadow sprites or drawing the icon in black a little bigger, like the factorissimo and ltn thought bubble mod:
This can be made to resemble a somewhat familiar look but it is still very far off in lots of subtle ways.
Therefore the MVP of this request is being able to draw the outline/background/sdf for items/fluids/signals/etc icons, things that never render as alt mode icons anyways can safely be ignored/excluded.
A more advanced version would be similar to https://lua-api.factorio.com/latest/pro ... cification or https://lua-api.factorio.com/latest/typ ... oning.html where you can specify one (or more) items/fluids/signals/etc and have the luarenderer take care of their size/spacing/positioning based on the parameters provided and/or the target entity.
A built-in quality draw option would be welcome too if something icon specific is being added anyways, but unlike the above it already has workarounds.
LuaRendering::draw_icon()
-
- Fast Inserter
- Posts: 204
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Re: LuaRendering::draw_icon()
+1, would help immensely in a number of scenarios I've seen recently.
This would also be awesome, perhaps when specifying a sprite for LuaGUI (Sprite or SpriteButton) perhaps it could be a table, then a property `quality` could be specified to have that rendered over top? I couldn't figure out how to render layered sprites runtime, this would help immensely.Quezler wrote: Wed Mar 05, 2025 12:09 pm A built-in quality draw option would be welcome too if something icon specific is being added anyways, but unlike the above it already has workarounds.
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.
Re: LuaRendering::draw_icon()
This would definitely be useful. I managed to get Lab Icon Revert looking "good enough" by drawing the shadows myself but it would definitely be nice to be able to do this automatically.