animations start at random frame &animation render layer bug

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
Joined: Thu Dec 21, 2017 8:02 am
Contact:

animations start at random frame &animation render layer bug

Post by ownlyme »

When using the trivial-smoke prototype for, lets say an energy shield with an animation, the animation starts playing at a random frame so it won't make a perfect loop.
I tried using a dummy with the unit-spawner prototype, but I can't get the render layer higher than the turret-gun with that one.
Last edited by ownlyme on Thu Apr 26, 2018 1:27 am, edited 2 times in total.
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

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

Re: Fog animation starts at random frame

Post by Bilka »

You can use a simple-entity for animations: https://github.com/Bilka2/Portals/blob/ ... ls.lua#L27
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
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: Fog animation starts at random frame

Post by ownlyme »

i already tried the type "simple-entity", it also starts the animation at a random frame.
the "random_animation_offset = false" flag you used has no effect on any of the prototypes, i couldn't find it anywhere in the game's vanilla entities either, where did you get this from?

it seems like specifying a render_layer (of any kind, i also tried final_render_layer, gun_animation_render_layer, base_picture_render_layer, animation_render_layer) doesn't affect the layer of the animation at all

when i change the gun_animation_render_layer of the turrets to "lower-object-above-shadow", my animations get rendered above, but i couldn't find out how to change the render layer of the pipe covers which still get rendered above my shield

this is currently my prototype:
prototype
it would work with a beacon prototype too, but i don't know which one would be more performance-friendly

on the attached picture i haven't changed the gun render layer
Attachments
renderlayer.png
renderlayer.png (126.64 KiB) Viewed 2018 times
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: animations start at random frame &animation render layer bug

Post by posila »

smoke-with-trigger always starts its animation at frame 0; only some prototypes have configurable render layers, smoke-with-trigger is one of them (it reads "render_layer" property).

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

Re: animations start at random frame &animation render layer bug

Post by Bilka »

ownlyme wrote:the "random_animation_offset = false" flag you used has no effect on any of the prototypes, i couldn't find it anywhere in the game's vanilla entities either, where did you get this from?
The ``random_animation_offset`` flag defaults to false, so you dont see an effect if you just leave out the line on the simple entity prototype.
Last edited by Bilka on Thu Apr 26, 2018 8:10 am, edited 1 time in total.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: animations start at random frame &animation render layer bug

Post by posila »

random_animation_offset controlls if entities will have same frame based just on current tick or they will add also random offset to frame calculated from tick number

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: animations start at random frame &animation render layer bug

Post by ownlyme »

The smoke-with-trigger prototype is what i was looking for
thank you everyone!

I think there should be a property to make animations play properly though.

And the prototypes should be documented better, they are the hardest part about modding.
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: animations start at random frame &animation render layer bug

Post by Rseding91 »

ownlyme wrote:And the prototypes should be documented better, they are the hardest part about modding.
They aren't documented at all right now. Just what the wiki shows from whoever decides they want to work on it at the time.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Modding interface requests”