Modding a fighter module


#1

Hi guys,

So, another user made a “fighter gatling” module and it inspired me to do something similar. Here is his code:

[code][config]
armour_penetration = 10
category = “WEAPONS”
classname = “SIM_BulletWeaponModule”
color=1
cost = 15
crew_required = 0
damage = 3
description = “Technically it’s an Electrothermal Nonlinear Breech Multibarrel Automusket, but anyone can see it’s a gatling gun.”
fire_interval = 80
guiname = “Fighter Gatling”
height = 3
hitpoints = 5
icon = turret
lockable = 0
max_range = 240
min_range = 10
name = “fighter_gatling”
optimum_range = 180
powerconsumed = 1
salvo_size = 4
salvo_interval = 1200
shield_penetration = 5
size = “FIGHTER”
slot_type = TURRET
sound = tribe/data/sounds/frigate_cannon.ogg
soundvolume = 0.25
speed = 5
tracking_speed = 2.3
turret_sprite = “turret_auto_v1”
turretsize = 0
unlockcost = 0
weight = 2.3
width = 1.55
uisortpos = 1050

[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 = optimum_range,DECIMAL
12 = min_range,DECIMAL[/code]

So here is what I want to do. I want basically use these stats, but I want it to have the “muzzle flash” of the Tribe Howitzer. Messing with a config files, I’ve learned that there is a lot of glitchiness that comes with making a “turretsize” anything larger than 0 on a fighter. I’ve noticed that no fighter module is larger than 0.

  1. Is this at all possible?

  2. The “projectile” for the above code is a basically a little white line, where is that referenced and can I modify it?

  3. Any other advice/suggestions?

Thanks!


#2

I don’t know about the fighter turret larger than zero, but you can modify bullet textures IF you have the Parasites expansion.

[code][config]
armour_penetration = 6
blasttexture = “turret_blast_red.png”
bullet_texture = “pulse bullets 1.png”**********
category = “WEAPONS”
classname = “SIM_BulletWeaponModule”
color = 0
cost = 15
crew_required = 0
damage = 2
description = “The new chaingun for the Atmosphere capable Thunderbolts.”
salvo_size = 8
fire_interval = 30
salvo_interval = 500
guiname = “EA Thunderbolt Gun”
hitpoints = 6
icon = TB Nose Cannon.png
lockable = 0
max_range = 300
min_range = 10
name = “EA Thunderbolt Gun”
optimum_range = 200
powerconsumed = 0.6
shield_penetration = 1
size = “FIGHTER”
slot_type = TURRET
sound = “B5/data/sounds/SFgun.wav”
soundvolume = 0.5
speed = 25
tracking_speed = 2.00
turret_sprite = “Fi EA Accelerated_Chaingun2”
turretsize = 0
uisortpos = 95101
unlockcost = 0
weight = 3.1
height = 2.5
width = 1.5
restricted = “earth alliance”

[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 = optimum_range,DECIMAL
12 = min_range,DECIMAL
[/code]

I put stars by the code like for adding a reference to a texture file. This file works very similar to the fighter hulks sprite file, and turret sprite files. You have multiple images beginning with 0,1,2,3,4, etc. Here is a copy of my bullet texture file.

This file lives in the FX folder.

May not be the only way, but this method worked for me.


#3

I don’t think you need the Parasites specifically, just game version 1.58 or later. But I could be wrong.

You can also use an entire image for the bullet, just change “color = 0” in the above code to “color = 10”. That uses the whole image (don’t forget to make sure the width and height variables have the same proportions as your bullet file or it will wind up distorted).


#4

As far as turretrs on fighters…you can’t do that unfortunately, unless something has developed that I don’t know about (which is entirely possible)


#5

Considering all the fighter weapons include a “turretsize = 0” variable, the game might or might not draw turrets for fighters. Guess I can add another quick test to my list of things to try …


#6

From my experiments, if you have a turret size larger than zero it will draw the fighter as the turret.
When the turret fires it will quickly change the “turret” to the bullet sprite sheet and back again.

As far as i am aware, there is no way to draw turrets on fighters nor display the muzzle flash
Unless you make really small frigates (but then you cant deploy as squads)


#7

That sounds fairly entertaining all by itself. :slight_smile: