Custom animations

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
TheFennekin
Neighborhood fox
Reactions:
Posts: 2728
Joined: 24 Aug 2017, 11:17
Location: Wandering around
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Custom animations

#21

Post by TheFennekin »

How do you make your animation appear only in night? (Night animations)

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

Plugin Creator

Platform

Re: Custom animations

#22

Post by CommanderABab »

TheFennekin wrote:
28 Jun 2020, 09:57
How do you make your animation appear only in night? (Night animations)
Have these two lines in youe animation:

Code: Select all

      "light switching":true,
      "light":true,

User avatar
TheFennekin
Neighborhood fox
Reactions:
Posts: 2728
Joined: 24 Aug 2017, 11:17
Location: Wandering around
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Custom animations

#23

Post by TheFennekin »

CommanderABab wrote:
28 Jun 2020, 10:04
TheFennekin wrote:
28 Jun 2020, 09:57
How do you make your animation appear only in night? (Night animations)
Have these two lines in youe animation:

Code: Select all

      "light switching":true,
      "light":true,
Can I have an example json of a custom animation that will only appear at night? I want something to base on :)

User avatar
Marvel
Metropolitan
Reactions:
Posts: 101
Joined: 29 Nov 2020, 08:47
Location: Indonesia
Plugins: Showcase Store
Version: Beta

Re: Custom animations

#24

Post by Marvel »

Where to save the animation file

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

Plugin Creator

Platform

Re: Custom animations

#25

Post by CommanderABab »

FranchuFranchu wrote:
17 Jun 2018, 22:22
Since KoalaGuy was deleted, all his posts are gone. One of those posts was about custom animations. So here I am remaking the tutorial

To define your animation:

Code: Select all

[
   {
       "id":"myanimation",
       "frames":[ {
              "bmp":"myanim.png"
              "move x":5 //In moment number 1, 
             //our animation will be in x 5
             "move y":16 //and in y 16
           },{
              "bmp":"myanim.png"
              "move x":10 //In moment number 2, 
             //our animation will be in x 10
             "move y":16 //and in y 16
           }
           
         ]
         "handle interpolation":5 //5 ticks between
         //moment 1 and moment 2
     }
]
To use it:

Code: Select all

[ 
  {
    "id":"buildingwithanimation",
    "type":"decoration",
    "width":1,
    "height":1,
    "frames":[{"bmp":"basepart.png"}],
    "animation":[
      {"id":"myanimation"}
    ]
  }
 ]
I hope I didn't mess up with anything
You would normally put the animation in the same json file as the plugin. Like so:

Code: Select all

[
{Example 1 in quote
},
{Example 2 in quote
}
]

User avatar
Pulga Wazaa
Settler
Reactions:
Posts: 1
Joined: 10 Oct 2023, 08:00

Re: Custom animations

#26

Post by Pulga Wazaa »

I have a question
I can create an animation that looks like the animation of the energy supply buildings?

User avatar
MeUsic
Villager
Reactions:
Posts: 8
Joined: 12 Mar 2022, 07:25

Re: Custom animations

#27

Post by MeUsic »

Can someone explain to me how to make an animation array? I have the model and night lights model ready, but I can't make them appear in game.

User avatar
burgernamn
Former aster dude
Reactions:
Posts: 172
Joined: 15 Apr 2022, 10:32
Plugins: Showcase Store

Plugin Creator

Platform

Re: Custom animations

#28

Post by burgernamn »

is ticks = speed of the animation?

User avatar
Dzhiya
Settler
Reactions:
Posts: 3
Joined: 15 Apr 2024, 05:13

Plugin Creator

Platform

Re: Custom animations

#29

Post by Dzhiya »

Does this animation reverse and repeatedly automatically? Or is there value?

User avatar
Mendel Group
Inhabitant of a Country
Reactions:
Posts: 905
Joined: 07 Apr 2024, 05:18
Location: नागपुर
Plugins: Showcase Store
Contact:

Re: Custom animations

#30

Post by Mendel Group »

How do we make night transition animation?

User avatar
Kulche
Pluche
Reactions:
Posts: 1154
Joined: 07 Jun 2017, 20:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Custom animations

#31

Post by Kulche »

a what now?

User avatar
Mendel Group
Inhabitant of a Country
Reactions:
Posts: 905
Joined: 07 Apr 2024, 05:18
Location: नागपुर
Plugins: Showcase Store
Contact:

Re: Custom animations

#32

Post by Mendel Group »

The transition from day to night makes different hues, how do we do that?

User avatar
Theotown player69420
Settler
Reactions:
Posts: 1
Joined: 17 Apr 2024, 12:58

Re: Custom animations

#33

Post by Theotown player69420 »

How do you finder the X and Y in a picture?

User avatar
ArthurJ22
Small-town resident
Reactions:
Posts: 32
Joined: 26 Oct 2020, 06:43

Plugin Creator

Platform

Re: Custom animations

#34

Post by ArthurJ22 »

Theotown player69420 wrote:
24 May 2024, 09:29
How do you finder the X and Y in a picture?
Image

Example here I was measuring where the light would be, remember that if it is to up a frame it must be negative so it would be "y": -80

Image

As you can see, it's exactly as the guideline says. It's all about marking the spots and remembering where they go.

Keep in mind that ideally, you should use individual light frames if they are windows and the vast majority have the same shape, primarily to optimize plugin space.

Besides, it might be a bit trickier, but the same principle applies. As long as you know where the zero point is, you can position the frame correctly in X too.

Another option would be to use the Animation Dev Tool by ian, which is more visually intuitive and allows you to position the frames more easily.

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”