Stormworks: Build and Rescue

Stormworks: Build and Rescue

V2 Enhanced TWS Radar
82 Comments
SMITHY  [author] 17 Oct @ 8:55pm 
probably, the missiles are kinda dodgy though.
Aryan MrBeast 17 Oct @ 1:12pm 
hypothetically speaking would the VLS included work if launched sideways while wired to this radar?
SMITHY  [author] 1 Oct @ 10:11am 
@Ragoon it outputs x,y,z and ID for every target sequentially. Where y is up, ID is unique to the target and counts up from 1. Target will be assigned an ID when launch on, only selected tracks are outputted.
SMITHY  [author] 1 Oct @ 10:09am 
@twzb, you probs don't need to anymore with the gimbal update
Ragoon 29 Sep @ 7:13am 
tried to make my own missile 1x2 in width, also used the mc from sam launcher but replaced old radar with a single small radar.

The missile goes somewhat in the target direction but just spins wildly.
how does the system output the gps and elevation of the target via composite?

i use output XYZ and not STT
twzb.ttv 26 Sep @ 3:34pm 
how do i make my own radar rotate this quick in XML like what is the code you changed
SMITHY  [author] 20 Sep @ 1:15am 
Yeah, but you’d have to modify the code to output that. Right now it just outputs selected tracks.

To be honest you might be better off waiting for some of the other creators to release their own tws systems. My one was made pre-gimbal update so it won’t perform as well as some of the newer ones I’ve seen. I don’t think any of those are on the WS yet, but you could ask shyzero (his steam is in the comments here) if he’ll release his.
Mr. Simtimus 19 Sep @ 10:50pm 
I like the precision it gives. Is it possible to add an output for detected targets. It would be useful for feeding my RWR with found targets, and also I'm planning on making a MiG-29 detailed HUD, and space is the key there. Thank you for reading.
SMITHY  [author] 7 Sep @ 5:37pm 
Yeah all good, you could even upload if you wanted
SMITHY  [author] 20 Jun @ 3:54pm 
yeah, that should be very possible. Sadly I probably won't be able to add it atm. The code is online if you wanted to change it to everything, but keep in mind the code is extremely messy
Bluu 19 Jun @ 11:16am 
Would it be possible to have the radar output XYZ target locations of all the current targets tracked or make it have a filter to identify targets closing the distance above a specific speed and feed all the XYZ targeting information in order from most recent to least recent?
SMITHY  [author] 3 May @ 8:26pm 
Not with its current setup
Gangster Poopland 30 Apr @ 9:14am 
Is it possible to give it more radars? that way it tracks faster like an AESA radar
SMITHY  [author] 27 Apr @ 5:41pm 
Probably won’t be able to find the time for a while, but the code’s on GitHub if you want to take a crack at it
Palkia 27 Apr @ 10:40am 
Would you be able to add a B scope mode?
SMITHY  [author] 11 Apr @ 5:39pm 
I probably won’t be able to add more functionality for a while
SMITHY  [author] 11 Apr @ 5:38pm 
Should be a property option in the MC called like TSD or something
50°02'05.1"N 19°10'33.0"E 22 Mar @ 5:35pm 
also how do you change the time since detection is it the timeout option?
50°02'05.1"N 19°10'33.0"E 22 Mar @ 5:26pm 
when you have time could you add a option or something like that in the MC soo that instead of full-360 on the monitor its forward looking 180 degrees
SMITHY  [author] 22 Mar @ 4:03pm 
Adding a map shouldn't be too difficult, but I don't have time to work on this atm.
SMITHY  [author] 22 Mar @ 4:03pm 
It can work with any, but you'll have to change some things. For best performance, you'll have to xml edit the radar's rotation speed so it's faster (like x2 maybe). You'll also have change the time since detection property box in the MC.
50°02'05.1"N 19°10'33.0"E 22 Mar @ 12:35pm 
can this work with a basic radar or only the phalanax
am_fis 19 Mar @ 2:14pm 
Is there anyway to add the map background like you did on V1?
And thanks for the awesome stuff:steamhappy:
SMITHY  [author] 27 Feb @ 12:40pm 
X,y,z are outputted over 1,2,3 (y is up), in tws mode each tick a new target coordinate is shown. In STT mode only the most recently selected target is displayed. Channel 4 is used with tws mode, it essentially tells you which numbered missile should be using these coordinates.
Finoxy 27 Feb @ 11:23am 
Hey, could you add a more detailed output describtion? I would appreciate it!


Like if I want to provide the location of a target to a weapons system, do I need to make an "interposer" that takes in the input from the radar controller and then changes the channels around?

Awesome work!
SMITHY  [author] 9 Feb @ 6:28pm 
Yeah, but at some point the radar will start skipping over targets. Without changing radar speed you could increase gate size or process noise instead.
Lekhoi7819 9 Feb @ 1:47am 
If I increase the speed of the radar will it improve target acquisition? Because currently when facing targets that are supersonic missiles, the radar may have difficulty catching the target, it does not recognize it as a target but just a small dot.
thisissparta138 2 Feb @ 12:40pm 
it took a while to understand anything but using some AI and general knowledge i pieced this together, it still crashes but its a slight improvement,
SMITHY  [author] 1 Feb @ 9:03am 
Minified*
SMITHY  [author] 1 Feb @ 9:02am 
Damn are you working on the unified version of the code? No clue how you’re making heads or tails of it
thisissparta138 31 Jan @ 6:11pm 
i changed this part and it seems to resist lag a little more and work better, just need to make sure there is not excessive lag and it should work to an extent. not perfect but its an improvement. but this section of code is the main thing causing tick errors i think.

