Space Engineers

Space Engineers

288 ratings
Whip's Subgrid Gyro Manager (aka SuGMa)
3
4
2
2
2
3
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
593.237 KB
17 Aug, 2021 @ 10:54am
17 Feb @ 11:27am
5 Change Notes ( view )

Subscribe to download
Whip's Subgrid Gyro Manager (aka SuGMa)

In 1 collection by Whiplash141
Whip's Scripts
22 items
Description
Whip's Subgrid Gyro Manager (aka SuGMa)

  Description
Howdy!

This script allows you to control gyros on subgrids using your mouse. This will allow you to use gyros on subgrids just like normal gyros. This script is very simple to setup and should permit you to build some neat multi-grid designs.

Do note; however, that gyros on subgrids will control much more sluggishly than if they weren't on subgrids. This is a result of (1) how the physics engine applies gyro torque and (2) how overridden gyros have a built in slowdown factor that regularly controlled gyros do not experience.





  Setup Instructions
  1. Place this script in a programmable block.
  2. Place at least one ship controller on your ship
  3. Place gyros on subgrids. Subgrids include pistons, rotors, or hinges.


  Ship Controller Prioritization
The script will automagically detect what seat you are controlling on your ship and begin controlling subgrid gyros. If you have multiple ship controllers on your ship, it will select them based on the following priority:
  1. Main seat/remote
  2. The first seat that was controlled


  Custom Data Config
You can customize several options in the custom data of the programmable block.
Key
Valid Values
Description
Gyro ignore name tag
string
Name tag of gyros that this script will always ignore
Detect blocks over connectors
true/false
If true, this script will detect and control gyros across connectors in addition to subgrids
Pitch gain
number
The speed multiplier on pitch rotations
Yaw gain
number
The speed multiplier on yaw rotations
Roll gain
number
The speed multiplier on roll rotations


  Author's Notes
I couldn't come up with a silly acronym for this one, so I gave up and settled for this boring name lol. Though as a friend pointed out, you could shorten the name to SuGMa...


This has been one of my most requested scripts, so I decided to stop tinkering with it and just push it out the door.

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
Popular Discussions View All (1)
7
21 Sep, 2021 @ 7:27pm
PINNED: Help/Questions (Subgrid Gyro Manager)
Whiplash141
59 Comments
Whiplash141  [author] 7 Aug, 2024 @ 9:47am 
I know that optimization is always present. It just seems to be more aggressive on grids that lack thrust and or gyros
Gontarekt 7 Aug, 2024 @ 9:42am 
Hm, that makes sense, seems to still happen even with gyros on the main grid however, possibly that is due to not all the subgrids having gyros, not a clue really.
Whiplash141  [author] 6 Aug, 2024 @ 5:39pm 
That sounds like the game's optimizations fighting you. When the main grid doesn't have a gyro, the game tries to put the grid to sleep to save computation cycles. When you are translating, this game optimization turns off.
Gontarekt 6 Aug, 2024 @ 9:53am 
Great Script. I seemed to be having the same issue as the person before me where the script recognised the gyros, but refused to move. Turns out the fix was that the ship needs to be moved by thrusters before the ship turns. Strange bug, which I believe I've noticed in the past as well on ships that had subgrids (But didn't use subgrid gyros oddly enough). My suspicion of what causes this is either a subgrid being too close to the main grid and/or the mass being too high (My ship was 1.6 Gg when I noticed this bug). Hope this helps folks running into the same issue as I.
Whiplash141  [author] 27 May, 2024 @ 4:25pm 
Can you upload that blueprint please?

This isn't a script issue, this is an underlying game issue that I'm trying to track down.
TheMajesticCarabao 27 May, 2024 @ 4:24pm 
1. Yes, I made sure all blocks ownership is set to me
2. Yeap, world file existed before the signal update, which the script worked before
3. Yesh, though result remained the same, but the bp was made after the signal update, if that makes any difference
4. Yep, copy pasted ship had the same result

It just seems to feel like the subgrids gyros isnt acknowledging the main grid's input.
Whiplash141  [author] 27 May, 2024 @ 1:09pm 
I'd like to claim user error, but you are like the 5th person across my scripts to claim the same behavior. Every ship that I have that is using my scripts works fine and if i set up a script from scratch it is also fine, so I suspect something subtle may have changed under the hood regarding block ownership.

So a few questions:
1. Have you ensured that you own all blocks on your grid?
2. Are you loading a pre-existing world that has your ship using this script?
3. Are you pasting a brand new blueprint?
4. Can you replicate this behavior if the troublesome ship is copy pasted?
TheMajesticCarabao 27 May, 2024 @ 12:39pm 
Don't know if Im the only one with the situation, but even though the script acknowledge the subgrid gyros, it doesn't seem to actually use them. Did the signal update broke something or is this just an error of usage on my end?
Whiplash141  [author] 27 Dec, 2022 @ 3:41pm 
Whoops... try now lol
DonCoyote 25 Dec, 2022 @ 8:40pm 
Its not there.