Howdy. When I tweaked the splitters in my mod, I manually edited every animation frame in Paint.NET to dinstinguish them visually from the default splitters (four direction facings, three splitter types, and 32 animation frames).
In thinking about supporting other mod author's splitters natively, I was wondering if there is a better way to accomplish the different look--like with a texture overlay or something. I imagine this is possible because it's done with circuit network connections.
Would someone mind outlining what I would need to do to accomplish this? I'm a complete graphics/animation newbie, so I'm not sure where to start or what to search for to find out.
Thanks!
Creating a new texture programmatically?
-
- Fast Inserter
- Posts: 152
- Joined: Fri Aug 12, 2016 10:22 pm
- Contact:
Re: Creating a new texture programmatically?
Well, have look at how default entities are defined. Most of them list several layers in their animations. If you need, you can modify the tint value of the layer, add new layers, including masks of various degree of transparency (tint with alpha value less than 1).
The algorithm is pretty much standard one, you modify data.raw after the entities of interest are known to be included (to do that you either list relevant mods as dependencies for your one, or use data-updates.lua or later.) .
The algorithm is pretty much standard one, you modify data.raw after the entities of interest are known to be included (to do that you either list relevant mods as dependencies for your one, or use data-updates.lua or later.) .
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
-
- Fast Inserter
- Posts: 152
- Joined: Fri Aug 12, 2016 10:22 pm
- Contact:
Re: Creating a new texture programmatically?
Yeah, I figured it out. The item in question had it's animation defined in a top-level table. By moving that definition into a newly created sub-table called layers, i was able to add another animation frame that's my texture overlay. It took some hunting around to find the magic sauce (i.e., that sub-table). Thanks.
Re: Creating a new texture programmatically?
could I get some more detail on how to do this? I can't find any documentation...