Space Engineers

Space Engineers

1,143 ratings
SWCS | Whip's Subgrid Wheel Control Script
7
3
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
810.377 KB
Jul 19, 2018 @ 5:20am
Apr 18, 2023 @ 4:51pm
13 Change Notes ( view )

Subscribe to download
SWCS | Whip's Subgrid Wheel Control Script

In 1 collection by Whiplash141
Whip's Scripts
22 items
Description

  Description

This script allows you to control steering and propulsion of wheels attached via pistons, rotors, or hinges using regular movement keys! Wheels will also emulate brake inputs as well.

The acronym is pronounced like "swicks" :)

This is a feature we have been dying for for ages, and Keen has finally allowed this control in the new MP update :D




  How Do I Use This?!
Setup
  1. Place this script on your ship with subgrid wheels
  2. CHECK OWNERSHIP
  3. Enjoy!

Seat Priority
Seat prioritization closely matches vanilla for simplicity. In order of highest priority to least:
  1. The main cockpit on the ship
  2. The first controlled seat that can control wheels
  3. The first seat the code finds

Other Features
  • You can configure variables like the braking constant in the Custom Data of the programmable blocks this runs from
  • Handbrake (P or toggling handbrake on for the seat that you are controlling the wheels from) is synchronized across all ship controllers on the grid. If you place remote controls on the subgrids that have wheels, this will make the parking brake much more effective!


  How the heck does braking work?
Poorly. This is because of several things:
  1. There is no brake toggle option for individual wheels. To apply brakes to a wheel, you must do that via a ship controller.
  2. A ship controller can only apply brakes to the wheels on its grid
  3. As of update 1.199, ship controllers with no wheels on their grids can no longer be used to read braking information

Handbrake
If you hold space...
Hand brakes will be enabled for the duration of the keypress.

Toggling Parking Brake
If your main ship controller has no wheels on its grid...
To toggle parking brake, you must use one of the following script arguments:
brake_toggle brake_on brake_off
If your main ship controller does have wheels on its grid...
To toggle parking brake, hit the

key (default parking brake key)

How Brakes Are Applied
If your subgrid wheels are on the same grid as a ship controller...
When parking brake is toggled, the ship controller will be used to turn brakes on for that grid's wheels.
If your subgrid wheels are on not the same grid as a ship controller...
When parking brake is toggled, the script will attempt to approximate parking brake by controlling the wheels to slow you down. This is less effective than the alternative, but it is better than nothing.


  Author's Notes

I hope y'all enjoy this! I've had a framework waiting for ages on the chance that this functionality would be added, so I was ecstatic when I saw that these functions were in the MP test branch!

I tried to make this script crazy simple to configure, so I hope it doesn't backfire XD

There is no brake override (the checkbox in terminal is something completely different), so I had to improvise. It isn't perfect but it works.

Be sure to report any bugs below in the Bug Reports discussion.

(Also, this should also go without saying, but do not reupload without explicit permission from me, not even to mod.io.)

Popular Discussions View All (5)
47
Nov 14, 2024 @ 7:07pm
PINNED: Bug Reports
Whiplash141
8
Nov 22, 2021 @ 6:44pm
PINNED: SWCS Creations!
Whiplash141
1
Aug 25, 2020 @ 2:22pm
Great Concepts I have for. Scripts
mhwyoshi
512 Comments
godsshadow755 Oct 3, 2024 @ 1:53am 
ok i got it had to put the arguments in custom data then toobar the run PB Argument Brake_toggle, then everything started working right
godsshadow755 Oct 3, 2024 @ 1:39am 
where do i put the arguments do i put it in the custom data of the cockpit or the program block itself?
Whiplash141  [author] Oct 2, 2024 @ 11:47pm 
have you read the entire "How the heck does braking work" section above?
godsshadow755 Oct 2, 2024 @ 11:03pm 
cant seem to get the braking to work on sub grids, I put that argument in the cockpit but I cant turn brakes on
OVERLORDTHOR Sep 23, 2024 @ 10:45pm 
Is there a way to get this working with remote control?
Whiplash141  [author] Jul 20, 2024 @ 11:30pm 
Sounds like the wheels are friction binding. Experiment with friction and steer angles
Eliree Jul 20, 2024 @ 8:16am 
Fot some weird reason , my rover instantly brakes when i turn the wheels , any idea what this could be ?
Into May 20, 2024 @ 9:26am 
My cockpit changes direction, how do I ensure that forward stays forward and doesn't change with cockpit direction?
E-Man720 Mar 14, 2024 @ 8:47pm 
This gets asked monthly I swear. It's not a mod, that's why it doesn't show in mods. It's a ingame script.
Poutine Mar 14, 2024 @ 1:45pm 
For some reason, I can't find this mod in my modlist? Am I a moron or am I just blind? https://i.imgur.com/RqOS3iP.jpeg https://i.imgur.com/a2pa8No.jpeg