Space Engineers

Space Engineers

WHAM | Whip's Homing Advanced Missile Script
712 comentarios
dead hace 4 horas 
my WHAM and LAMP are showing no error but everytime i reopen my game my missile groups all switch to "missile 1" i have 6 missiles. When i manually switch them back and fire the missiles they dont disconnect or engage instead they just blow up after a while.
Whiplash141  [autor] 16 MAY a las 11:08 
It's a game limitation, you can only mitigate the effects, not prevent them
DazeyDream 16 MAY a las 5:29 
Err, I'm not well versed in arcane speak, is this something I can do?
Whiplash141  [autor] 15 MAY a las 18:44 
It is the programmable block compiling on the main thread. The way to mitigate is to stagger building of missiles to the scripts compile at different ticks.

Why do scripts compile on the main thread? Idk :(
DazeyDream 15 MAY a las 16:44 
version for below comment
Version="170.22.2" Date = "2024/05/03" CompatVersion = "95.0.0"
DazeyDream 15 MAY a las 16:43 
When welding wham missiles, there is a jolt of lag presumably when the programming block with wham in gets built. It's fine when the server has fights with these missiles pre-built, but the jolts of lag mid fight when wham blocks are built are a concern. Is there a way I can reduce this jolt of lag?
TheGuyKnightly 19 ENE a las 21:45 
Is it possible to make this fire and forget? (I did NOT understand a single word in here)
Whiplash141  [autor] 13 ENE a las 12:24 
That is not an error associated with this script or any script for that matter. Sounds like you have mods or plugins installed.
Drunken Operator 12 ENE a las 19:51 
it did not
Drunken Operator 12 ENE a las 19:44 
I fire 1 missile and everything works correctly, but upon the launch of the second missile i get the error "Error: Cannot Find the Blueprint File" spammed over and over again and have to restart my game, i am in a testing world so i removed the old target and made a new one, but it isnt working correctly, going to test again and see if re targeting after a game restart fixes my issue
Yoghurt 18 DIC 2024 a las 12:07 
I see! Thanks. The remote control I was just wondering about because it would be cool to be able to sometimes control it and for example escort some other ship with torpedoes, or to launch and print a bunch of them before sending them to a target to get a more overwhelming amount at once. But I get stuff like that wouldn't fit in the script.
Whiplash141  [autor] 18 DIC 2024 a las 11:27 
"Sometimes it seems the missile switches target when I just switch lock."

That indicates that the missile does not have its own lock on your target. If a missile has no target of its own, it flies in semi-active guidance mode and attempts to track whatever LAMP is actively painting. Once it has a lock of its own, it only listens to LAMP updates associated with its actively guided target.

You can set "Antenna name mode" to "MissileStatus" to troubleshoot the homing status of each missile through its antenna name.

"Another question, is there a way to take over control of the missile manually through the remote block?"

I mean you can try, but the script will actively fight you as that is not intended functionality. You can always manually launch via RC and steer it in yourself.
Yoghurt 18 DIC 2024 a las 11:22 
I feel like I'm getting mixed behaviour. Does a launched missile switch target itself if you switch your lock to a different target mid-flight? I assumed that was what the retask command is for. Sometimes it seems the missile switches target when I just switch lock. Sometimes it works as I intend where I launch 1 missile at one target and another at a different target before the first has hit. How does it work?

Another question, is there a way to take over control of the missile manually through the remote block?
Whiplash141  [autor] 4 DIC 2024 a las 11:04 
Performance and the fact that almost every server uses only 3km sync distance anyways
nanuzacih 4 DIC 2024 a las 6:41 
And why is the range only 5km?
Whiplash141  [autor] 21 OCT 2024 a las 9:48 
That is a your game problem, not the script. Submit a big report to KSWH.
Mischief_Master 20 OCT 2024 a las 18:17 
Missles work great, exept for the fact that IT CORRUPTS THE GAME FOR THE HOST the second i launch it....sooo its worhless
Mo 2 OCT 2024 a las 19:02 
Thanks a lot!
Whiplash141  [autor] 2 OCT 2024 a las 15:06 
"Is there any where to read about the available guidance algorithms?"
Uhhhhh... I keep forgetting to finish the writeup lol
Whiplash141  [autor] 2 OCT 2024 a las 15:05 
"Does script works well with top mounted cameras from automaton update?"
Yep

"Does spinning (miscellaneous parameter of WHAM) affect effectiveness of missile?"
Yep. Higher spin makes it more difficult for the missile to track a maneuvering target

"What spin rate is safe?"
Honestly depends on the missile itself. The heavier/less maneuverable the missile, the worse the effect spinning has on responsiveness

"Can I compensate for the lack of side cameras on two out of four sides with spinning of missile?"
Yes. WHAM will use whatever cameras are facing the target that it can find.
Mo 2 OCT 2024 a las 12:29 
Hello. Thanks again for your great script!
Does script works well with top mounted cameras from automaton update? (Nothing obscures the view)
Does spinning (miscellaneous parameter of WHAM) affect effectiveness of missile? What spin rate is safe?
Can I compensate for the lack of side cameras on two out of four sides with spinning of missile?
Based_Stickman 1 OCT 2024 a las 15:27 
Is there any where to read about the available guidance algorithms?
Whiplash141  [autor] 1 SEP 2024 a las 13:44 
Guidance delay only delays activation of steering. The rest of the launch staging is entirely unaffected.

If you have no thrusters name tagged with "Detach", set the "Detach duration" to 0.
Grimir 1 SEP 2024 a las 13:02 
Sadly changing the Guidance Delay will only Delay. for the Rocket to do anything at all.

I am not using any Mods. And i am using both the latest version of WHAM and LAMP.
Whiplash141  [autor] 31 AGO 2024 a las 11:56 
Have you tried longer guidance delays? That below configuration only gives the missile 0.5 seconds to get out of the tube.
Grimir 31 AGO 2024 a las 10:37 
Pardon my intrusion.
As of late, my Missiles start turning while within the Welding Chamber.

Whereas before, the would leave the Chamber/Bay/Silo - whatever you might call it.
And then start turning.

I have medled with the Settings;
[Delays]
Guidance delay (s)=1.5
Stage 1: Disconnect delay (s)=1
Stage 2: Detach duration (s)=2
Stage 3: Main ignition delay (s)=0

To try and adjust this issue.
I even tried using Missiles from your Viper Demonstration BP.
but they do the same, on all of my Grids.

Even ones i build arround your Viper showcase.
The pasted Viper on its own, works just like a charm.

Thank you very much for all the neat Creations you share with the community.
Whiplash141  [autor] 25 AGO 2024 a las 0:27 
Not for super precise things, no
Redstar 24 AGO 2024 a las 23:24 
Yes, I require a specific sequence of events before detonation, so I use a timer. I assume it's not viable?
Whiplash141  [autor] 24 AGO 2024 a las 21:03 
Correction: range times attempt to estimate the radius of the target and account for that. Again, it is no where near as precise as camera based detonation. Are you using timers for detonation instead of the built in detonation range?
Redstar 24 AGO 2024 a las 14:17 
That is rather odd. Because, for example, when I set the range of a timer at 5 meters, if the structure (either ship or station) is large enough, there is a high chance it will explode extremely prematurely. Like, even 100 meters before reaching the target. Whereas against a fighter it will explode at the assigned distance without issue. Any idea what might be causing this and how to fix it? Perhaps some weird center of mass glitch with specific ship shapes?
Whiplash141  [autor] 24 AGO 2024 a las 13:00 
"Is the distance for the timer triggers calculated in the same way as the distance for the warheads?"

No, the distance for timers is a lot more simple than the distance for warheads. For timers, distance is simply the distance from the center of the target.

The distance for warheads is calculated in several different ways depending on what you have attached to your missile. If you have cameras on your missile, WHAM uses them to do close range proximity scans for very accurate detonations.
Redstar 24 AGO 2024 a las 8:03 
Hello! A bit of a question! Is the distance for the timer triggers calculated in the same way as the distance for the warheads? Because I've noticed that depending on the target size, I get lots of premature timer activations.
Whiplash141  [autor] 15 JUL 2024 a las 10:08 
I'm certain, and it sounds like you are running out of power or fuel.

Too down height is configurable in custom data. Please see the full guide for descriptions of all the custom data settings.
ZeroOnii-Chan 15 JUL 2024 a las 7:40 
i did the thing and you sure its 18km ? it gets to 250m/s but after like 5km or so its just poof gone
crashed into the gound even with the top down mode does it have ground avoidance ?
or is there wway to increase the altitude it goes to when launched ?
ZeroOnii-Chan 15 JUL 2024 a las 0:32 
oki thanky you will try that the speed limit is taht the setting in the fuel conservation section ?
does taht mean i need to turn that on ? or if i leave that off will that impact accuratie ?
Whiplash141  [autor] 14 JUL 2024 a las 14:46 
There is a kill switch built in after around 3 minutes of continuous flight with no intercept. That translates to roughly 18000 meters of flight at max vanilla speeds.

Speed limiting is disable by default, but you can enable it in custom data.

I'd recommend running the stealth_off argument in LAMP so that you can visually track the missiles through the antenna signal.
ZeroOnii-Chan 14 JUL 2024 a las 13:08 
so i setup a silo that fires simple atmo missile but it only seem to hit tarrgets close to silo not the designator ship when i target a structure 7km of the silo in my small ship thats 4km off target it fires and goes towards it but somehow it never gets to it
now i am no genie with this toke me 7h to figure out how it works XD any guidance on it ? is there range killswitch ? does it manage its own speed ? i use mod that allows relative speeds based on mass/thrust ratio is there a way yo limit its speed ?
Whiplash141  [autor] 16 JUN 2024 a las 10:12 
Reduce the detonation range?
Enderman22224 16 JUN 2024 a las 6:24 
hey,
I have problems with the missile fusing to early to do damage to a fighter( the fighter is positioned in an 90° up position)
HARM 9 JUN 2024 a las 3:12 
Hello again Whiplash.

Just got a question for you in regards to missiles successfully intercepting targets, My world sim max speed is 350ms, and the missiles I use are 2600 kgs. I only have forward thrust (4x small hydro thrusters, they fly at about 120ms).


When I'm fighting an enemy ship and I fire my missiles, they tend to either undershoot and have to double back. Or they do a huge, wide loop and try to intercept using the chase approach (I think its called chase).

Now I aint no rocket scientist, but If I change the navigational constant to a higher number (lets say from 3 to 20). Would that improve the chances of my missiles hitting the target dead on instead of having to double back?
Whiplash141  [autor] 14 MAY 2024 a las 21:03 
Planet to planet? Not currently because there is a timed kill in the missiles for server performance after 3 minutes of flight. I have plans to make remote-fired missiles increase their kill time, I just haven't gotten around to it because its a relatively niche use case.
ghost-gas 14 MAY 2024 a las 20:31 
is it possible to remote fire a missile from one planet to another with laser antenna relays in-between?
Whiplash141  [autor] 14 MAY 2024 a las 11:37 
Just checked and all my scripts still work as of game version 1.204.015. Check block ownership.
Enigma_bg 14 MAY 2024 a las 9:39 
hi whiplash141 can you cheek lamp and whan scripts after signal update wham look like broken when group is made and run argment setup script say is failed and cant find any of components in missile --- before signal update wham was working but now is broken
commie._.tears 11 MAY 2024 a las 9:11 
Hey, I don't know if there's a way to fix this, but I was testing some really long-range missiles that were fired via targeting satellite in orbit. Target was about 40km out. After about 15-20km, the missiles just killed themselves. The programmable block was still working, and still in guidance mode, but everything had just been switched off. I think its intentional, and I was wondering if there was a way to shut it off.
Whiplash141  [autor] 26 ABR 2024 a las 9:40 
Yeah, though you can try using the "Randomized raycast scan spread (m)" parameter in custom data to make the raycasts randomize into a cone and maybe improve hit probability? Chances are still pretty low though.
A_Superior_DuDe 26 ABR 2024 a las 8:45 
Ah okay, so even if the seeker head with the cameras are pointing directly (though kinda unstable) at the target, there is very little chance of lock?

Guess i will have to shelf the idea for now..

Thank you for the super quick replies though, and for the game-changing and awesome script!
Whiplash141  [autor] 25 ABR 2024 a las 17:22 
if you are blind scanning, you are more likely to win the lottery than manage to hit something with camera raycast. That is the primary reason these scripts require lock before firing. I will eventually expose the max raycast range for advanced users.
A_Superior_DuDe 25 ABR 2024 a las 14:26 
Hey, i have been looking at ways to bypass the 5km range barrier. Hoping to be able to engage targets at 10km+.

How i want it to work is that i start by guiding the missile using BeamRide, then when within 5km, the missile will lock on and guide itself using cameras.

The missile is actually two missiles baked into one, where missile 1 has a LAMP script on it aswell. Upon launch the LAMP script is activated and starts searching for a target. (using a moving targeting head on the front of the missile using a custom turret). Once lock is achieved, Missile 1 and 2 will separate + the homing head (since it creates instability) then auxiliary cameras maintain lock for missile 2.

I cannot for the life of me get the missiles to lock on when the missile is far away from me for some reason... Its like the script or camera mechanic in space engineers stops working.

Do you know of any successful ways of guiding a missile beyond the 5km limit?
Whiplash141  [autor] 21 ABR 2024 a las 18:46 
GetRotationAnglesSimultaneous/GetRotationVector gets the rotation vector between your current reference block orientation and your desired orientation.

ApplyGyroOverride applies the rotation command in your reference block frame and applies it into the gyro frame. This makes it so that the gyros can be in any orientation relative to your reference block without any control issues.