[MOD] Anti-Fighter Flak + Magnetic Accelerator Cannon


#1

EDIT: I’ve adjusted the painter so it can be installed on frigates. This compliments the strategy of using a high speed painter frigate to quickly approach enemy cruisers and paint them while the MAC cruisers shoot long range. If you don’t use any target painting (fighter or frigate) expect around 10% hit rate. I’ve also tidied up the post a bit.

Flak Cannon
The flak cannon leaves a nice trail of explosions where ever it fires giving that ‘wall-o-flak’ look that’s so damn cool.

Save the following as MOD_Flak_cannon.txt in Gratuitous Space battles Beta\data\modules\ (putting MOD in front makes it easier to find and remove later on)
When copying the code into the text file, highlight and select the text rather than pressing the select all button

[code][config]
unlockcost = 0
lockable = 0
armour_penetration = 10
category = “DEFENSES”
classname = “SIM_MissileModule”
cost = 61
crew_required = 12
damage = 50
description = "You always wanted an epic wall of fiery death to strike down enemy fighters before they could decimate

your fleet, what you needed were Flak cannons. Just pray your enemy doesn’t have shields… or armour."
fire_interval = 1
flareuvid = 3
fuel = 525
guiname = “Anti-Fighter Flak Gun”
has_decoys = 0
has_flare = 0
hitpoints = 10
icon = turret
max_range = 500
min_range = 50
missilelength = 2.0
missilespeed = 3.0
missilewidth = 1.0
name = “mod_flak_cannon”
powerconsumed = 16.0
shield_penetration = 5
size = “FRIGATE”
slot_type = TURRET
sound = data/sounds/fusion_torpedo2.ogg
soundvolume = 0.5
trail_fade_time = 0
tracking_speed = 2.5
turnspeed = 0.3
turret_sprite = “turret_bull_v3”
turretsize = 7
warhead = EXPLOSIVE
weight = 38

[dataitems]
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

[/code]
All we need now is an area-of-effect explosion to make it into real flak.

Magnetic Accelerator Cannon
The Magnetic Accelerator Cannon (MAC) requires a huge amount of power, a large crew, it weighs ALOT and is expensive, it does have a long range and only a couple of hits will drop a cruiser. The target needs to be painted (with any type of painter) for the rounds to have a chance of hitting (expect around 50% best case scenario). I don’t have a pic of the Magnetic Accelerator Cannon firing because the projectile is very fast and a picture doesn’t really portray that very well.

Save the following as MOD_MAC.txt in Gratuitous Space battles Beta\data\modules\ (putting MOD in front makes it easier to find and remove later on)
When copying the code into the text file, highlight and select the text rather than pressing the select all button

[code][config]
unlockcost = 0
lockable = 0
armour_penetration = 150
category = “WEAPONS”
classname = “SIM_MissileModule”
cost = 1500
crew_required = 100
damage = 500
decoy_release_range = 0
description = “The downside to a Magnetic Accelerator Cannon is the horrendous power drain, massive extra weight and a big price tag. The upside is the giant chunk of depleted uranium hurtling toward your enemy at relativistic speeds, somebody is about to to have a REALLY bad day.”
fire_interval = 6600
flareuvid = 0
fuel = 5000
guiname = “Magnetic Accelerator Cannon”
has_decoys = 0
has_flare = 1
hitpoints = 105
icon = turret
min_range = 300
max_range = 2000
missilelength = 8.0
missilespeed = 5.00
missilewidth = 2.0
name = “MOD_MAC”
powerconsumed = 150
shield_penetration = 75
size = “CRUISER”
sound = data/sounds/explosion_missile_destroyed.ogg
soundvolume = 1.0
tracking_speed = 0.5
trail_fade_time = 2000
turnspeed = 0.5
turret_sprite = “tractor_turret_v1”
turretsize = 12.0
warhead = EXPLOSIVE
weight = 985
slot_type = TURRET

[dataitems]
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
[/code]

