Space Engineers

Space Engineers

1,473 ratings
Whip's Turret Based Radar
3
5
3
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
443.484 KB
8 Apr, 2019 @ 10:56am
13 Apr @ 12:23am
49 Change Notes ( view )

Subscribe to download
Whip's Turret Based Radar

In 1 collection by Whiplash141
Whip's Scripts
22 items
Description
Whip's Turret Based Radar System

  Description
Howdy!

This script uses turret targeting to populate a 3D radar and is designed to increase the user's situational awareness. This script also works with custom turret control blocks!

This radar bears many visual and functional similarities to those of Elite Dangerous. Targets are plotted upon an angled plane centered around your ship, and vertical lines denote the target's elevation above your ship.

Also, targets are shared across antenna networks; if one ship detects a target, any other ships within its antenna range can see that target on their radar.

Targets locked with WHAM or LAMP will also be displayed.




  Setup Instructions
Required Steps
  1. Place this script on your ship.
  2. Add turrets and custom turret control blocks to your ship.
  3. Add Radar to the name of text panels or blocks with text surfaces that you want the radar displayed.
    • Blocks with text surfaces include: Cockpits, flight seats, programmable blocks, consoles, etc.
    • Configure which text surface the radar is displayed on within the block's custom data (You don't need to do this for text panels).


Optional steps
  • Place one or more ship controllers on your ship (Cockpits, Flight Seats, or Remote Controls).
    • These will be used to orient the way the radar is drawn.
  • Place the word Reference in the name of the specific ship controller that you want use to orient the radar.
    • If you do not specify, the code will automatically detect and use the seat you are controlling the ship from!
  • Place some sensors on your ship if you want to also use sensors to detect targets.
  • Place one or more antennas to enable the antenna network target sharing functionality.

NOTE: If you don't have turrets on your ship, the code will still work; however, you will only be able to see targets that are broadcast to you by other friendlies.


  Custom Data Config
You can change how the radar looks and behaves within the Custom Data of the programmable block this script is running from. Simply open the custom data, modify it, and click "Ok". The code will update to reflect these changes within 10 seconds at most.



  Multiscreen Display
You can also combine multiple LCD panels together to create larger surfaces to draw sprites on.

In order to create a multiscreen display:
  1. Make a wall of LCD panels (They must all be the same type of LCD).
  2. Add the name tag Radar to only the top left LCD panel in the wall.
  3. Add the following to the custom data of that top left LCD panel:
    [Radar - Multiscreen Config] Screen rows=1 Screen cols=1
    • Change "Screen rows" and "Screen cols" to match the shape of your screen wall.
  4. Run the argument refresh to process changes.
This will now be treated as one massive LCD screen!



  Arguments
To use an argument, enter it in the argument box and click the "Run" button.
Argument
Function
Example
range [number]
Sets radar range to the specified number (in meters)
range 1200
range default
OR
range auto
Resets range to be automatically determined from the max turret range
(Same as argument)


  What the FAQ?!
Will this script work with sensors?
Yes, simply add sensors to your ship.

How is the radar range determined?
It uses the max range of the turrets on your ship (default) or the range override.

How do I detect enemies and neutrals?
Turrets.

How do I detect friendies?
They need this radar script and they need to have you within antenna range.

There are also other scripts that broadcast valid IFF messages including:

Do enemy ships need this script to show up on my radar?
No. They merely need to be in turret range.

Why don't I see any ships on my radar?
  • You have no allied ships nearby with this radar
  • Your turrets are not shooting at any targets

Can I force the radar to show a different range than my turret range?
Yes. Change the range override in the custom data of the program block.

Will this script use camera raycast (aka LIDAR)?
No, hence the name. Raycast is absolutely awful at blindly scanning volumes without slagging sim-speed.

However, if you use LAMP or WHAM with a raycast (Lidar) lock, those targets will be shown.

Why do the visuals update so slow?
Keen capped the refresh rate of sprite drawn canvases to 6 Hz for performance reasons.

Why is the text so hard to read in the cockpit screens?
The screens in the cockpits are inherently darker than the LCD or text panel screens. Also, their resolution isn't all that great either.

