simple-entity-with-animation

Post Reply
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

simple-entity-with-animation

Post by darkfrei »

Hi! Is it possible to make the new simple entity?

For example something like roboport or electric furnace. It will be good, when it will be possible to set speed of animation and type of playing (cycle, just once, forward-reverse and just reverse once).
from electric furnace, it has animated ventilator

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

Re: simple-entity-with-animation

Post by Bilka »

I added animations to LuaRendering which should make this possible a slightly different way. You just define an animation prototype and then draw it in-game with LuaRendering. You can change the animation speed and render layer.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: simple-entity-with-animation

Post by darkfrei »

Bilka wrote:
Thu Jan 31, 2019 7:54 pm
I added animations to LuaRendering which should make this possible a slightly different way. You just define an animation prototype and then draw it in-game with LuaRendering. You can change the animation speed and render layer.
Is it possible to set color to any entity on control stage?

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

Re: simple-entity-with-animation

Post by Bilka »

objects like the animation that are drawn with LuaRendering are not entities. You can set the tint on the animation created with luarendering. You cannot runtime set tint on some arbitrary entity that uses animations, like radar.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: simple-entity-with-animation

Post by darkfrei »

Bilka wrote:
Fri Feb 01, 2019 8:32 am
objects like the animation that are drawn with LuaRendering are not entities. You can set the tint on the animation created with luarendering. You cannot runtime set tint on some arbitrary entity that uses animations, like radar.
But I can set LuaRendering layer with same graphics as radar over this entity! It's visually tint of entity, but it isn't.

Nice to have some easy way do do this:
entity.rendering_sticker = {{image=entity_prototype_image, tint=tint}}
Last edited by darkfrei on Fri Feb 01, 2019 9:46 am, edited 1 time in total.

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

Re: simple-entity-with-animation

Post by Bilka »

darkfrei wrote:
Fri Feb 01, 2019 9:38 am
But I can set LuaRendering layer with same graphics as radar over this entity! It's visually tint of entity, but it isn't.
Yes.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: simple-entity-with-animation

Post by darkfrei »

Bilka wrote:
Fri Feb 01, 2019 9:44 am
darkfrei wrote:
Fri Feb 01, 2019 9:38 am
But I can set LuaRendering layer with same graphics as radar over this entity! It's visually tint of entity, but it isn't.
Yes.
So it can be done internal just from entity.tint = tint, and another will be done as attach LuaRendering with the same graphics and tinted LuaRendering?

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

Re: simple-entity-with-animation

Post by Bilka »

darkfrei wrote:
Fri Feb 01, 2019 9:49 am
So it can be done internal just from entity.tint = tint, and another will be done as attach LuaRendering with the same graphics and tinted LuaRendering?
Only some entities support run-time tint changes directly. This is not changing. To get around that limitation you can use the LuaRendering. Basically yes.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Implemented mod requests”