[question] minimum fire interval?

i was wondering if there exists a lowest value for fire interval

im trying to make this shotgun-like weapon with a salvo of 10 projectile attacks and having their fire interval set to 0.01

yet in practice the projectiles still stream out of the cannon…

any ideas that may help?

thx in advance :slight_smile:


Intriguing, gunny. I’ve never thought to attempt inputting a decimal value into that field, or a value greater than 0 but less than 1. Depending on how the data field which holds the “fire interval” variable is defined, the lowest value might be 1. Try that instead of a sub-1 decimal value and let us know what happens. I’m not terribly confident this will help, but sometimes detective work is just eliminating the easy options first.

In an effort to create a shotgun effect (ie all pellets released at once) i tried to get the value to as close to zero as possible.
However i have discovered that any value less that one does not yeild a faster refire rate.

Does 2.5 give a faster rate than 2 but slower than 3? That’ll show whether it’s being read as an integer or just using 1 as a lower bound.

Color I understood was being read as an integer from my tests, so no decimals there. I and other people have managed shotgun style effects with rockets and multiple warheads set to split at a distance equal to their max firing range, meaning they split out of the cannon usually. Simply change turn radius to 0.

From what I observed there is also a respond time between reload and firing, which not surprisingly takes 42 frames. That is constant and does not change nomatter what interval you put in.

Usually this does not have a significant effect, but when you start making your gun fire below 100 interval it will start to matter.

Fire interval = 0
salvo interval = watever u want
speed = very very high, for example 50
tracking speed = slighty high, for example 4,3
height = 1.8
widht = 1.8

There u got the shotgun. I already had 2 shotguns in my mods. In fact, the shotgun is maybe one of the weapons that fits the reality closer, than other ones. Find a good shotgun sound, and u will see.


I Nvr thought to put 0 on there

For some reason I always thought it would crash like dividing by zero :stuck_out_tongue:



I just had an idea. You are all going about it the wrong way. Instead of bullets, use missiles with live submunitions.
It’s a little confusing, but I found that if you give your shotgun a fast missilespeed, you can use turnspeed to create a bullet spread without making it look like the “bullets” are turning. A turnspeed of zero will have all six bullets hit at the same point. If you make turnspeed too big, the “bullets” will home in on the target instead, acting like a missile. I used turnspeed = 0.1 to get the desired effect.
Also, make sure you set fuel = max_range, or the “bullets” will visibly turn if they miss their target. If you give the shotgun a long range, this effect is unavoidable. Same if you fire at close-range fighters.
Another thing that confused me was decoy_release_range. In order for the “bullets” to start spreading out immediately, you have to set the decoy_release_range equal to max_range. Unfortunately the game engine seems to limit the number of submunitions to 6, no matter which value I give it.
Unfortunately, you don’t get a constant spread. It seems to be determined by the damage points on a target. So, for a cruiser the bullets will spread out pretty far. If you shoot at a frigate, the bullets only slightly spread out.
You can also omit trail_fade_time if you just want bullets. I liked seeing a tiny bit of a trail.

unlockcost = 0
lockable = 0
armour_penetration = 41
category = "WEAPONS"
classname = "SIM_MissileModule"
cost = 136
crew_required = 14
damage = 8
decoy_release_range = 750
description = "A shotgun in space!"
fire_interval = 1000
flareuvid = 2
fuel = 750
guiname = "Shotgun"
has_decoys = 1
has_flare = 0
hitpoints = 103
icon = turret
min_range = 1
max_range = 750
missilelength = 3.0
missilespeed = 1.0
missilewidth = 1.0
name = "cruiser shotgun"
num_submunitions = 6
powerconsumed = 2.5
shield_penetration = 50
size = "CRUISER"
sound = data/sounds/explosion_destruction_fighter1.ogg
soundvolume = 1.0
submunitionslive = 1
tracking_speed = 1.0
trail_fade_time = 50
turnspeed = 0.1
turret_sprite = "turret_auto_v1"
turretsize = 12.0
warhead = EXPLOSIVE
weight = 128
slot_type = TURRET
uisortpos = 6000

0 = cost,DECIMAL
1 = weight,DECIMAL
2 = hitpoints,DECIMAL
3 = powerconsumed,DECIMAL
4 = max_range,DECIMAL
5 = damage,DECIMAL
6 = fire_interval,INTEGER
7 = tracking_speed,DECIMAL
8 = shield_penetration,DECIMAL
9 = armour_penetration,DECIMAL
10 = crew_required,INTEGER
11 = min_range,DECIMAL
12 = has_decoys,BOOL
13 = missilespeed,DECIMAL

well… yeah…

but then the problem is scramblers shouldn’t be able to scramble shotgun pellets…

Ya, darn scramblers work way too well. From what I can tell they even mess with unguided rockets (turnspeed = 0).

well then I know this and it might help:

1: I know shotguns (well they wouldnt have this much range anyways) but if they did i’d reckon they’d be equivalently fast.

2: if a missile goes fast enough even it wouldnt be affected by scramblers in time.

3: scramblers can only handle around 4 missiles at once. If you’re planning on making a missile delivery sytem that shoots 6 and maybe u have about 2/3 of those systems the enemy ships would need roughly 4 scramblers. And if they have that many then theyre at a disadvantage anyway.

so i think missile shotgun = :slight_smile: Good! :slight_smile:

the missile can have 6 warheads including the original max i think…

Wait, nemesis is right.

I first saw a shotgun weapon in the ancient mod, which had a version that used missiles.

I then made a bullet version which I think is simpler code-wise. I started with the original cruiser laser file, changed its fire interval to 1 and its damage to 10. I then gave it a salvo interval of 2500 and a salvo size of 5. It fires 5 shots in rapid succession, creating a spread effect. I then got my good shotgun sound from the ancient mod. :slight_smile: