Space Engineers

Space Engineers

SWCS | Whip's Subgrid Wheel Control Script
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
Souls Feb 18, 2024 @ 10:53pm 
@Whiplash141 appreciate you lookin into it! That makes sense. The same rough setup seemed to work when I tested on a single grid so I hadn't thought about the steering angle.
Whiplash141  [author] Feb 18, 2024 @ 10:18pm 
I got decent behavior by simply disabling steering on the 4 central wheels.
Whiplash141  [author] Feb 18, 2024 @ 10:13pm 
Checked the grid and the script is doing what it is told. The issue seems to be the very aggressive turning angles. You generally don't want (1) all wheels steering or (2) all wheels steering with the same angle. You want them to steer about a convergence point where the outer wheels steer the most aggressively, and the center wheels steer less aggressively.
Souls Feb 18, 2024 @ 2:17pm 
@Whiplash141 Yeah no problem, here: Link
Whiplash141  [author] Feb 18, 2024 @ 8:52am 
I haven't heard any reports like this, no. Got a blueprint I can look at?
Souls Feb 17, 2024 @ 9:47pm 
Having some trouble with this script on a rover. Currently it seems like some wheels lock up and stop applying propulsion when steering and accelerating at low speeds (e.g. holding 'W' and 'A' at the same time), easiest to reproduce when accelerating from a standstill, but hard to guarantee which wheel, or when.

Another issue had the script not drive forward at all, steering control was still fully functional, but neither 'W' nor 'S' would drive anywhere - though it *would* raise the power usage displayed on the HUD. It's like the wheels were fighting each other or something? And no, the parking brake was not engaged :P I cycled it several times while trying to get it to budge, just to be sure.

Have any issues like this been reported before? I'm using a mechanical suspension system so there are a lot of subgrids - three per wheel suspension, plus the 'main' grid, and all joining points use two blocks. Maybe the complexity of the grid connectivity is complicating/confusing things?
Whiplash141  [author] Feb 17, 2024 @ 8:56am 
Just mark one as main
REB Feb 17, 2024 @ 8:05am 
Please add way to prefer/ignore the ship controller, similar to your thruster subgrid control script, as a quick fix I modified the script to have an INI entry to ignore an specific ship controller like this

else if (block is IMyShipController)
{
if (!StringExtensions.Contains(block.CustomName, controllerIgnoreNameTag))
{
shipControllers.Add((IMyShipController)block);
}
}
Whiplash141  [author] Feb 8, 2024 @ 1:40pm 
The way to get perfect braking as enumerated above is to add a ship controller on the same subgrid as the wheels for brake toggling. Otherwise, the script does its best to approximate brakes. You can configure how aggressive the brake approximation is with the "Braking constant" config key in custom data.
Stoner Jezus Feb 8, 2024 @ 11:48am 
both parking brake and handbrake only seem to cancel out propulsion input. The vehicle keeps roling no matter what. The wheels are on subgrids, I upped the value for braking by a lot, and placed a suspension on the main grid, but nothing seems to fix it. I'm using compact 2x2 suspensions.
Sapioit Jan 24, 2024 @ 2:11am 
I understand. Honestly, I wish your scripts were actually in-game features without the need for experimental features being enabled.
E-Man720 Jan 24, 2024 @ 1:23am 
Wouldn't the main issue be script complexity limits when it come to trying to combine them?
Whiplash141  [author] Jan 23, 2024 @ 7:04pm 
@Sapioit
Generating good code with ChatGPT is like trying to win a cooking competition with off-brand Hamburger Helper.

If I combine the scripts, I'm going to do it right.

