Space Engineers

Space Engineers

APCK Control Module
41 Comments
Stollie 6 Jan, 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] 6 Jan, 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] 6 Jan, 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 5 Jan, 2024 @ 1:36pm 
In terms of them flying dumb I mean Keen's collision avoidance, not yours :D
Stollie 5 Jan, 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 5 Jan, 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] 5 Jan, 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 25 Dec, 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 25 Dec, 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
Stollie 24 Dec, 2023 @ 9:13pm 
I tried looking at if I could mix APCK's very nice docking and wingmen formation functionality with the Keen AI offensive blocks, however, they wont attack once a unit is detected 6k out as I think APCK locks them in place. They do turn towards them though strangely enough when the AI block activates.

The best mixture I think would be as you suggest, have a function in APCK that basically 'releases' them and allows the Keen AI block to takeover. You could then use APCK using IGC to turn off the Offensive block I guess and return them to formation?

Feels like it would be a tricky thing to code, I'm currently using SHART to send a command to a timer block with activates the AI recorder block to make them dock. As I mentioned though the Move block is awful at keeping them with your main carrier, constantly see them clump and run into each other like Collision Detection is off, even though its not (according to the Move block settings).
Stollie 24 Dec, 2023 @ 9:10pm 
I had a good play with the APckCommand control bridge, very cool stuff, a bit too finicky to use though when you've come under attack as by the time detection kicks in they are already blowing me up unless I tell the wingmen to charge forward.

I've made a complete carrier using AI automation blocks, I haven't looked if the offensive block has ingamescript functionality, thats an interesting thought..

So the Move block just keeps the Drones using the AI automation blocks following your carrier, its horrible though, they messed up something with collision and they run into each other, they have no beautiful formation like the linear or circle one you made.

The Offensive AI block is different to the move block. It basically 'detects' an enemy then attacks them using the settings you put in, they are pretty effective, I would say they actually out perform APCK in combat against 6 x MES drones which is pretty impressive.

They come back less damaged and more of them return.
cheerkin  [author] 24 Dec, 2023 @ 9:03am 
TGP can be currently found in Commander script blueprint (another one), it controls tracking turrets and allows raycast locking.

Hmm, I think that offensive block does not expose its targeting data to script API, so the only way to utilize it is to poll ai turrets for their targets (which extends "awareness" to 2km in case of arty turret coupled defense block). I suppose you mean you have used just Move Block driving your grid to the target, but iirc there is no way to get target position.

It is an interesting suggestion though. I think I could maybe have a APck mode like "release control and let vanilla Defense block detect target and rotate towards it", and when that happens create a move task towards that direction, turning Automaton blocks off and flying on its own.
Stollie 23 Dec, 2023 @ 12:49am 
I feel like I have the dumbest question - what is TGP and how can I use it to target enemies?

I've been testing this out and from what I can understand it requires the enemy to be in 600/800 range before the wingmen will respond and break formation to attack.

I was looking to basically deploy them as wingman and then if an enemy is detected within 6000 then break formation and attack them, basically a drone screen.

With the new AI Automation Offensive block they have a setting in entity components where you can set the range of detection and I've used it to successfully detect enemies at 6000 and then go blow them up.

I'm basically trying to replicate that using APCK as the movement functionality in the vanilla AI blocks is atrocious!
skyluka 8 Sep, 2023 @ 6:42am 
OK! Thank you
cheerkin  [author] 8 Sep, 2023 @ 6:00am 
Timers on those specific drones are not used, they are just spare ones in case user would want to add some functionality.
skyluka 7 Sep, 2023 @ 10:32pm 
the drones have timers installed. What settings are made in them? When creating the sontrol module, these settings are not selected.
cheerkin  [author] 4 Sep, 2023 @ 3:26am 
I don't understand the question.
skyluka 31 Aug, 2023 @ 1:40pm 
When creating a drawing, the timer settings are not displayed! Can you write what settings you made in them
a Bit Brutal 30 Mar, 2023 @ 6:59am 
just a quick update, i went ahead and copied tags for the antenna and added designator tags to a few turrets (also not sure if i did the refresh on the drones last time,my memory sucks) and it worked thanks for the help
cheerkin  [author] 27 Mar, 2023 @ 1:54pm 
@Mark, he said "and has a child ,my drone has a parent", so the link seems to be there, should be some other issue. Maybe removed antenna after the initialization though xD

