Space Engineers

Space Engineers

849 ratings
Rdav's Guided Missile Script
2
2
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
46.984 KB
Aug 3, 2018 @ 12:34pm
May 6, 2019 @ 10:37am
7 Change Notes ( view )

Subscribe to download
Rdav's Guided Missile Script

Description
My new guided missile script is designed for the everyman out there, easy to use with exceptionally effective guidance (same as the AIM-9 sidewinder)
With a bare minimum setup and designed and optimised for multiplayer engagements, I'm hoping to make missiles both commonplace and viable in dogfights.

Also be sure to also check out my MIG-15 used in the trailer: Here




About The Script

This missile script is designed for the masses and multiplayer, with a core focus on easy use, effectiveness, and performance friendliness, with no raycasts or cameras needed:

~ Easily installed system with intergrated instructions and useful diagnostics,
~ Advanced interception algorithm capable of hitting small fast accelerating targets
~ Readily built with, missiles are all the same, can be copied, pasted welded, no individual setup
~ Barebones missile requirements means missiles are cheap


Installation Of The Script Into The Programmable Block (PB)

This is not a blueprint like my previous scripts, this ultimately makes it easier to directly install.
To install a workshop script do the following (there is an image at the top of the page that shows these steps)
- Open the pb's terminal
- Press 'Edit'
- Press 'Browse Scripts'
- Find This script and click OK
- Click OK again

The scripts runtime indicator ( a small moving indicator) will now be seen along with the version number and a few other bits of useful information.
the PB is now set up and will give further instructions by itself.




Basic Installation Of The Script

To set up the remainder of the script the code will help you as best it can, and will tell you if you have any blocks missing or if a missile failed to fire and for what reason etc.
However at a glance all missiles require these blocks:

- Forward thrusters (really go wild with the forward thrust)
- Gyro
- Power (reactor/battery)
- Merge Block

Everything on the missile should be called #A# (or have in the name), if in any doubt you cannot go wrong by calling everything on the missile #A# the missile will sort itself which blocks it needs and which it does not.

To set up the launching ship will require:
- 1 turret (also called #A#)
- The programmable block
- a cockpit or button set with a toolbar option set to to 'Run' the Prog block with the argument 'Fire'

In Addition To These Components:
Missiles can have warheads (call these #A# and they will be proximity detonated), side thrusters to help them corner or stop dropping in gravity.

A sound block is used to trigger a 'lock-tone' when you have a target lock. it's use is not compulsory but advised. The code will select the first sound block it can find.




Basic Usage Of The Script

Move to engagement distance (800m), a distinctive target lock beeping will sound from the sound block. (if installed)

After you have target lock 'Run' The programmable block with the argument 'Fire' this will launch the next available missile. this action can be bound to the toolbar of any cockpit.
The missile will move away from the ship and once clear will engage guidance and seek in.

Missiles will target what the turret called #A# targets, thus keep an eye on the turret to see what your missiles are trying to engage.





Hints Tips And Tricks

Performance Tips:
The system uses the same tracking algorithm as the AIM-9 sidewinder Air-to-air missile, thus it is very good at taking out Light ships in arial dogfights and engagements. The algorithm also is effective at large ship combat using simple large grid missiles.

To Make the system work best ensure your missile has adeqaute acceleration, as a rule of thumb acceleration needs to be at least 2x that of your target to ensure a good hit rate, more is better though!
If missiles are failing to hit the target it is usually an issue with inedequate acceleration.

You can put lateral (sideways) thrusters on the missiles for better handling and gravity correction, although the code will work adequately without them.

Generally only 1-2 warheads are good for small fighters & dogfighting. for hardened targets usage of hard penetrating blocks are more advisable.


Usage Tips:
ID'ing of a target has to be done with 'common sense' the system locks whatever the seeker turret does, thus manual confirmation of target can be done by looking at where the turret is currently firing.

You can fire a missile without any lock and it will be guided by the direction you point your ship, thus if you have a turret on the missile you can wire guide it to engagement/lock range from a safe distance.

Turret Settings Can be changed to change how far the missile locks from (range) and what it will lock

Missiles have a proximity fuse that will arm and detonate any warheads when close to an enemy ship, this makes these missiles exceptional at taking out smaller fighters or missile interception.




Automatic Firing

As of Update 1.05 The Script can now auto-fire missiles when a target is in proximity,
To enable this go into the code and set 'autolaunch' to true:









Thanks And Acknowledgements

Many thanks to my beta-testing team and discord who gave continuous support and testing along the way, if you'd like to be a part of the discussion you can join in at: https://discord.gg/MXz8Gkj
Also special thanks to: Aceman, Bruceleedleleedleleedlelee, DeeBee, Night Encoder, geniusface1234, Finianb1 yakubo and Ethan for helping film the flying in formation shots and being counter pilots in a few of the video clips!
And also special shoutout to bruceleedle for making the awesome airbase shown in the video: https://steamcommunity.com/sharedfiles/filedetails/?id=1464313989&searchtext=

In addition a MASSIVE thanks to my patreon supporters,
I work on these codes in free time holidays, and evenings, and have spent a great deal of time making these shenanigans for people to enjoy, if you feel like slinging me a few quid to allow me to further fuel my scripting exploits I have a patreon which can be found Here[www.patreon.com]


Bugs and Issues

Please get in touch with me (via the discord is best) with any bugs and issues you have with the script, I've put aside the next week only half time at work for any emergency bugfixes and tweaks so the code works well, this one has been a pet project of mine for sometime now so had been tested quite thoroughly but stuff might still exist, if you do encounter anything, let me know!
Popular Discussions View All (3)
341
Mar 9 @ 8:01am
PINNED: Bugs And Issues / General Questions
Rdav
1
Apr 1, 2020 @ 7:30am
PINNED: FAQ and Diagnostics
Rdav
0
Feb 16, 2023 @ 4:27pm
Missiles pick random launch direction
Cona6789
1,195 Comments
Kheryn May 22 @ 2:54am 
Would it be possible to repurpose this scripts "launch one at a time by running the command" feature for unguided bombs by naming the merge block on the bomb #A#?
Rdav  [author] Apr 7 @ 4:16am 
it just works
DeltaWing Apr 6 @ 6:07pm 
Not even a workaround needed? It just works?
Rdav  [author] Apr 6 @ 4:40pm 
reference them in the pb before they leave the grid and you can maintain a connection to them

@Star_Kindler
in the script increase the 'launch distance' parameter, this will make them fire the thrusters in a straight line for a longer distance before performing any turning manoeuvres
DeltaWing Mar 18 @ 5:37pm 
How do you access blocks from the PB that aren'tpart of the same grid anymore?
Star_Kindler Mar 14 @ 4:55pm 
I guess I'll post this here as well as it doesn't look like the discussion is being used anymore,

My missiles launch perfectly when my ship isn't moving, but if it's drifting at even 18 m/s (I'm not accelerating at all), then the missiles crash into the inside of my ship and explode instead of launching out the bay. How do I fix this? If it is not possible to fix with this script, is there another with this capability that someone can recommend?

Thank you very much in advance!
Rdav  [author] Mar 10 @ 12:10am 
Depends on what mods, anything that uses any weaponcore or weaponcore shields variant will break any weapon scripts, most cosmetic mods are fine
TAB Mar 7 @ 11:07pm 
Like a lot, didn't think they could really interfere with script :(
Rdav  [author] Mar 7 @ 10:07am 
running any mods?
TAB Mar 6 @ 7:57am 
I can get it working, solved all displayed problems, but when I get into range it doesnt make beeping sound and when I fire it it just aims straight. Do you know what could be the problem?