How to: multiple frames + night anims

Find tutorials, documentation, and resources for creating and using TheoTown plugins.
Previous topicNext topic
User avatar
Galliano.M
Settler
Reactions:
Posts: 3
Joined: 28 Feb 2022, 11:17

How to: multiple frames + night anims

Post by Galliano.M »

If you want to learn how to make a plugin that contains different frames (like one or more rotations) with night animations
this is the right place!


Below I present you a JSON code that can contain all the frames of your plugin and associate the corresponding night animations to each.

Code: Select all    Reset

[ { "id": "$Night_Animation2022A", "type": "animation", "light": true, "light switching": true, "frames": [ { "bmp": "your_night_anim(01).png", "handle y": 30, "handle x": -6 } ] }, { "id": "$Night_Animation2022B", "type": "animation", "light": true, "light switching": true, "frames": [ { "bmp": "your_night_anim(02).png", "handle y": 30, "handle x": -6 } ] }, { "id": "$sample.plugin.unique.id.res00", "type": "residential", "author": "Lobby & theotheoderich", "width": 3, "height": 3, "draw ground": true, "animation": [ { "id": "$Night_Animation2022A", "x": 0, "y": 0, "frame": 0 }, { "id": "$Night_Animation2022B", "x": 0, "y": 0, "frame": 1 } ], "frames": [ { "bmp": "sample_bmp(01).png" }, { "bmp": "sample_bmp(02).png" } ], "level": 3 } ]
JSON checker
Check
Immagine 2022-07-11 213221edit.png
Here are written just two animations (the green and orange boxes) but the amount can be freely increased.

The "handle y" and "handle x" are not fixed values, so you will need to change them based on the circumstances, for example: the lights and windows may not coincide, with this numbers you will be able to change the coordinates at which the animations are placed on the axes.

In the "animation" sector (blue box) are contained the IDs of the animations and after "frame" is specified the frame which they are linked to: default=0 second=1 third=2 etc.

In the "frames" sector (yellow box) are stored the "base" frames of your plugin.


I hope this was helpful! ;)
*last update:15/07/22
You do not have the required permissions to view the files attached to this post.
User avatar
Neruenz
Settler
Reactions:
Posts: 2
Joined: 10 Jan 2026, 20:23

Re: How to: multiple frames + night anims

Post by Neruenz »

Thanks
User avatar
Syn
Small-town resident
Reactions:
Posts: 28
Joined: 07 Jan 2021, 05:55

Plugin Creator

Platform

Re: How to: multiple frames + night anims

Post by Syn »

So how does night animations on street lights work? Because there's also animation there already on foreground and background
User avatar
Galliano.M
Settler
Reactions:
Posts: 3
Joined: 28 Feb 2022, 11:17

Re: How to: multiple frames + night anims

Post by Galliano.M »

Syn wrote: 01 Mar 2026, 20:48 So how does night animations on street lights work? Because there's also animation there already on foreground and background
hi, :) I would really like to help but I may not be sure what you meant with that.. was there something that didn't work from the post? The method show does not apply to all cases of course, :lol: let me know!
User avatar
Syn
Small-town resident
Reactions:
Posts: 28
Joined: 07 Jan 2021, 05:55

Plugin Creator

Platform

Re: How to: multiple frames + night anims

Post by Syn »

Here's my earlier confusion come to be, because road deco usually writen as an animation and have those frame animation indices (for background)and fg indices (as foreground), then my pea size brain was like so where do or how we put the new night animations into the code, sorry if that's somehow incomprehensible English is my 3rd language, thanks
User avatar
Galliano.M
Settler
Reactions:
Posts: 3
Joined: 28 Feb 2022, 11:17

Re: How to: multiple frames + night anims

Post by Galliano.M »

Syn wrote: 02 Mar 2026, 15:37 Here's my earlier confusion come to be, because road deco usually writen as an animation and have those frame animation indices (for background)and fg indices (as foreground), then my pea size brain was like so where do or how we put the new night animations into the code, sorry if that's somehow incomprehensible English is my 3rd language, thanks
hey.. honestly I really dont know, ehm.. haven't dealt with that myself, but the guys over in the plugin discussion channel https://discord.com/channels/3654783917 ... 0519485441 of the theotown discord might know better than me, for certain actually.. I am sure the matter is way simpler that it appears to you right now, we just have to figure it out and ask other folks. 8-)
Previous topicNext topic