Following this: viewtopic.php?f=25&t=59173
Any chance we could get working_visualisations for mining drills, like we do for furnaces and assemblers?
Or on_animation and off_animation like labs?
I have big plans for furnace-miners and also laser mining, but the animations would just freeze in place if the drill stopped, and look silly.
*flutters eyelashes*
Working visualisations or on/off_animation for mining drills
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Working visualisations or on/off_animation for mining drills
Yes please... id love that option too. To custom the game into a more nicer way.
pY Coal processing mod
Discord: Pyanodon #5791
Discord: Pyanodon #5791
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Working visualisations or on/off_animation for mining drills
+1 from here too.
Had to rework some animations once when i saw the "frozen in air" dust clouds produced by my drill.
Had to rework some animations once when i saw the "frozen in air" dust clouds produced by my drill.
Re: Working visualisations or on/off_animation for mining drills
Implemented in 0.18.31
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Working visualisations or on/off_animation for mining drills
Thanks for this. Also thanks for adding draw_as_light to working_visualisations, that's made my day.
I'm struggling a little to update my mining drill stuff for the new graphics_set format. I note that the old specification (input_fluid_patch_shadow_animations, input_fluid_patch_window_base_sprites, etc. etc.) still works perfectly well in 1.0.0 although that spec has been removed from the wiki, so I assume it's legacy support. Will it keep working or is the new spec something to grapple with sooner or later?
I'm struggling a little to update my mining drill stuff for the new graphics_set format. I note that the old specification (input_fluid_patch_shadow_animations, input_fluid_patch_window_base_sprites, etc. etc.) still works perfectly well in 1.0.0 although that spec has been removed from the wiki, so I assume it's legacy support. Will it keep working or is the new spec something to grapple with sooner or later?
Re: Working visualisations or on/off_animation for mining drills
input_fluid_patch_shadow_animations, input_fluid_patch_window_base_sprites are not being loaded in 1.0, are you sure they work for you? Maybe some other mod procedurally converts them to graphics_set?Deadlock989 wrote: ↑Thu Oct 01, 2020 7:48 pmI'm struggling a little to update my mining drill stuff for the new graphics_set format. I note that the old specification (input_fluid_patch_shadow_animations, input_fluid_patch_window_base_sprites, etc. etc.) still works perfectly well in 1.0.0 although that spec has been removed from the wiki, so I assume it's legacy support. Will it keep working or is the new spec something to grapple with sooner or later?
I believe what you need to do is to copy&paste your graphics_set defintion into wet_mining_graphics_set and insert fluid patches as layers into working visualizations with always_draw = true.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Working visualisations or on/off_animation for mining drills
Actually, you're right, it's all broken. I'll figure it out from the new electric drill patches. Cheers.posila wrote: ↑Thu Oct 01, 2020 7:55 pminput_fluid_patch_shadow_animations, input_fluid_patch_window_base_sprites are not being loaded in 1.0, are you sure they work for you? Maybe some other mod procedurally converts them to graphics_set?
I believe what you need to do is to copy&paste your graphics_set defintion into wet_mining_graphics_set and insert fluid patches as layers into working visualizations with always_draw = true.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Working visualisations or on/off_animation for mining drills
Got there in the end. This spec is actually lot easier to manage and more powerful than the old way.
To convert old to new:
- Merge animation and base_picture (if you had them both) into graphics_set.animation. If some of your layers are running forwards-and-backwards and others are static or run the full length of the sequence, you can use repeat_count in the animation prototype to include them all in the same layer.
- Add any new working visualisations, light sources etc. to graphics_set.working_visualisations in a table of tables. Status lights should be apply_tint = "status" and always_draw = true. Stuff like smoke, lasers etc. should not be always drawn and go in a separate table entry; there are other dynamic tint options available for those (e.g. resource colours).
- Add a new value graphics_set.status_colors if your animation has any lights that might support them (see the wiki). You can set a value to fully transparent black {0,0,0,0} if you want the status lights to not be drawn in a specific condition, e.g. when the drill has no power at all.
- Put all that into the graphics_set property of the prototype. Make a deep copy of that graphics set for the wet mining options.
- Append new tables to the copy's working_visualisations table with always_draw = true. Anything that was in input_fluid_patch_animations, input_fluid_patch_sprites, input_fluid_patch_shadow_animations, input_fluid_patch_shadow_sprites can probably all go into the same layer - they have a relative render order and you can also move things up or down in the render order to draw behind the main animation if you need to with secondary_draw_order as well. It's possible that these will work equally well in the animation layers as well, I didn't experiment.
- For input_fluid_patch_window_base_sprites, put those in a separate entry and add apply_tint = "input-fluid-base-color". Same for input_fluid_patch_window_flow_sprites with apply_tint = "input-fluid-flow-color".
- Set wet_mining_graphics_set to this copied table.
- Profit.
To convert old to new:
- Merge animation and base_picture (if you had them both) into graphics_set.animation. If some of your layers are running forwards-and-backwards and others are static or run the full length of the sequence, you can use repeat_count in the animation prototype to include them all in the same layer.
- Add any new working visualisations, light sources etc. to graphics_set.working_visualisations in a table of tables. Status lights should be apply_tint = "status" and always_draw = true. Stuff like smoke, lasers etc. should not be always drawn and go in a separate table entry; there are other dynamic tint options available for those (e.g. resource colours).
- Add a new value graphics_set.status_colors if your animation has any lights that might support them (see the wiki). You can set a value to fully transparent black {0,0,0,0} if you want the status lights to not be drawn in a specific condition, e.g. when the drill has no power at all.
- Put all that into the graphics_set property of the prototype. Make a deep copy of that graphics set for the wet mining options.
- Append new tables to the copy's working_visualisations table with always_draw = true. Anything that was in input_fluid_patch_animations, input_fluid_patch_sprites, input_fluid_patch_shadow_animations, input_fluid_patch_shadow_sprites can probably all go into the same layer - they have a relative render order and you can also move things up or down in the render order to draw behind the main animation if you need to with secondary_draw_order as well. It's possible that these will work equally well in the animation layers as well, I didn't experiment.
- For input_fluid_patch_window_base_sprites, put those in a separate entry and add apply_tint = "input-fluid-base-color". Same for input_fluid_patch_window_flow_sprites with apply_tint = "input-fluid-flow-color".
- Set wet_mining_graphics_set to this copied table.
- Profit.