Stormworks: Build and Rescue

Stormworks: Build and Rescue

68 ratings
Zizo Autopilot System
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
126.459 KB
17 Jan, 2021 @ 3:42pm
21 Nov, 2024 @ 1:02pm
26 Change Notes ( view )

Subscribe to download
Zizo Autopilot System

Description
Map & Integrated Autopilot System for any type of vehicle with true vector following.

Features:
  • Autopilot follows the course rather than just heading to the next waypoint.
  • Circle path mode to navigate around fish hotspots or to use as search patterns.
  • No waypoints limit.
  • Pulse on/off output at arrival for your propulsion systems to stop.
  • Automatic zoom & movements.
  • ETA Display.
  • All monitor sizes compatible.
  • Multiple map designs.
  • Draws the trace you travelled.


Installation
Just save the microprocessor and install in your vehicles. Make sure the physics sensor is facing the correct way.

Setup
The microprocessor offers various customisations:
  • Manual steering: select the way your vehicle steers.
  • Default zoom: sets the map zoom when the autopilot is inactive.
  • Sensibility: decrease this value if the autopilot is steering too sharply.
  • Arrival distance: the distance in meters to the waypoint to consider reached. (50)
  • Tracing definition: meters interval for the tracing red dots. (100)
  • Tracing length: meters after which the tracing is being deleted (30000)

Usage
  • Switch on the display with your custom switch.
  • Onscreen controls:
    A: Toggle autopilot mode (at least one waypoint set).
    W: Sets the final waypoint, input by keyboard coordinates.
    • To add a waypoint, click on the line between two waypoints.
    • To remove a waypoint, first select it and then click on it again.
    • To move a waypoint, fist select it and then select where else it should be.
    • Use < and > buttons to move between waypoints.
    • Use "X" to delete currently selected waypoint.
    C: To enable before pressing "W". This turns the autopilot in circle mode, press "W" in circle mode to draw a circle around your waypoint the autopilot will follow endlessly. Circle mode can only be disabled after disengaging "W".
    • Use < and > buttons to increase or decrease the circle radius.
    M: Change the map coloration
  • Zoom is handled automatically

Credits:
Thanks to cjb for suggesting a fix to an issue.
62 Comments
cjb 11 Jul @ 4:09am 
@kingdomain you can try my fix below from nov 16, it seems to work for me to at least stop the unrecoverable error.
Kingdominian 10 Jul @ 11:08am 
so i am running into the screen and code crashing on reload. Is there a settings or known fix or?
The Duke of Piperton 26 Nov, 2024 @ 9:52pm 
i'm having the same issue as nfsplatinum - my craft drifts back and forth widely when on autopilot. turning the sensibility down fixes the issue somewhat, but tuning it low enough to do so makes the craft unable to turn sharply enough to follow waypoints or circles.
[GER] Talvkes 18 Nov, 2024 @ 7:35am 
@cjb omg... yea...i'm such a dumbass...that was it for me xDD
cjb 18 Nov, 2024 @ 6:55am 
@Talvkes did you hook the physics sensor to power?
[GER] Talvkes 18 Nov, 2024 @ 2:05am 
I might be to dumb to set it up correctly...
The map shows that I'm just north of Sawyer Island, and I can't figure out what I've done wrong.
All logic seems to be connected right, and the sensor is pointing in the right direction too...

Any suggestions on what I've done wrong? :c
cjb 17 Nov, 2024 @ 7:44pm 
It does seem like the 2nd fix is more reliable. If you had a waypoint active on save, then on load they're still cleared and the Stop Pulse is triggered. That could be bad for some craft, but probably better than the script being dead until the vehicle is respawned.

I haven't tested it with the circle waypoint, but I don't think it would cause any problems.
cjb 16 Nov, 2024 @ 5:50pm 
Having only 4096 characters makes this exceptionally hard to debug.

I'm testing out a kind of brute force "fix"; on line 25 of the 2nd lua block, I just exit onTick if somehow the Waypoint list does not contain an entry for sl

if W[sl]== nil then return end

This seems like it _should_ be fine; or at least I can't think of any valid state that this would cause to break. It _just_ fits in the remaining space.
cjb 16 Nov, 2024 @ 12:28pm 
@zizo No problem! Unfortunately it seems like it might not solve all the ways for it to happen.

As luck would have it, in all my tests, the change was effective but now I just loaded a save and hit the bug again. So there's probably some race conditions still. Maybe the fix just makes it less likely. If I find any other potential fixes, I'll pass them along.
Zizo  [author] 16 Nov, 2024 @ 10:40am 
Hello @cjb, thanks for taking your time and suggesting that fix. I tested it and implemented it now.

@nfsplatinum, thanks for reporting the issue, I will look into it to provide a more effective sensibility setting.