local MAX_RECURSION_DEPTH = 10
local recursionCounter = 0
local maxContactsPerTick = 5
local currentContactIndex = 1
function ar(N,E,ac)
if N>#p then
for a=1,ad do
if E[a]~=nil then
s[E[a]][a]=s[E[a]][a]+ac
end
end
ae=ae+ac
else
ar(N+1,E,ac*aG)
local contactsProcessed=0
for b9=1,#g[p[N]].G do
local O=g[p[N]].G[b9]
if O[2]~=0 and E[O[1]]==nil then
E[O[1]]=p[N]
ar(N+1,E,ac*(O[2]>0 and O[2]or aG))
E[O[1]]=nil
contactsProcessed=contactsProcessed+1
if contactsProcessed>=maxContactsPerTick then
break
end
end
end
end
end
SMITHY  [author] 28 Jan @ 6:58pm 
Probs broke something. There isn’t really any getting around the computational intensity for the normal jpdaf algorithm. Like just try finding the event hypothesis by hand it quickly gets to insanely high numbers. You could have a fail safe though like you mentioned with the max depth search.

There’s other versions of jpdaf I might try in the future. I’ve already tried suboptimal jpdaf and ad hoc jpdaf, but they both fail to stack up to normal jpdaf. There performance is a lot better though.
thisissparta138 28 Jan @ 5:04pm 
i have created a version of the script that does not have the tick error but in doing so i don't have the tracks on the radar video to click on to.
SMITHY  [author] 28 Jan @ 4:55pm 
Not a function, somewhere in the onTick() it multiplies the mouse position by the transpose of the rotation matrix to get the mouse position in 2D gps coordinates. Then selects the track closest to the mouse gps point. No idea what the variables are called now.
thisissparta138 28 Jan @ 4:07pm 
what is the function that creates the target over the radar video that we can click and enage a target?
thisissparta138 27 Jan @ 4:25pm 
i also found your ar function to be the main cause which we just say line 87 but that entire section could be trying to do too much at one time and overloading it. this system only crashes when other vehicles or ai are nearby. at least for me. as long as i am the only vehicle in the area then it runs fine.
SMITHY  [author] 26 Jan @ 7:16pm 
Also skorpion the missiles used in this WS post are pretty old. I should’ve used the ones used from the vls missile WS page (which are still kinda old). The current ones suck at hitting fast moving targets. They still both suck at hitting light weight targets since they use the old radar (which is hopeless at picking up stuff, but at least it has no noise)
SMITHY  [author] 26 Jan @ 7:12pm 
A max depth search is smart, not sure why I didn’t add it originally. If it passes the max depth I could have it just assume no new detections were found. I’ll add that when I get a chance (like a couple weeks from now)
thisissparta138 26 Jan @ 1:26pm 
i keep trying to edit the code and put local maxDepth =100
function *****
if **** > maxDepth then
return
end

it seems to help it last a bit longer but it still has a tick error
Skorpion4ik 26 Jan @ 12:47am 
Incredible radar, thanks for the good code. I would like to ask - having studied the design of the guidance radar and missile, it seemed to me that it should "guide" the target with the radar, continuously irradiating the target and receiving its current location in order to adjust the missile before the radar of the missile itself is triggered. But now, when trying to shoot down various targets flying sideways, the missile misses 100% of the time. That is, the missile flies to the point where the target was at the time of detection, which "kills" the meaning of a complex tracking and target selection system. I play StormWorks all the time, study and test various radar and missile systems in search of the best and most interesting, as for me, your radar is the most advanced. If you actively train and adjust the missile, it will become the best!) It will allow you to make very interesting crafts like S-400 air defense divisions and completely control the airspace)
SMITHY  [author] 25 Jan @ 4:27pm 
There’s some other cool methods I’ll probably try in the future though
SMITHY  [author] 25 Jan @ 4:09pm 
The algorithm is very computationally intensive
SMITHY  [author] 25 Jan @ 4:09pm 
Yeah not much I can do about that
Lekhoi7819 25 Jan @ 6:38am 
now it got tick error at line 3 bruhhhhhhhhhhhhhhh
Dandelion 22 Jan @ 11:25pm 
your works is very cool and useful, thanks.:steamthumbsup:
thisissparta138 21 Jan @ 6:23pm 
im getting the error message again, i quote "a problem has been detected in one or more scripts.

tick_failure

87: Max execution time exceeded (1000 MS) . stopped at line 87
*** stop 0X00000000
thisissparta138 18 Jan @ 2:23pm 
it is working a lot better now thanks!!
SMITHY  [author] 18 Jan @ 6:47am 
the search for these joint events "
T1, T2
0, 0 --both assigned to clutter
0, 1 --track 2 assigned to return 1
0, 2
1, 0
1, 2
2, 0
2, 1"
takes a super long time if there's a bunch of tracks and new detections overlapping. I just released an update that helps relieve some of the complexity. you might have to restart steam for it to update though
thisissparta138 18 Jan @ 6:24am 
i also made a modification to make it into a vls for my ship and currently have 24 missiles, after some time i get a "tick error" maximum time exceeded (1000 ms) not too sure what its referring to or how to fix it.