Space Engineers

Space Engineers

877 ratings
Rdav's Guided Missile Script
2
2
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
46.984 KB
3 Aug, 2018 @ 12:34pm
6 May, 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://sp.zhabite.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)
342
9 Oct, 2024 @ 6:25am
PINNED: Bugs And Issues / General Questions
Rdav
1
1 Apr, 2020 @ 7:30am
PINNED: FAQ and Diagnostics
Rdav
0
16 Feb, 2023 @ 4:27pm
Missiles pick random launch direction
Cona6789
1,247 Comments
Rdav  [author] 21 May @ 11:28am 
I'm currently working on a rework of this script for the modern era, hold tight
Rightraoedhelontidae Minima 21 May @ 7:31am 
In purely vanilla game, when putting a defensive IA block, it causes the turrets (say, large grid Artillery Turret) to have 2000m range instead of 800m.
But the missile only launches when the target is at 800m from the turret, instead of 2000m. Do you know a way to avoid this and make the script fire the missiles when at 2000m?
Rdav  [author] 27 Mar @ 2:27pm 
yeah, depending on the mod ofc, but mostly yes
catlol456 24 Mar @ 5:16pm 
ok, that is a lifesaver, would it be possible to use a modded turret with the script?
Rdav  [author] 24 Mar @ 4:07pm 
it is based on weapon tracking distance, so longer turret AI range = longer targeting range
catlol456 24 Mar @ 4:05pm 
is there a way to increase the lock on distance? i am playing with some mods the increase weapon ranges, and it is super dangerous to get within 800m of the npcs
MrXSmiles420 14 Feb @ 9:27pm 
can the firing mechanic work in a silo ?
meaning if it were in a tube could it still work ?
Rdav  [author] 9 Feb @ 4:00am 
when you launch the missile it detects and permanently locks in things like guidance turret and cockpit (ie for direction)

no way at present, you could add a random offset to target centre, with respect to how big the target is, its possible, but I am trying to only do critical bugfixes maintenence on the program currently due to an over-subscription of various projects,

no way to pre detonate the warhead with the tow guidance as it has no idea how close it is to a target, you can try using a few staggered sensor blocks to achieve the same effect possibly
murukmanjur 8 Feb @ 3:17pm 
First of all, I truely love your script. I use it alot and having fun with it.

I have some questions though.

1. Is it possible to have a fire and forget setup where as an example, having a remote control block and the programming block on the missile. Then detach it from a vehicle/aircraft/spacecraft with a fusion block and activate the script by using a timerblock? I was experimenting with this without luck cause it still used TOW guidance with my craft.
If it's possible, can you tell how.

2. Is there an option, where the missile will not fly in the center of the target?

3. Is there a option to detonate the warhead before impact (just like the turret guidance) with the TOW Guidance?

Best Regards
Spencer 8 Feb @ 4:18am 
Ive had setups where I had a sound block named #A# and the volume turned way down but for some reason it always wants to steal my sound blocks and outta the blue my build is making annoying noises again lol