Space Engineers

Space Engineers

HudDog - dogfight tracers, lead, autoaim
222 Comments
cheerkin  [author] Sep 2 @ 2:12pm 
To clarify, target cycling feature is implemented but not released here yet.
cheerkin  [author] Sep 2 @ 2:11pm 
It's been a while, my dev version is much ahead and targeting works very differently there. There is a special command to clear raycast targets and target cycling feature.
Looking at the relevant revision I think you are right, unfortunately it takes the first tracked target from the list, so if you cast another one, you would still engage the first (unless tracking is lost). So the only option would be turn away from the target for a few seconds so it gets stale.
IRON & WOOD Sep 2 @ 8:07am 
One small problem, I used "command:fw-cast" to lock onto a target and everything worked fine, "CTRL TKVR" worked perfectly.
However, if I find a more threatening target and want to lock onto it, I have to completely destroy the current target first.
I tried to turn off control takeover using "toggle:aim," but I can't use "command:fw-cast" to lock onto another target. Turning control takeover back on re-locks the original target.
Am I missing something? Or is this just how the script works?
cheerkin  [author] Feb 13 @ 3:52am 
Congrats on making fool of yourself, everything you said shows you are incapable of reading instructions.
Mischief_Master Feb 12 @ 8:43pm 
Shit mod, doesnt detect any of the WC guns I have, most the commands and keybinds dont work and the CCIP (or PIP as you call it) is horridly inaccurate and runs at like 2 fps
cheerkin  [author] Dec 30, 2024 @ 7:39am 
Не совсем понял. Напиши подробнее в Feature Suggestions.
BigStar Dec 29, 2024 @ 1:08pm 
Хотелось бы облегченный вариант скрипта, где просто захват и ведение цели без расчёта траектории, это было бы полезно для разных систем.
cheerkin  [author] Nov 11, 2024 @ 4:17am 
Thanks!
I've tried and it works for me (controlling through RC while sitting in a cockpit - not subgrid cockpit though but should not matter).
Make sure your RC is added to script group, and you are looking through appropriate camera when RCing. Tried in that shuttle mentioned on this page.
zen Nov 10, 2024 @ 11:02pm 
Excellent script, Can't seem to get it to function for my specific use case though.

I control my ship from a subgrid cockpit via a remote control for aesthetic reasons

Got an idea how I could trick it to work?
cheerkin  [author] Oct 30, 2024 @ 1:45pm 
Glad you liked it, and I'm happy to see the vid that makes use of the script, that happens not that often. Thank you!
leoli6 Oct 30, 2024 @ 10:04am 
this is dope i have so much fun with it, im still learning tho cause ima noob with that kind of stuff. but anyway even if it took me a few hours to make it work it was worth it, the ref build help a lot mate thanks for the time u put in it :steamthumbsup:
https://www.youtube.com/watch?v=FO6axGWSIE8
cheerkin  [author] Mar 23, 2024 @ 7:56am 
I've just made a ship, put CTC in the group, and it works (shows CustomTurretTargeter as data source), so that's something on your end.
Continuing this convo is pointless, as here on the main page it is just a false claim.
If you want to be constructive, report in pinned Bug Reports discussion with more info, repro steps, maybe a video.
LeNi Mar 23, 2024 @ 7:42am 
Works fine for the front, not for the turrets tho. Goes blank.
Put it all in the same group, Controller and everything, nothing.
So unless there are some extra steps, cant get this to work at all on custom turrets
cheerkin  [author] Mar 23, 2024 @ 6:51am 
It does work.
LeNi Mar 22, 2024 @ 9:49pm 
This doesnt work for custom turret fyi
cheerkin  [author] Sep 10, 2023 @ 12:55am 
Works for me, both this (1.0.64) and 1.0.71 RC
TheNightOwl Sep 8, 2023 @ 2:51pm 
ok since the recent update i think this might have broke
cheerkin  [author] Jul 8, 2023 @ 12:59am 
I don't know anything about WC radar converter, doubt it would work. I'm talking about "APCK Weapon Core Targeting" script.
Like I said, to fix misalign you have to figure out vertical/horizontal offset parameters for your cockpit by trial and error. Then you leave them as custom data commands so they get in effect automatically.
The reason - it's impossible from a script to know players' head position and it's different for most cockpits/seats.
THE EXE DUDE Jul 7, 2023 @ 11:46pm 
cheerkin i have tried using the script of the WC radar Converter and it didnt work 2 the weapon is getting identified by the script but the lead is missaligned and im pretty sure the cockpit is the issue since my setup is a consty pilot seat with a subgrid canopy which has the hud but idk how to know when its aligned even tho the view looks centered
cheerkin  [author] Jul 7, 2023 @ 4:39am 
Hi! WC messes up vanilla so this script would likely have problems in WC worlds. There are some workarounds though. You likely have 2 WC-related issues:

