Various camoflage bugs (modded camoflage)


#1

So, I have been trying to make permanently camoflaged fighters with various fun things happening.

Only some fighters cloacking even though they can last for very long
First thing i tried was to set max_cloak_power = 20000, which resoulted in only some fighters starting the camoflage at a time, even though it could last for very long. I found out some mintues ago that this is related to how big max_cloak_power is relative to cloak_rechargerate.

Ship trails not disapearing
I used The javelin fighter as a placeholder for my fighters and when they enter camoflage, the trail stays at the location where they entered camoflage. The trails disapear once the fighter leaves camoflage or it is destroyed.
Video: youtube.com/watch?v=D2wUuDOkQWA

Firing while camoflaged breaks the camoflage
I am aware it is known, but the strange thing is that I had it working on my fighters and suddenly it broke (makes me wish I had used svn so i could revert whatever happened). The only thing I can think of is getting the Outcast dlc, although I never got fire_while_camoflaged to work propperly on frigates.

Missiles using fire_while_camoflaged = 1 disapearing when ship re-enters camoflage
After the launch made the ship to leave camoflage, it will re-enter it and the missiles freeze and disapear. Once the ship leaves camoflage again they will unfreeze and re-apear. I am not sure if this also affects missiles that don’t have fire_while_camoflaged = 1 as the ship doesn’t re-enter camoflage.
Video: youtube.com/watch?v=M4tVCg_3zVw
Note: I had to record in windowed mode and for some reason the problem is even worse in fullscreen. The missiles will launch while cloaked, but freeze and be invisible untill the ship has fully uncloaked.

Frigate Hull:

[code][config]
classname = frigate
name = Protector Assoult Weapon
guiname = Protector Assoult Weapon Hull
sprite = Federation Falcon Fighter.dds
damagetexture = Federation Falcon Fighter_damaged.dds
hulktexture = federation_hulks.dds
hulkUVstart = 0
hulkUVend = 3
width = 110
height = 110
powerproduced = 52
cost = 44
racename = protector

[bonuses]
0 = INTEGRITYBOOST,0.1
1 = POWERBOOST,0.12

[runninglights]
0 = 48,83,110,2,1
1 = 207,83,110,2,0

[contrails]
0 = 128,254,40,500,1.5,4

[targets]
0 = 175.00,93.00,1,1,151.00,65.00,199.00,121.00,SHIP_EMMITER_SMALL,
1 = 99.00,88.00,0,0,
2 = 124.50,170.50,1,1,99.00,150.00,150.00,191.00,SHIP_EMMITER_SMALL,

[slots]
0 = 128.00,84.00,TURRET,
1 = 64.00,95.00,STANDARD,
2 = 192.00,95.00,STANDARD,
3 = 128.00,158.00,STANDARD,
4 = 128.00,209.00,STANDARD,

[explosions]
0 = 0,128,128,EXP_STARTBREAKUP
1 = 0,128,128,EXP_FIGHTER_DESTROYED_LOD
2 = 0,128,128,EXP_FIGHTER_DESTROYED
3 = 0,128,128,EXP_BLASTGLARE
[/code]

Weapon:

[code][config]
unlockcost = 0
lockable = 0
armour_penetration = 12
category = “WEAPONS”
classname = “SIM_MissileModule”
cost = 1700
crew_required = 0
damage = 9
description = “You can never have one missile too many.”
fire_interval = 2100
fuel = 850
guiname = “Frigate Swarm Rocket Launcher”
has_flare = 0
hitpoints = 8.0
icon = turret
min_range = 600
max_range = 800
missilelength = 2.0
missilespeed = 0.2
missilewidth = 0.8
name = “protector_frigate_rocketswarm”
powerconsumed = 0.0
shield_penetration = 12
size = “FRIGATE”
slot_type = TURRET
sound = data/sounds/missile_launch.ogg
soundvolume = 1.0
tracking_speed = 19.0
trail_fade_time = 200
turnspeed = 1.0
turret_sprite = “turret_miss_v3”
turretsize = 0
weight = 100
warhead = EXPLOSIVE
uisortpos = 1030
has_decoys = 1
decoy_release_range = 800
submunitionslive = 1
num_submunitions = 18
stage_separation_delay = 280
second_stage_speed = 0.38
twostage = 1
second_stage_turnspeed = 0.3
fire_while_camoflaged = 1
restricted = “protector”