Will this work with most modded/longer range turrets?
Yes.

Does this work with WeaponCore turrets?
No.

However, user Sigmund Froid has made a script that will broadcast weapon core target info to this script.

How do I send the radar script targeting information?
Send an IGC broadcast message with tag IGC_IFF_MSG and content MyTuple<byte, long, Vector3D, double>.
  • byte: Target info flags. To combine flags, simply add the numbers together.
    Flag values: Neutral=0, Enemy=1, Friendly=2, Locked=4, LargeGrid=8, SmallGrid=16, Missile = 32, Asteroid=64.
  • long: Entity ID of the target.
  • Vector3D: Position of the target.
  • double: Squared radius of the target. Used by the turret slaver for friendly fire avoidance.

Will this work with Configurable Auto LCDs 2?
Yes. See the section titled "Compatibility with other scripts" in the Auto LCD 2 Guide.


  Author's Notes
Be sure to report any bugs below in the Bug Reports discussion. I hope y'all enjoy! :D

(Do not reupload without permission, not even to mod.io)

Searchlights have no API, so no, they can not be supported.
Popular Discussions View All (2)
89
13 Apr @ 1:38am
PINNED: Bug Reports
Whiplash141
10
29 Jun, 2022 @ 12:14am
PINNED: Color Schemes
Whiplash141
907 Comments
Whiplash141  [author] 16 Jun @ 4:17pm 
Please read the emphasized text that serves as the first and last words of the description.
TridentPT 16 Jun @ 3:42pm 
I commented a while back, but no reply on this. I have been trying to get this script to work on small grids. It does not detect the searchlight as a turret, but also, it does not detect any sensors as well. Something I'm doing wrong?
Roomba 14 Jun @ 8:30pm 
could i use a search light since they act like turrets or does it have to be an actual turret?
Whiplash141  [author] 10 Jun @ 2:00pm 
Those are all questions for Sigmund on their script page. I simply maintain an API that allows users to draw radar contacts where they desire. I have 0 idea how the WC API works.
Ronchi 10 Jun @ 5:05am 
Hi Whip, it appears sigmunds addon is not working. A question, will this work using the custom turret controller info if weaponcore is installed and ignore the other turrets or it's just no dice with weaponcore ?
Whiplash141  [author] 6 Jun @ 6:56pm 
I can't determine what kind of blocks compose a grid, but a general size filter (and maybe even a speed filter) may be a good idea.
Sudimia 6 Jun @ 5:37pm 
Awesome script! I've been using it for close-range detection of vehicles and debris on a racing vehicle equipped with sensors. However, I've noticed an issue: individual wheels (not suspensions) also show up on the radar. This makes it hard to read at times and causes visual artifacts due to intersecting arrow sprites. I believe this is because wheels are technically sub-grids.

I wanted to suggest possibly implementing a basic filter to ignore grids under a certain size that only contain wheels or provide an equivalent solution. This would greatly improve the readability and functionality of the radar for similar scenarios.

I attempted to implement a solution myself but I don't have any experience with C# and I couldn't so much as load the script in VS without being swarmed by errors. Despite this, I believe it would be relatively straightforward to add such a filter, at least for this specific case. However, I am not sure if it is feasible with the script API and size constraints.
CatalysmUnabridged 23 May @ 7:11am 
Is there any functionality to trigger a timer upon contact, or can you recommend a script with said functionality? I've tried looking through pretty much every script I can find without success
ATF_Coldblooded Carebear || 18 May @ 1:29pm 
@Leconite ok thanks for the info.
Leconite 18 May @ 5:02am 
The enemy would not show up in 3 different locations on the same LCD. However the enemy would show up in different locations on each grid's LCD's based on the relation of it's reference to the enemy.

Regarding point of reference overrides, I asked about something similar for the artificial horizons script.

Based on ships being in a configurable range of a master reference instance.
https://steamproxy.net/workshop/filedetails/discussion/1721247350/4358997660743992387/

I don't think this would add any value to the radar script, as when I jump into a fighter to intercept an enemy, I need targeting data relative to the fighter, not the base I am docked to. Otherwise, I'd take off in the wrong direction to intercept, then waste time and fuel turning around.