Space Engineers

Space Engineers

297 个评价
Whip's Subgrid Gyro Manager (aka SuGMa)
3
4
2
2
2
3
2
2
   
奖励
收藏
已收藏
取消收藏
标签: other_script
文件大小
发表于
更新日期
593.237 KB
2021 年 8 月 17 日 上午 10:54
2 月 17 日 上午 11:27
5 项改动说明 ( 查看 )

订阅以下载
Whip's Subgrid Gyro Manager (aka SuGMa)

在 Whiplash141 的 1 个合集中
Whip's Scripts
22 件物品
描述
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
热门讨论 查看全部(1)
8
8 月 20 日 下午 12:19
置顶: Help/Questions (Subgrid Gyro Manager)
Whiplash141
60 条留言
PeteMetal 7 月 29 日 上午 7:10 
I noticed one thing that if you use rotor for let's say large grid to small grid and you adjust the rotors displacement too close to large grid things get funky. Just an observation if anyone have issue that the ships gyros not working as expected check that there's enough space for subgrid to move.
Whiplash141  [作者] 2024 年 8 月 7 日 上午 9:47 
I know that optimization is always present. It just seems to be more aggressive on grids that lack thrust and or gyros
Gontarekt 2024 年 8 月 7 日 上午 9:42 
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  [作者] 2024 年 8 月 6 日 下午 5:39 
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 2024 年 8 月 6 日 上午 9:53 
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  [作者] 2024 年 5 月 27 日 下午 4:25 
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 2024 年 5 月 27 日 下午 4:24 
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  [作者] 2024 年 5 月 27 日 下午 1:09 
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 2024 年 5 月 27 日 下午 12:39 
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  [作者] 2022 年 12 月 27 日 下午 3:41 
Whoops... try now lol