adaptive colors

Place to get help with not working mods / modding interface.
Grundox
Inserter
Inserter
Posts: 43
Joined: Wed Nov 23, 2016 8:18 pm
Contact:

adaptive colors

Post by Grundox »

I would like to color a animation dependent on what recipe it's using, kind of like how animations of the chemical plant are changing colors depending on what fluids are contained in the recipe. I already have the seperate animation but from what I saw, I also need a color mask or something like that, which is supposed to be partially transparent and white I think. So the two things I need is to know how to create that color mask and what to add to the code. Thanks in advance.
Kind regards,
Grundox

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: adaptive colors

Post by Deadlock989 »

Grundox wrote:
Wed Aug 28, 2019 6:42 pm
how to create that color mask
This has an infinite number of answers because it is an art question. It depends partly on how you are creating the base animation. For example, I use Blender, and I use a material ID mask, or layers, or both, to split off the mask(s). There are a million alternatives, up to and including throwing glitter at a wall and capturing it on your smartphone.

The mask doesn't absolutely have to be white, but you have the most control over it if it's greyscale. Contrary to what other people will tell you, there are use cases for not having it be entirely white, but stick to white/greyscale unless you have reason otherwise.
what to add to the code.
First you set the crafting_machine_tint property in the recipes: https://wiki.factorio.com/Prototype/Rec ... chine_tint

Then you need to rig the mask layer(s) in the assembling machine's working visualisation animation(s) to use the corresponding tint channel(s): https://wiki.factorio.com/Types/Working ... ecipe_tint

The best way to learn how to do this is to look at the chemical plant definition in the vanilla game's data.raw.
Last edited by Deadlock989 on Wed Aug 28, 2019 6:55 pm, edited 1 time in total.

Post Reply

Return to “Modding help”