LuaRendering and LuaPlayer Limitations

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
AlienX
Fast Inserter
Fast Inserter
Posts: 103
Joined: Wed May 17, 2017 7:13 pm
Contact:

LuaRendering and LuaPlayer Limitations

Post by AlienX »

Hi devs, and others.

LuaRendering:
Please can you make draw_sprite have the option to also be able to scale_with_zoom - i feel this has been missed?


LuaPlayer:
I was also going to write some code to do some LuaRendering work based off the players zoom level, but it's write only - is there any reason why this data is not readable via script?

Thanks for your time as always :)

Bilka
Factorio Staff
Factorio Staff
Posts: 3130
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: LuaRendering and LuaPlayer Limitations

Post by Bilka »

Why/what for?

Not deterministic, making it deterministic would mean lots of network traffic: viewtopic.php?p=455826#p455826
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Boodals
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Feb 11, 2018 7:10 pm
Contact:

Re: LuaRendering and LuaPlayer Limitations

Post by Boodals »

AlienX wrote:
Tue Sep 17, 2019 10:52 pm
Please can you make draw_sprite have the option to also be able to scale_with_zoom - i feel this has been missed?
As far as I know there's no technical reason this couldn't be done, the problem is as soon as it would be made, people will be requesting ways to position objects relative to each other based on their size (which gets really ugly very quickly), and ways to have the render objects show above GUIs (which as far as I know is impossible with the current system).
Only text supports scale_with_zoom at the moment, so I don't know why you'd think it has been missed.

If you want a sprite that stays in the same place on the screen, use a GUI. You don't have to have a frame for it if you don't want it. If you want to rotate the sprite, there's probably been a modding interface request for that already.

AlienX
Fast Inserter
Fast Inserter
Posts: 103
Joined: Wed May 17, 2017 7:13 pm
Contact:

Re: LuaRendering and LuaPlayer Limitations

Post by AlienX »

Well yes i want to rotate the sprite, and in terms of it being missed you pretty much answered your own question...
"draw_text is the only one with it" - so why not the rest that supports scaling?

I understand the limitations in terms of having text and a sprite re-sizing on the fly when used at the same time, overlapping or whatever but i still feel that this should be something we could do?

If it's been done for text already, i assume the coding work from a developers side isn't that much of a big task, but that's pure speculation.

If i wanted to make a GUI this is possible by swapping a crap-tonne of gui sprites out at runtime, but not that great.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: LuaRendering and LuaPlayer Limitations

Post by eradicator »

Bilka wrote:
Tue Sep 17, 2019 11:24 pm
Why/what for?
I remember bringing this up in the thread about weather. I.e. a sprite with scale_with_zoom could be used to "fake" a rain/fog/snow/night/etc overlay over the whole screen, albeit for that to work it'd have to be draw_animation, not _sprite.
Boodals wrote:
Wed Sep 18, 2019 5:04 am
As far as I know there's no technical reason this couldn't be done, the problem is as soon as it would be made, people will be requesting ways to position objects relative to each other based on their size (which gets really ugly very quickly)
That is true for every request though. Rejecting reasonable requests based on what unresonable requests might or might not come afterwards reminds me of dystopic stories where people get arrested for crimes they haven't commited yet :p.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “Modding interface requests”