From 9c646c64b7f36cb069696dd6417753fbb6346daf Mon Sep 17 00:00:00 2001 From: oznogon Date: Sun, 29 Mar 2026 23:39:21 -0700 Subject: [PATCH 1/4] Export more entities and entity properties --- scripts/api/gm.lua | 284 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 276 insertions(+), 8 deletions(-) diff --git a/scripts/api/gm.lua b/scripts/api/gm.lua index e9388a505d..7a3304d6d8 100644 --- a/scripts/api/gm.lua +++ b/scripts/api/gm.lua @@ -35,6 +35,9 @@ function __spawnCpuShipFunc(key) end function getEntityExportString(entity) + if entity.components.explosion_effect or entity.components.beam_effect then + return "" + end if entity.components.player_control and entity.components.typename then -- Likely a player ship for k, v in pairs(__ship_templates) do @@ -59,18 +62,64 @@ function getEntityExportString(entity) end end end - if entity.components.explode_on_touch and entity.components.physics and entity.components.physics.type == "sensor" then - -- Likely an asteroid + -- Terrain: Asteroid has spin, avoid_object, and explode_on_touch + if entity.components.spin and entity.components.avoid_object and entity.components.explode_on_touch then return "Asteroid()" .. __exportBasics(entity) end - if entity.components.delayed_explode_on_touch and entity.components.physics and entity.components.physics.type == "sensor" then - -- Likely an Mine + -- Terrain: VisualAsteroid has spin and mesh_render but no physics or avoid_object + if entity.components.spin and entity.components.mesh_render and not entity.components.physics and not entity.components.avoid_object then + return "VisualAsteroid()" .. __exportBasics(entity) + end + -- Mine has delayed_explode_on_touch and constant_particle_emitter + if entity.components.delayed_explode_on_touch and entity.components.constant_particle_emitter then return "Mine()" .. __exportBasics(entity) end - if entity.components.radar_block and entity.components.nebula_renderer then - -- Likely an Nebula + -- Nebula has nebula_renderer + if entity.components.nebula_renderer then return "Nebula()" .. __exportBasics(entity) end + -- Planet has planet_render + if entity.components.planet_render then + return "Planet()" .. __exportPlanet(entity) + end + -- BlackHole has gravity with damage=true and billboard_render + if entity.components.gravity and entity.components.billboard_render and entity.components.gravity.damage then + return "BlackHole()" .. __exportBasics(entity) + end + -- WormHole has gravity with damage=false and a non-zero wormhole_target + if entity.components.gravity and entity.components.billboard_render and not entity.components.gravity.damage then + local wt = entity.components.gravity.wormhole_target + if wt and (wt[1] ~= 0 or wt[2] ~= 0) then + return "WormHole()" .. __exportWormHole(entity) + end + end + -- SupplyDrop has pickup with at least one supply > 0 + if entity.components.pickup then + local p = entity.components.pickup + if (p.give_energy and p.give_energy > 0) + or (p.give_homing and p.give_homing > 0) + or (p.give_nuke and p.give_nuke > 0) + or (p.give_mine and p.give_mine > 0) + or (p.give_emp and p.give_emp > 0) + or (p.give_hvli and p.give_hvli > 0) + then + return "SupplyDrop()" .. __exportSupplyDrop(entity) + end + end + -- Artifact has mesh_render with an "mesh/Artifact" mesh + if entity.components.mesh_render and entity.components.mesh_render.mesh + and string.sub(entity.components.mesh_render.mesh, 1, 13) == "mesh/Artifact" + then + return "Artifact()" .. __exportArtifact(entity) + end + -- WarpJammer has warp_jammer + if entity.components.warp_jammer then + return "WarpJammer()" .. __exportWarpJammer(entity) + end + -- ScanProbe has allow_radar_link + if entity.components.allow_radar_link then + return "ScanProbe()" .. __exportScanProbe(entity) + end return "" end @@ -85,10 +134,229 @@ function __exportBasics(entity) if faction ~= nil and faction ~= "" then extras = extras .. ":setFaction('" .. faction .. "')" end + if entity.components.callsign then + extras = extras .. ":setCallSign('" .. entity.components.callsign.callsign .. "')" + end + local ss = entity.components.scan_state + if ss then + local complexity = ss.complexity or 0 + local depth = ss.depth or 0 + if complexity ~= -1 or depth ~= -1 then + extras = extras .. string.format(":setScanningParameters(%d, %d)", complexity, depth) + end + local states = {} + local first_state = nil + local all_same = true + for n = 1, #ss do + local entry = ss[n] + if entry.faction and entry.faction.components and entry.faction.components.faction_info then + local name = entry.faction.components.faction_info.name + local state = entry.state + states[#states+1] = {name=name, state=state} + if first_state == nil then + first_state = state + elseif state ~= first_state then + all_same = false + end + end + end + if #states > 0 then + if all_same and first_state ~= "none" then + extras = extras .. ":setScanState('" .. first_state .. "')" + elseif not all_same then + for _, entry in ipairs(states) do + if entry.state ~= "none" then + extras = extras .. ":setScanStateByFaction('" .. entry.name .. "', '" .. entry.state .. "')" + end + end + end + end + end + return extras +end + +function __exportShipChanges(entity, template) + local extras = __exportBasics(entity) + + -- Hull: export max if changed from template, current if damaged, allow_destruction if changed + local hull = entity.components.hull + local t_hull = template.hull + if hull then + if t_hull and hull.max ~= t_hull.max then + extras = extras .. string.format(":setHullMax(%.0f)", hull.max) + end + if hull.current ~= hull.max then + extras = extras .. string.format(":setHull(%.0f)", hull.current) + end + if hull.allow_destruction == false then + extras = extras .. ":setCanBeDestroyed(false)" + end + end + + -- Shields: export max per segment if changed from template, current level if depleted + local shields = entity.components.shields + local t_shields = template.shields + if shields and t_shields then + local any_max_diff = false + for i = 1, #shields do + if not t_shields[i] or shields[i].max ~= t_shields[i].max then + any_max_diff = true + break + end + end + if any_max_diff then + local maxes = {} + for i = 1, #shields do + maxes[i] = string.format("%.0f", shields[i].max) + end + extras = extras .. ":setShieldsMax(" .. table.concat(maxes, ", ") .. ")" + end + local any_level_diff = false + for i = 1, #shields do + if shields[i].level ~= shields[i].max then + any_level_diff = true + break + end + end + if any_level_diff then + local levels = {} + for i = 1, #shields do + levels[i] = string.format("%.0f", shields[i].level) + end + extras = extras .. ":setShields(" .. table.concat(levels, ", ") .. ")" + end + end + + -- Missile tubes: export changed max capacities first, then depleted stocks + local mt = entity.components.missile_tubes + local t_mt = template.missile_tubes + if mt and t_mt then + local weapon_types = { + {"Homing", "max_homing", "storage_homing"}, + {"Nuke", "max_nuke", "storage_nuke"}, + {"Mine", "max_mine", "storage_mine"}, + {"EMP", "max_emp", "storage_emp"}, + {"HVLI", "max_hvli", "storage_hvli"}, + } + for _, wt in ipairs(weapon_types) do + local name, max_key, storage_key = wt[1], wt[2], wt[3] + local t_max = t_mt[max_key] or 0 + local e_max = mt[max_key] or 0 + local e_storage = mt[storage_key] or 0 + if e_max ~= t_max then + extras = extras .. string.format(":setWeaponStorageMax('%s', %d)", name, e_max) + end + if e_storage ~= e_max then + extras = extras .. string.format(":setWeaponStorage('%s', %d)", name, e_storage) + end + end + end + + return extras +end + +function __exportPlanet(entity) + local extras = __exportBasics(entity) + local pr = entity.components.planet_render + if pr then + if pr.size then + extras = extras .. string.format(":setPlanetRadius(%.0f)", pr.size) + end + if pr.texture then + extras = extras .. ":setPlanetSurfaceTexture('" .. pr.texture .. "')" + end + if pr.atmosphere_texture then + extras = extras .. ":setPlanetAtmosphereTexture('" .. pr.atmosphere_texture .. "')" + end + if pr.atmosphere_color then + extras = extras .. string.format(":setPlanetAtmosphereColor(%.2f, %.2f, %.2f)", pr.atmosphere_color[1], pr.atmosphere_color[2], pr.atmosphere_color[3]) + end + if pr.cloud_texture then + extras = extras .. ":setPlanetCloudTexture('" .. pr.cloud_texture .. "')" + end + if pr.cloud_size and pr.size and math.abs(pr.cloud_size - pr.size * 1.05) > 1 then + extras = extras .. string.format(":setPlanetCloudRadius(%.0f)", pr.cloud_size) + end + if pr.distance_from_movement_plane and pr.distance_from_movement_plane ~= 0 then + extras = extras .. string.format(":setDistanceFromMovementPlane(%.0f)", pr.distance_from_movement_plane) + end + end + if entity.components.spin then + local rate = entity.components.spin.rate + if rate and rate ~= 0 then + extras = extras .. string.format(":setAxialRotationTime(%.2f)", 360.0 / rate) + end + end + return extras +end + +function __exportWormHole(entity) + local extras = __exportBasics(entity) + local g = entity.components.gravity + if g and g.wormhole_target then + local tx, ty = g.wormhole_target[1], g.wormhole_target[2] + if tx ~= 0 or ty ~= 0 then + extras = extras .. string.format(":setTargetPosition(%.0f, %.0f)", tx, ty) + end + end + return extras +end + +function __exportArtifact(entity) + local extras = __exportBasics(entity) + if entity.components.spin then + local rate = entity.components.spin.rate + if rate and rate ~= 0 then + extras = extras .. string.format(":setSpin(%.2f)", rate) + end + end + return extras +end + +function __exportSupplyDrop(entity) + local extras = __exportBasics(entity) + local p = entity.components.pickup + if p then + if p.give_energy and p.give_energy > 0 then + extras = extras .. string.format(":setEnergy(%.0f)", p.give_energy) + end + if p.give_homing and p.give_homing > 0 then + extras = extras .. string.format(":setWeaponStorage('Homing', %d)", p.give_homing) + end + if p.give_nuke and p.give_nuke > 0 then + extras = extras .. string.format(":setWeaponStorage('Nuke', %d)", p.give_nuke) + end + if p.give_mine and p.give_mine > 0 then + extras = extras .. string.format(":setWeaponStorage('Mine', %d)", p.give_mine) + end + if p.give_emp and p.give_emp > 0 then + extras = extras .. string.format(":setWeaponStorage('EMP', %d)", p.give_emp) + end + if p.give_hvli and p.give_hvli > 0 then + extras = extras .. string.format(":setWeaponStorage('HVLI', %d)", p.give_hvli) + end + end return extras end -function __exportShipChanges(entity, v) +function __exportWarpJammer(entity) local extras = __exportBasics(entity) + local wj = entity.components.warp_jammer + if wj and wj.range then + extras = extras .. string.format(":setRange(%.0f)", wj.range) + end return extras -end \ No newline at end of file +end + +function __exportScanProbe(entity) + local extras = __exportBasics(entity) + local lt = entity.components.lifetime + if lt and lt.lifetime then + extras = extras .. string.format(":setLifetime(%.0f)", lt.lifetime) + end + local mt = entity.components.move_to + if mt and mt.speed then + extras = extras .. string.format(":setSpeed(%.0f)", mt.speed) + end + return extras +end From 61cf622285ce405184152b48b5f97fb63586895d Mon Sep 17 00:00:00 2001 From: oznogon Date: Tue, 31 Mar 2026 21:37:22 -0700 Subject: [PATCH 2/4] Export more entities and entity properties --- scripts/api/gm.lua | 214 ++++++++++++++++++++++++++- scripts/scenario_aaaaaaa.lua | 276 +++++++++++++++++++++++++++++++++++ 2 files changed, 483 insertions(+), 7 deletions(-) create mode 100644 scripts/scenario_aaaaaaa.lua diff --git a/scripts/api/gm.lua b/scripts/api/gm.lua index 7a3304d6d8..f850b9aeb4 100644 --- a/scripts/api/gm.lua +++ b/scripts/api/gm.lua @@ -42,7 +42,7 @@ function getEntityExportString(entity) -- Likely a player ship for k, v in pairs(__ship_templates) do if v.__type == "playership" and v.typename.type_name == entity.components.typename.type_name then - return "PlayerSpaceship():setTemplate('" .. k .. "')" .. __exportShipChanges(entity, v) + return "PlayerSpaceship():setTemplate('" .. k .. "')" .. __exportShipChanges(entity, v, "full") end end end @@ -120,10 +120,15 @@ function getEntityExportString(entity) if entity.components.allow_radar_link then return "ScanProbe()" .. __exportScanProbe(entity) end + + -- No matching API function return "" end -function __exportBasics(entity) +-- default_scan_state: the scan state the entity type has by default (before any explicit setScanState call). +-- PlayerSpaceship() initialises all factions to "fullscan"; everything else defaults to "none". +function __exportBasics(entity, default_scan_state) + default_scan_state = default_scan_state or "none" local x, y = entity:getPosition() local extras = string.format(":setPosition(%.0f, %.0f)", x, y) local rotation = entity:getRotation() @@ -135,7 +140,8 @@ function __exportBasics(entity) extras = extras .. ":setFaction('" .. faction .. "')" end if entity.components.callsign then - extras = extras .. ":setCallSign('" .. entity.components.callsign.callsign .. "')" + local cs = entity.components.callsign.callsign:gsub("\\", "\\\\"):gsub("'", "\\'") + extras = extras .. ":setCallSign('" .. cs .. "')" end local ss = entity.components.scan_state if ss then @@ -161,11 +167,11 @@ function __exportBasics(entity) end end if #states > 0 then - if all_same and first_state ~= "none" then + if all_same and first_state ~= default_scan_state then extras = extras .. ":setScanState('" .. first_state .. "')" elseif not all_same then for _, entry in ipairs(states) do - if entry.state ~= "none" then + if entry.state ~= default_scan_state then extras = extras .. ":setScanStateByFaction('" .. entry.name .. "', '" .. entry.state .. "')" end end @@ -175,8 +181,8 @@ function __exportBasics(entity) return extras end -function __exportShipChanges(entity, template) - local extras = __exportBasics(entity) +function __exportShipChanges(entity, template, default_scan_state) + local extras = __exportBasics(entity, default_scan_state) -- Hull: export max if changed from template, current if damaged, allow_destruction if changed local hull = entity.components.hull @@ -252,9 +258,203 @@ function __exportShipChanges(entity, template) end end + -- Impulse engine + local ie = entity.components.impulse_engine + local t_ie = template.impulse_engine + if ie then + if not t_ie or ie.max_speed_forward ~= t_ie.max_speed_forward or ie.max_speed_reverse ~= t_ie.max_speed_reverse then + if ie.max_speed_forward == ie.max_speed_reverse then + extras = extras .. string.format(":setImpulseMaxSpeed(%.1f)", ie.max_speed_forward) + else + extras = extras .. string.format(":setImpulseMaxSpeed(%.1f, %.1f)", ie.max_speed_forward, ie.max_speed_reverse) + end + end + if not t_ie or ie.acceleration_forward ~= t_ie.acceleration_forward or ie.acceleration_reverse ~= t_ie.acceleration_reverse then + if ie.acceleration_forward == ie.acceleration_reverse then + extras = extras .. string.format(":setAcceleration(%.1f)", ie.acceleration_forward) + else + extras = extras .. string.format(":setAcceleration(%.1f, %.1f)", ie.acceleration_forward, ie.acceleration_reverse) + end + end + if ie.sound and ie.sound ~= "" and (not t_ie or ie.sound ~= t_ie.sound) then + extras = extras .. ":setImpulseSoundFile('" .. ie.sound .. "')" + end + end + + -- Maneuvering thrusters + local man_thrusters = entity.components.maneuvering_thrusters + local t_man_thrusters = template.maneuvering_thrusters + if man_thrusters and (not t_man_thrusters or man_thrusters.speed ~= t_man_thrusters.speed) then + extras = extras .. string.format(":setRotationMaxSpeed(%.1f)", man_thrusters.speed) + end + + -- Combat maneuvering thrusters + local cmt = entity.components.combat_maneuvering_thrusters + local t_cmt = template.combat_maneuvering_thrusters + if cmt and (not t_cmt or cmt.boost_speed ~= t_cmt.boost_speed or cmt.strafe_speed ~= t_cmt.strafe_speed) then + extras = extras .. string.format(":setCombatManeuver(%.0f, %.0f)", cmt.boost_speed, cmt.strafe_speed) + end + + -- Warp drive (C++ default speed_per_level=1000; setWarpDrive(true) without setWarpSpeed leaves it nil in template) + local wd = entity.components.warp_drive + local t_wd = template.warp_drive + if wd then + if not t_wd then + extras = extras .. ":setWarpDrive(true)" + end + local t_warp_speed = (t_wd and t_wd.speed_per_level) or 1000 + if wd.speed_per_level ~= t_warp_speed then + extras = extras .. string.format(":setWarpSpeed(%.0f)", wd.speed_per_level) + end + end + + -- Jump drive (C++ defaults min=5000, max=50000; setJumpDrive(true) without setJumpDriveRange leaves them nil) + local jd = entity.components.jump_drive + local t_jd = template.jump_drive + if jd then + if not t_jd then + extras = extras .. ":setJumpDrive(true)" + end + local t_jd_min = (t_jd and t_jd.min_distance) or 5000 + local t_jd_max = (t_jd and t_jd.max_distance) or 50000 + if jd.min_distance ~= t_jd_min or jd.max_distance ~= t_jd_max then + extras = extras .. string.format(":setJumpDriveRange(%.0f, %.0f)", jd.min_distance, jd.max_distance) + end + end + + -- Beam weapons (0-based index for setters, 1-based for ECS component array) + local bw = entity.components.beam_weapons + local t_bw = template.beam_weapons + if bw then + for i = 1, #bw do + local b = bw[i] + local tb = t_bw and t_bw[i] + local idx = i - 1 + if not tb or b.arc ~= tb.arc or b.direction ~= tb.direction or b.range ~= tb.range + or b.cycle_time ~= tb.cycle_time or b.damage ~= tb.damage + then + extras = extras .. string.format(":setBeamWeapon(%d, %.1f, %.1f, %.0f, %.1f, %.1f)", + idx, b.arc, b.direction, b.range, b.cycle_time, b.damage) + end + if b.turret_arc and b.turret_arc ~= 0 then + if not tb or b.turret_arc ~= tb.turret_arc or b.turret_direction ~= tb.turret_direction + or b.turret_rotation_rate ~= tb.turret_rotation_rate + then + extras = extras .. string.format(":setBeamWeaponTurret(%d, %.1f, %.1f, %.1f)", + idx, b.turret_arc, b.turret_direction, b.turret_rotation_rate) + end + end + -- For properties not stored in the Lua template, fall back to C++ struct defaults + local tb_texture = (tb and tb.texture) or "texture/beam_orange.png" + if b.texture and b.texture ~= "" and b.texture ~= tb_texture then + extras = extras .. string.format(":setBeamWeaponTexture(%d, '%s')", idx, b.texture) + end + local tb_energy = (tb and tb.energy_per_beam_fire) or 3.0 + if b.energy_per_beam_fire and b.energy_per_beam_fire ~= tb_energy then + extras = extras .. string.format(":setBeamWeaponEnergyPerFire(%d, %.2f)", idx, b.energy_per_beam_fire) + end + local tb_heat = (tb and tb.heat_per_beam_fire) or 0.02 + if b.heat_per_beam_fire and math.abs(b.heat_per_beam_fire - tb_heat) > 1e-5 then + extras = extras .. string.format(":setBeamWeaponHeatPerFire(%d, %.3f)", idx, b.heat_per_beam_fire) + end + -- arc_color is u8vec4 {r,g,b,a} (0-255); setBeamWeaponArcColor takes floats 0-1. + -- ShipTemplate has no setBeamWeaponArcColor, so compare against C++ defaults: + -- arc_color default={255,0,0,128}, arc_color_fire default={255,255,0,128} + local ac = b.arc_color + local acf = b.arc_color_fire + if ac and (ac[1] ~= 255 or ac[2] ~= 0 or ac[3] ~= 0 + or (acf and (acf[1] ~= 255 or acf[2] ~= 255 or acf[3] ~= 0))) + then + local fr = acf and acf[1] / 255.0 or 1.0 + local fg = acf and acf[2] / 255.0 or 1.0 + local fb = acf and acf[3] / 255.0 or 0.0 + extras = extras .. string.format(":setBeamWeaponArcColor(%d, %.3f, %.3f, %.3f, %.3f, %.3f, %.3f)", + idx, ac[1] / 255.0, ac[2] / 255.0, ac[3] / 255.0, fr, fg, fb) + end + if b.damage_type and b.damage_type ~= "energy" and (not tb or b.damage_type ~= tb.damage_type) then + extras = extras .. string.format(":setBeamWeaponDamageType(%d, '%s')", idx, b.damage_type) + end + end + end + + -- Docking bay: DockingBay uses a bitfield (default flags=0), so unset template fields are nil + -- while entity fields are false. Normalise both to boolean with == true before comparing. + local db = entity.components.docking_bay + local t_db = template.docking_bay + if db then + local e_share = db.share_energy == true + local e_repair = db.repair == true + local e_probes = db.restock_probes == true + local e_missiles = db.restock_missiles == true + local t_share = t_db and t_db.share_energy == true + local t_repair = t_db and t_db.repair == true + local t_probes = t_db and t_db.restock_probes == true + local t_missiles = t_db and t_db.restock_missiles == true + if e_share ~= t_share then + extras = extras .. ":setSharesEnergyWithDocked(" .. tostring(e_share) .. ")" + end + if e_repair ~= t_repair then + extras = extras .. ":setRepairDocked(" .. tostring(e_repair) .. ")" + end + if e_probes ~= t_probes then + extras = extras .. ":setRestocksScanProbes(" .. tostring(e_probes) .. ")" + end + if e_missiles ~= t_missiles then + extras = extras .. ":setRestocksMissilesDocked(" .. tostring(e_missiles) .. ")" + end + end + + -- Repair crew: only export if we found actual crew entities and the count differs from template. + -- internal_crew entities are not always instantiated, so a count of 0 is not reliable. + local crew_count = __countShipCrew(entity) + local template_crew_count = template.__repair_crew_count or 0 + if crew_count > 0 and crew_count ~= template_crew_count then + extras = extras .. string.format(":setRepairCrewCount(%d)", crew_count) + end + + -- AI controller (CPU ships only): export AI name and non-entity-targeted orders + local ai = entity.components.ai_controller + local t_ai = template.ai_controller + if ai then + if ai.new_name and ai.new_name ~= "" and ai.new_name ~= "default" and ai.new_name ~= t_ai.new_name then + extras = extras .. ":setAI('" .. ai.new_name .. "')" + end + local orders = ai.orders + local loc = ai.order_target_location + if orders == "idle" then + extras = extras .. ":orderIdle()" + elseif orders == "roaming" then + if loc and (loc[1] ~= 0 or loc[2] ~= 0) then + extras = extras .. string.format(":orderRoamingAt(%.0f, %.0f)", loc[1], loc[2]) + else + extras = extras .. ":orderRoaming()" + end + elseif orders == "stand_ground" then + extras = extras .. ":orderStandGround()" + elseif orders == "defend_location" and loc then + extras = extras .. string.format(":orderDefendLocation(%.0f, %.0f)", loc[1], loc[2]) + elseif orders == "fly_towards" and loc then + extras = extras .. string.format(":orderFlyTowards(%.0f, %.0f)", loc[1], loc[2]) + elseif orders == "fly_towards_blind" and loc then + extras = extras .. string.format(":orderFlyTowardsBlind(%.0f, %.0f)", loc[1], loc[2]) + -- entity-targeted orders (defend_target, attack, dock, fly_formation) cannot be serialized + end + end + return extras end +-- Returns the number of internal repair crew belonging to `entity`. +function __countShipCrew(entity) + local n = 0 + for _, crew in ipairs(getEntitiesWithComponent("internal_crew")) do + if crew.components.internal_crew and crew.components.internal_crew.ship == entity then + n = n + 1 + end + end + return n +end + function __exportPlanet(entity) local extras = __exportBasics(entity) local pr = entity.components.planet_render diff --git a/scripts/scenario_aaaaaaa.lua b/scripts/scenario_aaaaaaa.lua new file mode 100644 index 0000000000..907ba1a62d --- /dev/null +++ b/scripts/scenario_aaaaaaa.lua @@ -0,0 +1,276 @@ + WormHole():setPosition(109190, -39762):setTargetPosition(-61730, 29490) + CpuShip():setTemplate('MT52 Hornet'):setPosition(87805, -3169):setRotation(342):setFaction('Kraylor'):setCallSign('K-EGF1') + CpuShip():setTemplate('Atlantis X23'):setPosition(102472, -42236):setRotation(68):setFaction('Kraylor'):setCallSign('K-GDN2'):setWeaponStorage('Homing', 0) + CpuShip():setTemplate('Atlantis X23'):setPosition(105052, -46060):setRotation(364):setFaction('Kraylor'):setCallSign('K-GDN1'):setWeaponStorage('Homing', 0) + CpuShip():setTemplate('Phobos T3'):setPosition(95233, -29696):setRotation(194):setFaction('Kraylor'):setCallSign('K-SCN2'):setWeaponStorage('Homing', 4) + CpuShip():setTemplate('Phobos T3'):setPosition(90930, -32986):setRotation(163):setFaction('Kraylor'):setCallSign('K-SCN1'):setWeaponStorage('Homing', 4) + Mine():setPosition(102374, -58356) + Mine():setPosition(91704, -56874) + Mine():setPosition(82218, -51242) + Mine():setPosition(79402, -38867) + Mine():setPosition(113194, -55392) + Mine():setPosition(122605, -40794) + Mine():setPosition(114231, -19304) + Mine():setPosition(80292, -29752) + Mine():setPosition(78661, -13598) + Mine():setPosition(96669, 852) + Mine():setPosition(107117, -1816) + Mine():setPosition(85331, -26344) + Mine():setPosition(116899, -35977) + Mine():setPosition(113860, -29011) + Mine():setPosition(105635, -27159) + Mine():setPosition(107488, -9967) + Mine():setPosition(101930, -6855) + Mine():setPosition(96224, -3520) + Mine():setPosition(82070, -40497) + Mine():setPosition(86294, -43462) + Mine():setPosition(85479, -47908) + Mine():setPosition(91037, -52206) + Mine():setPosition(91778, -48056) + Mine():setPosition(98818, -51909) + Mine():setPosition(107932, -54132) + Mine():setPosition(111415, -50279) + Mine():setPosition(116380, -47908) + Mine():setPosition(119640, -32717) + Mine():setPosition(115120, -41164) + Mine():setPosition(118603, -38719) + Mine():setPosition(96076, -38348) + Mine():setPosition(99633, -36644) + Mine():setPosition(96298, -33309) + Mine():setPosition(99410, -31679) + Mine():setPosition(102300, -29752) + Mine():setPosition(115861, -31235) + Mine():setPosition(113786, -25454) + Mine():setPosition(108970, -25306) + Mine():setPosition(106006, -20045) + Mine():setPosition(109859, -18341) + Mine():setPosition(104672, -13598) + Mine():setPosition(80810, -35681) + Mine():setPosition(86442, -34717) + Mine():setPosition(83997, -29382) + Mine():setPosition(86887, -23380) + Mine():setPosition(91333, -25232) + Mine():setPosition(93779, -17377) + Mine():setPosition(85183, -17303) + Mine():setPosition(85479, -9596) + Mine():setPosition(81107, -4335) + Mine():setPosition(84960, 1371) + Mine():setPosition(104968, -7225) + Mine():setPosition(92000, -5669) + Nebula():setPosition(118381, -32642):setRotation(191) + Nebula():setPosition(116158, -41164):setRotation(55) + Nebula():setPosition(113786, -48649):setRotation(354) + Nebula():setPosition(106598, -53095):setRotation(352) + Nebula():setPosition(98225, -52799):setRotation(133) + Nebula():setPosition(90666, -50798):setRotation(64) + Nebula():setPosition(84071, -44351):setRotation(323) + Nebula():setPosition(97594, -36092):setRotation(351) + Nebula():setPosition(83552, -35014):setRotation(310) + Nebula():setPosition(88591, -26566):setRotation(91) + Nebula():setPosition(111045, -27159):setRotation(292) + Nebula():setPosition(102523, -28715):setRotation(324) + Nebula():setPosition(106895, -18563):setRotation(85) + Nebula():setPosition(93704, -17970):setRotation(275) + Nebula():setPosition(85034, -16340):setRotation(16) + Nebula():setPosition(105264, -8633):setRotation(342) + Nebula():setPosition(94001, -4928):setRotation(158) + Nebula():setPosition(83108, -7966):setRotation(26) + Nebula():setPosition(88962, 3520):setRotation(202) + Nebula():setPosition(82515, 1149):setRotation(73) + CpuShip():setTemplate('Phobos T3'):setPosition(104829, 21454):setRotation(72):setFaction('Kraylor'):setCallSign('K-MC001'):setWeaponStorage('Homing', 4) + CpuShip():setTemplate('Atlantis X23'):setPosition(106363, 25218):setRotation(40):setFaction('Kraylor'):setCallSign('K-MDFD'):setWeaponStorage('Homing', 0) + CpuShip():setTemplate('MT52 Hornet'):setPosition(97993, 22149):setRotation(266):setFaction('Kraylor'):setCallSign('K-MF2') + CpuShip():setTemplate('MT52 Hornet'):setPosition(103710, 31493):setRotation(80):setFaction('Kraylor'):setCallSign('K-MF1') + CpuShip():setTemplate('MT52 Hornet'):setPosition(13948, -52838):setRotation(203):setFaction('Kraylor'):setCallSign('K-Fi3'):setScanState('full') + CpuShip():setTemplate('MT52 Hornet'):setPosition(10922, -51749):setRotation(118):setFaction('Kraylor'):setCallSign('K-Fi2'):setScanState('full') + CpuShip():setTemplate('Phobos T3'):setPosition(6273, -55399):setRotation(77):setFaction('Kraylor'):setCallSign('K-Strike1'):setScanState('full'):setWeaponStorage('Homing', 4) + CpuShip():setTemplate('MT52 Hornet'):setPosition(80200, 37900):setRotation(161):setFaction('Kraylor'):setCallSign('K-EF2') + CpuShip():setTemplate('MT52 Hornet'):setPosition(78000, 37100):setRotation(15):setFaction('Kraylor'):setCallSign('K-EF1') + CpuShip():setTemplate('MT52 Hornet'):setPosition(78200, 38000):setRotation(199):setFaction('Kraylor'):setCallSign('K-EC2') + CpuShip():setTemplate('Phobos T3'):setPosition(80200, 39900):setRotation(52):setFaction('Kraylor'):setCallSign('K-EC1'):setWeaponStorage('Homing', 4) + VisualAsteroid():setPosition(49512, -26931):setRotation(132) + Asteroid():setPosition(36424, -25214):setRotation(62) + VisualAsteroid():setPosition(35803, -19825):setRotation(327) + Asteroid():setPosition(31920, -21281):setRotation(178) + VisualAsteroid():setPosition(-9501, -19626):setRotation(44) + Asteroid():setPosition(-5690, -15855):setRotation(190) + VisualAsteroid():setPosition(49232, -21090):setRotation(166) + Asteroid():setPosition(41831, -24812):setRotation(11) + VisualAsteroid():setPosition(25665, -20026):setRotation(114) + Asteroid():setPosition(35055, -18572):setRotation(146) + VisualAsteroid():setPosition(14268, -21845):setRotation(4) + Asteroid():setPosition(15250, -15081):setRotation(91) + VisualAsteroid():setPosition(48320, -26822):setRotation(329) + Asteroid():setPosition(48675, -21440):setRotation(247) + VisualAsteroid():setPosition(30597, -22490):setRotation(360) + Asteroid():setPosition(19347, -21040):setRotation(9) + VisualAsteroid():setPosition(18212, -21617):setRotation(312) + Asteroid():setPosition(12576, -19862):setRotation(110) + Asteroid():setPosition(-5156, -19970):setRotation(43) + VisualAsteroid():setPosition(53585, -20598):setRotation(217) + Asteroid():setPosition(51046, -21357):setRotation(195) + VisualAsteroid():setPosition(17959, -23201):setRotation(287) + Asteroid():setPosition(19736, -24673):setRotation(86) + VisualAsteroid():setPosition(16542, -21496):setRotation(230) + Asteroid():setPosition(9958, -20384):setRotation(273) + VisualAsteroid():setPosition(41843, -22702):setRotation(219) + Asteroid():setPosition(46301, -24411):setRotation(224) + VisualAsteroid():setPosition(12032, -24776):setRotation(106) + Asteroid():setPosition(25222, -18999):setRotation(195) + VisualAsteroid():setPosition(-184, -20233):setRotation(97) + Asteroid():setPosition(-6649, -17790):setRotation(252) + VisualAsteroid():setPosition(49507, -21749):setRotation(262) + Asteroid():setPosition(47319, -20343):setRotation(79) + VisualAsteroid():setPosition(24666, -24528):setRotation(60) + Asteroid():setPosition(16604, -20562):setRotation(270) + VisualAsteroid():setPosition(19384, -21588):setRotation(8) + Asteroid():setPosition(16950, -16308):setRotation(142) + VisualAsteroid():setPosition(39486, -23205):setRotation(41) + Asteroid():setPosition(49385, -20183):setRotation(159) + VisualAsteroid():setPosition(12838, -19966):setRotation(333) + Asteroid():setPosition(29017, -24980):setRotation(225) + VisualAsteroid():setPosition(13202, -17319):setRotation(167) + Asteroid():setPosition(15547, -18798):setRotation(169) + VisualAsteroid():setPosition(53389, -21750):setRotation(99) + Asteroid():setPosition(42579, -23901):setRotation(124) + VisualAsteroid():setPosition(36394, -24832):setRotation(179) + Asteroid():setPosition(36931, -23221):setRotation(35) + VisualAsteroid():setPosition(17971, -18162):setRotation(156) + Asteroid():setPosition(12418, -21630):setRotation(242) + VisualAsteroid():setPosition(52022, -26723):setRotation(162) + Asteroid():setPosition(47481, -21998):setRotation(261) + VisualAsteroid():setPosition(22862, -23922):setRotation(233) + VisualAsteroid():setPosition(13488, -20172):setRotation(170) + Asteroid():setPosition(18237, -18695):setRotation(329) + VisualAsteroid():setPosition(41324, -22290):setRotation(219) + Asteroid():setPosition(54794, -20355):setRotation(122) + VisualAsteroid():setPosition(14824, -22322):setRotation(92) + Asteroid():setPosition(30135, -18215):setRotation(357) + VisualAsteroid():setPosition(2989, -20365):setRotation(226) + Asteroid():setPosition(7720, -20874):setRotation(24) + VisualAsteroid():setPosition(38243, -24786):setRotation(132) + Asteroid():setPosition(52238, -24376):setRotation(142) + VisualAsteroid():setPosition(16400, -20831):setRotation(165) + Asteroid():setPosition(32154, -22773):setRotation(101) + VisualAsteroid():setPosition(13075, -18843):setRotation(271) + Asteroid():setPosition(14250, -18988):setRotation(324) + VisualAsteroid():setPosition(37331, -24094):setRotation(257) + Asteroid():setPosition(51813, -21490):setRotation(225) + VisualAsteroid():setPosition(32126, -23386):setRotation(358) + Asteroid():setPosition(39731, -21123):setRotation(9) + VisualAsteroid():setPosition(18128, -16995):setRotation(3) + Asteroid():setPosition(15971, -20283):setRotation(293) + VisualAsteroid():setPosition(42941, -20837):setRotation(4) + Asteroid():setPosition(39594, -26187):setRotation(313) + VisualAsteroid():setPosition(23731, -22925):setRotation(176) + Asteroid():setPosition(33332, -21886):setRotation(35) + VisualAsteroid():setPosition(-7017, -17918):setRotation(13) + Asteroid():setPosition(13059, -16132):setRotation(136) + VisualAsteroid():setPosition(46865, -22674):setRotation(301) + Asteroid():setPosition(49605, -21599):setRotation(97) + VisualAsteroid():setPosition(24894, -19300):setRotation(319) + Asteroid():setPosition(14979, -23214):setRotation(41) + VisualAsteroid():setPosition(16349, -16609):setRotation(174) + Asteroid():setPosition(1733, -15679):setRotation(8) + VisualAsteroid():setPosition(37013, -21726):setRotation(270) + Asteroid():setPosition(54320, -22166):setRotation(3) + VisualAsteroid():setPosition(38972, -18708):setRotation(319) + Asteroid():setPosition(12784, -23081):setRotation(296) + VisualAsteroid():setPosition(17332, -20975):setRotation(343) + Asteroid():setPosition(7216, -21754):setRotation(113) + VisualAsteroid():setPosition(41716, -20267):setRotation(231) + Asteroid():setPosition(52710, -24180):setRotation(258) + VisualAsteroid():setPosition(35870, -22038):setRotation(243) + Asteroid():setPosition(24556, -24798):setRotation(65) + VisualAsteroid():setPosition(19849, -18940):setRotation(28) + Asteroid():setPosition(9972, -19804):setRotation(244) + VisualAsteroid():setPosition(38887, -20668):setRotation(104) + Asteroid():setPosition(50126, -20648):setRotation(316) + VisualAsteroid():setPosition(20131, -20760):setRotation(305) + Asteroid():setPosition(32985, -21377):setRotation(10) + VisualAsteroid():setPosition(-4161, -19924):setRotation(104) + Asteroid():setPosition(-5390, -17545):setRotation(89) + VisualAsteroid():setPosition(35817, -25095):setRotation(103) + Asteroid():setPosition(50233, -25471):setRotation(344) + VisualAsteroid():setPosition(22217, -18610):setRotation(53) + Asteroid():setPosition(15907, -18048):setRotation(209) + VisualAsteroid():setPosition(-999, -15150):setRotation(354) + Asteroid():setPosition(-214, -15521):setRotation(221) + VisualAsteroid():setPosition(38966, -20912):setRotation(308) + Asteroid():setPosition(40969, -20068):setRotation(326) + VisualAsteroid():setPosition(28961, -22306):setRotation(325) + Asteroid():setPosition(23201, -24724):setRotation(253) + VisualAsteroid():setPosition(18548, -15224):setRotation(123) + Asteroid():setPosition(18557, -17163):setRotation(233) + VisualAsteroid():setPosition(42327, -23664):setRotation(304) + Asteroid():setPosition(45459, -24329):setRotation(94) + VisualAsteroid():setPosition(31233, -24533):setRotation(339) + Asteroid():setPosition(18689, -23788):setRotation(18) + VisualAsteroid():setPosition(1992, -15394):setRotation(255) + Asteroid():setPosition(17731, -17292):setRotation(19) + Nebula():setPosition(-33654, -41667):setRotation(265) + Nebula():setPosition(-27368, 85952):setRotation(164) + Nebula():setPosition(-46273, 39476):setRotation(123) + Nebula():setPosition(-67320, 11857):setRotation(315) + Nebula():setPosition(-68463, 42333):setRotation(293) + Nebula():setPosition(13626, 75799):setRotation(20) + Nebula():setPosition(-33690, 17766):setRotation(308) + Nebula():setPosition(21545, 64380):setRotation(152) + Nebula():setPosition(-10484, -10439):setRotation(356) + Nebula():setPosition(-4159, 19240):setRotation(259) + Nebula():setPosition(-915, 27349):setRotation(211) + Nebula():setPosition(49362, -18062):setRotation(331) + Nebula():setPosition(48700, 30050):setRotation(294) + Nebula():setPosition(51300, 34200):setRotation(46) + Nebula():setPosition(52300, 42200):setRotation(31) + CpuShip():setTemplate('MT52 Hornet'):setPosition(35501, 42872):setRotation(124):setFaction('Human Navy'):setCallSign('HM3'):setScanState('full') + CpuShip():setTemplate('MT52 Hornet'):setPosition(37471, 37173):setRotation(198):setFaction('Human Navy'):setCallSign('HM2'):setScanState('full') + CpuShip():setTemplate('MT52 Hornet'):setPosition(31851, 38661):setRotation(151):setFaction('Human Navy'):setCallSign('HM1'):setScanState('full') + SpaceStation():setTemplate('Medium Station'):setPosition(-27987, 41095):setRotation(76):setFaction('Human Navy'):setCallSign('DS2') + SpaceStation():setTemplate('Small Station'):setPosition(-9130, 10285):setRotation(333):setFaction('Human Navy'):setCallSign('DS3') + SpaceStation():setTemplate('Medium Station'):setPosition(1632, 30619):setRotation(59):setFaction('Human Navy'):setCallSign('DS4') + SpaceStation():setTemplate('Small Station'):setPosition(-44177, 20762):setRotation(298):setFaction('Human Navy'):setCallSign('DS7') + SpaceStation():setTemplate('Medium Station'):setPosition(11100, -49150):setRotation(100):setFaction('Arlenians'):setCallSign('Galileo') + SpaceStation():setTemplate('Large Station'):setPosition(101830, 26725):setRotation(143):setFaction('Kraylor'):setCallSign('K-Midline') + SpaceStation():setTemplate('Small Station'):setPosition(79200, 38800):setRotation(104):setFaction('Kraylor'):setCallSign('K-Endline') + SpaceStation():setTemplate('Huge Station'):setPosition(14500, 19100):setRotation(101):setFaction('Human Navy'):setCallSign('Central Command') + SpaceStation():setTemplate('Medium Station'):setPosition(34643, 39301):setRotation(141):setFaction('Human Navy'):setCallSign('Midspace Support') + SpaceStation():setTemplate('Small Station'):setPosition(60500, 42100):setRotation(313):setFaction('Human Navy'):setCallSign('E.O.S. scope') + SpaceStation():setTemplate('Small Station'):setPosition(1530000, 412000):setRotation(196):setFaction('Human Navy'):setCallSign('Nirvana') + CpuShip():setTemplate('Flavia'):setPosition(1530000, 411000):setRotation(197):setFaction('Human Navy'):setCallSign('Technical Officer') + do + local e = createEntity() + e.components.jump_drive = {delay=0, power_change_rate_per_second=0.3, distance=0, min_distance=5000, damage_per_second_on_overheat=0.08, charge_time=90, can_be_hacked=true, health=1, coolant_level=0, coolant_request=0, power_factor=5, charge=50000, coolant_change_rate_per_second=1.2, heat_add_rate_per_second=0.05, hacked_level=0, health_max=1, max_distance=50000, power_level=1, auto_repair_per_second=0, activation_delay=10, just_jumped=0, heat_per_jump=0.35, heat_level=0, power_request=1, energy_per_km_charge=2} + e.components.transform = {x=12400, position={12400, 18200}, y=18200, rotation=16.3111} + e.components.coolant = {max_coolant_per_system=10, auto_levels=false, max=10} + e.components.impulse_engine = {max_speed_reverse=90, request=0, hacked_level=0, damage_per_second_on_overheat=0.08, max_speed_forward=90, can_be_hacked=true, health=1, coolant_level=0, sound="", power_factor=4, power_change_rate_per_second=0.3, coolant_change_rate_per_second=1.2, health_max=1, heat_add_rate_per_second=0.05, power_level=1, auto_repair_per_second=0, coolant_request=0, acceleration_forward=20, acceleration_reverse=20, heat_level=0, power_request=1, actual=0} + e.components.long_range_radar = {long_range=30000, short_range=5000} + e.components.physics = {type="dynamic", velocity={0, 0}, size=200, angular_velocity=0} + e.components.shields = {{length=2, level=200, max=200}, {length=2, level=200, max=200}, front_coolant_level=0, rear_power_factor=5, rear_coolant_change_rate_per_second=1.2, rear_heat_level=0, energy_use_per_second=1.5, front_power_change_rate_per_second=0.3, front_heat_add_rate_per_second=0.05, front_damage_per_second_on_overheat=0.08, rear_power_level=1, front_power_factor=5, active=false, calibration_time=25, front_can_be_hacked=true, rear_coolant_level=0, rear_auto_repair_per_second=0, front_health_max=1, rear_health=1, rear_hacked_level=0, front_coolant_change_rate_per_second=1.2, rear_damage_per_second_on_overheat=0.08, rear_power_change_rate_per_second=0.3, front_coolant_request=0, rear_can_be_hacked=true, front_health=1, frequency=12, front_auto_repair_per_second=0, rear_health_max=1, front_hacked_level=0, calibration_delay=0, rear_coolant_request=0, rear_power_request=1, front_power_request=1, front_heat_level=0, front_power_level=1, rear_heat_add_rate_per_second=0.05} + e.components.engine_emitter = {{position={-120, 0, -12}, scale=56, color={1, 0.2, 0.1}}, {position={-132, 48, -4}, scale=68, color={1, 0.2, 0.1}}, {position={-132, -48, -4}, scale=68, color={1, 0.2, 0.1}}, {position={-132, 88, -4}, scale=56, color={1, 0.2, 0.1}}, {position={-132, -88, -4}, scale=56, color={1, 0.2, 0.1}}} + e.components.ship_log = {} + e.components.custom_ship_functions = {} + e.components.internal_rooms = {{system="maneuver", size={2, 1}, position={1, 0}}, {system="beamweapons", size={2, 1}, position={1, 1}}, {system="none", size={2, 1}, position={2, 2}}, {system="rearshield", size={1, 2}, position={0, 3}}, {system="reactor", size={2, 2}, position={1, 3}}, {system="warp", size={2, 2}, position={3, 3}}, {system="jumpdrive", size={1, 2}, position={5, 3}}, {system="none", size={2, 1}, position={6, 3}}, {system="none", size={2, 1}, position={6, 4}}, {system="frontshield", size={1, 2}, position={8, 3}}, {system="none", size={2, 1}, position={2, 5}}, {system="missilesystem", size={2, 1}, position={1, 6}}, {system="impulse", size={2, 1}, position={1, 7}}, auto_repair_enabled=false, doors={{1, 1, true}, {2, 2, true}, {3, 3, true}, {1, 3, false}, {3, 4, false}, {3, 5, true}, {2, 6, true}, {1, 7, true}, {5, 3, false}, {6, 3, false}, {6, 4, false}, {8, 3, false}, {8, 4, false}}} + e.components.hacking_device = {effectiveness=0.5} + e.components.radar_trace = {arrow_if_not_scanned=true, color_by_faction=true, radius=160, rotate=true, min_size=16, icon="radar/dread.png", long_range=true, blend_add=false, color={255, 255, 255, 255}, max_size=1024} + e.components.scan_probe_launcher = {max=8, recharge=0, stock=8, charge_time=10} + e.components.hull = {damaged_by_emp=false, current=250, damaged_by_energy=true, allow_destruction=true, damaged_by_kinetic=true, max=250} + e.components.comms_transmitter = {open_delay=0, incomming_message="Apollo, come in.\n\nOur edge-of-space telescope has been malfunctioning for the past few days. We expect the cause to be a mechanical failure, but we want you to take a look.\n\nThe E.O.S. scope is on the border of Kraylor space, so maintain contact and keep up long-range scans.\n\nDock with the E.O.S. scope and investigate the damage. Transmitting your report via standard communications channels is too dangerous given the already delicate nature of our treaty with the Kraylor, so return to Central Command to report your findings.\n\nReopen communications if you have any questions.", state="hailed", target_name="Central Command"} + e.components.mesh_render = {specular_texture="battleship_destroyer_1_upgraded/battleship_destroyer_1_upgraded_specular.jpg", scale=4, mesh_offset={0, 0, 0}, normal_texture="", texture="battleship_destroyer_1_upgraded/battleship_destroyer_1_upgraded_color.jpg", illumination_texture="battleship_destroyer_1_upgraded/battleship_destroyer_1_upgraded_illumination.jpg", mesh="battleship_destroyer_1_upgraded/battleship_destroyer_1_upgraded.model"} + e.components.share_short_range_radar = {} + e:setFaction('Human Navy') + e.components.docking_port = {dock_subclass="Destroyer", auto_reload_missile_time=10, dock_class="Corvette", auto_reload_missiles=false, state="not_docking"} + e.components.combat_maneuvering_thrusters = {boost_request=0, boost_heat_per_second=0.2, charge=1, boost_speed=400, strafe_request=0, strafe_max_time=3, boost_max_time=3, boost_active=0, strafe_heat_per_second=0.2, strafe_speed=250, strafe_active=0, charge_time=20} + e.components.waypoints = {} + e.components.typename = {localized="Technician Cruiser", type_name="Technician Cruiser"} + e.components.missile_tubes = {{length=1, delay=0, size="medium", allow_hvli=true, type_loaded="none", state="empty", allow_nuke=true, position={0, 0, 0}, allow_mine=false, direction=0, allow_homing=true, load_time=8, allow_emp=true}, max_hvli=20, storage_hvli=20, power_change_rate_per_second=0.3, max_homing=12, max_mine=0, storage_homing=12, damage_per_second_on_overheat=0.08, can_be_hacked=true, health=1, coolant_level=0, coolant_request=0, max_emp=6, coolant_change_rate_per_second=1.2, max_nuke=0, heat_add_rate_per_second=0.05, health_max=1, power_factor=1, power_level=1, auto_repair_per_second=0, storage_mine=0, storage_nuke=0, hacked_level=0, heat_level=0, power_request=1, storage_emp=6} + e.components.radar_link = {} + e.components.reactor = {power_change_rate_per_second=0.3, hacked_level=0, max_energy=1000, heat_add_rate_per_second=0.05, can_be_hacked=false, health=1, coolant_level=0, coolant_request=0, power_factor=-25, overload_explode=true, health_max=1, power_level=1, auto_repair_per_second=0, coolant_change_rate_per_second=1.2, energy=1000, heat_level=0, power_request=1, damage_per_second_on_overheat=0.08} + e.components.beam_weapons = {{cycle_time=6, damage_type="energy", range=1000, cooldown=0, arc=90, texture="texture/beam_orange.png", energy_per_beam_fire=3, length=2, turret_arc=0, heat_per_beam_fire=0.02, position={136, -68, -28}, damage=10, turret_direction=0, direction=-25, arc_color_fire={255, 255, 0, 128}, arc_color={255, 0, 0, 128}, turret_rotation_rate=0}, {cycle_time=6, damage_type="energy", range=1000, cooldown=0, arc=90, texture="texture/beam_orange.png", energy_per_beam_fire=3, length=2, turret_arc=0, heat_per_beam_fire=0.02, position={136, 68, -28}, damage=10, turret_direction=0, direction=25, arc_color_fire={255, 255, 0, 128}, arc_color={255, 0, 0, 128}, turret_rotation_rate=0}, power_change_rate_per_second=0.3, system_target="none", hacked_level=0, heat_add_rate_per_second=0.05, can_be_hacked=true, health=1, coolant_level=0, coolant_request=0, power_factor=3, frequency=6, health_max=1, coolant_change_rate_per_second=1.2, auto_repair_per_second=0, damage_per_second_on_overheat=0.08, heat_level=0, power_request=1, power_level=1} + e.components.science_scanner = {max_scanning_delay=6, delay=0} + e.components.maneuvering_thrusters = {power_change_rate_per_second=0.3, hacked_level=0, heat_add_rate_per_second=0.05, target=1.17549e-38, can_be_hacked=true, health=1, coolant_level=0, coolant_request=0, power_factor=2, health_max=1, power_level=1, auto_repair_per_second=0, coolant_change_rate_per_second=1.2, damage_per_second_on_overheat=0.08, power_request=1, heat_level=0, speed=10, rotation_request=1.17549e-38} + e.components.player_control = {control_code="", allowed_positions={"helms", "weapons", "engineering", "science", "relay", "tactical", "engineering+", "operations", "singlepilot", "damagecontrol", "powermanagement", "database", "altrelay", "commsonly", "shiplog"}, alert_level="Normal"} + e.components.scan_state = {{state="full"}, {state="full"}, {state="full"}, {state="full"}, {state="full"}, {state="full"}, {state="full"}, {state="full"}, {state="full"}, {state="full"}, depth=-1, complexity=-1, allow_simple_scan=true} + e.components.self_destruct = {damage=150, countdown=0, size=1500, active=false} + e.components.callsign = {callsign="Apollo"} +end From 7caa205e06c6d06407ff86388bf489b4de034539 Mon Sep 17 00:00:00 2001 From: oznogon Date: Tue, 31 Mar 2026 22:08:01 -0700 Subject: [PATCH 3/4] Export Zone entities --- scripts/api/gm.lua | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/scripts/api/gm.lua b/scripts/api/gm.lua index f850b9aeb4..ceaa9017e8 100644 --- a/scripts/api/gm.lua +++ b/scripts/api/gm.lua @@ -120,6 +120,10 @@ function getEntityExportString(entity) if entity.components.allow_radar_link then return "ScanProbe()" .. __exportScanProbe(entity) end + -- Zone has zone component + if entity.components.zone then + return "Zone()" .. __exportZone(entity) + end -- No matching API function return "" @@ -560,3 +564,36 @@ function __exportScanProbe(entity) end return extras end + +function __exportZone(entity) + local extras = "" + local z = entity.components.zone + if not z then return extras end + -- Color: C++ default is {255,255,255,0} (white); setColor takes integers 0-255 + if z.color and (z.color[1] ~= 255 or z.color[2] ~= 255 or z.color[3] ~= 255) then + extras = extras .. string.format(":setColor(%d, %d, %d)", z.color[1], z.color[2], z.color[3]) + end + -- Label + if z.label and z.label ~= "" then + extras = extras .. ":setLabel('" .. z.label .. "')" + end + -- Local skybox + if z.skybox and z.skybox ~= "" then + local fade = z.skybox_fade_distance or 0 + if fade ~= 0 then + extras = extras .. string.format(":setLocalSkybox('%s', %.0f)", z.skybox, fade) + else + extras = extras .. ":setLocalSkybox('" .. z.skybox .. "')" + end + end + -- Outline points: z.points is {{x1,y1},{x2,y2},...}; setPoints takes a flat coord list + if z.points and #z.points > 0 then + local coords = {} + for _, pt in ipairs(z.points) do + coords[#coords+1] = string.format("%.0f", pt[1]) + coords[#coords+1] = string.format("%.0f", pt[2]) + end + extras = extras .. ":setPoints(" .. table.concat(coords, ", ") .. ")" + end + return extras +end From 3b6c689696893490e463d9b6e49e7453ddf39940 Mon Sep 17 00:00:00 2001 From: oznogon Date: Tue, 31 Mar 2026 22:23:41 -0700 Subject: [PATCH 4/4] Remove pasted content --- scripts/scenario_aaaaaaa.lua | 276 ----------------------------------- 1 file changed, 276 deletions(-) delete mode 100644 scripts/scenario_aaaaaaa.lua diff --git a/scripts/scenario_aaaaaaa.lua b/scripts/scenario_aaaaaaa.lua deleted file mode 100644 index 907ba1a62d..0000000000 --- a/scripts/scenario_aaaaaaa.lua +++ /dev/null @@ -1,276 +0,0 @@ - WormHole():setPosition(109190, -39762):setTargetPosition(-61730, 29490) - CpuShip():setTemplate('MT52 Hornet'):setPosition(87805, -3169):setRotation(342):setFaction('Kraylor'):setCallSign('K-EGF1') - CpuShip():setTemplate('Atlantis X23'):setPosition(102472, -42236):setRotation(68):setFaction('Kraylor'):setCallSign('K-GDN2'):setWeaponStorage('Homing', 0) - CpuShip():setTemplate('Atlantis X23'):setPosition(105052, -46060):setRotation(364):setFaction('Kraylor'):setCallSign('K-GDN1'):setWeaponStorage('Homing', 0) - CpuShip():setTemplate('Phobos T3'):setPosition(95233, -29696):setRotation(194):setFaction('Kraylor'):setCallSign('K-SCN2'):setWeaponStorage('Homing', 4) - CpuShip():setTemplate('Phobos T3'):setPosition(90930, -32986):setRotation(163):setFaction('Kraylor'):setCallSign('K-SCN1'):setWeaponStorage('Homing', 4) - Mine():setPosition(102374, -58356) - Mine():setPosition(91704, -56874) - Mine():setPosition(82218, -51242) - Mine():setPosition(79402, -38867) - Mine():setPosition(113194, -55392) - Mine():setPosition(122605, -40794) - Mine():setPosition(114231, -19304) - Mine():setPosition(80292, -29752) - Mine():setPosition(78661, -13598) - Mine():setPosition(96669, 852) - Mine():setPosition(107117, -1816) - Mine():setPosition(85331, -26344) - Mine():setPosition(116899, -35977) - Mine():setPosition(113860, -29011) - Mine():setPosition(105635, -27159) - Mine():setPosition(107488, -9967) - Mine():setPosition(101930, -6855) - Mine():setPosition(96224, -3520) - Mine():setPosition(82070, -40497) - Mine():setPosition(86294, -43462) - Mine():setPosition(85479, -47908) - Mine():setPosition(91037, -52206) - Mine():setPosition(91778, -48056) - Mine():setPosition(98818, -51909) - Mine():setPosition(107932, -54132) - Mine():setPosition(111415, -50279) - Mine():setPosition(116380, -47908) - Mine():setPosition(119640, -32717) - Mine():setPosition(115120, -41164) - Mine():setPosition(118603, -38719) - Mine():setPosition(96076, -38348) - Mine():setPosition(99633, -36644) - Mine():setPosition(96298, -33309) - Mine():setPosition(99410, -31679) - Mine():setPosition(102300, -29752) - Mine():setPosition(115861, -31235) - Mine():setPosition(113786, -25454) - Mine():setPosition(108970, -25306) - Mine():setPosition(106006, -20045) - Mine():setPosition(109859, -18341) - Mine():setPosition(104672, -13598) - Mine():setPosition(80810, -35681) - Mine():setPosition(86442, -34717) - Mine():setPosition(83997, -29382) - Mine():setPosition(86887, -23380) - Mine():setPosition(91333, -25232) - Mine():setPosition(93779, -17377) - Mine():setPosition(85183, -17303) - Mine():setPosition(85479, -9596) - Mine():setPosition(81107, -4335) - Mine():setPosition(84960, 1371) - Mine():setPosition(104968, -7225) - Mine():setPosition(92000, -5669) - Nebula():setPosition(118381, -32642):setRotation(191) - Nebula():setPosition(116158, -41164):setRotation(55) - Nebula():setPosition(113786, -48649):setRotation(354) - Nebula():setPosition(106598, -53095):setRotation(352) - Nebula():setPosition(98225, -52799):setRotation(133) - Nebula():setPosition(90666, -50798):setRotation(64) - Nebula():setPosition(84071, -44351):setRotation(323) - Nebula():setPosition(97594, -36092):setRotation(351) - Nebula():setPosition(83552, -35014):setRotation(310) - Nebula():setPosition(88591, -26566):setRotation(91) - Nebula():setPosition(111045, -27159):setRotation(292) - Nebula():setPosition(102523, -28715):setRotation(324) - Nebula():setPosition(106895, -18563):setRotation(85) - Nebula():setPosition(93704, -17970):setRotation(275) - Nebula():setPosition(85034, -16340):setRotation(16) - Nebula():setPosition(105264, -8633):setRotation(342) - Nebula():setPosition(94001, -4928):setRotation(158) - Nebula():setPosition(83108, -7966):setRotation(26) - Nebula():setPosition(88962, 3520):setRotation(202) - Nebula():setPosition(82515, 1149):setRotation(73) - CpuShip():setTemplate('Phobos T3'):setPosition(104829, 21454):setRotation(72):setFaction('Kraylor'):setCallSign('K-MC001'):setWeaponStorage('Homing', 4) - CpuShip():setTemplate('Atlantis X23'):setPosition(106363, 25218):setRotation(40):setFaction('Kraylor'):setCallSign('K-MDFD'):setWeaponStorage('Homing', 0) - CpuShip():setTemplate('MT52 Hornet'):setPosition(97993, 22149):setRotation(266):setFaction('Kraylor'):setCallSign('K-MF2') - CpuShip():setTemplate('MT52 Hornet'):setPosition(103710, 31493):setRotation(80):setFaction('Kraylor'):setCallSign('K-MF1') - CpuShip():setTemplate('MT52 Hornet'):setPosition(13948, -52838):setRotation(203):setFaction('Kraylor'):setCallSign('K-Fi3'):setScanState('full') - CpuShip():setTemplate('MT52 Hornet'):setPosition(10922, -51749):setRotation(118):setFaction('Kraylor'):setCallSign('K-Fi2'):setScanState('full') - CpuShip():setTemplate('Phobos T3'):setPosition(6273, -55399):setRotation(77):setFaction('Kraylor'):setCallSign('K-Strike1'):setScanState('full'):setWeaponStorage('Homing', 4) - CpuShip():setTemplate('MT52 Hornet'):setPosition(80200, 37900):setRotation(161):setFaction('Kraylor'):setCallSign('K-EF2') - CpuShip():setTemplate('MT52 Hornet'):setPosition(78000, 37100):setRotation(15):setFaction('Kraylor'):setCallSign('K-EF1') - CpuShip():setTemplate('MT52 Hornet'):setPosition(78200, 38000):setRotation(199):setFaction('Kraylor'):setCallSign('K-EC2') - CpuShip():setTemplate('Phobos T3'):setPosition(80200, 39900):setRotation(52):setFaction('Kraylor'):setCallSign('K-EC1'):setWeaponStorage('Homing', 4) - VisualAsteroid():setPosition(49512, -26931):setRotation(132) - Asteroid():setPosition(36424, -25214):setRotation(62) - VisualAsteroid():setPosition(35803, -19825):setRotation(327) - Asteroid():setPosition(31920, -21281):setRotation(178) - VisualAsteroid():setPosition(-9501, -19626):setRotation(44) - Asteroid():setPosition(-5690, -15855):setRotation(190) - VisualAsteroid():setPosition(49232, -21090):setRotation(166) - Asteroid():setPosition(41831, -24812):setRotation(11) - VisualAsteroid():setPosition(25665, -20026):setRotation(114) - Asteroid():setPosition(35055, -18572):setRotation(146) - VisualAsteroid():setPosition(14268, -21845):setRotation(4) - Asteroid():setPosition(15250, -15081):setRotation(91) - VisualAsteroid():setPosition(48320, -26822):setRotation(329) - Asteroid():setPosition(48675, -21440):setRotation(247) - VisualAsteroid():setPosition(30597, -22490):setRotation(360) - Asteroid():setPosition(19347, -21040):setRotation(9) - VisualAsteroid():setPosition(18212, -21617):setRotation(312) - Asteroid():setPosition(12576, -19862):setRotation(110) - Asteroid():setPosition(-5156, -19970):setRotation(43) - VisualAsteroid():setPosition(53585, -20598):setRotation(217) - Asteroid():setPosition(51046, -21357):setRotation(195) - VisualAsteroid():setPosition(17959, -23201):setRotation(287) - Asteroid():setPosition(19736, -24673):setRotation(86) - VisualAsteroid():setPosition(16542, -21496):setRotation(230) - Asteroid():setPosition(9958, -20384):setRotation(273) - VisualAsteroid():setPosition(41843, -22702):setRotation(219) - Asteroid():setPosition(46301, -24411):setRotation(224) - VisualAsteroid():setPosition(12032, -24776):setRotation(106) - Asteroid():setPosition(25222, -18999):setRotation(195) - VisualAsteroid():setPosition(-184, -20233):setRotation(97) - Asteroid():setPosition(-6649, -17790):setRotation(252) - VisualAsteroid():setPosition(49507, -21749):setRotation(262) - Asteroid():setPosition(47319, -20343):setRotation(79) - VisualAsteroid():setPosition(24666, -24528):setRotation(60) - Asteroid():setPosition(16604, -20562):setRotation(270) - VisualAsteroid():setPosition(19384, -21588):setRotation(8) - Asteroid():setPosition(16950, -16308):setRotation(142) - VisualAsteroid():setPosition(39486, -23205):setRotation(41) - Asteroid():setPosition(49385, -20183):setRotation(159) - VisualAsteroid():setPosition(12838, -19966):setRotation(333) - Asteroid():setPosition(29017, -24980):setRotation(225) - VisualAsteroid():setPosition(13202, -17319):setRotation(167) - Asteroid():setPosition(15547, -18798):setRotation(169) - VisualAsteroid():setPosition(53389, -21750):setRotation(99) - Asteroid():setPosition(42579, -23901):setRotation(124) - VisualAsteroid():setPosition(36394, -24832):setRotation(179) - Asteroid():setPosition(36931, -23221):setRotation(35) - VisualAsteroid():setPosition(17971, -18162):setRotation(156) - Asteroid():setPosition(12418, -21630):setRotation(242) - VisualAsteroid():setPosition(52022, -26723):setRotation(162) - Asteroid():setPosition(47481, -21998):setRotation(261) - VisualAsteroid():setPosition(22862, -23922):setRotation(233) - VisualAsteroid():setPosition(13488, -20172):setRotation(170) - Asteroid():setPosition(18237, -18695):setRotation(329) - VisualAsteroid():setPosition(41324, -22290):setRotation(219) - Asteroid():setPosition(54794, -20355):setRotation(122) - VisualAsteroid():setPosition(14824, -22322):setRotation(92) - Asteroid():setPosition(30135, -18215):setRotation(357) - VisualAsteroid():setPosition(2989, -20365):setRotation(226) - Asteroid():setPosition(7720, -20874):setRotation(24) - VisualAsteroid():setPosition(38243, -24786):setRotation(132) - Asteroid():setPosition(52238, -24376):setRotation(142) - VisualAsteroid():setPosition(16400, -20831):setRotation(165) - Asteroid():setPosition(32154, -22773):setRotation(101) - VisualAsteroid():setPosition(13075, -18843):setRotation(271) - Asteroid():setPosition(14250, -18988):setRotation(324) - VisualAsteroid():setPosition(37331, -24094):setRotation(257) - Asteroid():setPosition(51813, -21490):setRotation(225) - VisualAsteroid():setPosition(32126, -23386):setRotation(358) - Asteroid():setPosition(39731, -21123):setRotation(9) - VisualAsteroid():setPosition(18128, -16995):setRotation(3) - Asteroid():setPosition(15971, -20283):setRotation(293) - VisualAsteroid():setPosition(42941, -20837):setRotation(4) - Asteroid():setPosition(39594, -26187):setRotation(313) - VisualAsteroid():setPosition(23731, -22925):setRotation(176) - Asteroid():setPosition(33332, -21886):setRotation(35) - VisualAsteroid():setPosition(-7017, -17918):setRotation(13) - Asteroid():setPosition(13059, -16132):setRotation(136) - VisualAsteroid():setPosition(46865, -22674):setRotation(301) - Asteroid():setPosition(49605, -21599):setRotation(97) - VisualAsteroid():setPosition(24894, -19300):setRotation(319) - Asteroid():setPosition(14979, -23214):setRotation(41) - VisualAsteroid():setPosition(16349, -16609):setRotation(174) - Asteroid():setPosition(1733, -15679):setRotation(8) - VisualAsteroid():setPosition(37013, -21726):setRotation(270) - Asteroid():setPosition(54320, -22166):setRotation(3) - VisualAsteroid():setPosition(38972, -18708):setRotation(319) - Asteroid():setPosition(12784, -23081):setRotation(296) - VisualAsteroid():setPosition(17332, -20975):setRotation(343) - Asteroid():setPosition(7216, -21754):setRotation(113) - VisualAsteroid():setPosition(41716, -20267):setRotation(231) - Asteroid():setPosition(52710, -24180):setRotation(258) - VisualAsteroid():setPosition(35870, -22038):setRotation(243) - Asteroid():setPosition(24556, -24798):setRotation(65) - VisualAsteroid():setPosition(19849, -18940):setRotation(28) - Asteroid():setPosition(9972, -19804):setRotation(244) - VisualAsteroid():setPosition(38887, -20668):setRotation(104) - Asteroid():setPosition(50126, -20648):setRotation(316) - VisualAsteroid():setPosition(20131, -20760):setRotation(305) - Asteroid():setPosition(32985, -21377):setRotation(10) - VisualAsteroid():setPosition(-4161, -19924):setRotation(104) - Asteroid():setPosition(-5390, -17545):setRotation(89) - VisualAsteroid():setPosition(35817, -25095):setRotation(103) - Asteroid():setPosition(50233, -25471):setRotation(344) - VisualAsteroid():setPosition(22217, -18610):setRotation(53) - Asteroid():setPosition(15907, -18048):setRotation(209) - VisualAsteroid():setPosition(-999, -15150):setRotation(354) - Asteroid():setPosition(-214, -15521):setRotation(221) - VisualAsteroid():setPosition(38966, -20912):setRotation(308) - Asteroid():setPosition(40969, -20068):setRotation(326) - VisualAsteroid():setPosition(28961, -22306):setRotation(325) - Asteroid():setPosition(23201, -24724):setRotation(253) - VisualAsteroid():setPosition(18548, -15224):setRotation(123) - Asteroid():setPosition(18557, -17163):setRotation(233) - VisualAsteroid():setPosition(42327, -23664):setRotation(304) - Asteroid():setPosition(45459, -24329):setRotation(94) - VisualAsteroid():setPosition(31233, -24533):setRotation(339) - Asteroid():setPosition(18689, -23788):setRotation(18) - VisualAsteroid():setPosition(1992, -15394):setRotation(255) - Asteroid():setPosition(17731, -17292):setRotation(19) - Nebula():setPosition(-33654, -41667):setRotation(265) - Nebula():setPosition(-27368, 85952):setRotation(164) - Nebula():setPosition(-46273, 39476):setRotation(123) - Nebula():setPosition(-67320, 11857):setRotation(315) - Nebula():setPosition(-68463, 42333):setRotation(293) - Nebula():setPosition(13626, 75799):setRotation(20) - Nebula():setPosition(-33690, 17766):setRotation(308) - Nebula():setPosition(21545, 64380):setRotation(152) - Nebula():setPosition(-10484, -10439):setRotation(356) - Nebula():setPosition(-4159, 19240):setRotation(259) - Nebula():setPosition(-915, 27349):setRotation(211) - Nebula():setPosition(49362, -18062):setRotation(331) - Nebula():setPosition(48700, 30050):setRotation(294) - Nebula():setPosition(51300, 34200):setRotation(46) - Nebula():setPosition(52300, 42200):setRotation(31) - CpuShip():setTemplate('MT52 Hornet'):setPosition(35501, 42872):setRotation(124):setFaction('Human Navy'):setCallSign('HM3'):setScanState('full') - CpuShip():setTemplate('MT52 Hornet'):setPosition(37471, 37173):setRotation(198):setFaction('Human Navy'):setCallSign('HM2'):setScanState('full') - CpuShip():setTemplate('MT52 Hornet'):setPosition(31851, 38661):setRotation(151):setFaction('Human Navy'):setCallSign('HM1'):setScanState('full') - SpaceStation():setTemplate('Medium Station'):setPosition(-27987, 41095):setRotation(76):setFaction('Human Navy'):setCallSign('DS2') - SpaceStation():setTemplate('Small Station'):setPosition(-9130, 10285):setRotation(333):setFaction('Human Navy'):setCallSign('DS3') - SpaceStation():setTemplate('Medium Station'):setPosition(1632, 30619):setRotation(59):setFaction('Human Navy'):setCallSign('DS4') - SpaceStation():setTemplate('Small Station'):setPosition(-44177, 20762):setRotation(298):setFaction('Human Navy'):setCallSign('DS7') - SpaceStation():setTemplate('Medium Station'):setPosition(11100, -49150):setRotation(100):setFaction('Arlenians'):setCallSign('Galileo') - SpaceStation():setTemplate('Large Station'):setPosition(101830, 26725):setRotation(143):setFaction('Kraylor'):setCallSign('K-Midline') - SpaceStation():setTemplate('Small Station'):setPosition(79200, 38800):setRotation(104):setFaction('Kraylor'):setCallSign('K-Endline') - SpaceStation():setTemplate('Huge Station'):setPosition(14500, 19100):setRotation(101):setFaction('Human Navy'):setCallSign('Central Command') - SpaceStation():setTemplate('Medium Station'):setPosition(34643, 39301):setRotation(141):setFaction('Human Navy'):setCallSign('Midspace Support') - SpaceStation():setTemplate('Small Station'):setPosition(60500, 42100):setRotation(313):setFaction('Human Navy'):setCallSign('E.O.S. scope') - SpaceStation():setTemplate('Small Station'):setPosition(1530000, 412000):setRotation(196):setFaction('Human Navy'):setCallSign('Nirvana') - CpuShip():setTemplate('Flavia'):setPosition(1530000, 411000):setRotation(197):setFaction('Human Navy'):setCallSign('Technical Officer') - do - local e = createEntity() - e.components.jump_drive = {delay=0, power_change_rate_per_second=0.3, distance=0, min_distance=5000, damage_per_second_on_overheat=0.08, charge_time=90, can_be_hacked=true, health=1, coolant_level=0, coolant_request=0, power_factor=5, charge=50000, coolant_change_rate_per_second=1.2, heat_add_rate_per_second=0.05, hacked_level=0, health_max=1, max_distance=50000, power_level=1, auto_repair_per_second=0, activation_delay=10, just_jumped=0, heat_per_jump=0.35, heat_level=0, power_request=1, energy_per_km_charge=2} - e.components.transform = {x=12400, position={12400, 18200}, y=18200, rotation=16.3111} - e.components.coolant = {max_coolant_per_system=10, auto_levels=false, max=10} - e.components.impulse_engine = {max_speed_reverse=90, request=0, hacked_level=0, damage_per_second_on_overheat=0.08, max_speed_forward=90, can_be_hacked=true, health=1, coolant_level=0, sound="", power_factor=4, power_change_rate_per_second=0.3, coolant_change_rate_per_second=1.2, health_max=1, heat_add_rate_per_second=0.05, power_level=1, auto_repair_per_second=0, coolant_request=0, acceleration_forward=20, acceleration_reverse=20, heat_level=0, power_request=1, actual=0} - e.components.long_range_radar = {long_range=30000, short_range=5000} - e.components.physics = {type="dynamic", velocity={0, 0}, size=200, angular_velocity=0} - e.components.shields = {{length=2, level=200, max=200}, {length=2, level=200, max=200}, front_coolant_level=0, rear_power_factor=5, rear_coolant_change_rate_per_second=1.2, rear_heat_level=0, energy_use_per_second=1.5, front_power_change_rate_per_second=0.3, front_heat_add_rate_per_second=0.05, front_damage_per_second_on_overheat=0.08, rear_power_level=1, front_power_factor=5, active=false, calibration_time=25, front_can_be_hacked=true, rear_coolant_level=0, rear_auto_repair_per_second=0, front_health_max=1, rear_health=1, rear_hacked_level=0, front_coolant_change_rate_per_second=1.2, rear_damage_per_second_on_overheat=0.08, rear_power_change_rate_per_second=0.3, front_coolant_request=0, rear_can_be_hacked=true, front_health=1, frequency=12, front_auto_repair_per_second=0, rear_health_max=1, front_hacked_level=0, calibration_delay=0, rear_coolant_request=0, rear_power_request=1, front_power_request=1, front_heat_level=0, front_power_level=1, rear_heat_add_rate_per_second=0.05} - e.components.engine_emitter = {{position={-120, 0, -12}, scale=56, color={1, 0.2, 0.1}}, {position={-132, 48, -4}, scale=68, color={1, 0.2, 0.1}}, {position={-132, -48, -4}, scale=68, color={1, 0.2, 0.1}}, {position={-132, 88, -4}, scale=56, color={1, 0.2, 0.1}}, {position={-132, -88, -4}, scale=56, color={1, 0.2, 0.1}}} - e.components.ship_log = {} - e.components.custom_ship_functions = {} - e.components.internal_rooms = {{system="maneuver", size={2, 1}, position={1, 0}}, {system="beamweapons", size={2, 1}, position={1, 1}}, {system="none", size={2, 1}, position={2, 2}}, {system="rearshield", size={1, 2}, position={0, 3}}, {system="reactor", size={2, 2}, position={1, 3}}, {system="warp", size={2, 2}, position={3, 3}}, {system="jumpdrive", size={1, 2}, position={5, 3}}, {system="none", size={2, 1}, position={6, 3}}, {system="none", size={2, 1}, position={6, 4}}, {system="frontshield", size={1, 2}, position={8, 3}}, {system="none", size={2, 1}, position={2, 5}}, {system="missilesystem", size={2, 1}, position={1, 6}}, {system="impulse", size={2, 1}, position={1, 7}}, auto_repair_enabled=false, doors={{1, 1, true}, {2, 2, true}, {3, 3, true}, {1, 3, false}, {3, 4, false}, {3, 5, true}, {2, 6, true}, {1, 7, true}, {5, 3, false}, {6, 3, false}, {6, 4, false}, {8, 3, false}, {8, 4, false}}} - e.components.hacking_device = {effectiveness=0.5} - e.components.radar_trace = {arrow_if_not_scanned=true, color_by_faction=true, radius=160, rotate=true, min_size=16, icon="radar/dread.png", long_range=true, blend_add=false, color={255, 255, 255, 255}, max_size=1024} - e.components.scan_probe_launcher = {max=8, recharge=0, stock=8, charge_time=10} - e.components.hull = {damaged_by_emp=false, current=250, damaged_by_energy=true, allow_destruction=true, damaged_by_kinetic=true, max=250} - e.components.comms_transmitter = {open_delay=0, incomming_message="Apollo, come in.\n\nOur edge-of-space telescope has been malfunctioning for the past few days. We expect the cause to be a mechanical failure, but we want you to take a look.\n\nThe E.O.S. scope is on the border of Kraylor space, so maintain contact and keep up long-range scans.\n\nDock with the E.O.S. scope and investigate the damage. Transmitting your report via standard communications channels is too dangerous given the already delicate nature of our treaty with the Kraylor, so return to Central Command to report your findings.\n\nReopen communications if you have any questions.", state="hailed", target_name="Central Command"} - e.components.mesh_render = {specular_texture="battleship_destroyer_1_upgraded/battleship_destroyer_1_upgraded_specular.jpg", scale=4, mesh_offset={0, 0, 0}, normal_texture="", texture="battleship_destroyer_1_upgraded/battleship_destroyer_1_upgraded_color.jpg", illumination_texture="battleship_destroyer_1_upgraded/battleship_destroyer_1_upgraded_illumination.jpg", mesh="battleship_destroyer_1_upgraded/battleship_destroyer_1_upgraded.model"} - e.components.share_short_range_radar = {} - e:setFaction('Human Navy') - e.components.docking_port = {dock_subclass="Destroyer", auto_reload_missile_time=10, dock_class="Corvette", auto_reload_missiles=false, state="not_docking"} - e.components.combat_maneuvering_thrusters = {boost_request=0, boost_heat_per_second=0.2, charge=1, boost_speed=400, strafe_request=0, strafe_max_time=3, boost_max_time=3, boost_active=0, strafe_heat_per_second=0.2, strafe_speed=250, strafe_active=0, charge_time=20} - e.components.waypoints = {} - e.components.typename = {localized="Technician Cruiser", type_name="Technician Cruiser"} - e.components.missile_tubes = {{length=1, delay=0, size="medium", allow_hvli=true, type_loaded="none", state="empty", allow_nuke=true, position={0, 0, 0}, allow_mine=false, direction=0, allow_homing=true, load_time=8, allow_emp=true}, max_hvli=20, storage_hvli=20, power_change_rate_per_second=0.3, max_homing=12, max_mine=0, storage_homing=12, damage_per_second_on_overheat=0.08, can_be_hacked=true, health=1, coolant_level=0, coolant_request=0, max_emp=6, coolant_change_rate_per_second=1.2, max_nuke=0, heat_add_rate_per_second=0.05, health_max=1, power_factor=1, power_level=1, auto_repair_per_second=0, storage_mine=0, storage_nuke=0, hacked_level=0, heat_level=0, power_request=1, storage_emp=6} - e.components.radar_link = {} - e.components.reactor = {power_change_rate_per_second=0.3, hacked_level=0, max_energy=1000, heat_add_rate_per_second=0.05, can_be_hacked=false, health=1, coolant_level=0, coolant_request=0, power_factor=-25, overload_explode=true, health_max=1, power_level=1, auto_repair_per_second=0, coolant_change_rate_per_second=1.2, energy=1000, heat_level=0, power_request=1, damage_per_second_on_overheat=0.08} - e.components.beam_weapons = {{cycle_time=6, damage_type="energy", range=1000, cooldown=0, arc=90, texture="texture/beam_orange.png", energy_per_beam_fire=3, length=2, turret_arc=0, heat_per_beam_fire=0.02, position={136, -68, -28}, damage=10, turret_direction=0, direction=-25, arc_color_fire={255, 255, 0, 128}, arc_color={255, 0, 0, 128}, turret_rotation_rate=0}, {cycle_time=6, damage_type="energy", range=1000, cooldown=0, arc=90, texture="texture/beam_orange.png", energy_per_beam_fire=3, length=2, turret_arc=0, heat_per_beam_fire=0.02, position={136, 68, -28}, damage=10, turret_direction=0, direction=25, arc_color_fire={255, 255, 0, 128}, arc_color={255, 0, 0, 128}, turret_rotation_rate=0}, power_change_rate_per_second=0.3, system_target="none", hacked_level=0, heat_add_rate_per_second=0.05, can_be_hacked=true, health=1, coolant_level=0, coolant_request=0, power_factor=3, frequency=6, health_max=1, coolant_change_rate_per_second=1.2, auto_repair_per_second=0, damage_per_second_on_overheat=0.08, heat_level=0, power_request=1, power_level=1} - e.components.science_scanner = {max_scanning_delay=6, delay=0} - e.components.maneuvering_thrusters = {power_change_rate_per_second=0.3, hacked_level=0, heat_add_rate_per_second=0.05, target=1.17549e-38, can_be_hacked=true, health=1, coolant_level=0, coolant_request=0, power_factor=2, health_max=1, power_level=1, auto_repair_per_second=0, coolant_change_rate_per_second=1.2, damage_per_second_on_overheat=0.08, power_request=1, heat_level=0, speed=10, rotation_request=1.17549e-38} - e.components.player_control = {control_code="", allowed_positions={"helms", "weapons", "engineering", "science", "relay", "tactical", "engineering+", "operations", "singlepilot", "damagecontrol", "powermanagement", "database", "altrelay", "commsonly", "shiplog"}, alert_level="Normal"} - e.components.scan_state = {{state="full"}, {state="full"}, {state="full"}, {state="full"}, {state="full"}, {state="full"}, {state="full"}, {state="full"}, {state="full"}, {state="full"}, depth=-1, complexity=-1, allow_simple_scan=true} - e.components.self_destruct = {damage=150, countdown=0, size=1500, active=false} - e.components.callsign = {callsign="Apollo"} -end