Why doesn't my animation work?

Plugin specific problems will be solved here.

Moderators: Scenario Moderators, Plugin Moderators

User avatar
Zareth
Settler
Posts: 2
Joined: 03 May 2025, 21:21

Plugin Creator

Platform

Why doesn't my animation work?

#1

Post 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

User avatar
CommanderABab
AB
Posts: 11245
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Why doesn't my animation work?

#2

Post 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.

User avatar
Zareth
Settler
Posts: 2
Joined: 03 May 2025, 21:21

Plugin Creator

Platform

Re: Why doesn't my animation work?

#3

Post 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 2891 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 2893 times
CowAnimation_0002_bmp.png
CowAnimation_0002_bmp.png (714 Bytes) Viewed 2893 times
CowAnimation_0003_bmp.png
CowAnimation_0003_bmp.png (702 Bytes) Viewed 2893 times
CowAnimation_0004_bmp.png
CowAnimation_0004_bmp.png (714 Bytes) Viewed 2893 times
FarmMo_bmp.png
FarmMo_bmp.png (5.53 KiB) Viewed 2893 times
Last edited by Zareth on 13 May 2025, 23:55, edited 3 times in total.

Post Reply Previous topicNext topic

Return to “Problems”