Space Engineers

Space Engineers

Not enough ratings
APCK Control Module
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
4.049 MB
Nov 21, 2022 @ 10:41am
Dec 11, 2022 @ 2:19am
4 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
APCK Control Module

Description
Reference carrier control module for the AutoPillock script.

Summary
Basic APck set-up with TreeMenuCommand for convenience. Got 5 docks and built-in navigation grapth, 5 drones included.

How to use:

Quickstart
Watch videos for the basic operations understanding.

Spawn the module in space, get into control seat.

Get the latest code from AutoPillock2. [s]This blueprint won't get updated very often from now on[/s].

Make sure drones are linked, sometimes if the game takes time to load, you may need to run global recycle command (it forces all PBs in antenna radius to "soft recompile").

Run wingman task to make drones depart and wait in formation.

To attack, there are several simple ways.

Cruise-fw (Rush B mode)

cruise-fw is a task type that makes a drone infinetely go forward, maintaining altitude (they can do full orbit). Just set formation interfal higher and make them do forward sweep. If they find enemy, they would attack.

Formation guide

You can adjust the formation depth offset and guide them like a SACLOS beam-ride. They would go to your crosshair. Guide them close to the enemy so they sense it with their turret ai (600/800m).

If you set FreeFire response, they wont switch to attack task automatically and would just shoot maintaining formation. In Attack response mode (default) they would engage in close combat behavior.

To force them retreat, use break-off menu option. Check the actual command in TMC to understand how it works - break-off is just an alias.

Forced point mode
Setting a point using raycast point or rangefinder + fw point, or GPS reader.

  • Raycast point just sets the point using main camera raycast. It would show coordinates on right bottom panel (command:raycast-pt looking through main camera). Max range is 5000m.
  • command:read-gps-from:{block name} would read CustomData and attempt to get GPS from it. For quick testing, you can place this command into CustomData for auto-run on recompile. Just place GPS in keen format.
  • command:rangefind would do a raycast, but instead of setting point, it would set a Range value. Then if you run command:range-pt, the point would be set as your Range projected towards your look direction. If you want for a drone to move to position above ground, you can rangefind the ground point, then move your crosshair higher, and set the point there. Yeah, kinda meh. I probably would remove this feature.

Intel scripts

You can use HudDog or TGP (if you happen to have one and know how to use it) for more sophisticated raycast tracking. HudDog can make APck subscribe for its' data link, same with TGP.

Main controls

Toolbar 1-1 to toggle TMC control capture (arg "cc")
Toolbar 1-2 - main cam
Toolbar ?-(1-7) - TMC quick action keys
Toolbar ?-(8) - main cam
Toolbar ?-(9) - TMC go back (arg "esc")

Customization
Building an actual carrier based on this.

Landing area

Video guide

If you want to add docks, build them and tag them "dock-host".

To modify navigation mesh, use following commands while flying subordinate ship. You can check if it is linked by looking at its' PB printout, or by looking at the carrier winman count on the output screen.
command:clear-navs
command:d-path-add:node
command:d-path-add:entry

Take a drone, make sure its' linked, then fly using remote control at the exact spot where you want the node to be, then run either d-path-add:node or d-path-add:entry. If all goes well, carrier PB printout should output Navgraph:(number of nodes). You need at least one entry and one normal node, otherwise bad things happen.

Added nodes get linked to existing node.

Entry nodes act as transitions between world and "interior". When docking, an agent would search for the nearest entry node, and ask carrier for path. The path would be build to the NON-entry node closest to a dock.
Undocking works the oppsite way: the nearest non-entry node is chosen, and the path is built to an entry node that is closest to a destination.
When building node, think about the way the path would unwind. Look at every dock and imagine how drone would go for the nearest node. Carefully add nodes at corners.
This ship has only two normal nodes and two entries, and that's enough.


I placed red cubes (roughly) at entry nodes, blue ones at normal nodes. Note how I specifically placed the "first" (closest to control seat) node a bit closer to the "crossroad" so the far pair of docks is a bit closer to it than to the crossroad node. This way I ensured that docking drones would go to the between-docks node and not straight to connector after crossroad

If you want to revert to basic docking mode, which is faster and simpler if you are using open deck, then just run command:clear-navs and recompile the carrier PB (a-core).
In the basic mode all drones would rush to docks at once, so it should be planned accordingly.
In nav graph mode path is locked and they proceed one by one.

Engines and other devices

