Space Engineers

Space Engineers

62 ratings
Rotor Cannon Script
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
13.998 KB
5 Apr, 2018 @ 4:41pm
15 Aug, 2020 @ 8:32pm
6 Change Notes ( view )

Subscribe to download
Rotor Cannon Script

Description
────────────────────────────────────────────
          Rotor Displacement Cannon System
               In-Game Script

                                                Showcase ship: Jaculus Destroyer

A compact, efficient, and lightweight alternative to gravity guns.
Or a paradigm-shifting new weapon form which promises more bang for your buck (and, perhaps, the ire of many).

No matter where the enemy hides, they will no longer be safe.

What does it do?



How does it work?


It also works with small grid rotors; of course, it also requires 3-4x the amount of rotors.

A note: Four (and less) rotor stacks... currently don't work at all.

How do I use it?


For merge block launcher:
  1. Stack rotors.
  2. Add merge block (and a projector, unless you have something in mind) to top of stack.
  3. Group rotors and merge block with name 'RDSA - <id>'. <id> must be a single word and is case-sensitive.
  4. Configure custom data as necessary.

For standard rotor part launcher:
  1. Stack rotors.
  2. Group rotors with name 'RDSA - <id>'. <id> must be a single word and is case-sensitive.
  3. Remove the rotor part on the topmost rotor.

Troubleshooting may be required.

If there are multiple merge blocks or rotors fitting the generator condition, the group will be skipped.
If there are no rotors, the group will be skipped.



Custom data:
<string id> <int oscillations> <int detachOnRetract> <int cooldown> <int reload> <int salvoLength> <int inertiaTensorFraction>
  • id: Whatever you used for <id> when setting the gun up.
  • oscillations: How many times to retract/extend the gun before launching the payload. This adds speed up to a point, and is essential for merge block payloads.
  • detachOnRetract: Whether to launch payload after retraction or extension. Either 1 or 0.
  • cooldown: Ticks to wait before allowing reload.
  • reload: Ticks to wait for reload. Divide by 60 for seconds.
  • salvoLength: How many shots to fire per salvo.
  • inertiaTensorFraction: Reciprocal of fraction of rotors to set 'Share Inertia Tensor' on; e.g. '2' will set it for half of the rotors, '3' will set it for a third, and so on.
Set any ints/numbers to -1 to use the default values.

Arguments:
<id-substring> <action>
  • id-substring - Selects all guns with IDs containing this.
  • action - One of the following:
    • fire : fire single shot
    • salvo : fire salvo
    • auto : toggle full-auto

Default settings are for a 6-rotor gun firing rotor parts.

And if it doesn't work?

If the gun is doing the above in rapid-fire, decrease salvoLength as necessary and don't use full auto fire. Or apply next step.
If the gun is doing the above no matter what, increase cooldown or inertiaTensorFraction.
If the payload is going nowhere fast, increase oscillations or add rotors to the stack.
If the payload is still going nowhere fast, or things are breaking, set detachOnRetract to 1.
If you're still having problems, please tell me.

Features
Compared to the original Discount Rotor Gun Script (which has since been decommissioned):
- You can use a rotor part launcher.
- You can use a merge block payload.
- You can use no payload at all. Helpful for drilling.
- You can use multiple distinct guns. Only one PB is needed for a single ship.
- You can configure the firing sequence.

Special Thanks
[Bruce LeedleLeedleLeedleLee] Claymore Chaingun Tank
Without a working prototype, I would never have gotten this (or it's predecessor) to work.
Note that this no longer works as-is.
[Alysius] RDSA Railgun
This provided the necessary insights to get compact rotor guns functional in general - not just merge block guns.
124 Comments
funhans 21 Feb, 2022 @ 7:47pm 
Howdy ;)

This thing is basically a dream - shredds everything withing moments and doesn't take any resources ^^ - huuuuuge thank you ;)

From time to time I get the error/message "Head already exists" ... Do you know something about it?
Shillelagh 15 Sep, 2021 @ 7:35pm 
1 rotor would be extremely slow
Liquighost 15 Sep, 2021 @ 5:10pm 
can i use this with one rotor for a cold launch missile?
Sarekh 16 Aug, 2021 @ 1:54pm 
I don't know if I have ever properly thanked you for this wonderful script - I use it in a great many ships and artillery units and it always performs perfectly!
Shillelagh 7 Aug, 2021 @ 6:57am 
Ah, thank you.
I remeber playing with them briefly a while ago and they were extremely overpowered.
I guess it's time I need to write a piston cannon script.

Thanks for the fun with these!
dagriefaa  [author] 6 Aug, 2021 @ 8:09pm 
Unfortunately, the days where a rotor gun could hurl things at 600m/s are long gone. You might be able to squeeze 250m/s out of them if you try, which is still enough to wreck most things.

If you want to hurl things really really fast, then piston jolt guns are what you want these days. Especially if you don't have a speed mod.
Shillelagh 6 Aug, 2021 @ 9:35am 
Rather slow. I've increased oscillations yo 15 and the stack is 10 large rotors long.
I've seen these things fire ridiculously fast objects, what am I missing here?
dagriefaa  [author] 13 Mar, 2021 @ 8:25pm 
Update the script, use a 5-rotor gun, and check your groups are correct.
Also have a look at the showcase ship and see if that still works.
Starry 13 Mar, 2021 @ 6:44pm 
Every time i try to fire a gun, it always explodes after the first oscillation, and detaches at the first rotor. I am trying a normal 6 rotor part gun
MagnaGazoo 28 Jan, 2021 @ 6:50pm 
I changed detachOnRetract: to 1 and it stopped blowing up BUT I see no head part launching. It makes the noise and shakes but no head is flying.