Night Animations

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Kulche
Inhabitant of a Country
Reactions:
Posts: 953
Joined: Wed Jun 07, 2017 20:28
Location: 2hot2tell
Plugins: Show
Version: Beta

Platform

Plugin Creator

Night Animations

#1

Post by Kulche » Sun Aug 25, 2019 13:10

I recommend looking here; viewtopic.php?f=41&p=152003#p152003, and at animations there: viewtopic.php?f=41&t=7455. Best results with help of paint.net.

Information
This requires Plugin Creator Tools by Lobby to see the effects.
image.png
Defining a light animation is basically a normal animation with some additions. They consist of

Code: Select all

"light":true/false
which will make the animation visible at night, and

Code: Select all

"light switching":true/false
which will make it appear at night only. Applies to animation definition.
Here's a table with current animations' IDs and pictures with it's pivot points marked:
LMAO_TUTORIAL4POTATAS.png
LMAO_TUTORIAL4POTATAS.png (3.81 KiB) Viewed 297 times
Step-by-step Tutorial
1. You should obviously choose a building first. We will use one of default buildings:
1.png
1.png (860 Bytes) Viewed 297 times
2. Now, choose window shapes which will you use and where. Mark pivot points with some visible color.
2.png
2.png (866 Bytes) Viewed 297 times
3. Draw a line across the frame at y=0. This will help you with defining coordinates.
3.png
3.png (826 Bytes) Viewed 297 times
4. Now, pick two visible colors and draw a line from the pivot point to the previous line. If you are using paint.net, length should be displayed at the bottom-left. This will be your y. In this case it's 5.
4.png
4.png (840 Bytes) Viewed 297 times
Protip: Y is negative (-) when above the black line, and positive (not +, just nothing) when below. So our Y will equal -5.

5. Time for X. Draw a line like this. The length is your X, here it's 9. It's always positive unless your window is in the left, outside the frame.
5.png
5.png (845 Bytes) Viewed 297 times
6. Coordinates should now be written in the animation code like this:

Code: Select all

"animation":[{"id":"1x2l", "x":9, "y":-5}]
For animation IDs and pictures look above. Enter the ID accordingly to the frame.

7. Repeat with other lights. Our complete code should look like that:

Code: Select all

...
"animation":[{"id":"1x2", "x":9, "y":-5}, {"id":"1x2", "x":23, "y":-2}]
Rotation Aware Buildings
In case your building is rotation aware or contains more than one frame, add "frame" to animation code like this:

Code: Select all

[{"id":"1x2", "x":16, "y":-7, "frame":0}, {"id":"1x2", "x":12, "y":-1, "frame":1}]
First light will apply to the first frame, and second - to the second frame.

Custom Animations
In case you want to add your own animations, the color for windows is FFF6BB, with glow of 50%. You may also like send me your own.

Please don't say a thing about IDs.

...pls enlarge the pics
I'm not lazy, I'm motivated to do nothing!
...blame lobby for that

Return to “Tutorials and Documentation”

Who is online

Users browsing this forum: No registered users and 3 guests