@BrutalRIP try it this way: get this blueprint, don't change anything. Use command to clear nav graph on the carrier, check that it says 0 nodes, then take a drone and try adding nodes with those commands, like in the guide. Check what node count the carrier shows.
If it works out, then do your building thing step by step, put the carrier module on your actual ship, etc, make sure that the carrier has non-zero children count, and that drones have parent ID (so they are linked). If you recompile (or copy-paste the carrier) don't forget to refresh drones too, by recompiling their PBs manually or using global recycle command.
AN Marc Appledash 27 Mar, 2023 @ 7:29am 
it does need the rank tag to determine what is the parent and what is the child
a Bit Brutal 27 Mar, 2023 @ 7:10am 
@cheerkin I don't think it's a bug more user error I'm copying the build guide vid (different carrier) I don't see him mess with antenna or designator so didn't add the one from your blueprint is that the issue? I can't actually get on my PC at the moment so can't make a video
a Bit Brutal 27 Mar, 2023 @ 6:59am 
The carrier has a antenna does it need a tag?
AN Marc Appledash 27 Mar, 2023 @ 3:18am 
he answered his own problem xd you need a antenna for the drone to broadcast the nav position
cheerkin  [author] 27 Mar, 2023 @ 2:05am 
It's impossible to guess what's wrong from your message. Please describe the issue in bug reports, what you do step by step, maybe drop a video. It works for everybody, so you may do something specific that leads to an issue.
a Bit Brutal 26 Mar, 2023 @ 8:23pm 
I'm really struggling to create a nav mesh been trying for hrs, my carrier docks marked and has a child ,my drone has a parent , i try draw a navmesh using the drone and commands to add node and entry but the carrier still says navmesh 0 drone is your broadsword control centre is this BP without the engines docks and antenna
cheerkin  [author] 7 Dec, 2022 @ 12:41am 
You can make any APck-controlled ship dock to another one, as long as the target ship has dock-host connectors, and it does not need to be a wingman. It's done by running "command:create-task:dock:TargetId={id of the carrier PB}". You can deduce that id by looking into carrier PB log.

Wingman grouping is a tree structure (carrier can have children ships and they can have their own children ships, etc). A ship can have only one parent, and currently parent does not differentiate children, so it's not possible to have many groups per carrier. I may change that, it's just like this atm.

But you can have non-child ships docked, like I said - the inconvenience is that you'd have to command each of them directly using TMC script or however you want.
cheerkin  [author] 7 Dec, 2022 @ 12:17am 
No discrimination between docks yet, they are equal and are chosen "randomly" for every incoming ship.

I can see having multiple logical groups of subordinates per carrier useful, with some kind of docks grouping, but I have to do many other important features before I handle this.
Nanomed 6 Dec, 2022 @ 5:48pm 
Hey man been playing with this for over a week and loving it. Looking forward to seeing a full command list similar to scam so I can really deep dive.

Is there a way to control another group with the command vessel? The wingmen are awesome, but would love to be able to dock another group of ships. In my case I'm running 2 mining vessels and would like to have them dock while my carrier is moving. Would also need to set their docks to be different then the wingmen.
skatt 22 Nov, 2022 @ 11:53am 
Ляпота
cheerkin  [author] 22 Nov, 2022 @ 11:45am 
Тут, уже готово.
skatt 22 Nov, 2022 @ 11:23am 
ты про дискорд или тут?
cheerkin  [author] 22 Nov, 2022 @ 8:39am 
@AN Marc Appledash, oh yea, I forgot I bought that one just to be able to write HUD scripts.
cheerkin  [author] 22 Nov, 2022 @ 8:38am 
Ща будет подробное видео по настройке navigation graph
skatt 22 Nov, 2022 @ 8:14am 
о.. круто, сажусь разбираться)
Comet 21 Nov, 2022 @ 10:02pm 
YESSSSSSSSSS
AN Marc Appledash 21 Nov, 2022 @ 5:38pm 
@cheerkin the DLC is needed because you use the transparent LCD
AN Marc Appledash 21 Nov, 2022 @ 4:18pm 
this works so well i can even dock and undock at full speed

i love this already time to dig into the BP to make my own shit work to make my mega fleet
Aggelus 21 Nov, 2022 @ 3:34pm 
Show!!!