Page 2 of 3

Re: Night Animations

Posted: Wed Jun 24, 2020 21:04
by KINGTUT10101
Is there a way to add a probability that certain lights will be on/off?

Re: Night Animations

Posted: Wed Jun 24, 2020 21:20
by Imran M
KINGTUT10101 wrote:
Wed Jun 24, 2020 21:04
Is there a way to add a probability that certain lights will be on/off?
Probably fun, maybe check animation control, or random fun, as well as rnd. Those could be what you need.

Re: Night Animations

Posted: Wed Jun 24, 2020 22:44
by MONTEMARINO
KINGTUT10101 wrote:
Wed Jun 24, 2020 21:04
Is there a way to add a probability that certain lights will be on/off?
Yes. Ask @Carlão da massa, he added a random animation on his Allianz Parque Stadium. Lights shoud be the same... :bt

Re: Night Animations

Posted: Thu Jun 25, 2020 19:36
by Carlão da massa
For the stadium I just put a date factor for the animation ("date": {"start day": 0, "days": 7, "days total": 30}) it is simply a periodic animation.

Re: Night Animations

Posted: Thu Jun 25, 2020 21:44
by KINGTUT10101
That's a bit disappointing. Thanks for the response though. I would implement that idea into my plug-in, but I don't want to redefine all of the light animations to do it tbh. Maybe a developer could add it in the future.

Re: Night Animations

Posted: Fri Jun 26, 2020 15:42
by TheFennekin
Noob question, how do you add a custom night animation?

Re: Night Animations

Posted: Fri Jun 26, 2020 16:06
by Kulche
See custom animation tutorial :)

Re: Night Animations

Posted: Sat Jun 27, 2020 4:48
by KINGTUT10101
Is there a way we could easily change the color of these lights? I think having white or light blue versions available would be really nice.

Re: Night Animations

Posted: Sat Jun 27, 2020 6:57
by Kulche
I could recolor all the lights white and use "color" in animation def and add blue variants. There is no easy way of changing colors without adding new animations.

Re: Night Animations

Posted: Sun Jun 28, 2020 13:07
by Kulche
Since the latest versionIn a future version (that will be 1.8.90) a new attribute can be used. It is called

Code: Select all

"night light probability":0.9
It can be used in animation definition. With the code above, the light has a 90% probability of spawning. It can be used to create more diversity of lights on the same buildings.
 /\_/\
( o.o )
 > ^ <

Re: Night Animations

Posted: Sun Jun 28, 2020 15:26
by Lobby
That upcoming version will also support color within animation spot definitions instead of only within the animation draft definitions.

Could look like that:
Party hard
Party hard
image.png (16.51 KiB) Viewed 2011 times
You can either specify a color directly within a color object (like "color":{r:...}) or provide an id of a color that was defined before:

Code: Select all

[
  {
    "id": "$simpletestcolor00",
    "type": "color",
    "r": 0,
    "g": 255,
    "b": 0
  },
  {
    "id":"$comhotel00",
    "type":"commercial",
    "animation": [
      {"id": "$anim_comhotel00_elevator00"},
      {"id":"4x2_side", "x":9, "y":-47,"color": {"r": 255,"g": 0,"b": 0}},
      {"id":"4x2_side", "x":9, "y":-57,"color": "$simpletestcolor00"},
      ...
    ],
    ...
  }
]
 _._     _,-'""`-._
(,-.`._,'(       |\`-/|
    `-.-' \ )-`( , o o)
          `-    \`_`"'-

Re: Night Animations

Posted: Sat Aug 08, 2020 15:07
by Lobby
Kulche wrote:
Sun Jun 28, 2020 13:07
Since the latest versionIn a future version (that will be 1.8.90) a new attribute can be used. It is called

Code: Select all

"night light probability":0.9
Another option is to use

Code: Select all

"animation night light probability": 0.9
in the building which would apply a night light probability for all lights of the building (independently, mainly used for convenience).

Re: Night Animations

Posted: Tue Aug 11, 2020 7:26
by Alparingitlgnd5
Where to put this code "animation":[{"id":"1x2l", "x":9, "y":-5}] and "animation":[{"id":"1x2", "x":9, "y":-5}, {"id":"1x2", "x":23, "y":-2}] this one? also this one [{"id":"1x2", "x":16, "y":-7, "frame":0}, {"id":"1x2", "x":12, "y":-1, "frame":1}] where do I put these ones even this "light":true/false, and this "light switching":true/false sorry for my question.

Re: Night Animations

Posted: Tue Aug 11, 2020 7:35
by Kulche
All the "animation" codes go into your building definition. The "light" ones go into your animation definition, along with custom frames and such.

Re: Night Animations

Posted: Wed Aug 12, 2020 20:54
by TTFercho
Alparingitlgnd5 wrote:
Tue Aug 11, 2020 7:26
Where to put this code "animation":[{"id":"1x2l", "x":9, "y":-5}] and "animation":[{"id":"1x2", "x":9, "y":-5}, {"id":"1x2", "x":23, "y":-2}] this one? also this one [{"id":"1x2", "x":16, "y":-7, "frame":0}, {"id":"1x2", "x":12, "y":-1, "frame":1}] where do I put these ones even this "light":true/false, and this "light switching":true/false sorry for my question.
answering your question I think the order does not matter I would put the code down to the bottom of the json

Re: Night Animations

Posted: Wed Aug 12, 2020 21:00
by TTFercho
Kulche wrote:
Tue Aug 11, 2020 7:35
All the "animation" codes go into your building definition. The "light" ones go into your animation definition, along with custom frames and such.
Kulche do you know of any mobile app that allows me to see the coordinates of the windows or how can I know it? I use pixel studio to make my plugins, please answer me.

Re: Night Animations

Posted: Wed Aug 12, 2020 21:52
by Kulche
I don't use Android so I don't know any apps that show coordinates. Maybe you could try Pixly but I'm not sure about it. I recommend getting paint.net on a desktop as it's far more convenient.

Re: Night Animations

Posted: Wed Aug 12, 2020 22:02
by TTFercho
Kulche wrote:
Wed Aug 12, 2020 21:52
I don't use Android so I don't know any apps that show coordinates. Maybe you could try Pixly but I'm not sure about it. I recommend getting paint.net on a desktop as it's far more convenient.
and I have to write the exact coordinates of the window or those of the pivot point?

Re: Night Animations

Posted: Thu Aug 13, 2020 7:12
by Kulche
You have to define the red points, otherwise the windows will be misaligned

Re: Night Animations

Posted: Tue Oct 27, 2020 13:23
by ian`
Light seed documentation, please. :teach