Night Animations

Find tutorials, documentation, and resources for creating and using TheoTown plugins.
User avatar
Marvel
Metropolitan
Reactions:
Posts: 111
Joined: 29 Nov 2020, 06:47
Location: Indonesia
Plugins: Showcase Store
Version: Beta

Re: Night Animations

Post by Marvel » 03 Dec 2020, 09:20

How to make own animation
:space I LOVE THEOTOWN :space
User avatar
Imran M
Inhabitant of a Country
Reactions:
Posts: 832
Joined: 24 Oct 2018, 11:41
Plugins: Showcase Store

Plugin Creator

Platform

Re: Night Animations

Post by Imran M » 04 Jan 2021, 18:24

What does "light switching" do?
I just love the DOPE-amine you get after completing a plugin!
User avatar
Kulche
Inhabitant of a Continent
Reactions:
Posts: 1194
Joined: 07 Jun 2017, 18:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Night Animations

Post by Kulche » 04 Jan 2021, 18:27

Imran M wrote: 04 Jan 2021, 18:24 What does "light switching" do?
I wrote: ...which will make it appear at night only.
get yoked!!
User avatar
Imran M
Inhabitant of a Country
Reactions:
Posts: 832
Joined: 24 Oct 2018, 11:41
Plugins: Showcase Store

Plugin Creator

Platform

Re: Night Animations

Post by Imran M » 04 Jan 2021, 18:54

Kulche wrote: 04 Jan 2021, 18:27
Imran M wrote: 04 Jan 2021, 18:24 What does "light switching" do?
I wrote: ...which will make it appear at night only.
Thanks!
I just love the DOPE-amine you get after completing a plugin!
User avatar
Imran M
Inhabitant of a Country
Reactions:
Posts: 832
Joined: 24 Oct 2018, 11:41
Plugins: Showcase Store

Plugin Creator

Platform

Re: Night Animations

Post by Imran M » 04 Jan 2021, 19:09

Kulche wrote: 04 Jan 2021, 18:27
Imran M wrote: 04 Jan 2021, 18:24 What does "light switching" do?
I wrote: ...which will make it appear at night only.
me.png
You do not have the required permissions to view the files attached to this post.
I just love the DOPE-amine you get after completing a plugin!
Lalulali
Settler
Reactions:
Posts: 5
Joined: 28 Dec 2020, 07:07

Platform

Re: Night Animations

Post by Lalulali » 07 Mar 2021, 10:40

could some one help me, what is wrong with my way to define .json file

Code: Select all    Reset

[ { "id":"Lampu001", "type":"animation", "frames":[{"bmp": "Lampu 1.png"}], "light": true, "light switching": true }, { "id":"Lampu002", "type":"animation", "frames":[{"bmp": "Lampu 2.png"}], "light": true, "light switching": true }, { "id": "$HuResTp1", "type": "residential", "author": "lalulali", "width": 1, "height": 1, "frames": [{"bmp": "Human Res 1.png"}], "animation": {"id":"Lampu001", "x": 20, "y": -2}, {"id":"Lampu001", "x": 20, "y": -6}, {"id":"Lampu001", "x": 20, "y": -10}, {"id":"Lampu002", "x": 7, "y": -4} "level": 1, "people": 6, "title": "Human Residence", "text": "Human Residence Type 1 For Poor People", "price": 10, "bulldoze price": 15, "build time": 5 } ]
JSON checker
Check
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Night Animations

Post by CommanderABab » 07 Mar 2021, 11:04

Code: Select all

[
    {
	"id":"Lampu001",
	"type":"animation",
	"frames":[{"bmp": "Lampu 1.png"}],
	"light": true,
	"light switching": true
    },
    {
	"id":"Lampu002",
	"type":"animation",
	"frames":[{"bmp": "Lampu 2.png"}],
	"light": true,
	"light switching": true
    },
    {
        "id": "$HuResTp1",
        "type": "residential",
        "author": "lalulali",
        "width": 1,
        "height": 1,
        "frames": [{"bmp": "Human Res 1.png"}],
	"animation":	[{"id":"Lampu001", "x": 20, "y": -2},
			{"id":"Lampu001", "x": 20, "y": -6},
			{"id":"Lampu001", "x": 20, "y": -10},
			{"id":"Lampu002", "x": 7, "y": -4}],
        "level": 1,
        "people": 6,
        "title": "Human Residence",
        "text": "Human Residence Type 1 For Poor People",
        "price": 10,
        "bulldoze price": 15,
        "build time": 5
    }
]

Code: Select all    Reset

[ { "id":"Lampu001", "type":"animation", "frames":[{"bmp": "Lampu 1.png"}], "light": true, "light switching": true }, { "id":"Lampu002", "type":"animation", "frames":[{"bmp": "Lampu 2.png"}], "light": true, "light switching": true }, { "id": "$HuResTp1", "type": "residential", "author": "lalulali", "width": 1, "height": 1, "frames": [{"bmp": "Human Res 1.png"}], "animation": [{"id":"Lampu001", "x": 20, "y": -2}, {"id":"Lampu001", "x": 20, "y": -6}, {"id":"Lampu001", "x": 20, "y": -10}, {"id":"Lampu002", "x": 7, "y": -4}], "level": 1, "people": 6, "title": "Human Residence", "text": "Human Residence Type 1 For Poor People", "price": 10, "bulldoze price": 15, "build time": 5 } ]
JSON checker
Check
You forgot [] around the "animation": ids in $HuResTp1.
my avatar:
Lalulali
Settler
Reactions:
Posts: 5
Joined: 28 Dec 2020, 07:07

