Page 1 of 1

Why doesn't my animation work?

Posted: 12 May 2025, 16:36
by Zareth
I've been following the documentation and haven't been able to reproduce the animation I made for my farm building.
Does anyone know why nothing happens?

Code: Select all    Reset

[ { "id" : "Farm.Animation.Mo.Plugin.unique.id.res00", "type" : "animation", "handle interpolation" : 5, "loop" : true, "frames" : [ { "bmp" : "CowAnimation_0001_bmp.png", "move x" : 0, "move y" : 0 }, { "bmp" : "CowAnimation_0002_bmp.png", "move x" : 0, "move y" : 0 }, { "bmp" : "CowAnimation_0003_bmp.png", "move x" : 0, "move y" : 0 }, { "bmp" : "CowAnimation_0004_bmp.png", "move x" : 0, "move y" : 0 } ] }, { "id" : "$Farm.Animals.Mo.Plugin.unique.id.res00", "type" : "farm", "title" : "Cow Farm", "text" : "A farm that produces milk and meat. It requires a lot of space and workers, but it is worth it. It is a great source of food and income for the city.", "author" : "Zareth", "width" : 3, "height" : 3, "frames" : [ { "bmp" : "FarmMo_bmp.png" } ], "animated" : [ { "id" : "Farm.Animation.Mo.Plugin.unique.id.res00" } ], "level" : 3, "build time" : 31, "price" : 1000, "workers" : 150, "sound click" : {"file" : "Farm.ogg"}, "influense noise" : 1, "influense nature" : 10, "influence polution" : -1 } ]
JSON checker
Check

Re: Why doesn't my animation work?

Posted: 12 May 2025, 19:05
by CommanderABab
:!:
Zareth wrote:
12 May 2025, 16:36
I've been following the documentation and haven't been able to reproduce the animation I made for my farm building.
Does anyone know why nothing happens?

Code: Select all

[
    {
        "id" : "Farm.Animation.Mo.Plugin.unique.id.res00",
        "type" : "animation",
        "handle interpolation" : 5,
        "loop" : true,
        "frames" : [
            {
                "bmp" : "CowAnimation_0001_bmp.png",
                "move x" : 0,
                "move y" : 0
            },
            {
                "bmp" : "CowAnimation_0002_bmp.png",
                "move x" : 0,
                "move y" : 0
            },
            {
                "bmp" : "CowAnimation_0003_bmp.png",
                "move x" : 0,
                "move y" : 0
            },
            {
                "bmp" : "CowAnimation_0004_bmp.png",
                "move x" : 0,
                "move y" : 0
            }
        ]
    },
    {
        "id" : "$Farm.Animals.Mo.Plugin.unique.id.res00",
        "type" : "farm",
        "title" : "Cow Farm",
        "text" : "A farm that produces milk and meat. It requires a lot of space and workers, but it is worth it. It is a great source of food and income for the city.",
        "author" : "Zareth",
        "width" : 3,
        "height" : 3,
        "frames" : [
            {
                "bmp" : "FarmMo_bmp.png"
            }
        ],
        "animated" : [
            {
                "id" : "Farm.Animation.Mo.Plugin.unique.id.res00"
            }
        ],
        "level" : 3,
        "build time" : 31,
        "price" : 1000,
        "workers" : 150,
        "sound click" : {"file" : "Farm.ogg"},
        "influense noise" : 1,
        "influense nature" : 10,
        "influence polution" : -1
    }
]
Maybe you could show us these files to see what they look like:
"bmp" : "CowAnimation_0001_bmp.png",

"bmp" : "CowAnimation_0002_bmp.png",

"bmp" : "CowAnimation_0003_bmp.png",

"bmp" : "CowAnimation_0004_bmp.png",

Things to try (1 for sure):

1. animated should be animation.
2 loop - I am unaware of this tag.
(Unused tags are basically ignored.)

3. "handle interpolation" : 5, won't do anything if you are intending to move cows around the field and all your (x and y)s are 0.

Re: Why doesn't my animation work?

Posted: 13 May 2025, 19:50
by Zareth
CommanderABab wrote:
12 May 2025, 19:05
:!:
Zareth wrote:
12 May 2025, 16:36
I've been following the documentation and haven't been able to reproduce the animation I made for my farm building.
Does anyone know why nothing happens?

Code: Select all

[
    {
        "id" : "Farm.Animation.Mo.Plugin.unique.id.res00",
        "type" : "animation",
        "handle interpolation" : 5,
        "loop" : true,
        "frames" : [
            {
                "bmp" : "CowAnimation_0001_bmp.png",
                "move x" : 0,
                "move y" : 0
            },
            {
                "bmp" : "CowAnimation_0002_bmp.png",
                "move x" : 0,
                "move y" : 0
            },
            {
                "bmp" : "CowAnimation_0003_bmp.png",
                "move x" : 0,
                "move y" : 0
            },
            {
                "bmp" : "CowAnimation_0004_bmp.png",
                "move x" : 0,
                "move y" : 0
            }
        ]
    },
    {
        "id" : "$Farm.Animals.Mo.Plugin.unique.id.res00",
        "type" : "farm",
        "title" : "Cow Farm",
        "text" : "A farm that produces milk and meat. It requires a lot of space and workers, but it is worth it. It is a great source of food and income for the city.",
        "author" : "Zareth",
        "width" : 3,
        "height" : 3,
        "frames" : [
            {
                "bmp" : "FarmMo_bmp.png"
            }
        ],
        "animated" : [
            {
                "id" : "Farm.Animation.Mo.Plugin.unique.id.res00"
            }
        ],
        "level" : 3,
        "build time" : 31,
        "price" : 1000,
        "workers" : 150,
        "sound click" : {"file" : "Farm.ogg"},
        "influense noise" : 1,
        "influense nature" : 10,
        "influence polution" : -1
    }
]
Maybe you could show us these files to see what they look like:
"bmp" : "CowAnimation_0001_bmp.png",

"bmp" : "CowAnimation_0002_bmp.png",

"bmp" : "CowAnimation_0003_bmp.png",

"bmp" : "CowAnimation_0004_bmp.png",

Things to try (1 for sure):

1. animated should be animation.
2 loop - I am unaware of this tag.
(Unused tags are basically ignored.)

3. "handle interpolation" : 5, won't do anything if you are intending to move cows around the field and all your (x and y)s are 0.
I've already fixed what you told me about changing animated to animation, but it still doesn't work.

I just saw the cows in the manual construction section, but they're much lower than the farm. What's wrong? I already changed the "y" value, but it doesn't work.
image.png
image.png (2.36 KiB) Viewed 2852 times
But it's only visible in that section; it's still not visible in the game.

Here are the images you asked for:
CowAnimation_0001_bmp.png
CowAnimation_0001_bmp.png (709 Bytes) Viewed 2854 times
CowAnimation_0002_bmp.png
CowAnimation_0002_bmp.png (714 Bytes) Viewed 2854 times
CowAnimation_0003_bmp.png
CowAnimation_0003_bmp.png (702 Bytes) Viewed 2854 times
CowAnimation_0004_bmp.png
CowAnimation_0004_bmp.png (714 Bytes) Viewed 2854 times
FarmMo_bmp.png
FarmMo_bmp.png (5.53 KiB) Viewed 2854 times