D.A.R.T


Save ammunition by smarter targeting

Content
16 days ago
2.0
1.26K
Factorio: Space Age Icon Space Age Mod
Combat Circuit network

g [Fixed] Bad reaction time

a month ago

The classification of an asteroid happens quick (red / green circle).
But when the ship travels fast, the command to enable a turret is just WAY to slow,
I've had multiple asteroids hit my ship, because the turrets where simply not enabled by dart in time.
I have a mixed setup of rocket turrets and normal ammo-turrets, removing the ammo-turrets from DART improved the situation a huge bit.
but even now the rocket turrets are too slow, I have to slow my ship down every few seconds to give the turrets enough time to actually fire.

a month ago

To be honest I've had the same impression sometimes. At the moment detection is running every 60 ticks and it needs 2 detection cycles to determine the course of an asteroid to make the decision whether the asteroid hits or not, so it takes at least 2 s (worst case nearly 3 s) to start defense.

Currently I am thinking about a way to improve that and I have two (vague) ideas
- releasing control over the turrets if there are too much asteroids approaching and let them work on their own
- reducing (automatically and temporarily) the throttle to reduce the speed of the platform to get more time for defense (that's what you're doing at the moment manuallyπŸ˜‰)

The first should be implemented easier, but has the disadvantage that much more ammo would be consumed.
For the second I am not sure whether it is even technically possible.

Any other ideas?

a month ago

Okay that explains the problem, 2-3 seconds at ~200 km/s can mean an impact before DART has even decided weather or not to intercept.
did you choose that 60 ticks timer for a specific performance reason, or just as a reasonably start-value?
plenty of other mods let the users change that "how often should the mod do something" value with a setting, would that be an option?
other than that I think the first idea from you would be an option worth trying.

a month ago

did you choose that 60 ticks timer for a specific performance reason, or just as a reasonably start-value?

Both 😏. I was/am in doubt, whether a higher frequency would be well-tolerated with the overall performance. And the second reason - it should also simulate the fact that radar scans always have a delay as they are directional - and I am a great fan of some realism in the game.

Will start implementing the first idea in the next days, so stay tuned ...

a month ago

okay the reason of being closer to realism I can understand. But then the range should be MUCH higher, that would a) be more realistic (radar can have an insane range) and b) would compensate the longer detection time.

a month ago

I've fiddled around a bit und increased the tick rate for the businessLogic from 60 to 15, this improves the targeting of the rocket turrets significant.
but the ammo-turrets still are not really usable, the tend to fire a single shot and then wait a moment (probably 15 ticks) then fire again a single shot.
but when you have busted 2-3 big asteroids and cracked them up in smaller chunks, there are 20-30 chunks flying against your turrets, no chance to shot them away with those delays.

