Space Engineers

Space Engineers

631 ratings
LAMP | Launch A Missile Program (for WHAM)
2
7
4
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
401.714 KB
25 May, 2020 @ 9:17am
3 May, 2024 @ 10:07pm
33 Change Notes ( view )

Subscribe to download
LAMP | Launch A Missile Program (for WHAM)

In 1 collection by Whiplash141
Whip's Scripts
22 items
Description
LAMP | Launch A Missile Program
"I love LAMP." - Satisfied user


  Description
LAMP is a fire control program for my homing missile script, WHAM. It allows you to fire guided Player Made Weapons (PMWs) at targets. You may be asking: "Why is it called LAMP?". Well much like a lamp, this script illuminates a target for its missiles! (*Groan*)

This script also communicates with WHAM missiles using the Inter-Grid Communications API (IGC) instead of exploits. Because of this, missiles can be sent commands mid-flight to change their behavior.

If missiles have stealth disabled, they will also show up on screens using my Turret Based Radar script. Additionally, any target that you are actively painting with camera raycast will also show up on friendly radar!

LAMP is capable of 3 guidance designation modes:
  • Camera Homing - Uses camera raycast for target tracking (colloquially referred to as LIDAR)
  • Turret Homing - Uses targeting data from AI turrets and custom turret controllers
  • Beam Riding - Missile follows your look direction much like a TOW missile

Note: This script supports camera raycast designation to a max range of 5km. Turret designation range is only limited by the max range of the grouped turret(s) themselves.

Homing Functionality
When in either of the homing designation modes, you must have a target lock before firing. If the missiles you are firing are setup with cameras, the missiles will attempt to lock on to the target themselves (Active Homing). This means that you can fire and forget them as they will track on their own.

If the missiles do not have any cameras on them, they will only fly towards a target that you are currently painting (Semi-Active Homing). See the WHAM script for more details about setting up missiles with cameras (it is real simple, I promise!).

Example ships:


  Instructions
See the full guide for instructions.




  Author's Notes
This has been in development for quite some time now, so I hope it is nice and polished. If you notice any issues/bugs, please let me know.

Also, I've minified this code to make it fit in the programmable block. I have not obfuscated any of the code; only the white-space has been blasted. You can use an IDE like Visual Studio to auto-format and beautify the code into something that is less dense.

Also huge thanks to my testers! (Out of characters, list on guide)

Enjoy!

(Also, this should also go without saying, but do not reupload without explicit permission from me, not even to mod.io.)
Popular Discussions View All (2)
362
24 May @ 9:56pm
PINNED: Help/Questions (LAMP)
Whiplash141
1
16 Jan @ 2:32am
Missile range
Hasbick
679 Comments
Whiplash141  [author] 6 Jul @ 11:02am 
increase your guidance delay. That determines when the missile starts aiming towards the target
prexray13 6 Jul @ 6:40am 
how do i make it so that when i fire a missile it uses the detach group to fly straight out of a missile pod becouse i made this and when i fire it it doesnt do that this is my configuration :
[Names]
Auto-configure missile name=True
Missile name tag=M
Missile number=1
Fire control group name=lamp
Detach thruster name tag=DT

[Delays]
Guidance delay (s)=1
Stage 1: Disconnect delay (s)=0
Stage 2: Detach duration (s)=5
Stage 3: Main ignition delay (s)=0

[Homing Parameters]
; Valid guidance algorithms:
; ProNav, WhipNav, HybridNav, QuadraticIntercept
Guidance algorithm=ProNav
Navigation constant=3
Acceleration constant=1.5
Max aim dispersion (m)=0
Topdown attack height (m)=4000

[Raycast/Sensors]
Use cameras for homing=True
Tripwire range (m)=10
Minimum target size (m)=0
Minimum warhead arming range (m)=100
Ignore friendlies=False
Ignore planets=True
Ignore target ID for detonation=False

[Fuel Conservation]
Conserve fuel=False
Max speed (m/s)=300
Angle tolerance (deg)=2.5
Whiplash141  [author] 23 Jun @ 1:55am 
Not with this script no. This is designed for target homing, not GPS guidance
prexray13 23 Jun @ 12:04am 
is there a way for me to use missiles by giving them gps cords to hit ?
Whiplash141  [author] 1 Apr @ 10:07pm 
"What's the mechanism by which LAMP determines a target lock?"

Camera raycast. Point directly at the target while looking through your camera and it will acquire and lock the target. If LAMP does not say that you have a target lock, then you do not have a target lock.

You can start your world in single player, hit F11, and enable debug draw to see where your camera raycasts are going.
Baby Jesus 1 Apr @ 7:24pm 
I'm having an issue where I target lock a ship, but LAMP is not saying that I have a target locked for the purposes of Camera based fire control. What's the mechanism by which LAMP determines a target lock?
Whiplash141  [author] 16 Mar @ 8:09pm 
There are 2 commands, enable_fire and disable_fire, which should do what your are looking for
Based_Stickman 16 Mar @ 5:13pm 
Is it possible to get a master Arm command so that it wont fire anything if not armed so that i can have a lock and use event controller to set when i can fire a missile?
Whiplash141  [author] 27 Feb @ 12:05am 
In the custom data of the WHAM programmable block, there is a section for the gyro PID params that you can mess with
prexray13 26 Feb @ 7:23am 
how do i do that ?