Space Engineers

Space Engineers

WHAM | Whip's Homing Advanced Missile Script
712 則留言
dead 7 小時以前 
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  [作者] 5 月 16 日 上午 11:08 
It's a game limitation, you can only mitigate the effects, not prevent them
DazeyDream 5 月 16 日 上午 5:29 
Err, I'm not well versed in arcane speak, is this something I can do?
Whiplash141  [作者] 5 月 15 日 下午 6: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 5 月 15 日 下午 4:44 
version for below comment
Version="170.22.2" Date = "2024/05/03" CompatVersion = "95.0.0"
DazeyDream 5 月 15 日 下午 4: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 1 月 19 日 下午 9:45 
Is it possible to make this fire and forget? (I did NOT understand a single word in here)
Whiplash141  [作者] 1 月 13 日 下午 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 1 月 12 日 下午 7:51 
it did not
Drunken Operator 1 月 12 日 下午 7: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 2024 年 12 月 18 日 下午 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  [作者] 2024 年 12 月 18 日 上午 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 2024 年 12 月 18 日 上午 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  [作者] 2024 年 12 月 4 日 上午 11:04 
Performance and the fact that almost every server uses only 3km sync distance anyways
nanuzacih 2024 年 12 月 4 日 上午 6:41 
And why is the range only 5km?
Whiplash141  [作者] 2024 年 10 月 21 日 上午 9:48 
That is a your game problem, not the script. Submit a big report to KSWH.
Mischief_Master 2024 年 10 月 20 日 下午 6: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 2024 年 10 月 2 日 下午 7:02 
Thanks a lot!
Whiplash141  [作者] 2024 年 10 月 2 日 下午 3:06 
"Is there any where to read about the available guidance algorithms?"
Uhhhhh... I keep forgetting to finish the writeup lol
Whiplash141  [作者] 2024 年 10 月 2 日 下午 3: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 2024 年 10 月 2 日 下午 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 2024 年 10 月 1 日 下午 3:27 
Is there any where to read about the available guidance algorithms?
Whiplash141  [作者] 2024 年 9 月 1 日 下午 1: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 2024 年 9 月 1 日 下午 1: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  [作者] 2024 年 8 月 31 日 上午 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 2024 年 8 月 31 日 上午 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  [作者] 2024 年 8 月 25 日 上午 12:27 
Not for super precise things, no
Redstar 2024 年 8 月 24 日 下午 11:24 
Yes, I require a specific sequence of events before detonation, so I use a timer. I assume it's not viable?
Whiplash141  [作者] 2024 年 8 月 24 日 下午 9: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 2024 年 8 月 24 日 下午 2: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  [作者] 2024 年 8 月 24 日 下午 1: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 2024 年 8 月 24 日 上午 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  [作者] 2024 年 7 月 15 日 上午 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 2024 年 7 月 15 日 上午 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 2024 年 7 月 15 日 上午 12: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  [作者] 2024 年 7 月 14 日 下午 2: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 2024 年 7 月 14 日 下午 1: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  [作者] 2024 年 6 月 16 日 上午 10:12 
Reduce the detonation range?
Enderman22224 2024 年 6 月 16 日 上午 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 2024 年 6 月 9 日 上午 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  [作者] 2024 年 5 月 14 日 下午 9: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 2024 年 5 月 14 日 下午 8:31 
is it possible to remote fire a missile from one planet to another with laser antenna relays in-between?
Whiplash141  [作者] 2024 年 5 月 14 日 上午 11:37 
Just checked and all my scripts still work as of game version 1.204.015. Check block ownership.
Enigma_bg 2024 年 5 月 14 日 上午 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 2024 年 5 月 11 日 上午 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  [作者] 2024 年 4 月 26 日 上午 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 2024 年 4 月 26 日 上午 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  [作者] 2024 年 4 月 25 日 下午 5: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 2024 年 4 月 25 日 下午 2: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  [作者] 2024 年 4 月 21 日 下午 6: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.