Overview
This is the guide for my LiDAR mapping script and missile system. In it, I detail how to setup and control the functions the script provides, with examples and pictures. Please let me know if something is missing or unclear.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 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) Overridden turrets can take advantage of the ‘Precision Aiming’ capability of the script 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
Getting Started
First and foremost, thank you for taking the time to view this guide! The video below will take you through the basic setup procedures for the script. I’ve also written the instructions below the video.
NOTE: Raycasts are limited by the recharge rate (2km/s) as well as the script (for performance). If you want an easier way to track objects, you can 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
- A programmable block with this script
- A SINGLE block group containing the following:
- A remote control or control station block
- NOTE: “Up” on the map is defined by the retrieved ship controller’s “forward” direction.
- Turrets – as many as you want the script to use.
- A Modded Sensor AND / OR Cameras
- If both are present in the block group, the script will default to using the sensor for locating ships / stations / players, and cameras for asteroids.
- At least one LCD for the map
- A remote control or control station block
- Optional items:
- Info LCDs: Want to see the details of known objects on the map? Tag one or more LCDs and the details will be displayed.
- Tag is defined in the Custom Data of the Programmable Block.
- Scrolling text support added – Vertical scrolling is automatic, however Horizontal scrolling requires that you add “Scroll” (without quotes) to either the Name or Custom Data of the tagged LCDs
- Don’t want the text to scroll at all? Instead of adding “Scroll”, simply add “NoScroll” π
- WARNING: Enabling Horizontal scrolling will disable the GPS download feature!
- Timer Blocks: Want something specific to happen when an enemy is detected? Setup your own customized actions and the script will “Start” the timer any time a new enemy is found! See the “Timers and Multi-Display” section for details.
- Multi-Display LCDs: The script supports stretching the map display across 4 standard LCD panels, or 2 Wide LCD panels! See the “Timers and Multi-Display” section for a video guide.
- Rotor-mounted Cameras: These will aim into the blind spots of the grid to assist in maintaining lock on known objects. See the “Rotor-Cams” section for a video guide.
- Info LCDs: Want to see the details of known objects on the map? Tag one or more LCDs and the details will be displayed.
- Add the following to the same block group as above:
- At least one projector, housing the blueprint for your missile or missile cluster.
- NOTE: The script appends the projector’s entity id to the name of the missile PB, which is used to ensure no duplicates are added to the queue
- An antenna – for communicating with the missiles once fired.
- All Welders that will be used to weld the missile projections.
- With the addition of Missile Sequencing, welders are turned off during all launch sequences in order to ensure missiles are fired without issue
- (Optional) A designated forward-facing camera – used for manual targeting (see commands)
- At least one projector, housing the blueprint for your missile or missile cluster.
- NOTE: All of these items must be afixed to the ship / station, NOT part of the missile.
- Missiles will need a PB of their own with my missile script, found here. Also, ensure the projector is the closest one to the projected missile. Please see the above video for further detail.
NOTE: The group name, and tags can be customized in the Custom Data of the script’s Programmable Block. Tags are added to the name or the Custom Data of the block to be used.
Features
NOTE: See the Commands section for details on how to manipulate these features.
Scan Range
- Allowable value is between 0 and 10,000 meters. The current scan range will be displayed in the upper-left corner of the display.
Targeting Modes
- The current targeting mode will be shown in the lower-left corner of the display.
- ALL – will display all found entities
- Enemy + Neutral – will display only enemies and neutral / unowned entities (includes asteroids)
- Enemy Only – will only display enemies
Missiles
- The script will use designated projectors in order to maintain a stock of player-built missiles.
- The number of available missiles will be shown in the bottom-right corner of the screen.
- This number is split between Kinetic and Explosive missiles. You must determine which type the missiles are by editing the top portion of the LiDAR Guided Missile Script
- Missiles can be launched at any non-owned grid displayed on the map. To do this, simply run the PB with the argument “Select Target” followed by “Launch”, OR use the “Auto Launch” feature (see commands section for details).
- Missiles may be fired in sequence given the following conditions:
- Open the PB’s Custom Data and navigate to the section of code seen below
- Ensure “Use Firing Order” is set to TRUE
- Set the “Firing Order Tag”, then place the tag somewhere in the Name or Custom Data of the missiles you wish to have fired in sequence. Note the example, below, for usage.
; ; If TRUE, missiles will be fired in sequence. ; Use Firing Order=true ; ; If using the firing order, place this tag in the NAME or CUSTOMDATA ; of your missiles, followed by the numbering sequence you wish ; the script to use, starting with 1. ; EXAMPLE: Missile 1 has [M:1], Missile 2 has [M:2], etc ; Firing Order Tag=[M:
Missile Settings
- In the upper-right corner of the screen, three toggle-able missile settings can be found:
- P – Precision aiming uses the point of intersection of a raycast with a targeted grid to enable aiming at specific areas, like blowing the turret off the wing with a missile, for example
- A – Auto launch will automatically fire available missiles at any enemy grid that comes within a configurable range of your ship / station. Edit this range in the Custom Data of the PB
- S – Safety lock will keep missiles from being fired by any means as long as it is enabled.
- T – Turret Control will aim any turrets containing a specified tag at the selected target. If no target selected, they default to the nearest enemy grid
- V – Show Voxels displays asteroids on the map display
- R – Relay Enabled relays all local target info to other LiDAR systems
Turret Control
- The script can override the default AI, allowing for greater accuracy of fire and a consistent target set.
- The script uses the same logic for turrets as it does for missiles, adjusted for use with turrets
- The script will maintain turret lock on a single entity for five seconds before switching to the next, rather than bouncing all over the place.
- NOTE: rotor-based turrets are not yet supported, but are planned for a future release
- To enable this feature, follow these steps:
- Ensure the turrets you wish to have controlled are part of the Lidar Block Group
- Open the PB Custom Data and navigate to the section defined below
- Ensure Control Turrets is set to True
- Add the Turret Control Tag to the Name of the turret(s)
- Enter your Max Speed – used to determine where the acceleration cutoff should be for targets
Information Display
- If you enter the configurable “Lidar Info Tag” in either the name or custom data of an LCD, the above information will be displayed on that LCD in reference to the items displayed on the map.
- This LCD must also be added to the Lidar Block Group in order to function
Timers and Multi-Display
Timers:
- Want to execute your own action sequence when an object is detected? ie. Cause lights to flash red, play sounds, or run another PB? This script will ‘Start’ any external timer retrieved. Simply add timers to the block group, then customize the action sequence in the timers to your liking!
Want to customize your timers even further?
- In the Custom Data, you will find the following section:
Add the ‘Advanced Timer Tag IN’ to a timer, followed by a distance, and the timer will only be executed once a valid object comes within said distance of your ship! Likewise, add the ‘Advanced Timer Tag OUT’ to a timer, followed by a distance, and the timer will be executed once a valid object moves beyond said distance from your ship! NOTE: The script will only perform these actions on the -CLOSEST- valid object found.
- Example: Place this in the NAME or Custom Data of the timer
What is a “valid object”?
- I’m glad you asked! In the same section above, note the ‘Timer Rel Settings’. Here is where you’ll decide which types of objects you want the script to recognize before starting the timer(s). The available types are: Owner, FactionShare, Neutral, and Enemies. Comment / uncomment (‘;’) or delete them as desired.
Now for the Multi-Display!
In the Custom Data, you will find a section that looks like this:
The script will determine which mode you are using based on the type of LCD it finds tagged.
Essentially, you need to label each LCD that will be used to stretch the display in a certain order, as it appears in the figure above. By default, the script uses the nameTag you have defined followed by a delimeter (default is a colon) to search for the LCDs. After the colon, you will need to place either the numbers 1 – 4 if using Mode 1, or 1 and 2 if using Mode 2.
Please view the video below for a demonstration on how to configure everything. Note that the settings portion has been moved to the Custom Data of the PB.
Rotor-Cams
Ever wonder why objects just randomly disappear from the map? Yep, me too! But I finally figured out why, and now there’s a fix!
The reason for the issue is that the corners of the grid produce blind spots, and when an object travels through one of them, the calculations the script uses to predict that object’s next location starts to produce errors due to various things. If it takes too long (several seconds, for instance) for the object to leave the blindspot, the prediction will end up being too far off, and miss.
In comes the fix – Rotor-Mounted Cameras!
Setting up dual-rotors with a camera allows the script to “see” in the blindspots, and track any object that traverses them! Best practice is to place 8 of them, one on each corner – top and bottom. Please view the video below for a demonstration on setting them up.
NOTE: The script will ONLY recognize rotors if they are setup according to the above video. If you place a single “base” rotor and create a camera platform for it, DO NOT add the single base rotor to the lidar block group – simply add the cameras ON the rotor. Otherwise, the script will skip over those cameras as it is expecting to find a “top” rotor as well.
Cockpit Display Settings
Yes! The script is now compatible with the cockpit displays introduced in SE v1.190! To use this feature, follow these instructions:
- Ensure the cockpit has been added to the LiDAR Block Group
- Once added, either recompile the script or use the Refresh command
- Open the Custom Data of the cockpit in order to customize which screen(s) the map and/or information is displayed on.
NOTES:
- You cannot display both the map and information on a single cockpit screen
- The order in which the surfaces appear in the custom data is the same as the order in which they appear in the terminal menu
- An example of the Custom Data is shown below
Commands
NOTE: All configuration is now done explicitly through the CUSTOM DATA of the Programmable Block (no more editing the script itself!). All commands may still be given via PB argument. Commands are NOT case sensitive.
Custom Data Usage:
- When you open the Custom Data of the PB, you will find “Sections” like the following:
The part wrapped in square brackets (“[” and “]”) is the Section Title. Below the Title is the Item Description, denoted by a preceeding semi-colon (;). Then comes the configurable Item. You ONLY need to adjust the value portion of the line, which comes after the equals sign (=)
PB Argument Usage:
- Scan Resolution – adjusts the angle step between raycasts. Higher values increase probability of finding objects at farther ranges, but at the cost of speed (takes longer to complete a full scan)
- Usage: Scan Resolution:<integer value>
- Valid values are between 1 and 10
- Example:
scan resolution:7 - Range – sets the Scan Range.
- Usage: Range:<integer value>
- Valid values are between 0 and 10000
- Example:
range:1500 - Refresh – will refresh the grid. Use if you add/remove blocks after script has completed setup (or just recompile the script)
- Targets – cycles through the targeting modes.
- ALL = All
- E + N = Enemy + Neutral
- E = Enemy Only
- Select Target – cycles through known entities and locks onto the next non-owned grid that it finds.
- Deselect – deselects the current target
- Control Turrets – toggles turret control on / off. Use this to resume / cease all turret fire.
- Blacklist – adds the currently selected target to the blacklist. Blacklisted grids cannot be fired upon by the script. Does nothing if no target is selected.
- Whitelist – removes the currently selected target from the blacklist. Does nothing if no target is selected or if the target is not in the blacklist.
- Clear Blacklist – clears the blacklist.
- Manual Target – uses a designated targeting camera to add an object to the map
- Add Target – will take a provided position coordinate and attempt to raycast to that location. If an object is found, the object will be added to the map display, provided the object meets the criteria for being shown (ie. object has a valid relationship setting).
- USAGE: Add Target:<Vector3D>
- This command is delimeted by a colon
- Hint: Calling .ToString() on the vector will provide the proper format for the command
- Example:
Add Target:{X:232.23 Y:2983.28 Z:-3234.58} - Precision – toggles precision aiming on/off. Precision aiming can be used to aim a missile at a specific section of a ship or base, rather than the default ‘center of grid’ that the game uses.
- Clear Targets – removes all objects from the map
- Launch – launches a missile at the currently selected target. Must have missiles available and a valid target selected.
- Select Payload – switches between using kinetic missiles, explosive missiles, or both. Note that if you select a payload type and you do not have any such missiles, no missiles will be fired.
- Safety Lock – will keep missiles from being fired as long as it is set to true
- USAGE: Safety Lock:<True / False>
- This command is delimeted by a colon
- Example:
Safety Lock:true - Auto Launch – toggles automatic missile launch on/off. This feature will fire missiles at the closest known enemy vessel, and will continue to fire new missiles until all enemies have been destroyed.
- For Custom Data input, valid values are True or False
Frequently Asked Questions (FAQ)
- The number of cameras you have on any given axis will greatly affect the time it takes to scan everything in that direction. There are 25,450 (at a scan resolution of 2) points the script will scan in all six directions. In Vanilla SE, raycast recharge rate is 2000m per second. So, using one camera to scan them all, at ONE scan per 1.5 seconds (with 3km scan range), will take ~9 hours. Two cameras will cut that in half, 4 cameras will cut it in half again, and so on and so forth. In short – more cameras is better!
- This is generally an ownership issue. Open your terminal window, select all blocks on the grid (Ctrl+A) and then set ownership to “Me” – if the issue persists after doing this, please let me know and I’ll be happy to take a look π
- There is a blind spot between the axes of the ship/station. Depending on where the object is in relation to your current position (above, below) the blind spot can grow to several hundred meters, which means that there is potentially several seconds where the object cannot be tracked. If the object slows down, accelerates, or changes direction in that window, the script has no way of knowing, and a likely chance of losing the target. I have implemented a few tricks to help mitigate this, but it seems the best route is to use rotor-mounted cameras to take care of the blind spots. See the “Rotor-Cams” section for details.
- Blue: Owned entities – anything other than you or the scanning ship/station will be displayed
- Red: Enemy factions
- Green: Friendly factions
- White: Unknown / unowned entities
- Orange/Yellow: Neutral – includes asteroids and planets
What are the ranges for the contour lines?
- Outer – 100%
- Middle – 66%
- Inner – 33%
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 π