-> I think you will need to implement your fix + increase the scan time (i don't feel any performance issues with 15 ticks)

a month ago

There are two additional possibilities, that could improve the behavior in the current version.

  • Are you using higher qualities yet? Max detection/defense range of a dart-radar are higher for higher levels of quality.
  • Do you use different - in best case unique - signals for each turret? If not, please change it.

In the meantime I'll have a deeper look at the decision logic, but this will take some time.

a month ago

Yes I'm currently running on epic scanners, but they have more or less the same range then my rare-rocket turrets, that's why I said the range is way too small.
With quality it gets even worse. since the range on turrets rises up further then the radars.
When i tried your mod the first time, a few months ago, I used the same signal for all turrets (that didn't work at all for me),
so this time I used the new auto-feature. that assigned different signals for each turret.

a month ago

I've definitely noticed the issue with turret retargeting as well. Turrets that could instantly delete a swarm of asteroids instead shoot them one by one, leading to way less than satisfactory results. Would it be possible to add in a config that makes it so the defense area enables all contained asteroids as valid targets?

a month ago

One of the ideas mentioned above was to release control over the turrets, if there are too much asteroids approaching and let the turrets do their work on their own. This and an increase of the range - I am currently investigating how to implement some additional research (including an infinite one), that offer this - should improve the defense. Despite that I'll look at the decision logic too.

a month ago

@SunBlaze86, @Akujialex

Could you please tell me which types of turrets you're using and to which mod they belong. I want to make the improved ranges more suitable for them - at the moment the range is much too close to the simple vanilla gun-turret 😏.

Thx

a month ago
(updated a month ago)

I am using Quality+ with Vanilla and Modular Turrets. Most turrets are of the Legendary+ quality, unless I want their range to be lower.
Also: I'm pretty sure it doesn't have anything to do with your mod, but do you know anything about a mod/bug that makes it so that turrets specifically ignore oxide asteroids? I've been having a lot of problems with that recently.

a month ago

Also: I'm pretty sure it doesn't have anything to do with your mod, but do you know anything about a mod/bug that makes it so that turrets specifically ignore oxide asteroids? I've been having a lot of problems with that recently.

The only thing that comes to mind is the possibility of excluding certain target types in the turrets.

a month ago

I'm worried that it might have to do with the other asteroid types added by some of the planet mods, but idk

a month ago

@SunBlaze86, @Akujialex

Could you please tell me which types of turrets you're using and to which mod they belong. I want to make the improved ranges more suitable for them - at the moment the range is much too close to the simple vanilla gun-turret 😏.

Thx

I'm just using vanilla Turrets. (normal to epic quality) ammo-turrets and rocket turrets.

27 days ago

Think I've just found (and fixed) this annoying bug that caused the unwanted pauses. Will publish this and the two other changes mentioned in the next days. Need to make still some finalizations.

24 days ago

V 1.2.0 is online, that should fix the bad reaction time and the other points discussed earlier.

24 days ago

Hi,
first of all I wanna say thank you as this has improved the mod tremendously! now I can really set all my turrets to be controlled by DART :)
Asteroid are now marked as targets long before they come into reach of the turrets, so the rocket turrerts handle them good now.
but the ammo-turrets are still taking quite some time to start to actually shoot.
I've took a screenshot so you can see what I mean: https://snipboard.io/n26I0Z.jpg (hope this works, never used that before^^)
The asteroid moves that far into the range of the turret, before it starts firing.
(even though it has been marked as a target since a very long time thanks to the better radar range)

24 days ago
(updated 24 days ago)

I'm happy to hear, that the improvements and the bug fixes helped you.

Looking at your image gives me an idea what's happening - but unfortunately not why πŸ˜‰.

I have two ideas, what could be wrong:

  • I've seen that you have set target priorities in the turrets - haven't used that before and it might be interfering with D.A.R.T.
  • While I was looking for that nasty "pause-the-turrets-bug", I recognized that I have not previously considered that some turrets have additional restrictions (a minimum range or reduced firing angles)

Which of these possibilities (or another not yet known) is responsible is hard to say without a deeper analysis. For that it would help me lot
if you could share your save file.

(even though it has been marked as a target since a very long time thanks to the better radar range)

P.S.: The red mark only means asteroid is probably hitting the platform and will be attacked - not asteroid is targeted by any turret

23 days ago

Yes I have, to make sure the rocket turrets only fire at big asteroids, while the ammo-turrets only fire at small and medium ones
(to get the most effective ammo per target)
My save file:
https://1drv.ms/f/c/e3d4db726ef52703/EmgNAiBmLeJLsDmnHuT1hvoBbStVtLynhjip7ero17FPDw?e=GK6iTf
the Ships: "Starship 2" and "Nauvis <-(Gleba)-> Aquilo use DART systems, the others are not updated yet ;)

23 days ago

Thx. Will have a look at it tomorrow - now it's time to 😴

23 days ago

Just an Idea on the possible reason, does the calculation for the turret not include the turret quality?
I've just held an default-quality turret over my rare turrets, so I could see the normal range
and that seems to be exactly the range where the turrets start to fire.

23 days ago

Yes - you're absolutely right. The range is taken from the prototype of the turret (haven't found no other source for this information yet) and this has only the range for normal quality - at least AFAIK.

