Page 1 of 1

[0.16.51] trivial-smoke ignores "affected_by_wind_setting"

Posted: Thu Dec 27, 2018 12:17 am
by Muppet9010
The trivial-smoke seems to be affected by wind regardless of the "afffected_by_wind" data prototype attribute being set to false.

With the below code in data.lua

Code: Select all

data:extend({
	{
		type = "trivial-smoke",
		name = "wheel-sparks",
		animation = {
			filename = "__base__/graphics/entity/sparks/sparks-01.png",
			width = 39,
			height = 34,
			frame_count = 19,
			line_length = 19,
			shift = {-0.109375, 0.3125},
			tint = { r = 1.0, g = 0.9, b = 0.0, a = 1.0 },
			animation_speed = 0.3
		},
		duration = 19,
		affected_by_wind = false,
		show_when_smoke_off = true,
		render_layer = "air-entity-info-icon"
	}
})
When you then create this trivial smoke the animation moves off centre in random directions that appear to be the wind direction.

Code: Select all

/c game.player.surface.create_trivial_smoke{name="wheel-sparks", position = {-2, -2}}

Re: [0.16.51] trivial-smoke ignores "affected_by_wind_setting"

Posted: Thu Dec 27, 2018 1:44 am
by Rseding91
Thanks for the report however the smoke correctly respects the wind boolean. If you're having problems with it's animation it's not wind related.

I'm going to move this to modding help.

Re: [0.16.51] trivial-smoke ignores "affected_by_wind_setting"

Posted: Thu Dec 27, 2018 1:50 am
by Muppet9010
when i run the create trivial smoke command repeatedly manually via console I see the sparks animations drifting around. So first few times they may drift downwards on each animation run, then they drift down right, and later straight right. It feels like smoke drift.

Re: [0.16.51] trivial-smoke ignores "affected_by_wind_setting"

Posted: Thu Dec 27, 2018 7:31 am
by Rseding91
When smoke is set to not pay attention to wind it just drifts in a random direction. When it does pay attention to wind it drifts in a random direction effected by wind.

You can't make a smoke that doesn't drift in a random direction - that's part of the logic of how smoke works at the moment.

Re: [0.16.51] trivial-smoke ignores "affected_by_wind_setting"

Posted: Thu Dec 27, 2018 2:48 pm
by Klonan
If you want the smoke to not drift at all, set this in the prototype:

Code: Select all

movement_slow_down_factor = 1

Re: [0.16.51] trivial-smoke ignores "affected_by_wind_setting"

Posted: Thu Dec 27, 2018 7:54 pm
by Muppet9010
thanks, am using them as an in-game visual/animation only thing. As it looks like they are most suitable for this.