Platform

Re: Night Animations

Post by Lalulali » 07 Mar 2021, 12:40

finally, i can sleep now, for 2 days straight i think about it and now it solved, thanks
User avatar
ajimaul
Villager
Reactions:
Posts: 24
Joined: 27 Jan 2021, 13:28
Location: Indonesis
Plugins: Showcase Store

Plugin Creator

Platform

Re: Night Animations

Post by ajimaul » 07 Mar 2021, 16:08

Lalulali wrote: 07 Mar 2021, 12:40 finally, i can sleep now, for 2 days straight i think about it and now it solved, thanks
Hahahaha jangan kebanyakan ngopi biar bisa tidur bro :space
:android :calc :json newbie
User avatar
JohnSallow
Townsman
Reactions:
Posts: 64
Joined: 29 Jan 2020, 16:45
Location: Buenos Aires, Argentina
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Night Animations

Post by JohnSallow » 13 Mar 2021, 02:50

Can I make a rotation-awared building have a single animation array?
E.g.:

Code: Select all

[
{
"id":"$nightanim_test",
"type":"animation",
"frames":[{"bmp":"test.png","w":32,"count":4}],
"light":true,
"light switching":true
},
{
. . .
"rotation aware":true,
"animation":[{"id":"$nightanim_test"}],
. . .
}
]
As I won't be online on TheoTown anymore, you can freely use my plugins' database if you want to, they are all of them uploaded in this forum, just remember to gime me credits before ;)
For any doubts, don't hesitate in sending me a Discord DM: johnsallow
User avatar
Kulche
Inhabitant of a Continent
Reactions:
Posts: 1194
Joined: 07 Jun 2017, 18:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Night Animations

Post by Kulche » 13 Mar 2021, 06:54

Yes, that animation will be applied to all frames.
get yoked!!
User avatar
ajimaul
Villager
Reactions:
Posts: 24
Joined: 27 Jan 2021, 13:28
Location: Indonesis
Plugins: Showcase Store

Plugin Creator

Platform

Re: Night Animations

Post by ajimaul » 22 Mar 2021, 10:10

please ... can you tell me what is the color code for transparency at night like this
Evaod_21-03-22_17.07.32.png
You do not have the required permissions to view the files attached to this post.
:android :calc :json newbie
User avatar
Kulche
Inhabitant of a Continent
Reactions:
Posts: 1194
Joined: 07 Jun 2017, 18:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Night Animations

Post by Kulche » 22 Mar 2021, 10:21

That's just a normal animation. It's a part of a building cut out.
get yoked!!
User avatar
ajimaul
Villager
Reactions:
Posts: 24
Joined: 27 Jan 2021, 13:28
Location: Indonesis
Plugins: Showcase Store

Plugin Creator

Platform

Re: Night Animations

Post by ajimaul » 23 Mar 2021, 14:01

Kulche wrote: 22 Mar 2021, 10:21 That's just a normal animation. It's a part of a building cut out.
ahh tanks for your info sir...
:android :calc :json newbie
User avatar
A dutch Guy
Inhabitant of a Megacity
Reactions:
Posts: 174
Joined: 26 Dec 2017, 12:41
Location: The Netherlands
Plugins: Showcase Store

Plugin Creator

Platform

Re: Night Animations

Post by A dutch Guy » 12 Apr 2021, 08:25

Is it possible to set night animations for each frame of a building? I wanted to add night animations to a building with a left and right facing variant with rotation awareness.
User avatar
Bearbear76
Inhabitant of a Multiverse
Reactions:
Posts: 5701
Joined: 10 Feb 2017, 12:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: Night Animations

Post by Bearbear76 » 12 Apr 2021, 09:06

A dutch Guy wrote: 12 Apr 2021, 08:25 Is it possible to set night animations for each frame of a building? I wanted to add night animations to a building with a left and right facing variant with rotation awareness.
I'm not an expert but try adding this in the night animation.

Code: Select all

"frames":[x] // x is the frame number (starts from 0)
Just my opinion
retired
User avatar
Kulche
Inhabitant of a Continent
Reactions:
Posts: 1194
Joined: 07 Jun 2017, 18:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Night Animations

Post by Kulche » 12 Apr 2021, 10:11

Might work, but I would recommend adding eg. "frame": 0 in your animation objects. This way, the animation will be applied to first frame only.
get yoked!!
Designer Anthony
Reactions:

Re: Night Animations

Post by Designer Anthony » 29 Apr 2021, 14:44

How am I supposed to save plugin space by animation? I don’t know how to do this. Tell me how. Thanks.
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Night Animations

Post by CommanderABab » 29 Apr 2021, 16:02

You may study this plugin.

viewtopic.php?p=21614#p21614

It draws a base from one png, then multiple static floors with an elevator animation on each level from two other pngs, then a roof from a fourth png.
my avatar:
Sharizal zul
Small-town resident
Reactions:
Posts: 28
Joined: 17 Jun 2021, 15:33
Plugins: Showcase Store
Version: Beta

Re: Night Animations

Post by Sharizal zul » 18 Jun 2021, 17:15

How to get the night picture that already I edited.