Create image dynamically
Create image dynamically
Is there any way to create sprite for an entity prototype dynamically, combining from number of parts?
Re: Create image dynamically
I assume that this is not literally possible, as images are loaded at start.
But you may play with existing entities like train-stop, rail signals etc. that contain animation and whose images are actually divided in several parts
Replacing animations could help you create various images
Maybe if you are more precise, we could give a better answer.
Hermios
But you may play with existing entities like train-stop, rail signals etc. that contain animation and whose images are actually divided in several parts
Replacing animations could help you create various images
Maybe if you are more precise, we could give a better answer.
Hermios
- Ranakastrasz
- Smart Inserter
- Posts: 2124
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Create image dynamically
I think so. Look at the base-game script for how Barreling icons are created. I am pretty sure you can copy that and use it for entities as well.
data/base/data-updates
data/base/data-updates
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: Create image dynamically
Thanks for the reply. I already can create combined icons (as in exampled file), but I want to create combined entity sprites on game loading. My entity is container type and it only supports "picture" field - no "layers", no "pictures", no animation or so. That's why I ask. Maybe it supports some tricky property I don't know. But I... don't know)))Ranakastrasz wrote:I think so. Look at the base-game script for how Barreling icons are created. I am pretty sure you can copy that and use it for entities as well.
data/base/data-updates