Dynamic sprite generation

Place to get help with not working mods / modding interface.
Post Reply
Atria
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sat Jul 09, 2016 10:25 am
Contact:

Dynamic sprite generation

Post by Atria »

Is it possible to generate sprites using script on game load and still use it in prototypes?

I'm pretty sure it's not possible, just tought of asking before completely rejecting this idea.

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

Re: Dynamic sprite generation

Post by Rseding91 »

You can layer sprites (which is what the base game does to generate the barrel icons) but that's about it.
If you want to get ahold of me I'm almost always on Discord.

Atria
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sat Jul 09, 2016 10:25 am
Contact:

Re: Dynamic sprite generation

Post by Atria »

So it could be possible to layer a lot of small sprites next to each other to create ilusion of one big sprite?

Is it possible to do he same with picture property of entity like this?

Code: Select all

picture = {
    {filename, x, y, width, height, shift, ...},
    {sprite two},
    {sprite three},
    {sprite four},
    ....
},

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Dynamic sprite generation

Post by darkfrei »

See car animation: layers for layers, stripes for multiple files spritesheet.

Code: Select all

    animation =
    {
      layers =
      {
        {
          stripes =
          {
            {
             filename = "__base__/graphics/entity/car/car-1.png",
             width_in_frames = 2,
             height_in_frames = 22,
            },
            {
             filename = "__base__/graphics/entity/car/car-2.png",
             width_in_frames = 2,
             height_in_frames = 22,
            },
By turrets you can find same layers too.

Atria
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sat Jul 09, 2016 10:25 am
Contact:

Re: Dynamic sprite generation

Post by Atria »

darkfrei wrote:See car animation: layers for layers, stripes for multiple files spritesheet.

Code: Select all

    animation =
    {
      layers =
      {
        {
          stripes =
          {
            {
             filename = "__base__/graphics/entity/car/car-1.png",
             width_in_frames = 2,
             height_in_frames = 22,
            },
            {
             filename = "__base__/graphics/entity/car/car-2.png",
             width_in_frames = 2,
             height_in_frames = 22,
            },
By turrets you can find same layers too.
Thank you, hopefully it will work with chests.

Post Reply

Return to “Modding help”