night animation problem

Plugin specific problems will be solved here.

Moderator: Plugin Moderators

User avatar
ur_sc4_guy
Metropolitan
Reactions:
Posts: 135
Joined: 16 Jun 2022, 20:01
Location: Any ambanivohitra any e, Madagascar
Plugins: Showcase Store

Plugin Creator

Platform

night animation problem

#1

Post by ur_sc4_guy »

I've made a building with 4 subvariants which holds different night animations.The building was not supposed to be rotation-aware. But for some reason it is not working. Here's the code:

Code: Select all

[
	{
		"id":"SomeSC4Fan.TranoGasy.Zone",
		"title":"Trano Gasy",
		"text":"For Malagasy-Themed towns. Or maybe not ?",
		"type":"zone",
		"author":"Some SC4 Fan",
		"rci":true,
		"separator":true,
		"base":"$zoneresidential",
		"frames":[{"bmp":"Frame.png"}],
		"preview frames":[{"bmp":"Preview Frame.png"}],
		"price":30,
		"superior to base":true,
		"placeable":true,
		"persistent":true
	},
	{
		"id":"SomeSC4Fan.TranoGasy.1x1_I.night",
		"type":"animation",
		"frames":[{"bmp":"1x1_I_night.png"}],
		"light":true,
		"light switching":true
	},
	{
		"id":"SomeSC4Fan.TranoGasy.1x1_I",
		"type":"residential",
		"zone":"SomeSC4Fan.TranoGasy.Zone",
		"author":"Some SC4 Fan",
		"frames":[{"bmp":"1x1_I.png","w":32,"count":4}],
		"habitants":11,
		"width":1,
		"height":1,
		"draw ground":true,
		"animation":[{"id":"SomeSC4Fan.TranoGasy.1x1_I.night","y":-24}], 
		"influence culture":1
	}
]
... And there's the result.
Screenshot_20221031-114954.jpg
The night animation of the 3 other subvariants are "stuck" with the building's respective one. What's the problem here?
Thanks in advance.

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: night animation problem

#2

Post by Bearbear76 »

I'm not 100% sure this will work but try adding something like this to the animation frames:

Code: Select all

"frames": [{"bmp": "1x1_I_night.png", "w": <number>, "count": 4}],

User avatar
ur_sc4_guy
Metropolitan
Reactions:
Posts: 135
Joined: 16 Jun 2022, 20:01
Location: Any ambanivohitra any e, Madagascar
Plugins: Showcase Store

Plugin Creator

Platform

Re: night animation problem

#3

Post by ur_sc4_guy »

sorry to deceive you, but it didn't work. Now the night animations are flushing.

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

Plugin Creator

Platform

Re: night animation problem

#4

Post by Kulche »

You can't create night animation 'variants' without using lua as far as I'm aware. Try separating the png into windows and define them as separate drafts.

User avatar
ur_sc4_guy
Metropolitan
Reactions:
Posts: 135
Joined: 16 Jun 2022, 20:01
Location: Any ambanivohitra any e, Madagascar
Plugins: Showcase Store

Plugin Creator

Platform

Re: night animation problem

#5

Post by ur_sc4_guy »

Kulche wrote:
01 Nov 2022, 19:18
You can't create night animation 'variants' without using lua as far as I'm aware. Try separating the png into windows and define them as separate drafts.
I did as you said. Thanks. It worked.

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: night animation problem

#6

Post by Bearbear76 »

Some SC4 Fan wrote:
01 Nov 2022, 18:46
sorry to deceive you, but it didn't work. Now the night animations are flushing.
Yeah, that's kind of what I thought was going to happen. :lol:

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

Plugin Creator

Platform

Re: night animation problem

#7

Post by CommanderABab »

Code: Select all

[
	{
		"id":"SomeSC4Fan.TranoGasy.Zone",
		"title":"Trano Gasy",
		"text":"For Malagasy-Themed towns. Or maybe not ?",
		"type":"zone",
		"author":"Some SC4 Fan",
		"rci":true,
		"separator":true,
		"base":"$zoneresidential",
		"frames":[{"bmp":"Frame.png"}],
		"preview frames":[{"bmp":"Preview Frame.png"}],
		"price":30,
		"superior to base":true,
		"placeable":true,
		"persistent":true
	},
	{
		"id":"SomeSC4Fan.TranoGasy.1x1_I.night",
		"type":"animation",
		"frames":[{"bmp":"1x1_I_night.png","w":32,"count":4}],
		"rotation aware": true,
		"light":true,
		"light switching":true
	},
	{
		"id":"SomeSC4Fan.TranoGasy.1x1_I",
		"type":"residential",
		"zone":"SomeSC4Fan.TranoGasy.Zone",
		"author":"Some SC4 Fan",
		"frames":[{"bmp":"1x1_I.png","w":32,"count":4}],
		"habitants":11,
		"width":1,
		"height":1,
		"rotation aware": true,
		"draw ground":true,
		"animation":[{"id":"SomeSC4Fan.TranoGasy.1x1_I.night","y":-24}], 
		"influence culture":1
	}
]

Post Reply Previous topicNext topic

Return to “Problems”