[Mod]Mega Laser Module


I decided to try making a new weapon, the “Cruiser Mega Beam Laser”. It entirely ignores shields, although the armor penetration isn’t great.

(I reduced the size by 1/7th after this screenshot)

Save the following as megabeam.txt in Gratuitous Space battles Beta\data\modules\

unlockcost = 0
lockable = 0
armour_penetration = 25
beam_duration = 5000
beamwidth = 35.0
blasttexture = “beam_red_atlas.dds”
category = “WEAPONS”
classname = “SIM_BeamWeaponModule”
color = 111,0,120
cost = 4000
crew_required = 124
damage = 200
description = “The big daddy of lasers.”
fire_interval = 15000
grain = “beam_purple_atlas.dds”
guiname = “Cruiser Mega Beam Laser”
has_grain = 1
hitpoints = 800
icon = turret
min_range = 260
max_range = 770
name = “cruiser_megabeam”
optimum_range = 616
powerconsumed = 100
shield_penetration = 100
size = “CRUISER”
sound = “data/sounds/cruiser_beamlaser.ogg”
soundvolume = 2.0
texture = “beam_red_atlas.dds”
tracking_speed = 0.3
turret_sprite = turret_las_v1
turretsize = 30.0
weight = 184
slot_type = TURRET

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 = optimum_range,DECIMAL
12 = min_range,DECIMAL

It’s surprisingly easy to add new weapons. Does anyone understand how to change the color? I changed the color config to a purple, but it stayed red. Also, what is classname for?


Nice, time for me to have a go at it!


I’m guessing beam_red_atlas.dds is the source of much of the redness. Maybe pick another texture?


Sorry for the double-post, but I have a question unrelated to my first post.

Does the shield-penetration of 100 make it actually IGNORE shields, or just always deal damage to shields with a reflectivity of less than 100?

I’m still not too sure how these values work, but I don’t think it’s a percentile modifier, I think it’s just compared to shield / armour reflectivity, and if it’s less, they do nothing. If it’s more, it doesn’t matter how much more, and the weapons do their stated damage to the shield/armour.

Some sort of graduated response might be good… if it’s less, no damage. If it’s more, but not as much as twice the reflectivity, they do damage scaled from 0% to 100%, based on how close they are to twice the reflectivity, and if their penetration is over twice the reflectivity, 100% damage.


You may be right Darloth…

And I can’t believe I missed that red texture :stuck_out_tongue:

So what’s the color config for?


Color is actually redundant, and is a leftover from an earlier graphical system. The texture is where its all at.
Some other tips:

Shield penetration is entirely a matter of beating shield resistance, so higher numbers are good, and just mean you wont bounce off

firedelay is the milliseconds it takes for a beam weapon to ‘stretch’ towards its target, you can see it clearly a minimum speed. 0 turns this off
classname should always be left alone. it determines whether this module acts as a beam or bullet firing weapon in internal code terms.
blast texture is the extra image that shows up as a blast image over the turret as it fires.
beamwidth is the beams thickness
has_grain determines whether or not the beam has a granular flowing particle style effect layered on top of it.
grain is the texture used for that

I’m surprised I didn’t expose the pulse speed and intensity for the beam effect, I’ll do that at some stage.


While you’re exposing things, pleasepleaseplease expose the target painter module. ;_;

I’m hoping I can make a low effect but long duration beam that has to be used in large groups to be effective.