@Blood Brother:
Glad to hear it
Blood Brother Jan 23, 2024 @ 5:57pm 
Hey Whip, thanks man. It was my own lack of understanding that was the problem, not your mod or the server. I got it working now. Thanks for responding.
Sapioit Jan 22, 2024 @ 10:04am 
Gocha. Thanks for the reply! You could try using ChatGPT to do that for you, and if it doesn't work, you simply don't publish the new script.
Whiplash141  [author] Jan 22, 2024 @ 8:03am 
That's a *lot* of code. I don't have any plans to do that anytime soon.
Sapioit Jan 22, 2024 @ 1:23am 
Could it be possible to merge the 3 subgrid manager scripts you have into a single one? Though I guess that might create more problems than it's worth.
Whiplash141  [author] Jan 5, 2024 @ 7:59pm 
This isn't a mod. It's an in-game script, so you shouldn't be installing it a mod
Blood Brother Jan 5, 2024 @ 3:01pm 
This is a GTX Gaming Server that I pay for. In the server settings both Experimental mode and Enable Scripts are activated. Your mod is literally the only mod that will not work although I've had your mod work just fine in my solo games even when people have joined me in them. Could it have something to do with the fact that I'm using a external server? And if so, why do the other mods work?
Whiplash141  [author] Jan 3, 2024 @ 4:49pm 
MP probably doesn't have scripts enabled then. Ensure experimental mode and scripts are turned on in the MP world's settings.
Blood Brother Jan 3, 2024 @ 10:00am 
Hey Mr. Whip. I would like to use this mod in a private server with my friends but I can't get it to work in MP only in solo play. Can I fix that?
Swann Nov 30, 2023 @ 1:43pm 
Thank you Mr. Whip. This script is simply the most important, most indispensable, most seminal mod ever added to this game. Unequivocally, SE would hold no value to me and be joylessly unplayable without this script. Keen should be embarrassed that Mr. Whip had to provide such basic functionality for them. Thank you, thank you.
Dead_Pixels Oct 31, 2023 @ 7:47am 
Hey Whip! I'm using this script on a series of semi trucks and trailers and noticed something strange. I'm not sure if this is done by your script or the base game though. I have a trailer with 8 axles, all with steering enabled to and none set to invert, and while steering the first axle (furthest to the front) and sometimes the second axle will invert their steering angle. Is this something your script does? If so, can I disable it?
Dahar Sep 20, 2023 @ 9:04am 
Thanks for your script! Is there any way to set cruise control to certain speeds? 10,20,30 m/s. Or add such a function through commands?
Whiplash141  [author] Jul 20, 2023 @ 8:42pm 
See the section "How the heck does braking work?"
Cam Jul 20, 2023 @ 8:05pm 
okay, idk what i did but it seems to be working fine now lol.. now i just gotta get the parking brake to work without having to input a command every time
Cam Jul 20, 2023 @ 7:42pm 
yes, the brakes are off.. the other curious thing is it only overrides propulsion in the control panel. i tried to set a toolbar key and it immediately resets to 0%
Whiplash141  [author] Jul 20, 2023 @ 7:20pm 
The script uses overrides for propulsion. Brakes are off, yes?
Cam Jul 20, 2023 @ 7:16pm 
hey, so i made a bucket truck for no jetpack on planets type of use (basically 4 wheels on a frame with a bunch of subgrids and a helm mounted on a basket) and i when using this script, the steering seems to work as advertised, but i can get propulsion to work unless i use override.. any thoughts? TIA
KeenCritter May 10, 2023 @ 9:32pm 
Specifically, that was for if you activate the parking break through the script and were having issues with power consumption being notably high, which makes this script even MORE useful for 'realistic' runs where power is EVERYTHING. Like on Mars.

Because I'm insane.
KeenCritter May 10, 2023 @ 9:27pm 
So as it turns out, for anyone having issues with the breaking system using HUGE amounts of power... You can actually set up Radio Control on a multi-subgrid setup specifically for the purpose of activating the parking breaks PROPER.

BUT, you have to make sure that you make a hotbar action for turning off the programmable block, because otherwise it overrides.

Here's a fix

Basically:

1) Make a remote block for each subgrid.
2) Group the remote blocks together into a single unit in the control panel.
3) Go to the hotbar menu and drag that group into the hotbar, and make sure to select parking break or whatever it is.
4) Drag the programmable block with the script running into the hotbar next to it, or wherever, and have it as 'toggle on/off.'

Profit!

Now, when you toggle OFF the programmable, you can engage and disengage your parking break, free of charge!

Dunno if anyone else was having a similar issue, but just in case, there it is! Saved me a LOT of frustration, I'm sure.
Der Afrikanische Blasrohr Sniper Apr 10, 2023 @ 2:27pm 
you enable scripts in your world config, set a programmable block onto your ship, browse through the scripts (its an option within the block) and enjoy!
F*ck Me iM FamouS Apr 7, 2023 @ 2:33am 
How to install? i Subscribed but what to do next? Check ownership what dous it mean?
Whiplash141  [author] Mar 5, 2023 @ 8:29pm 
Also game version is not as useful as code version
Whiplash141  [author] Mar 5, 2023 @ 8:29pm 
This script touches neither steering nor friction. Only steer override and propulsion override.
Nesano Mar 5, 2023 @ 5:39pm 
Version 1.201.014
Is it common for people to not be able to enable steering on wheels with this script active? The box immediately unticks itself when I check it. Not sure if it's a bug or just something I'm doing wrong.
Update: It looks like Wheel Friction keeps resetting to default, too.
Whiplash141  [author] Feb 28, 2023 @ 9:32am 
Consult the "How the heck does braking work?" section above
RC2101Copey Feb 28, 2023 @ 7:47am 
I'm having an issue; the wheels on my trailer don't seem to park - and they keep getting propulsion overrides +/- when I'm stationary.
brake_toggle doesn't seem to do anything
Any idea what I'm doing wrong?
kennet0508 Feb 7, 2023 @ 4:36pm 
@whiplash141
First of, i LOVE your script, this particular one has allowed me to make so many amazing things, my workshop is full of crazy designs that would not be possible without the script youve made here!

i have a feature whish for your script.
(Picture for relevance - https://steamcommunity.com/sharedfiles/filedetails/?id=2930053454)

Would you be willing to ammend/add a function, that would allow the suspension to bank into turns? a type of "Active Body Control" or anti roll?

A function, that when you steer left or right (A/D) the wheel suspension height offset is altered to offset potential roll to custom amount

It would be ofc be off by default, and could be enabled in custom data to maintain the simplicity of your script as is.

Im not a coder, i havent seen anyone make something like this, and this is something im really missing from a lot of my builds. and perhaps for many others
SLATOR Dec 25, 2022 @ 11:27pm 
hey man i need your help,ive got the mod,but it dosent auto work,and i have no idea where i get the script *if i have to* to put it in the custom data for the wheels or hinge,im a stupid idiot with small brain,please help