Page 1 of 1

[2.0.72] Destroying decals with "destroy-decoratives" trigger effect, destroys the decals, but keeps rendering them.

Posted: Wed Dec 03, 2025 4:30 pm
by DonBoobleone
Context:
Made a Grenade with this effect:
{
type = "destroy-decoratives",
radius = 10,
from_render_layer = "decals",
to_render_layer = "decals",
include_soft_decoratives = false,
include_decals = true,
invoke_decorative_trigger = true,
decoratives_with_trigger_only = false,
repeat_count = 10000,
probability = 1
}


If repeat_count is low, it will not destroy all decorative-decals in the explosion radius, even this high, it can miss some.

Before tossing the grenade I check the decals around me with:
/c local p=game.player.position local a={{p.x-4,p.y-4},{p.x+4,p.y+4}} local decals=game.player.surface.find_decoratives_filtered{area=a,from_layer="decals",to_layer="decals"} local names={} for _,decal in pairs(decals) do local n=decal.decorative and decal.decorative.name or "NIL" if n then names[n]=true end end local keylist={} for name in pairs(names) do table.insert(keylist,name) end local out=table.concat(keylist,", ") game.print("Decal names ("..#decals.."): "..out)

Tossing 1 or more zen-grenades and rechecking the decals to confirm all of them are destroyed

The decals will be visible until:
- game is saved and reloaded
- an artificial tile like concrete is placed in the area.

- Tried other effects to trigger cleanup, like "damage-tile", create-smoke, invoke-tile trigger, but without success.

Using this command, the decals will be cleared without problems, and also they won't be rendered anymore: (Note, all decals will be destroyed consistently vs trigger effect which is inconsistent)
/c local p=game.player.position local a={{p.x-4,p.y-4},{p.x+4,p.y+4}} game.player.surface.destroy_decoratives{area=a, from_layer="decals", to_layer="decals", exclude_soft=true}

Video: https://youtu.be/SZd_ro4fk9w

Note for save file: Zen-grenade code exist in Zen-garden 4.2 (current live version) but require is commented out in datal.lua (will be released in 4.3)

Re: [2.0.72] Destroying decals with "destroy-decoratives" trigger effect, destroys the decals, but keeps rendering them.

Posted: Thu Dec 04, 2025 2:19 pm
by Rseding91
Thanks for the report. This is now fixed for 2.1.

Also, repeat_count of 10000 is a little crazy given 9999 of them are doing nothing.

Re: [2.0.72] Destroying decals with "destroy-decoratives" trigger effect, destroys the decals, but keeps rendering them.

Posted: Thu Dec 04, 2025 11:44 pm
by DonBoobleone
Hi,

2.1, nice!

PS: I increased the repeat count during testing since some times with low repeat count, no decals were destroyed even when throwing the grenade directly on it.
At one test it took 20+ grenade with repeat count = 1, area = 6.5 to destroy 4 decals on top of each other (4x sand-dune).