Space Engineers

Space Engineers

468 betyg
Whip's Skid Steering Script
4
2
2
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Taggar: other_script
Filstorlek
Lades upp
Uppdaterades
794.397 KB
12 okt, 2021 @ 12:16
27 maj, 2024 @ 14:15
2 ändringsnotiser ( visa )

Abonnera för att ladda ner
Whip's Skid Steering Script

I 1 samling av Whiplash141
Whip's Scripts
22 artiklar
Beskrivning
Whip's Skid Steering Script

  Description
Howdy!

This script emulates tank skid steering using wheel suspensions, and it is able to skid steer without gyros! This is possible because the script uses adaptive steering friction to ensure that wheels closest to the centerline of the vehicle provide the most torque. You can still use gyros to aid in steering, but they should not be required!

Additionally, when you transition between driving straight and turning, the friction change is not instantaneous; instead, there is a configurable ramp-up time that will allow for smooth transitions between different friction settings for driving and steering. This should prevent many cases of flipping due to fast friction increases.




  Features
  • Wheel based skid steering
  • Adaptive steering friction means no gyros are needed!
  • Gyros can still be used to assist with turning
  • Gradual friction ramp-up to prevent flipping
  • Lots of Custom Data configuration options
  • Animated running screens!
  • Works across subgrids


  Adaptive Steering Friction
Adaptive steering friction permits vehicles to skid steer without the need of gyros. This is because wheels closest to the vehicle's centerline get the most friction, and the wheels furthest from the centerline get little-to-no friction. This prevents the suspension wheel system from locking up during turns.




  Setup Instructions
  1. Place this script in a programmable block.
  2. Place the wheels that you want to use for skid steering and the cockpit you will control the wheels from in a group named Skid Steering.
    • (Optional) You can also add gyros to the group to aid in turning, but they are not required.

Now you can configure the Custom Data to your heart's content!



  Custom Data Config
You can configure several settings in the Custom Data of the Programmable Block to fine tune how your vehicle behaves.
Key
Valid Values
Description
Group name tag
string
Name of the skid steering block group.
Draw title screen
true/false
If the animated title screen should be drawn on the programmable block's main screen.
Wheel friction - Driving (%)
number (0 to 100)
Wheel friction when driving straight.
Wheel friction - Turning (%)
number (0 to 100)
Max wheel friction when turning.
Friction ramp-up time - Turning to Driving (s)
number
Time it takes (in seconds) for wheel friction to linearly scale from turn friction to drive friction.
Friction ramp-up time - Driving to Turning (s)
number
Time it takes (in seconds) for wheel friction to linearly scale from drive friction to turn friction.
Gyro power - Driving (%)
number (0 to 100)
Gyro power when driving straight.
Gyro power - Turning (%)
number (0 to 100)
Gyro power when turning.
Gyro rotation speed (RPM)
number
Gyro max rotation speed when turning.
Invert steer while reversing
true/false
If steering direction should be inverted when reversing.
Enable adaptive steering friction
true/false
If adaptive steering friction should be enabled.

Recommended setting: true
Adaptive steering friction max angle (deg)
number (0 to 90)
Maximum angle (in degrees) between the wheel and the centerline for it to have adaptive friction. If the wheel is further off the centerline than this angle, it will have no friction.


  Author's Notes
I decided to completely rewrite my archaic skid steer script that I never "officially" released. I didn't want to release a skid steering script dependent on gyros, so I held off until I figured out how to make adaptive steering friction work.

Hopefully you tank nerds will find this useful!

The tank showcased in the first GIF is the Halvar MBT by Beans and can be found here: https://steamcommunity.com/sharedfiles/filedetails/?id=2626456159

If you want to be able to drive while a different player controls a MART turret, you need to use Digi's mod that fixes that: https://steamcommunity.com/sharedfiles/filedetails/?id=2304767743 This has finally been fixed!

Also, I made the sprites for the cute little running screen using the SESpriteBuilder tool that I developed: https://gitlab.com/whiplash141/spritebuilder/-/wikis/home. It may be of use to scripters trying to visualize and design sprites :)

- Whiplash141
129 kommentarer
Autumn 4 apr @ 23:34 
Fair enough lol, thanks anyways!
Whiplash141  [skapare] 4 apr @ 23:23 
"Do you have one that has a turret position indicator kinda like the screen on this one?"

Yes, i can't remember where I put it though lol
Autumn 4 apr @ 17:43 
Absolutely loving this script. Do you have one that has a turret position indicator kinda like the screen on this one? Would love an easier way to keep track of where my turrets are for the ones with an angle that makes it difficult!
Whiplash141  [skapare] 8 feb @ 12:14 
Yeah I've been meaning to do that
TheHellKat 7 feb @ 7:03 
Hey Whip, been using this script for... Well I'm not really sure, a very long time?

Anyway awesome script, never had it fail on me, I only realized today that it can control subgrids! Honestly had no idea.

One issue with subgrids control is no hand brake feature or brake, would it be possible to add that?

Many thanks 👍
Gemini Sierra 6 jan @ 8:21 
apologies, the description I was referring to was in the comments at the top of the script.
I think the comments/instructions at the top of the scripts are great. save from having to open a separate window to read the notes.

Would you be able to answer my other question, how to adjust the speed of the turning? I think it has to do with the friction settings, but I'm unsure of which to adjust
Whiplash141  [skapare] 5 jan @ 19:17 
@Gemini Sierra:
The description above has Skid Steering in bold and italicized. Always follow the instructions on the workshop page if the comment differs. I will be removing all of the setup instructions from scripts to avoid this desync in the future.
Gemini Sierra 5 jan @ 17:09 
@Jonnyhawkeye
I had that too... and looked in the script... it should be "Skid Steering".
The description has "Skid steering" but the variable it looks for is "Skid Steering"
Gemini Sierra 5 jan @ 17:07 
What variable do I need to change to adjust the turning speed?
LordEidar 23 nov, 2024 @ 13:47 
Hi, I built an asymmetrical rover and when I press forward it pulls on one side? Is it because cockpit is off centre?