- HD does not know about modded weapons and can't just control them out of the box. It can't trigger shooting and can't get ballistic parameters (velocity, range, etc). You can work around that using custom weapon trigger feature (with timer block and grouping)

- WC messes up both raycast and turret targeting

One guy made an adapter script that would pass WC targeting data and fix those issues, it works with AutoPillock, though I don't know if anyone tried applying that to HudDog. Also I'm in the middle of reworking all related scripts, HudDog would be updated too in the near future.

About lead misalign, two possible reasons. One, the weapon is not detected properly (likely because of WC). Two, you use some non-standard cockpit which has different astronaut head position, so you need to adjust offsets (read those guides).
THE EXE DUDE Jul 6, 2023 @ 11:54pm 
Hello im having 2 major issues 1 lead indicator is missaligned and cant lock using cameras im Using WC so turrets are broken i have a WC radar turret but doesnt seem to work i also have 4 cameras and the lead indicator is very far from correct worth noting im on DS if u need the ip of the server is
IP: 131.226.242.83:27010

There should be 2 planes i made with the script the world has lots of mods and WC overrides if u need more info send me friend request an ill be happy tov awenser
cheerkin  [author] May 30, 2023 @ 4:12pm 
I also don't have doubling in my dev version, but instead I don't have texts at all, so no screen is detected as primary. Anyway, good case to investigate, thanks for report (should've been posted in bug reports discussion btw to not get buried and forgotten).
cheerkin  [author] May 30, 2023 @ 4:10pm 
Yeah, your guess is correct. The code checks cockpit forward vector intersection with screens, and if it touches, then that screen is considered main. What you suggest would complicate things by a fair degree, because I would need to check for screen/text size and deduce what screens need to receive text, because the whole text is grouped for performance and all offsets are based on screen edges. Not worth having less performance for one specific case I guess. I can solve doubling issue though, whichever screen passes the check would be the only main screen, but the text would still be pinned.
Saint Valentine May 30, 2023 @ 1:07pm 
any way to use two horizontal connected transparent lcds without duplicating the hud text twice? i want it to span across both screens, but only the pip road/circles displays correctly, as if the two were a single screen. all other hud elements are duplicated. my best guess is it's because I'm using a rover cockpit, so it can't decide which screen is the "main" screen (bc the center of the cockpit is exactly between the two screens). ideally, it would just treat each screen as half of the main screen.
Pufferfish 120 May 10, 2023 @ 3:37am 
Nice
defamai May 8, 2023 @ 8:17pm 
Sent you a friend request.
cheerkin  [author] May 8, 2023 @ 6:09pm 
DM me on discord, I'll send you current version if you wish
cheerkin#0497
defamai May 8, 2023 @ 5:17pm 
Yeah, that makes sense. What you've suggested (pre-igniting the next one) is precisely what I had in mind. I'd be happy to contribute that to your script myself once the unminified script is published.
cheerkin  [author] May 8, 2023 @ 3:39pm 
I mean the key feature of the ripple fire is that each gun is individually aimed at the point with precision. If you just make delay too small, then the agent won't have enough time to readjust aim for the next gun, if it is spaced away far enough. And for railguns specifically that would cause the previous one to miss, because it won't release the shot in time.
cheerkin  [author] May 8, 2023 @ 3:36pm 
No, you are not supposed to change that delay. The value is tuned specifically for railgun wind-up time. You want to actually wait until it finishes its' firing animation and release projectile, and only after that switch to next reference gun. Yeah, I could've made more sophisticated logic just for railguns, pre-igniting the next one while the current still is in firing state, subtracting that time diff from the next delay, etc, but the stuff is already complicated enough.

I'll release it to some hosting later, need to sync it with my other scripts changes first.
defamai May 8, 2023 @ 11:05am 
Also; would it be possible to get an unminified version of the script so that I can poke at it?
defamai May 8, 2023 @ 8:38am 
Hey Cheerkin. Been using a number of your scripts. They are quite potent, thank you for sharing them!

I'm using this script to control the main railgun battery on my ship. The battery consists of 32 large grid railguns, which I'm using the ripple fire mode with to snipe out power systems in enemy ships. This works quite well, and allows me to kill targets from considerable range with minimal collateral damage.

Is it possible to speed up the rate at which ripple fire functions? I'd like less of a delay inbetween shots if possible. I've looked through your documentation, but haven't been able to find anything.
cheerkin  [author] Apr 7, 2023 @ 3:42pm 
Check the reference ship and compare your set up.
tigergamer20096 Apr 7, 2023 @ 12:19pm 
when i lock on, nothing happens. have i done something wrong? ive set up the LCD, cockpit, and the PB in a group, the hud comes up but when i lock on, nothing changes.
cheerkin  [author] Apr 2, 2023 @ 10:05am 
I don't think there is one. If I don't want to continue shooting a target, I just don't shoot or turn auto-aiming/fire off. If I want to shoot another target, I raycast it. Maybe there are specific reasons to cancel lock instead, they are just not obvious for me.
Endemis Apr 2, 2023 @ 7:04am 
Which command allows you to cancel the lock on the target?
Endemis Mar 31, 2023 @ 9:41am 
i add camera in "raycast" group and it work!:steamhappy:
cheerkin  [author] Mar 30, 2023 @ 3:53pm 
It works. Get the reference ship, there is action 3 on the first toolbar for it.
Endemis Mar 30, 2023 @ 4:03am 
command:fw-cast (raycast lock / add offset)

Dont work. How to lock a point to fire?
cheerkin  [author] Feb 12, 2023 @ 5:02pm 
Put commands in PB CustomData. Just like the reference ship has.
Praise the Lamb Feb 11, 2023 @ 4:19pm 
How can I have my settings such as seat pov offset set automatically on load?
cheerkin  [author] Feb 6, 2023 @ 3:46am 
Please provide more specific info about your set up and what exactly looks wrong - in Bug Reports discussion.
doc.valentine2014 Feb 5, 2023 @ 4:26pm 
Good script, really like how it looks, I'm using a modded weaponcore weapon however and I can't seem to get the lead right regardless of how I adjust it, what would be a good suggestion for making my fighter lead shots closer to the target?
cheerkin  [author] Jan 9, 2023 @ 6:32am 
Yes
RoyalWaffles Jan 7, 2023 @ 6:28pm 
Instead of using a bulky turret for target designation to get a lock, Could you use a Turret controller?
Ctaehko Dec 11, 2022 @ 7:36am 
i got "useable" reliable results with a jolt gun, to follow up, i can use the leading as a baseline and adjust according to circumstance, cant fully rely on just the automatic leading
cheerkin  [author] Dec 11, 2022 @ 4:26am 
The script always had special solver for rockets, they never spawn at their max velocity. If no mod is affecting initial velocity, desired velocity and acceleration of rockets, they should be fine.
MyCrabs Dec 11, 2022 @ 4:08am 
Hello, i have some problems with rockets.
in server where i play, rockets not fly on max speed at start, script can calculate non static speed of projectile like this?
cheerkin  [author] Oct 21, 2022 @ 10:49am 
Glad to hear! Did you get reliable results with jolt gun in the end?
Ctaehko Oct 21, 2022 @ 9:53am 
Thanks, it works well enough for my purposes now so I guess the issue is resolved.
sorry for bombing the comments, I didn't wanna split the conversation into multiple places in case someone else has the same issue, and will look at our conversation for help.