Space Engineers

Space Engineers

120 ratings
AutoPillock - universal flight automaton
6
5
2
2
3
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
473.995 KB
Dec 10, 2022 @ 12:21pm
Dec 17, 2022 @ 1:23pm
4 Change Notes ( view )

Subscribe to download
AutoPillock - universal flight automaton

Description
AutoPillock is general-purpose control script with focus on grid movement, formation management and combat.
This script sums up most things I've made in areas related to grid flight: combat, autodocking, formations, missile, clangdrives, weapon controls, gravity drives, this kind of stuff.

Feature highlights
While it may be not the best in some areas, it can replace a few dozens of scripts on its' own.
One pb for everything
Drone/missile/carrier/torpedo are the same thing. Missile can fly and fight like a drone, and carrier can ram target and detonate its' warheads, and a drone can dock on a missile, because why not.
Move/Follow
Point, formation, docking navigation, landing to surface, planetary circumnavigation, player crosshair follow.
Cruise
Keep altitude, speed control, gravity align, zero-g mode near planet, planetary circumnavigation (orbit), limited collision avoidance.
Fight
Different attack behaviors for point or targeted entity attacks. Advanced vanilla and custom weapons control.
React
Automatic configured threat response - free fire, missile launch, attack, etc.
Surprise
Condition-based commands autorun during combat (chance, target type, target size, etc), changing combat face (weapons can be installed in all 6 directions), sudden ramming, etc.
Brawl or snipe
Jab - inertial torpedo launch using ship acceleration.
SubUnit - drones can launch owned guided missiles.
SubUnits
Ref-hack antenna-less agents that run in the same physical PB and can be dynamically added any time any quantities (missile, drone, etc).
They can have their own sub-units, and this recursive structure is ran by a single PB.
Missile/ram
Missile behavior (arm warheads, evasion mode, trigger timers), space-planet or planet-space pathfinding (circumnavigation).
Single thrust or 3d thrust, gravity or even clang drive missiles.
Organize
Wingman: dynamically configured formations based on subordination tree.
Routing: commands can be mass-issued using global/wingman/sub-unit/index/tag filtering.
Dock
Autodocking to any friendly ship (moving or rotating - it does not matter) with navigation graph support (for closed-type carriers)
Business
Cargo: simple trade behaviors (pull or push certain type of cargo).
Repeat behavior for making shuttles with multiple docking stops, waiting, timer triggers, etc.
Persistence
Task queues can be saved permanently and executed automatically or by trigger. Repeat behavior for cyclic tasks.
Almost every thrust type possible
Built-in thrust control:
  • Gravity drive
  • Normal 6-dir thrust
  • Single direction thrust
External thrust provider script support:
  • Two types of clangdrive (mass shift, MMF)
  • VTOL
  • Rover (very basic at the moment)

Modules

Tactical Graph
Formations based on tree subordination. Tree is formed based on ranks and/or proximity. Commands can be issued to the whole attached wing and propagated down.
WeaponBot module
Handling guns
  • Ripple fire mode with individual gun aiming.
  • Switching based on weapon cooldowns, combat distance accounts for available weapons.
  • Support for weapons in all 6 directions.
  • Default weapon accuracy is 2/5m for ripple/pressure weapon groups.
Weapon support
  • W2 vanilla
  • Custom groups with velocity, range, accuracy settings.
  • Player-made weapons like AK-125/8, piston jolts, etc.
  • torpedoes with timer/proximity fuse
  • internally-controlled missiles (aka Sub-Units)
External combat script integration:
  • RWC (custom turrets and rotor-displacement cannon)
  • GRA/GAPS (gravity active protection system)
Condition-based commands autorun during combat and decisions on special weapon usage (missiles, torpedo jabs).
  • Trigger chance
  • Target type
  • Target size
  • Availability of torpedoes
  • Availability of sub-units
