Space Engineers

Space Engineers

HudDog - dogfight tracers, lead, autoaim
 This topic has been pinned, so it's probably important
cheerkin  [developer] 29 Mar, 2022 @ 5:32am
[IMPORTANT] Change notes, guide for newer features
The main description page has limits, so extended info regarding new features goes here.
< >
Showing 1-3 of 3 comments
cheerkin  [developer] 29 Mar, 2022 @ 6:01am 
1.0.51 is out
Summary: W2 weapons support, ripple fire, custom weapon groups, ITargeter providers.

W2 weapons support

Add vanilla weapons to the coaxial-weapons group, as before. New ballistic models are implemented: heavy ballistics (arty, аss-cannon), light ballistics (gats and autocannons), rail (railguns). Implemented simple bullet drop correction.

Ripple fire

Slow firing weapons can benefit from new fire control behavior called ripple fire. The controller would cycle through weapons, changing aim reference point, so each shot would go exactly into aim point (instead of firing all at once, where shots would travel in parallel and mostly miss the aim point).

Heavy ballistics and rails get this by default. This behavior can be toggled by "toggle:coax-ripple" argument run.

Custom groups can enable this by having [ripple] tag in group name.

Custom weapon groups

Organize weapons into group with [hd-coax] tag. Example:
'coax custom [hd-coax][ripple][v=500][r=1000]'

You must provide v and r tags that define muzzle velocity and range.
[ripple] tag enables ripple fire behavior.

Weapons should support IMyUserControllableGun interface. You can try it with mod weapons, chances are they may support it too. Just add appropriate range and velocity tags.

ITargeter providers

There are following implemented targeting provides as of 1.0.51:
GPStargeter
TurretControllerTargeter
RaycastSingleTargeter
RaycastTrackerTargeter
TurretAiTargeter
DataLinkTargeter

They are checked in the order defined above. I.e. if you have active point for GPStargeter, all subsequent targeters are ignored.

GPStargeter - run "command:gps:X:Y:Z" (or place this command into CustomData to activate it on every recompile or world load).

TurretControllerTargeter - add turret controllers (with camera or weapon) to the main group, enable AI on them.

RaycastSingleTargeter - run "command:single-cast" looking through unobstructed camera, range is limited to 5000m.
You need to have at least one camera in "raycast" group. Add there cameras that would be used for tracking, they should not be blocked by glass or grid superstructures.


RaycastTrackerTargeter - run "command:fw-cast", range is defined by "raycast-range" set-value.
You need to have at least one camera in "raycast" group. Add there cameras that would be used for tracking, they should not be blocked by glass or grid superstructures.

When you see a big circle, you can execute a massive scan burst covering area in the circle. If you happen to catch the target in the crosshair, the burst would be spared.
At the bottom you can see stats about raycast subsystem - how many range your cameras had accumulated, charge delta (it can go down if you are tracking too many targets at long range).
Hitting the target with raycast precisely would add local target offset (small red diamond). You can cycle through them double tapping Q.

TurretAiTargeter - add turrets to the main group, enable AI on them (same as before).

DataLinkTargeter - integration with AutoPillock/TGP targeting network.
Last edited by cheerkin; 29 Mar, 2022 @ 6:07am
cheerkin  [developer] 22 Apr, 2022 @ 8:41am 
1.0.62 is out
Summary: custom/modded/complex weapons support, turret AI improvements, target offset manager.

Custom/modded/complex weapons support

Create a group named
"your dakka name [hd-custom][v=500][r=1000][d=5][fwO=10]"
where
v - projectile velocity - required
r - projectile max range - required
d - deviation threshold, i.e. accuracy in meters (how far from the point the weapon triggers)
fwO - forward muzzle offset in meters (that is added to your reference forward block)

That group needs to have at least a welder, or a timer, or both. If there is a welder, it is considered weapon position and forward reference. Otherwise, the timer is considered weapon reference.
When the reference block is aligned towards a target point, the script would trigger the timer and activate welder (if present).

Target offset manager

Target offsets are local points in target coordinate system. They can be added by TurretAiTargeter (auto) or RaycastTrackerTargeter (by user).

"command:fw-cast" works as before, adding offset if raycast hits the same target once more.
"command:remove-offset" removes last raycast offset.

Double tap Q cycles offsets (it no longer changes zero-range).

"command:tom-src" - changes offset collection from raycast to ai-turret and vice versa.

Other changes

Inertial ballistic model is no longer added by default. Use "command:enable-inertial-pmw" if needed.

New set values:
"turret-ai-cone" - cone from 0 to 1, default 0.85 (dot). Higher value means narrower cone.
"squared-offset-filter" - min distance between offsets (squared), default is 16 (4 m)
toggles:
"aim-to-center" - false, if set then targeter would just aim to the center.
commands:
"enable-inertial-pmw" - add Inertial ballistic model
"tom-src" - changes offset collection from raycast to ai-turret and vice versa.
"remove-offset" - removes last raycast offset.
cheerkin  [developer] 4 Oct @ 2:15pm 
1.1 is out
Summary: big update with a lot of improvements and new features, interop-compatible with the rest of 1.1 APck ecosystem

New features

Bomb sight
New free-fall ballistic solver allows dropping "smart" bombs with proximity detonation, timer triggers and real-time HUD output.
https://www.youtube.com/watch?v=-hPqXRmgp1M