It now runs fully functional APck core script, but the blueprint still has no thrusters "captured". If you want to have APck be in full control of your carrier, clear-defs after adding them (refer to the building guide).

To build the actual ship, just add thrusters and everything, but remember not to replace initial core blocks like forward-gyro, autopillock-remcon, control seat and the main camera.
TMC set-up is free to be changed, but leave the PB in place. Main camera should be forward-clear because it is used for rangefinder and raycast-pt commands.
This APck won't mess with thrusters so you need to rely on Keen dampening and all (for some reason the ship undercompensates in the gravity because of drone weight. How do you guys even play this game?)

Important note

If you have issues or questions related to script operation rather than this specific blueprint, please proceed to the main AutoPillock script page, make sure you read documentation, FAQ, Known Issues, and ask there.

Please use the script from the main page, or at least check the latest version number there. I won't always update every blueprint when new AutoPillock version comes out so it is not guaranteed to be up to date.
Popular Discussions View All (4)
30
Jan 7, 2024 @ 3:31am
PINNED: Bug Reports
cheerkin
6
Nov 28, 2022 @ 8:34am
Next steps
cheerkin
0
Nov 22, 2022 @ 1:51am
FAQ
cheerkin
41 Comments
Stollie Jan 6, 2024 @ 3:59am 
Darn, that's a shame, could maybe use sensors, range of 50m might be enough distance to avoid a crash.
cheerkin  [author] Jan 6, 2024 @ 12:40am 
Keen (and ModApi iirc) can directly query in-game objects tree to get potential neighbors of a drone very efficiently in one line of code, while in script this is a huge problem than can't be solved cheaply.
cheerkin  [author] Jan 6, 2024 @ 12:37am 
The issue with collision avoidance in scripts are various bottlenecks. IGC has a limit of 25 messages in a queue, drone counts can easily get to hundreds if you are using sub-units. It is just not feasible to go O(N^2) so needs some centralized PB to handle, which I don't want to introduce so far. Also voxel avoidance and navigation inside of grid can be done in a script, but in much less efficient way that Keen can due to their internal access to world stuff. Its better to assign different positions to drones instead, like wingman task does (or SCAM miners), to avoid the possibility of inter-drone collisions. Though currently this is not a thing for combat tasks, which I'm considering to improve.
Stollie Jan 5, 2024 @ 1:36pm 
In terms of them flying dumb I mean Keen's collision avoidance, not yours :D
Stollie Jan 5, 2024 @ 1:28pm 
I've kinda been wondering if you could use IGC to transmit between each drone its location to avoid running into each other when moving, it sounds like it would be complex as hell though once you start getting up to multiple grids.

I believe Keen's just uses bounding boxes and intersects which is why its so drunk all the time.
Stollie Jan 5, 2024 @ 1:26pm 
@cheerkin - sounds awesome!

Interesting, I'll have a look at that option. I ended up writing my own scripts to do dumb undocking, pretty much shoot up for X amount of distance and also used the carrier bounding box to determine if they should launch backward or forward and then I activate Keen's blocks.

The Basic Task block still sucks, they still run into each other when following the Beacon.

I also interfaced with SPUG's docking script, after using my script to run the the remote control to fly to a waypoint above their saved connection, with collision avoidance on, to get them to return to carrier without smashing into each other, as SPUG doesnt use collision avoidance either.

So between my script the Keen blocks and SPUG's I have them functioning really well in terms of dock, un-dock & combat. Even with APCK though I've seen the grids smash into each other, I'm assuming you're also using thrust over rides with no collision detection due to how dumb it makes the grids fly.
cheerkin  [author] Jan 5, 2024 @ 3:25am 
@Stollie new version probably would be better in combat, current CQB method often puts a drone in danger because it is a function of time. Now it would be a function of current drone position relative to target, so they would be damaged less I guess.

There are Inert and Disabled states that release control, but iirc in current version there is no set-state command. You can try a workaround using thrust delegation, i.e. "command:thrust-delegation:Vtol" to make apck think that vtol script would handle movement (without actually having it).
AN Marc Appledash Dec 25, 2023 @ 7:35am 
also you can have designator turrets on drones and it will also count for all drones over intel system
AN Marc Appledash Dec 25, 2023 @ 7:34am 
AI blocks have 0 scripting interface/api access or what ever you want to call it.

how ever you can extend APck range to 2KM (Vanilla 0 mods) to 2KM with the Arty turret and the offencive ai block since it will extend the range of the arty turret to its full 2KM