Frigate Painter
The MAC painter is now designed for use with frigates, it has shorter range than the vanilla cruiser version but costs less and weighs less too.
Save the following as MOD_MAC_painter.txt in Gratuitous Space battles Beta\data\modules
When copying the code into the text file, highlight and select the text rather than pressing the select all button

[code][config]
unlockcost = 0
lockable = 0
classname = “SIM_TargetPainterModule”
category = “WEAPONS”
size = “FRIGATE”
name = “MOD_MAC_painter”
guiname = “Frigate MAC Painter”
description = "A specially crafted Frigate sized target painter. Perfect for Cruisers that want to sit back, relax and

pummel the enemy from afar while your Frigates get eaten alive."
fire_interval = 1000
beam_duration = 4000
max_range = 650
color = 255,16,16
weight = 68
hitpoints = 105
cost = 96
icon = turret
crew_required = 8
powerconsumed = 6
texture = target_painter_beam.dds
turret_sprite = “turret_pd_v1”
turretsize = 12.0
tracking_speed = 1.2
slot_type = TURRET

[dataitems]
0 = cost,DECIMAL
1 = weight,DECIMAL
2 = hitpoints,DECIMAL
3 = powerconsumed,DECIMAL
4 = max_range,DECIMAL
5 = fire_interval,INTEGER
6 = crew_required,INTEGER

[/code]
If anyone has any comments or questions just reply in the thread :slight_smile:


#2

This would be so awsome if area of effect dmg was implemented

Reminds me of Battlestar Galactica - would be kinda awsome to recreate some of that “feel” :smiley:


#3

Nice work. Love the screenshot.


#4

when it took out a frigate with one shot, my first thought was “massively overpowered” … but then, even with the painters running - it misses quite a lot. i’m unsure whether it’s balanced or not… but it’s not massively out (i think)


#5

So… it’s a big coilgun? Cool >.>


#6

I’m getting an unknown slot type error. how do I fix that?


#7

I wanted it to be devastating but at a cost, I thought the best way to balance it was to have a large fire interval and make it so expensive to equip (you need 3 level III power cores just to fire the gun) that a cruiser with one loaded will be sorely lacking in defenses (shields, armour etc…) and need other ships to defend it. The accuracy is something that made me laugh when I first tested it, if you don’t have painters and a targeting booster running, the gun is wildly inaccurate. That said I could probably tone down the damage a bit.

Hmmm, the only problems I’ve run into so far with implementing custom modules, is if I change the name of the text file for the module after I’ve loaded it onto a ship the game will crash looking for the modules. Try deleting the custom module text files, then create one new one at a time (i.e. create the flak cannon file and test it, if working create the MAC weapon file etc…).


#8

I have tried it one at a time. I copied the mac cannon text into a txt file named MOD_MAC.txt and then placed it into gratuitious space battles\data\modules. Is there something I needs to do to the game before I implement any mods so that the game will accept the files?


#9

oh yes - there’s an error in the cannon file - you need to remove the ‘.dds’ from the texture


#10

the railgun really needs the target painter to be a short-range frigate or fighter module… but this would rather require that the game allow ships to tie their targetting somewhat tighter than currently. (ie the illuminator ship would have an order that says “use the target of this other ship”). having the painter be the same range as the shell seems very wrong to me - i feel it should work like laser-guided munitions at the moment … infantry illuminates, and ordinance comes over the horizon.


#11

Has someone tested the anti-missile ECM system with this gun?

As it’s counted as a missile, I would think the ECM would make it veer, which is… odd. Point defenses can shoot it down as well, but probably won’t do so fast enough.


#12

Did that… same error. Is it a problem with the current patch level?


#13

ah. don’t cut&paste using ‘select all’ from the forum… or be careful. (xemacs didn’t do this. notepad did - 4 spaces before every line.)

all lines must have no spaces before them… and the turret icon needs to not have ‘.dds’.


#14

against cruisers, with two target painters, a tracking-boost-II … 44% of shots hit.

