Space Engineers

Space Engineers

1,573 ratings
Whip's Turret Based Radar
3
5
3
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
443.484 KB
8 Apr, 2019 @ 10:56am
13 Apr, 2024 @ 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.

Do WeaponCore turrets work with this script?
No, due to a WeaponCore decision to be incompatible with the script API.

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)
91
19 Nov, 2024 @ 12:17pm
PINNED: Bug Reports
Whiplash141
10
29 Jun, 2022 @ 12:14am
PINNED: Color Schemes
Whiplash141
965 Comments
Leconite 18 May @ 10:37am 
Thank you for the explanation.
Whiplash141  [author] 17 May @ 4:40pm 
The way that AI block turret range boosting works is that it can boost a turret range all the way up to the max distance that the ammo it fires can fly.

Artillery turrets (custom or premade) can be boosted up to 2km as a result, but gatling turrets can only be boosted to 800m.
Leconite 17 May @ 8:09am 
Oh, OK, I'm a bit confused now.
Am I correct in concluding the following when adding AI combat blocks to a grid with radar?
1. The usually 800m "sensor net" range offered by turrets is then extended to ~ 2.5 Km?
2. Enemy grids within the 2.5Km range of the AI enhanced "sensor net" range, but outside of the turrets 800m range will show up on radar screens.

If we can see the 2.5Km space surrounding a radar installation on radar, it definitely makes adding AI combat blocks to a radar installations a no brainer.
Whiplash141  [author] 16 May @ 3:21pm 
For clarity: the script can only see what your turrets (or custom turret controllers) can see. This does include the range boost afforded to them by AI blocks, but there is no direct access to the AI block target.
Leconite 16 May @ 1:55pm 
That's a no, scroll down about half a dozen comments.
Jon Kirk 16 May @ 11:32am 
@Whiplash141 Is there any way to use the AI offensive block to see targets up to 2.5km?
Whiplash141  [author] 11 May @ 7:12pm 
Thought I separated the title text from other text, but apparently not. I'll try and fix that when I have time to breathe
Nighthunter 11 May @ 11:36am 
@Whiplash141 wouldn't the range meter dissapear than too?
Whiplash141  [author] 10 May @ 2:23pm 
Change the color of the title bar and text to transparent
Nighthunter 9 May @ 9:00am 
@Whiplash141 is there a way to disable the Title "WMI Radar System"? I use Splitsies Nav Console and it gets cut off.