add this to WEAPONS.lua, I made them as fast and durable as Strike Fighters, and a bit cheaper (change as you please)
Code: Select all
define_weapon "EMP Bomber" {
tier=2,
motion_sound = 'FIGHTER_ENGINE_LOOP',
launch_sound = 'FIGHTER_LAUNCHED_SINGLE',
multi_launch_sound = 'FIGHTER_LAUNCHED_MULTI',
type= "fighter",
loadout = {type = 'emp_bombs', n=1},
cant_attack_trackers=true,
cost_mult=3,
health = 30,
speed=12,
desc = "Small craft designed to deliver EMP warheads at point blank range.",
fighter_drawers = {
default = 'BladeBomber',
Hawk='HawkBomber',
Hammer='HammerBomber',
Blade='BladeBomber',
Manta='MantaBomber',
Star='StarBomber',
Box='BoxBomber',
Hat='HawkBomber',
}
}
define_weapon "Leech Bomber" {
tier=2,
motion_sound = 'FIGHTER_ENGINE_LOOP',
launch_sound = 'FIGHTER_LAUNCHED_SINGLE',
multi_launch_sound = 'FIGHTER_LAUNCHED_MULTI',
type= "fighter",
loadout = {type = 'leech_bombs', n=1},
cant_attack_trackers=true,
cost_mult=3,
health = 30,
speed=12,
desc = "Small craft designed to deliver Leech warheads at point blank range.",
fighter_drawers = {
default = 'BladeBomber',
Hawk='HawkBomber',
Hammer='HammerBomber',
Blade='BladeBomber',
Manta='MantaBomber',
Star='StarBomber',
Box='BoxBomber',
Hat='HawkBomber',
}
}
then change function _G.get_fighter_weapon(craft_type,empire,target) from tech.lua to this
Code: Select all
function _G.get_fighter_weapon(craft_type,empire,target)
local _TRACE_INFO = craft_type
local type in empire.part_info![craft_type]!.loadout!
local alt_type
if (type == 'energy_or_bombs')
if target
if is_tracking_object(target)
type='energy'
else
type='strike'
end
else
type='bombs'
alt_type='energy'
end
end
if (type == 'emp_bombs')
if (empire:known 'EMP Warhead')
return 'EMP Missiles'
else
type='bombs'
end
end
if (type == 'leech_bombs')
if (empire:known 'Leech Warheads')
return 'Leech Missiles'
else
type='bombs'
end
end
local best_weapon = fighter_weapon_fun![type](empire:available_part_info()!)
if alt_type
return best_weapon,fighter_weapon_fun![alt_type](empire:available_part_info()!)
end
return best_weapon
end
now change tech 'Multirole Fighters' to unlock your new bombers (file ~TECHNOLOGY.lua)
Code: Select all
--unlocks_parts='Strike Fighter',
unlocks_parts={'Strike Fighter','EMP Bomber','Leech Bomber'},