This ... API sometimes is driving me nuts - especially when I am thinking about other mods introducing new turrets or qualities with potentially different factors for increased quality.

23 days ago
(updated 23 days ago)

.

23 days ago

At least you now know why this is happening :)
Sadly I know Sh*t about API and LUA code otherwise I would try to help :/

I hope you find a way to get the range from the actual turrets without to much work.


Regarding the prioritization: do you think it would be possible to include this?
-> My rocket turrets are always targeting asteroids that would not hit the ship (marked with a green circle).
I guess that's because they get activated by dart, because a medium asteroid is in their range.

23 days ago
(updated 23 days ago)

Hhmm - sounds a bit like D.A.R.T. 2 πŸ˜† - but shouldn't be impossible - as long as it's possible to read out the target priorities settings of the turrets. At the moment every (hitting) asteroid in range of a turret will be assigned as target - nearest first. If this is destroyed the next of the remaining is assigned - always regardless of their size, the only criteria is their distance to a certain turret.

So - now there are three goals to achieve:
- using additional restrictions (minimum range or reduced firing angles) when choosing turrets
- calculate range of turrets depending on their quality (fun question - does quality also influence minimum range or reduced firing angles?)
- recognize priority setting in the turrets

23 days ago

Sounds like a lot of work :/

regarding your (fun) question: I've tried a few turrets in different qualities:
only max-range is changed with quality, firing angle and minimum range stay the same.
(but I'm not sure if mod turrets might behave differently)

23 days ago

Sounds like a lot of work :/

Yes - indeed 😏

regarding your (fun) question: I've tried a few turrets in different qualities:
only max-range is changed with quality, firing angle and minimum range stay the same.
(but I'm not sure if mod turrets might behave differently)

Thx - that saves me looking myself.

22 days ago

Hallelujah - there is light on the end of the (quality-)tunnel (and it's not the oncoming train).

Between https://lua-api.factorio.com/2.0.42/prototypes/QualityPrototype.html and
https://lua-api.factorio.com/latest/prototypes/QualityPrototype.html (former is the API I've started with when developing this mod) are huge differences - the actual version contains the solution for the range problem - a field field named range_multiplier. Obviously there was some progress in the API that I didn't know yet, but fortunately I've found this post in forum

22 days ago

That is really good news :)

16 days ago

V 1.2.4. (not 2.0.0 πŸ˜‰) is online including all three improvements for targeting asteroids.

15 days ago

Just updated and made a few test flights.
Now we're talking! Now this makes a hell of a difference, I'm using about 50% less rockets.
while previously my ship had to make a 5-10min stop around Aquilo to restock on rockets before it could return, the break is now 1-2min.

There are still a few rockets targeting asteroids that would not hit this ship sometimes,
but this only happens when the same turret has also a asteroid in range that will hit the ship, so I guess that's inevitable.

Great work! A big thank you, I don't think I would like to play space age without your mod anymore :)

15 days ago
(updated 15 days ago)

Just updated and made a few test flights.
Now we're talking! Now this makes a hell of a difference, I'm using about 50% less rockets.
while previously my ship had to make a 5-10min stop around Aquilo to restock on rockets before it could return, the break is now 1-2min.

I'm glad to read that the changes are so beneficial to you.

There are still a few rockets targeting asteroids that would not hit this ship sometimes,
but this only happens when the same turret has also a asteroid in range that will hit the ship, so I guess that's inevitable.

I've already seen that too. Unfortunately I wasn't able to figure out for sure, what is happening. It looks a bit like that the game engine makes additional assigns of targets to turrets and if this happens while the turret still is activated it fires at this target. Can't avoid that because the API doesn't allow to reset such a target (with nil), only non nil targets are allowed. The only idea I had so far is to assign a dummy target - that should be out of range to prevent firing - but that that needs some investigations to make it work - even if it's possible at all.

This thread has been locked.