Space Engineers

Space Engineers

[APck] TGP TargetingPod
cheerkin  [developer] 10 Feb, 2024 @ 3:20pm
Script argument reference
Script argument reference
There are two types of args - command and toggle. Both can be used in CustomData boot sequence and directly by putting them as an argument and hitting Run button on PB.
Toggle flips its' state whenever you execute it.
Commands can also be seen as two general types - set-value and action.

Toggle reference
Pattern: toggle:<name>
Example: toggle:wb-jab

You can add optional 3rd part to force specific state (true/false):
Example: toggle:wb-jab:true

Name
Default
Meaning
pirate-scan
true
GetNearestPlayer function, works only for SPRT faction, detects players up to 50km.
sweep
false
Reserved, not fully supported.
raycast-burst
true
Additional scattered raycasting around initial ray (or lost target).
stabilize
true
Stabilization for tracker turrets.
lock-friendlies
false
Allow/deny friendly grid raycast locking.

Set-value reference
Set-value is a container object representing some key-value pair that can be changed in runtime by script user.

Name
Default
Meaning
turret-target-min-size
0f
Deny targets smaller than this. Zero means filter is off.
raycast-range
3000f
Distance for manual forward-style casts, but not for maintaining the lock. Big value spends camera resource faster (aka raycast charge).
tracking-clock
1
Set higher to update lock only Nth frame.
squared-offset-filter
16f
"Resolution" for ai-turret-added target offsets, squared (16 means 4m minimum range between added offsets)

Pattern: command:set-value:<name>:<value>
Example: command:set-value:sp-limit:1500

Action command reference
Pattern: command:<name>:<p1>:<p2>:...:<pN>
Example: command:static-cast:600

Name
Values
Meaning
cast
resolution
Manual forward raycast to the distance <raycast-range>. If raycast burst is enabled and no target hit, additional rays would be casted around the initial one, with <resolution> interval (default is 5m)
static-cast
expiration
Manual forward raycast creating a static non-updated coordinates. Use to paint voxels or static bases. <expiration> in ticks means how long that target is "alive" (being emitted). 60 ticks is 1 second.
cycle-offset
Cycle local selected offset for current target (for emitting said offset as a single target when in <MultiTrackingSelector.Selected> emitter mode, or to delete offset).
tom-src
Switch offset provider (TurretAI or Raycast). Offsets are stored in two independent collections. If you raycast a target, this is automatically switched to Raycast source.
remove-offset
Remove current selected offset
next-target
Next target root (grid)
prev-target
Previous target root (grid)
save-offsets
...
Permanently save current target offsets (serializes into PB storage) with associated name and description. E.g.: command:save-offsets:{your-unique-id-text}:Name={text},Description={text}.
set-target-def
...
Import target definition using a data string. E.g.: command:set-target-def:{your-unique-id-text}:Name={text},Description={text}:{x0}:{y0}:{z0}:{x1}:{y1}:{z1}:...:{xN}:{yN}:{zN} where xyz are local coordinates.
cycle-selector
Cycle MultiTrackingSelector (Selected->AllOffsets->AllTargets->Everything), aka emitter mode. This defines emitter strategy (which targets to expose).
set-selector
MultiTrackingSelector value (Selected, AllOffsets, AllTargets, Everything)
Set MultiTrackingSelector aka emitter mode. This defines emitter strategy (which targets to expose).
set-offset-scan-designator-tag
tag
Set this tag to enable scan mode for ai turrets that have the same tag in the name.
set-offset-scan-min-d
distance
Min distance for turret ai scan mode. Targets closer than this will disable scan mode.
set-offset-scan-min-size
size
Targets smaller than the value will disable turret ai scan mode.
set-filter-deny-inertial
true|false
Enable to filter out inertial targets (no acceleration - meteors, debris, etc). Targets free-falling in gravity are also marked as inert.
set-filter-deny-smaller-than
size
Enable to filter out targets smaller than value.
set-filter-deny-missing-sphere
radius
Enable to filter out targets that are not going inside sphere around this grid.
probe-surface
Raycast surface and issue local APck a landing task there.
recycle
Clear program state, re-initialize everything.
reset-rotors
Force rotors to zero positions.
clear-user-shift
Snap the tracker turret back to the current tracked target offset.
drop
Remove tracked target.
drop-ban
Remove tracked target permanently (won't be possible to lock unless program is recycled/recompiled).
set-value
...
See section above.
get-toggles
Integration with TreeMenuCommand script, calls back passing toggle states collection via IGC to provided endpoint.
Last edited by cheerkin; 10 Feb, 2024 @ 5:08pm