Space Engineers

Space Engineers

343 ratings
LiDAR Mapping Script
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
547.488 KB
26 Nov, 2017 @ 12:16am
20 Dec, 2021 @ 8:41pm
103 Change Notes ( view )

Subscribe to download
LiDAR Mapping Script

Description
Version 6.9.1 released December 20, 2021

Hello, Engineers, and welcome to version 6 of the LiDAR mapping script! This version boasts a fresh new look utilizing the drawing library introduced in SE v1.190.

Blueprints
Here are a couple of ready-made blueprints to try out :)
Current Features
  • Will use any number of cameras and / or turrets and / or a modded sensor to display near-real-time tracking information on an angled viewing plane
    • If no detection block is found by the script, it will default to "Relay Only" mode. In this mode, only objects that have been found and relayed by another LiDAR system will be displayed
  • Each system is capable of relaying 'known' objects to other grids in antenna range
  • Rotor-based cameras will track objects in their given sector to ensure you don’t lose sight of the object.
  • The map and information output can be displayed on any LCD, including cockpits and flight seats!
  • Activate Info LCDs (default F key) to auto-download all known grid coordinates to the suit GPS
  • Grids can be selectively added to a 'blacklist' to ensure the script does not fire upon them
  • Detection- and distance-based timer options. You can have the script run any number of timers, either when detecting a new object or when an object crosses a distance threshold (both ways).
  • Offers the ability to override the default turret AI in favor of a much more accurate ballistic algorithm
    • You may set which target types a controlled turret can auto-fire against in the Custom Data of the PB
    • If you have a target selected on the map, all turrets will redirect their fire at it
    • Modded turrets are supported. See the Custom Data of the turret to enter the necessary information
    • Overridden turrets can take advantage of the 'Precision Aiming' capability of the script
    • NOTE: You cannot use the same turret for both target scanning and AI override, you must pick one (you can have both options at the same time, you just need separate turrets for each)
  • Player-built missiles are supported using connectors, rotors and merge blocks
    • You may select a displayed target as well as which payload type to deploy via PB arguments
    • Once a target has been selected, you may launch a missile at the target via PB arguments
    • The Auto Launch feature takes care of both of the above items for you. Any enemy grid that comes within a configurable range will automatically be fired upon, provided you have the missiles available to do so
    • Missiles will automatically be redirected to other targets (if any) if their intended target is lost for any reason

A Note For Those Using Cameras
Camera raycasts are limited by the game's recharge rate (2km/s in vanilla) as well as the script (for performance reasons). The easiest method of tracking objects is to install one of the sensor mods available on the WS. CalDaug2020's will detect anything within 10km (adjustable) for large grids, and 5km for small. This mod can be found here

How does this work?
As there is a lot to cover, please refer to the guide for details on setting everything up and how everything works.

The accompanying LiDAR Guided Missile Script can be found here

Feel free to leave a comment or question, and I'll do my best to accommodate requests as much as is feasible. And please rate if you like the script :)

Update Notes
Dec 20
  • Added check for null camera names during camera setup
Feb 3
  • Added a missile icon for player-built missiles. Owned / relayed missiles will be shown as such on the map
  • Adjusted highlights on the map display to better fit over the text
January 28
  • Fixed an issue with turrets firing at selected target even if it's blacklisted
January 27
  • Fixed an issue with missiles not firing for grids that don't have thrusters (rovers)
  • Added a "Deselect" command to clear the target selection
December 22
  • Fixed issue with multi-screen config overwriting other configs in the Custom Data
December 19
  • Fixed issue with script forcing scan range to 3000 every recompile / reload
  • Fixed potential issue with script not saving new settings if recompiled too soon after change
November 17
  • Added Raycast limit options to the Custom Data Config
October 20
  • Fixed crash when firing missiles that share the same projector
October 11
  • Reworked missile manager to fix issue with "Script too complex" error with very large grids
  • Removed the limit on displays so that Single- and Multi-display modes can be used simultaneously
September 16
  • Compatibility update for missile script update
August 28
  • Fixed issue with objects having a relationship of "Friends" shown as "Unowned" or missing
July 2
  • Cameras will now shift their center point by a tenth of the angle step after completing a full scan revolution, allowing them to scan more points
June 13
  • Updated multi-surface config to allow simultaneous use of other scripts
  • Added workaround for sprite issues in MP
June 3
  • Fixed methods related to creating and parsing vector strings due to changes by Keen
May 24
  • Added a check to keep users from turning Detect Asteroid on for modded sensors
  • Fixed corner LCD displays now that Keen has adjusted their surface area settings
  • Adjusted corner LCD text size so it shows more lines when in Info mode
  • Fixed Info overlap on console screens
March 9
  • Added a setting to configure the number of missiles to fire at each target when the script is in auto-launch mode; this is found under the Missile System of the Custom Data config
  • Updated the Target Display Settings to include more categories: All, Friendly, Neutral, Neutral/Enemy, and Enemy
  • Fixed a bug with the Enable Relay setting where it was still sending out messages if turned off
February 29
  • Fixed issue where the script wasn't accounting for multiple distance-based timers in the same direction
February 27
  • Added a setting to allow configuration of which types of entities are detected by the script. See "Valid Detection Types" section of Custom Data for details.
  • Reworked the timer settings so that the OUT timer will fire if an object comes inside the IN range and then is destroyed / removed
  • Fixed a bug in the timer settings where script wasn't getting the correct entity
  • Had to remove the config instructions from the Custom Data output in order to fit this update in the char limit


See Change Notes for full history.

Credits
I would like to say thank you to @Whiplash141 for assisting me with numerous hiccups along the way. To @Malware, @Digi, and @Equinox for all their advice and assistance with best practices, standards, and how-to's. To @Blargmode for showing me some of the drawing techniques. And many more that have helped along the way. You all make this fun :)
Popular Discussions View All (6)
169
2 May, 2023 @ 1:37am
PINNED: Bug Reports
jTurp
144
20 May, 2024 @ 5:53pm
PINNED: Feature Requests
jTurp
10
24 Feb, 2020 @ 9:03am
PINNED: Raycast for dummies
AxeOfKukujevo
1,066 Comments
IMEI 4 Jun @ 7:24am 
Is it possible to have an option to view a camera, point it at an object (asteroid, ship, etc.) and get the target range? I like the list of asteroids and their ranges, but it doesn't let me find the distance of a specific object.
Strategic Developments 18 May @ 2:08pm 
Is there any way we could take a look at a non-minified version of the script?
Strategic Developments 12 May @ 9:34am 
Found it all and adjusted it - no worries 👍
jTurp  [author] 11 May @ 7:58am 
The cap has always been there, for performance reasons. Without it you can easily wreck the sim speed on a game, especially near planets.

I don't provide the information for bypassing it, but if you know what you're doing you'll find it.
Strategic Developments 4 May @ 1:03pm 
It seems like there's a hard cap written into the 10KM range, which might not have been there last time I messed around with it? Regardless, how might I go about bypassing this?
Strategic Developments 4 May @ 12:55pm 
Hey - sent you a friend request to ask the specifics of range increases with the Lidar Mapping Script and accompanying missile script. I've done so in the past, but i'm having some difficulty with getting it to work at 100KM .

i do remember i got it to previously work at 25KM or so, but I just wanted to reach out and see what your thoughts on the matter were.
jTurp  [author] 22 Mar @ 8:05am 
@moaoka

Shoot me the link to your blueprint and I’ll run a test with it
moaoka 21 Mar @ 6:35am 
Hello, As I add lot of camera on it the program block show Script too complex. Is that any way to fix it thank you
jTurp  [author] 15 Apr, 2024 @ 4:58pm 
[VII] Aquamarine Intangible

I'm taking a look now - I will comment on your workshop page with further information :)
MTF Nu-5 Δ 13 Apr, 2024 @ 7:40am 
@jTurp Hi, I hope you're well. My grid is not displaying on the lcd the grids I set to enemy. They're all grouped under Lidar System, and I've added a couple of custom turrets to try and automatically track targets, but nothing changed following recompile.

I'd be really grateful if you could have a look at the small large grid I have made (1) with all sufficient blocks included as per the script's demands. The reason I have made my own is I am trying to learn and understand how to implement it in my own designs starting with the basics. I just don't quite understand why it's not working whereas yours is.

I hope I have given credit correctly in the description. Thank you!

1) https://sp.zhabite.com/sharedfiles/filedetails/?id=3221217939