Captain module
Task queue management. Default task, wait for signal, repeat task, etc.
Target environment analysis, listening to global targeting link and designator turrets.
Assigns attack orders to WeapBot and move orders to Pilot.
Desides how to react on nearby threats.
Desides how exactly to fly to task position (flight behaviors, circumnavigation, carrier sphere avoidance, altitude checks, etc).
Raycast point, rangefinder, GPS reader to provide simple targeting alternative to TGP script.
Gateway to Command script that allows RTS-like fleet control.
Pilot module
Flight and rotation.
Controls gyros and thrusters to get the grid in a certain spot and rotation, or delegates this task to ThrustProvider service for VTOL/Clang/Rover.
ApckUnit module
Responsible to collect only blocks that are logically relevant to the agent. For example, one grid can be a bunch of drones dead-merged together, and ApckUnit resolves that.
Recursive initialization of units (one PB can control many "virtual" units like drones or missiles that are dynamically initialized and detached by merge block, they don't need antenna).
DockHost module
Provides docking/departure services for friendly agents.
Two modes:
- simple, when no navigation graph is attached - one approach waypoint above connector, no locking.
- navgrapth - runs a* navigation algorithm to tell an agent the shortest route from entry point to assigned dock or vice versa. Allows building complex routes to internal hangars.
Targeting module
Polls designator turrets for targets, provides simple filtering like minimal size.
Listens to global targeting datalink.

Mods support
Mods are not supported explicitly. See FAQ on how to make it work with WeaponCore.

How to start
Basic - carrier with drones - formation control, docking, attack orders
Get the carrier control module blueprint, it has drones included.
Watch demos there, read the description for how to use it.
It got somewhat decent TMC menu set-up that would let you use it without reading too much docs and references.
Basic - just a drone to see how it moves and fights - challenge yourself by passing it to SPRT
Get the reference drone and paste it near an enemy, or pass it to pirate faction.
If you spawn many, they would share targeting data and help each other.
There is a missile-equipped variant to showcase the SubUnit feature. You can change missile launch probability in PB CustomData.

Advanced
Read the building guide

Read the user guide (pinned discussion).
Read the script arguments reference

Got a question?
Please make sure you've read links above, and the FAQ. If you still have no answer, it's better to ask it there, not on this page.

Stupid thing not work
Please do not ask questions until you read relevant description/guide and do not complain on this page.

Questions -> there is a FAQ
Bugs/complains -> Known Issues & Bug Reports
Suggestions -> Feature Suggestions
Popular Discussions View All (9)
73
Feb 29 @ 2:54am
PINNED: FAQ
cheerkin
24
Jan 7 @ 1:40am
PINNED: Known Issues & Bug Reports
cheerkin
14
Apr 29, 2023 @ 11:21am
Feature Suggestions
cheerkin
121 Comments
[HELLBENT] Apr 2 @ 7:08am 
Hi, can I ask you for the source code of this script? I'm a scriptwriter myself and I try to improve myself every day, so I would be very interested in figuring out how some of the features work. I'm mainly interested in optimization: 2 milliseconds for 600 objects, each of which has a gyroscope is great.
overwerk Mar 1 @ 7:38am 
@Deltaprimus It should yes, docks for miners are tagged differently, so unless you mess your definitions they should stay out of each other's way as long as the drones do not have APCK, just the carrier
Deltaprimus Feb 24 @ 6:52am 
can this be used alongside thescam miners on the same ship?
Stollie Dec 19, 2023 @ 5:15pm 
Think I have this worked out now as well, the docked broadswords when thrusters are enabled are fighting the carrier grid, once they undock it goes down to 0.00 :)
Stollie Dec 19, 2023 @ 4:44pm 
OK I think I sorted this out with the clear defs, as you mentioned in the description it needed reset to find all the thrusters. It has this annoying habit of switching between 0.00 and 0.01 rapidly though, is there some way to stop that?
Stollie Dec 19, 2023 @ 6:13am 
Hi I'm having issues with dampners. I think you are overwriting the vanilla dampening with your own version of it if I read correctly.

I'm using the reference control module https://steamcommunity.com/sharedfiles/filedetails/?id=2891606222 and updating the script in it.

What I'm finding is that the dampening doesn't seem to work, it just wont kick in and when I toggle damp-when-idle on or off it seems to make no difference.

Can you please let me know what I'm doing wrong?
Aymira Nov 1, 2023 @ 4:07pm 
i cant find any usable tutorials. I want make a fleet for my freighter but i can only found print ready things. I have a freighter and 4 attack drones. How i can set up? I checked already your channel or youtube but only i see preview or else. Can u make tutorials please? Im so confused. I had download 5-6 scripts about of autopillock but how i can use them? With custom drones? Custom fleets? Mainship? or else?
TheGamingNot Oct 18, 2023 @ 6:02pm 
would it be possible to make a auto defense system with this script? like once one "radar" detects a enemy grid all bases within a certain range send out their drones to intercept the grid, and once the grid is dead they all return to their bases. if theres a guide or video already out on how to do this please let me know
Tueem Oct 10, 2023 @ 11:39am 
And how can I set one or multiple seats to main cockpit using the script? or disable certain seats? is there maybe some tag?
Tueem Oct 9, 2023 @ 3:26pm 
Hey, I got a quick question about the dampener system... When manually controlling a ship with apck and then lock with a landing gear the thruster still fight gravity. Is there a way to disable that?