I'll split this into two requests.
1. Before the 2.0.33 segmented-unit optimisation, I was able to trigger targeted demolisher attacks by having the desired target periodically "hit" them using the entity.damage command. Unfortunately, demolishers do not "activate" even when taking damage.
Could this be changed? Or could someone let me know the most practical method available for jump starting their simulated behaviour without player interaction?
2. I understand the need for optimisation but I feel that the simulation distance limit at which demolishers no longer circle their territories is very small. Before 2.0.33, I was triggering the attacks based on pollution but now, even when the pollution cloud expands onto and past the worm's head, it stays frozen. Manually spawning pollution on it seems to get it moving for a few seconds but no more. Ideally, I'd like demolishers with pollution in their territory to spend some time in it.
Could I get some more clarity into the specifics of this system so that I may work around it? And/or would it be possible to expose some control over this distance/system via the modding API?
I would love to have more control but I could get by if either/both damage and pollution prevented the simulation from being disabled/woke them back up. These should not affect unmodded players as Vulcanus does not have pollution by default.
This has been my most highly requested Space Age mod so I would love to have a way to make it work again, thank you!
More control over the demolisher simulation mechanic
Re: More control over the demolisher simulation mechanic
Possibly related to viewtopic.php?t=128104
-
- Factorio Staff
- Posts: 217
- Joined: Fri Dec 07, 2018 3:41 pm
- Contact:
Re: More control over the demolisher simulation mechanic
I agree, overriding these SegmentedUnit optimizations will be a necessary inclusion for any demolisher API.
As for other parts of your request, I suspect there might be a few bugs with demolishers going to sleep too eagerly / not waking up when they are supposed to. I am presently looking into this with 128104, and will also look at how pollution affects them while I'm in there.
As for other parts of your request, I suspect there might be a few bugs with demolishers going to sleep too eagerly / not waking up when they are supposed to. I am presently looking into this with 128104, and will also look at how pollution affects them while I'm in there.
Re: More control over the demolisher simulation mechanic
Really happy to hear you're looking into it!
Thought I should update the thread with the solution I personally found.
Creating a capsule like this with the smoke enabled on top of it will wake it up:
I'm also very excited for that API! It would be great to have a readonly property on a segment of the entity that points to the head (when it exists).
Thought I should update the thread with the solution I personally found.
Creating a capsule like this with the smoke enabled on top of it will wake it up:
Code: Select all
local simulation_capsule = table.deepcopy(data.raw["projectile"]["slowdown-capsule"])
simulation_capsule.name = "new_name"
simulation_capsule.action = {{
type = "direct",
action_delivery = {
type = "instant",
},
}}
simulation_capsule.animation = nil
simulation_capsule.shadow = nil
-- simulation_capsule.smoke <-- Removing this breaks it
data:extend({simulation_capsule})