To make a bomb you got to have a "linker" block. It can be a merge or rotor/hinge, should be on the "bomb side", i.e. the grid which would fly away.
The linker block is tagged with [bomb] keyword and optionally with tags detonation, precision or name.
Example: Small Merge Block 1 [bomb][detonation=3][precision=1.5] Example: Hinge [bomb][name=Fatso]
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3580553924
The following tags are supported:
name - custom name for UI
detonation - proximity fuse range
precision - deviation limit for auto-drop purposes

You don't have to put bomb blocks in any groups, it all starts from the linker and initializes after the bomb detaches.
A bomb can have timers with a tag which sets a distance from target to be triggered at. For example, Timer Block [150] would trigger 150m before impact (main purpose - item nukes).

Bomb can be dropped in target-less mode (in that case it would deduce detonation altitude based on your ship current altitude but that's apparently not reliable).
After 50m of flight a bomb would arm all warheads. The HUD would show its position as a green dot, and there would be a progress circle in the middle.
The HUD would show the "scheme" of your bomb hardpoints (top view), color coded (blue one is selected).
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3580596256

In case of real target data the solver would show the future target position and you can align the PIP (aka CCIP) with that, or let automatics do that for you.
If you have auto drop enabled, the new "autodrop-timeout" set-value would act as a cooldown (60 ticks by default).

command:cycle-bomb - cycles hardpoints
command:drop:first - drops currently selected
command:drop:* - drops all
command:drop:substring - drops matched (linker block custom name substring)

Hardpoints are one-use from the pov of the code, there is no refresh command yet. If that could be useful, let me know.
For best results I recommend using APck in non-dampening mode (zero-g style flight in gravity) or dropping from max speed at horizontal flight to have steady PIP.

Mouse-shift target offset
Toggle-able target point shift in the target coordinate space to adjust auto-aim or expose the target point to other scripts.
toggle:mouse-shifting to switch. Upon switching the offset is cleared.
When used, the target position would be replaced with the offset one (velocity would still be considered as usual).

Passenger seat controller support
You can now use seat with a remote control.

Pov camera spring simulation
The HD now compensates the in-game head sway feature (happens when accelerating) - eliminating the HUD markers float.

Built-in definitions for all current vanilla cockpits and seats
Built-in local camera PoV offsets for all vanilla/DLC cockpits and seats (as of SE 207).
The old approach of using set-values is gone, now you can use "MyIni"-style config in the specific seat CustomData in case you need tuning.
Example:
[hd-head-offset]
X=...
Y=...
Z=...
The above is the local coordinate of astronaut head in the block space. It would substitute the built-in offset if there is any for a given block SubtypeId.

Lockless funnel auto-range when near planet surface
When you are near a planet and have no lock, the zero-range would dynamically update based on look direction. The idea is that the target is likely at the surface level and that is a good reference to eyeball actual distance. It does not use the raycast for performance reasons, so it's not perfectly accurate and works as if a planet was a perfect sphere with no terrain fluctuations.

You can also use command:set-value:zero-range to set it explicitly (before it was based on gun range).

Ripple pre-ignition (railguns)
The HD would trigger railguns in advance, before actually switching the aim reference. In other words, it would trigger them fast but with a phase shift. This is needed only for railguns due to their fire delay. As a result, you can get a good burst rate with no precision loss. Keep in mind that weapon group guns are ordered by their custom name, so you can control the sequence to minimize the angular change when swithcing to the next gun.

"ripple-increment-interval-rail" value sets the switch time for railgun subtype. Default is 20 ticks, but lower values are possible depending on the mass/gyros of your grid (I've used 8 frames for small grid and got perfect precision).

Built-in support for WeaponCore targeting and weapons

The new WcTargeter uses GetSortedThreatsByID from WC api to deal with targeting. In case WC is detected, all other (local) targeting sources are disabled (raycast and turret ai are unusable with WC)

Keep in mind that WC purposedly adds a randomized error to target data given to scripts to make them a less attractive option.

The HD would now use GetCoreStaticLaunchers from WC api to get all fixed weapons and would use generic action hooks to switch firing on/off (which is a bit slower). That means in most cases you won't have to deal with hd-custom group set up to make use of WC.

Globally visible targets and offscreen target markers
The HD is fully plugged into APck ecosystem and would show up all target offers from global channel on HUD, and you can now cycle them. It can also act as a target data emitter for other scripts (APck, RWC and others).

Changes

New rocket solver
Rockets should have nearly perfect precision no matter what relative velocity is.

Improved gyro control
Autoaim efficienty increased and should be decent at any target direction change rates.

command:set-grid-accel:X:Y:Z can be used to tune the rotation (they represent your average estimated acceleration per axis).

Perfect projection for all vanilla/dlc seats and small/large grid transparent LCDs
The screen thickness, texture size, head local positions were ripped directly from the game.

Target providers were replaced by new system
Raycasting, turret ai and external sources now work in parallel.

command:set-selector:First|Loop|Crosshair switches the way your target is picked up.
Repeatedly running command:set-selector:Loop would cycle the targets.

For raycasting add cameras to a group "hd-raycast". Make sure these cameras have clear view with no blocks in front of them. Do not add a camera through which you are planning to look when raycasting.

command:static-cast makes a static target point via a raycast.
command:gps:X:Y:Z makes a static target point for provided coordinates.
command:cast starts a raycast tracking (dynamic, maintained, make sure you have enough cams).
command:clear-rc clears dynamic and static raycast sources.

Last edited by cheerkin; 4 Oct @ 3:49pm
< >
Showing 1-3 of 3 comments
Per page: 1530 50