Space Engineers

Space Engineers

SWCS | Whip's Subgrid Wheel Control Script
521 kommentarer
MarzEz 5. sep. kl. 18:57 
Is there a way to get this script to reference a remote control block or programmable block as the "forward" position?
I have built a mobile slewing crane, but when the cab rotates, steering and drive of the wheels fight each other. I have a remote control block to enable use of the handbrake, if there's any code I can change or any way to use the position/orientation of that block to determine forward/left/right, that would be exquisite.
Whiplash141  [ophavsmand] 14. aug. kl. 4:19 
the script controls all subgrids that it sees. How are your subgrids connected to eachother?
Alexis The Calico Yokai 13. aug. kl. 23:31 
I'm making a monorail and it has 2 subgrids and the script is one only controlling one of the subgrids. is there a way to get it to control both?
Killer66 9. aug. kl. 14:44 
You are a god! Thank you, now I can realize all my engineer fantasies!
Whiplash141  [ophavsmand] 8. juli kl. 14:48 
Scripts are vanilla; however, I don't know anything about subgrid control without scripts.
►relaxxx◄ 8. juli kl. 9:32 
This is a feature we have been dying for for ages, and Keen has finally allowed this control in the new MP update :D
Does it mean I can somehow make it in vanila without this script? (Without scripts at all to be clear)
Grebanton1234 28. juni kl. 13:22 
Thank you very much!
Whiplash141  [ophavsmand] 28. juni kl. 12:27 
You can use my scripts however you want, I don't even need attribution since that lives in the script itself. If you create derivative work (like modifying the actual script), I only ask for attribution and a clear indication that the work is not officially supported by me.
Grebanton1234 27. juni kl. 11:46 
Hey there, may I use your script for the current research bunker competition? I think legally I have to ask you for permission because I think by submitting the build I give Keen the right to use it how they want to.
godsshadow755 3. okt. 2024 kl. 1:53 
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 3. okt. 2024 kl. 1:39 
where do i put the arguments do i put it in the custom data of the cockpit or the program block itself?
Whiplash141  [ophavsmand] 2. okt. 2024 kl. 23:47 
have you read the entire "How the heck does braking work" section above?
godsshadow755 2. okt. 2024 kl. 23:03 
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 23. sep. 2024 kl. 22:45 
Is there a way to get this working with remote control?
Whiplash141  [ophavsmand] 20. juli 2024 kl. 23:30 
Sounds like the wheels are friction binding. Experiment with friction and steer angles
Eliree 20. juli 2024 kl. 8:16 
Fot some weird reason , my rover instantly brakes when i turn the wheels , any idea what this could be ?
Into 20. maj 2024 kl. 9:26 
My cockpit changes direction, how do I ensure that forward stays forward and doesn't change with cockpit direction?
E-Man720 14. mar. 2024 kl. 20:47 
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 14. mar. 2024 kl. 13:45 
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 18. feb. 2024 kl. 22:53 
@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  [ophavsmand] 18. feb. 2024 kl. 22:18 
I got decent behavior by simply disabling steering on the 4 central wheels.
Whiplash141  [ophavsmand] 18. feb. 2024 kl. 22:13 
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 18. feb. 2024 kl. 14:17 
@Whiplash141 Yeah no problem, here: Link
Whiplash141  [ophavsmand] 18. feb. 2024 kl. 8:52 
I haven't heard any reports like this, no. Got a blueprint I can look at?
Souls 17. feb. 2024 kl. 21:47 
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  [ophavsmand] 17. feb. 2024 kl. 8:56 
Just mark one as main
REB 17. feb. 2024 kl. 8:05 
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  [ophavsmand] 8. feb. 2024 kl. 13:40 
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 8. feb. 2024 kl. 11:48 
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 24. jan. 2024 kl. 2:11 
I understand. Honestly, I wish your scripts were actually in-game features without the need for experimental features being enabled.
E-Man720 24. jan. 2024 kl. 1:23 
Wouldn't the main issue be script complexity limits when it come to trying to combine them?
Whiplash141  [ophavsmand] 23. jan. 2024 kl. 19:04 
@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 23. jan. 2024 kl. 17:57 
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 22. jan. 2024 kl. 10:04 
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  [ophavsmand] 22. jan. 2024 kl. 8:03 
That's a *lot* of code. I don't have any plans to do that anytime soon.
Sapioit 22. jan. 2024 kl. 1:23 
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  [ophavsmand] 5. jan. 2024 kl. 19:59 
This isn't a mod. It's an in-game script, so you shouldn't be installing it a mod
Blood Brother 5. jan. 2024 kl. 15:01 
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  [ophavsmand] 3. jan. 2024 kl. 16:49 
MP probably doesn't have scripts enabled then. Ensure experimental mode and scripts are turned on in the MP world's settings.
Blood Brother 3. jan. 2024 kl. 10:00 
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 30. nov. 2023 kl. 13:43 
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 31. okt. 2023 kl. 7:47 
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 20. sep. 2023 kl. 9:04 
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  [ophavsmand] 20. juli 2023 kl. 20:42 
See the section "How the heck does braking work?"
Cam 20. juli 2023 kl. 20:05 
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 20. juli 2023 kl. 19:42 
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  [ophavsmand] 20. juli 2023 kl. 19:20 
The script uses overrides for propulsion. Brakes are off, yes?
Cam 20. juli 2023 kl. 19:16 
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 10. maj 2023 kl. 21:32 
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 10. maj 2023 kl. 21:27 
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.