so not gratuitously overpowered. (that had two railguns, two painters a couple of engines, 5 (!) power cores and crew… and cost something like 6000)

i think minimum range should be upped a bit as well as making it so the painters have to go on other ships. maybe have the painter range < weapon range? :slight_smile:


#15

That must be the problem. I’ll test once I get home. Thanks a million. Now I get to ruin people’s Christmas with a really big gun glee


#16

Currently the target painters fighters use work for the cannon and you can set the ships to fight cooperatively (so the fighters paint the ship the cruisers are firing at, it’s actually pretty cool looking). It would be trivial to alter the painter so it could only be installed on frigates and chop the range. This would be interesting because the cruisers would rely on the painters for targeting and the frigates rely on the cruisers for the firepower.

I really like the idea of a fleet where each ship is purposed for a certain type of battle with little overlap, ships using their strengths to cover the weaknesses of other ships in the fleet.

I’m pretty sure the ECM weapon isn’t fast enough to hit the projectile, I built a scenario with a couple of cruisers decked with ECM and battled them against a pair of MAC cruisers. I could see the ECM fire but from what I could see it only fired on rounds that missed, regardless it’d be nice if cliffski (when he has time) could add a solid projectile weapon type.

Thanks for all the feedback guys, I really appreciate it :slight_smile:

Oh and what do you guys think of the flak cannon?


#17

Everything is working now. Thanks for the tip.


#18

the game model is being strained by this weapon:
it seems that if a target is at a certain range - the shot can never hit. it looks like it’s taking discrete steps (the shell), and if it jumps over the target, it doesn’t it it. i had one fight in which 2 cruisers with a normal build (2 MACs, 2 painters, 1 booster) scored 5% hits total … over a very long fight. and i’m looking at a statemate where they’re locked onto a cruiser that’s just not being hit.

also, weapons pick their targets and stay with them until death… this is a problem if there’re many options, as the target painters pick one target (and lockon forever) … and the cannons pick another, and miss forever.


#19

Couple suggestions along that vein…

1st: From an aesthetics stand point the MAC is less than perfect. The shell needs to be slowed down or enlarged or both simply because you have to slow the game down to 1/2 speed to see if its hitting anything when you’re in the middle of a fire fight. By that I mean, the only way to tell if you’re connecting sometimes is to watch for explosions on the painted target.

2nd: While I’m all for the cannon being fairly inaccurate there needs to be something done to the cannon or the painter that will improve the accuracy a bit. I’d be happy with 10-15% accuracy honestly but I just played a battle against an imperial fleet and watched 10 out of 10 shots wiz by a cruiser that was almost sitting still. Finally the 11th shot hit. The whole time this particular vessel was lit up like a Christmas tree by 6 painters. I’m not trying to tell you that you suck (the opposite really) but I do think the weapon needs some tweaking to make it effective.

Overall though, this a a great v1 of a an awesome weapon (its gained a place in every fleet I make).


#20

@crankdawg47
Thanks for the input I’m glad you like the cannon so far. Unfortunately it seems that the accuracy of weapons is hardcoded into the game. Hopefully when cliffski has time he’ll be able to open it up a bit as this game is just asking for some gratuitous modding.

Regarding the speed of the projectile I’ve been recently toying with slowing it down, though for visibilities sake I could always increase the time it takes the trail to fade so if it misses you’ll see the trail going past the cruiser rather than what there is now.

@snowdrift
That got me thinking about how the collisions are actually calculated. If the projectile is discretely jumping every frame then that could explain the shots missing. I wonder if that’s tied to the frame rate as well? I’ll have to ask cliffski

EDIT: I setup a scenario where the I had a single ship firing high speed missiles at an enemy fleet. I used the same deployment every round and found something interesting; the slower you ran the game at, the greater the chance of missile hits. Playing at 4x the missiles were hitting at around 10-20%, at regular speed 40-50%, at 0.2x around 70-80%. I’m definitely going to reduce the speed of the cannon projectiles now.