[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 = min_range,DECIMAL
11 = has_decoys,BOOL
12 = missilespeed,DECIMAL
[/code]

Camoflage:

[code][config]
unlockcost = 0
lockable = 0
classname = “SIM_CamoflageShieldModule”
category = “DEFENSES”
size = “FRIGATE”
name = “protector_frigate_camoflage”
guiname = “Frigate Cloaking Device”
description = “This device makes your ship nearly invisible for short periods. You can’t fire whilst active, but you can combine it with repair systems and then repair in relative safety mid-battle.”
weight = 80
hitpoints = 3
cost = 40
icon = module_camoflage.dds
crew_required = 0
powerconsumed = 0
max_cloak_power = 100
cloak_rechargerate = 1.0
cloak_consumptionrate = 0.0001
slot_type = STANDARD
uisortpos = 2190
restricted = “protector”

[dataitems]
0 = cost,DECIMAL
1 = weight,DECIMAL
2 = hitpoints,DECIMAL
3 = powerconsumed,DECIMAL

[/code]

Fighter Hull:

[code][config]
classname = fighter
name = Protector Guardian Fighter
guiname = Protector Guardian Fighter Hull
sprite = Imperial Javelin Fighter.dds
damagetexture = Imperial Javelin Fighter_damaged.dds
hulktexture = imperial_hulks.dds
hulkUVstart = 4
hulkUVend = 7
width = 13
height = 13
powerproduced = 30
cost = 39
racename = protector

[bonuses]
0 = ARMOURBOOST,0.13

[runninglights]
0 = 128,177,200,3,2

[contrails]
0 = 80,214,40,200,2.0,4
1 = 176,214,40,200,2.0,4

[targets]
0 = 43.00,153.50,1,1,4.00,99.00,82.00,208.00,SHIP_EMMITER_SMALL,
1 = 116.00,89.00,0,0,
2 = 181.50,104.00,1,1,150.00,39.00,213.00,169.00,SHIP_EMMITER_SMALL,

[slots]
0 = 128.00,177.00,STANDARD,
1 = 209.00,53.00,TURRET,
2 = 47.00,53.00,TURRET,
2 = 128.00,40.00,STANDARD,

[explosions]
0 = 0,128,128,EXP_STARTBREAKUP
1 = 0,128,128,EXP_FIGHTER_DESTROYED_LOD
2 = 0,128,128,EXP_FIGHTER_DESTROYED
3 = 0,128,128,EXP_BLASTGLARE
[/code]

Weapons:

[code][config]
unlockcost = 0
lockable = 0
armour_penetration = 5
blasttexture = “turret_blast_red.dds”
category = “WEAPONS”
classname = “SIM_BulletWeaponModule”
color = 1
cost = 10
crew_required = 0
damage = 2
description = “Something.”
salvo_size = 20
salvo_interval = 2000
fire_interval = 100
guiname = “Fighter Gattling Gun”
hitpoints = 0
icon = turret
min_range = 10
optimum_range = 30
max_range = 50
name = “protector_fighter_gattlinggun”
powerconsumed = 0
shield_penetration = 0
size = “FIGHTER”
sound = “data/sounds/interstellar_gun_04.ogg”
soundvolume = 0.5
speed = 5
tracking_speed = 4.0
turret_sprite = “turret_bull_v1”
turretsize = 0.0
weight = 2
height = 2.2
width = 0.5
slot_type = TURRET
uisortpos = 1010
fire_while_camoflaged = 1
restricted = “protector”

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

[code][config]
armour_penetration = 90
blasttexture = “turret_blast_red.dds”
category = “WEAPONS”
classname = “SIM_BulletWeaponModule”
color = 4
cost = 50
crew_required = 0
damage = 2
description = “Sometimes those pesky enemies swarm at you like a hive of angry space bees, which is when you will be glad you have the area-of effect damage of the Mk I Flak Cannon.”
fire_interval = 300
guiname = “Fighter Energy Bomb”
hitpoints = 5
icon = turret
lockable = 0
max_range = 80
min_range = 0
name = “fighter_hebomb”
powerconsumed = 0
shield_penetration = 0
size = “FIGHTER”
slot_type = TURRET
sound = “data/sounds/swarm_gun_08.ogg”
soundvolume = 1.0
speed = 0.3
tracking_speed = 4.0
turret_sprite = “turret_miss_v1”
turretsize = 0.0
uisortpos = 1060
unlockcost = 0
weight = 5
height = 6
width = 6.0
payload = “RADIATION”
radiation_damage = 1
radiation_decay = 3.0
total_damage = 2
damage_duration = 5000
restricted = “protector”
fire_while_camoflaged = 1

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

Camoflage:

[code][config]
unlockcost = 0
lockable = 0
classname = “SIM_CamoflageShieldModule”
category = “DEFENSES”
size = “FIGHTER”
name = “protector_fighter_camoflage”
guiname = “Fighter Cloaking Device”
description = “Renders your fighters near invisible for long periods of time, making it harder for the enemies inferior computers to target them.”
weight = 1
hitpoints = 3
cost = 20
icon = module_camoflage.dds
crew_required = 0
powerconsumed = 0
max_cloak_power = 100
cloak_rechargerate = 1.0
cloak_consumptionrate = 0.00001
slot_type = STANDARD
uisortpos = 2190
restricted = “protector”

[dataitems]
0 = cost,DECIMAL
1 = weight,DECIMAL
2 = hitpoints,DECIMAL
3 = powerconsumed,DECIMAL
[/code]