Space Engineers

Space Engineers

750 oy
Whip's Weapon Salvo Script
2
   
Ödül
Favorilere Ekle
Favorilere Eklendi
Favorilerden Çıkar
Etiketler: other_script
Dosya Boyutu
Gönderilme
Güncellenme
358.933 KB
4 Ara 2017 @ 20:29
3 Tem 2023 @ 0:51
18 Değişiklik Notu ( görüntüle )

İndirmek için abone ol
Whip's Weapon Salvo Script

Whiplash141 tarafından 1 koleksiyonda
Whip's Scripts
22 öğe
Açıklama
Whip's Weapon Salvo Script


  Description
This script sequences the firing of groups of fixed weapons so that you can achieve a continuous rate of fire. Rather than fire all of your weapons at once, this code will delay the firing so that they fire rapidly one after another. This script works with vanilla weapons AND modded ones! This script also allows you to fire your weapons with the regular mouse input; the code will handle the sequencing for you!

This script is a upgrade to my old Weapon Sequencer. My old code only worked for one group of weapons, but this new code will work for as many weapon groups as you want!

The behavior of each Salvo Group can be customized through program arguments or custom data configuration!


  Features
  • Staggers the firing of weapons to create a continuous stream of destruction!
  • Weapons can be fired from the hotbar just like normal
  • Weapons can be fired in bursts of specified length!
  • Rate of fire can be customized
  • Simultaneous sequencing of multiple independent weapon groups
  • No timers needed for operation!
  • Weapons are sequenced alphabetically. This means that you can control the firing pattern by naming launchers alphabetically.
  • Works with vanilla and modded weapons (with customization)


  Instructions
  1. Place this script in a programmable block.
  2. Make block groups of your weapons with the name "Salvo Group <unique tag>" where <unique tag> is a unique word or phrase (Ex: Salvo Group 1)
    • Leading and trailing spaces do not matter
    • Letter case does not matter
    • NOTE: Salvo groups names can not have square bracket characters "[" or "]"!
  3. You can make as many salvo groups as you want! A single code can control them all!
  4. Fire your weapons normally, and the code will sequence them automatically!


  Arguments
Type in these arguments without quotes. Arguments are case insensitive. These arguments can be input manually to the program argument field, this program's Custom Data, through timers, or through sensors.

In the Custom Data, command lines can be seperated with semi-colons, or they can be seperated by new lines.

Basic Argument Syntax
"<Group name>" <command 1>

Advanced Argument Syntax
You can also execute several commands for the same group.
"<Group name>" <command 1> <command 2> ...

Available Commands
Command
Function
--rps <number>
Changes the rate of fire in rounds per second.

[Maximum RPS] = [Standard RPS] * [Number of sequenced weapons]

NOTE: The script will round this number, this is not a bug!
--rpm <number>
Changes the rate of fire in rounds per minute.

[Maximum RPM] = 60 * [Standard RPM] * [Number of sequenced weapons]

NOTE: The script will round this number, this is not a bug!
--ticks <integer>
Changes the rate of fire in ticks between shots (60 ticks = 1 sec)

NOTE: This should be a whole number
--burst <integer>
Fires a burst with the specified number of shots

NOTE: This should be a whole number
--default
The script will determine the maximum continuous rate of fire of the weapons (using the default fixed rocket rate of fire).
--fire_on
Toggles fire on only
--fire_off
Toggles fire off only
--fire_toggle
Toggles fire on/off

Examples

"Salvo Group 1" --fire_on
Toggles the weapon firing on and uses default rate of fire for "Salvo Group 1"

"Salvo Group 2" --default
Resets the default rate of fire for "Salvo Group 2"

"Salvo Group 3" --rpm 10 --fire_toggle
Sets the rate of fire to 10 rounds per minute and toggles weapon firing for "Salvo Group iLikeTurtles"


  Custom Data
You can also manually configure the default behavior of each Salvo Group individually within the Custom Data of the programmable block that is running this script.


  Author's Notes
If you are shooting and only one gun is working, try clicking middle mouse. If you accidentally clicked MMB before, the game will only let you fire one weapon of that type; clicking it again will turn that mode off. Why this "feature" even exists in the game is beyond me.

No this will not work with Weapon Core. Weapon Core guns need special, mod specific code to work properly and I will not add support for it.

No this wont work with AI turret blocks, and there is no way to make it. This will only work for fixed weapons.

I've been working on this for quite a while. This new script should bring with it a lot more versatility and better performance.

Hope y'all enjoy!

(Do not reupload without permission, not even to mod.io)

This works with the new railguns!
Popüler Tartışmalar Tümünü Görüntüle (1)
44
21 Kas 2022 @ 13:04
SABİT: Bug Reports
Whiplash141
421 Yorum
Whiplash141  [yaratıcı] 11 Eyl @ 10:07 
No, but you can chain calls by triggering a timer that runs multiple separate arguments in its actions
Strong Hoov ✅ 11 Eyl @ 1:28 
Ah! Funny how some of the others dosen't require the ( -- ) part...
Also Whip if you wouldn't mind. Could I requsest an addition for your script?

I have this "Big ol fuck off" custom naval cannon design. that uses multible small grids cannons as it's main firepower. Could you add in a custom option to be able to group up those groupss as a "Single fire" unit? So i can use as the main fire.
(Basicly. I wanna be able to Group up X amounts of guns
"Say 18 cannons into as 1 Single group unit"
And then be able to use said groups of those together as a "Salvo Group" type)

Example:/ 12 cannons together as 1 "CustomTag" group // CustomNameTags=Cannon 1 2 and 3//
"Salvo Group Cannon 1+Cannon 2+Cannon 3 --burst 3"
Whiplash141  [yaratıcı] 2 Eyl @ 9:37 
It is 100% necessary. The arguments require the format shown above in the table.
Strong Hoov ✅ 2 Eyl @ 9:18 
didn't think the -- was nessercy since i didn't require it with RPM/ RPS
Whiplash141  [yaratıcı] 2 Eyl @ 9:17 
you aren't typing the -- like I did and like the instructions above show
Strong Hoov ✅ 2 Eyl @ 7:37 
Ya! That's what I thought. BUT.
The script dosen't wanna do any burst fire of (insert number) of shots... It's just fires normally.

example/ Salvo Group Cannons burst 4
Whiplash141  [yaratıcı] 1 Eyl @ 20:37 
"Salvo Group Whatever" --burst 4
Strong Hoov ✅ 1 Eyl @ 12:59 
How do I use the " burst " trigger? Do I simply just add "burst 3" After the Group name or am I doing something wrong here? If it is that simple it's not working for me... :lunar2019deadpanpig:
Whiplash141  [yaratıcı] 31 Ağu @ 17:21 
Not with this script (or any script for that matter). That random spool up is indeed... random. So it can't be predicted all that well.
The Arizona Ranger 31 Ağu @ 15:15 
Howdy, big fan of your scripts. Is there a way to use the salvo scrip to fire all weapons at the same time? For example with autocannons they have that random spool up time. I want every autocannon to shoot at once as if I grouped them and clicked "shoot once", but for that to happen when I use the mouse click. Is that possible?