Space Engineers

Space Engineers

786 arvostelua
Whip's Weapon Salvo Script
2
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
Tunnisteet: other_script
Tiedostokoko
Julkaistu
Päivitetty
358.933 KB
4.12.2017 klo 20.29
3.7.2023 klo 0.51
18 muutosilmoitusta ( näytä )

Tilaa ladataksesi
Whip's Weapon Salvo Script

1 kokoelmassa, tekijä Whiplash141
Whip's Scripts
22 luomusta
Kuvaus
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!
Suositut keskustelut Näytä kaikki (1)
46
14.6. klo 16.31
TÄRKEÄ: Bug Reports
Whiplash141
482 kommenttia
Vladimir Bergholtz 21.8. klo 10.23 
Thats an idea I hadnt thought of with the Event Controllers. Thanks for the help!
Whiplash141  [tekijä] 20.8. klo 18.41 
not via mouse click to my knowledge. At least, not without some event controller/programmable block logic. This script doesnt have any such logic, so it sadly can not solve that issue
Vladimir Bergholtz 20.8. klo 16.22 
But as far as I know you cannot fire two different weapons simultaneously right?
Whiplash141  [tekijä] 20.8. klo 15.01 
If you do not want to fire things in sequence, this script is unnecessary. You can just fire them with your regular mouse click.
Vladimir Bergholtz 20.8. klo 14.52 
Yes, I just want to use my mouse to do that for both weapons at once because shooting by pressing hotkeys is horrible.
Any idea where that bugging out with the Assault Cannon could come from? Havent seen anyone mention anything about Industrial Overhaul in the past comments
Whiplash141  [tekijä] 20.8. klo 9.33 
i dont understand, are you trying to get them to fire all at once and not in sequence?
Vladimir Bergholtz 20.8. klo 8.44 
I am not getting it to work as I want.
Im using Industrial Overhaul, which includes an Autocannon and Gatling that are modified. As far as I understand, it uses some Script for bullet drop, but nothing besides that. I mainly just want to use the Script to fire both Weapons simultaneously.
I set up the block and the groups, fire mode default in arguments.
When I group the 6 Gats and the 1 Cannon in a Group the firing cycle will get stuck on the Autocannon, until I manually fire it, then repeats till the next Autocannon shot.

Also, when I just group the Gatlings in default fire mode, should they not just all fire simultaneously? They mimic the fire rate of 1 Gatling, taking turns, but at least it works. Is there a method to let them fire nonstop?
Whiplash141  [tekijä] 17.8. klo 22.49 
The only real limit is based upon the tick rate of the game and the maximum achievable ROF of the weapon in question. Idk what the 45mm auto cannon is, but if it behaves like the vanilla auto cannon, they really bad for salvo fire because that weapon type has an arbitrary and random spool up interval that the script can't measure. This makes it so those type of guns dont fire consistently for a few seconds of firing which isnt great.
Spocku 17.8. klo 18.44 
is there a limit? using a 45mm auto cannon and this works with 4 of them, go up to 6 and it wont fire at all
Whiplash141  [tekijä] 10.7. klo 21.22 
You'd need 2 different salvo groups to support that