Smoke Test Hull command, Weapon Feel and Arcs on the test hull (catalog not yet applied)

AetherDb smoke-hull [apply] adds a product-less Longinus copy with a 2x2 Energy and a 2x2 Ballistic
hardpoint past the bow and a 1x1 side mount on each flank. Weapon Feel (seed 107) stages it with
ChargeBlast SG, Autocannon and FastBlast+-; Arcs flies it with a mount on each flank and a Port and
Starboard hull. This commit does not build a passing suite: the scenarios name the hull and
GameData/Aetheria.cc does not hold it until the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-11 21:04:09 +02:00
commit e8442328df
8 changed files with 297 additions and 12 deletions

View file

@ -42,6 +42,7 @@ public static class Program
case "field-kinds": return FieldKindsCatalog(args.Contains("apply"));
case "pd-gear": return PdGearCatalog(args.Contains("apply"));
case "mine-launcher": return MineLauncherCatalog(args.Contains("apply"));
case "smoke-hull": return SmokeHullCatalog(args.Contains("apply"));
case "roles-backfill": return RolesBackfill(args.Contains("apply"));
case "consumables-first-set": return ConsumablesFirstSetCatalog(args.Contains("apply"));
case "pirates-faction":
@ -49,7 +50,7 @@ public static class Program
return PiratesFaction(args.Contains("apply"));
case "verse-grammar": return VerseGrammarCommand.Run(args.Contains("apply"));
default:
Console.WriteLine("commands: census, factions, station-fit, hardpoint-fit, loadout [seed], save, settings, settings-dump, dangling [clear <Type.Member>]... [apply], shield-migrate [apply], brownout-migrate [apply], roles-migrate [apply], firing-arc-migrate [apply], targeting-catalog [apply], targeting-catalog-6c [apply], targeting-catalog-6d [apply], ship-authoring create|inspect|validate|compose, field-kinds [apply], mine-launcher [apply], roles-backfill [apply], pd-gear [apply], consumables-first-set [apply], pirates-faction [apply], verse-grammar [apply]");
Console.WriteLine("commands: census, factions, station-fit, hardpoint-fit, loadout [seed], save, settings, settings-dump, dangling [clear <Type.Member>]... [apply], shield-migrate [apply], brownout-migrate [apply], roles-migrate [apply], firing-arc-migrate [apply], targeting-catalog [apply], targeting-catalog-6c [apply], targeting-catalog-6d [apply], ship-authoring create|inspect|validate|compose, field-kinds [apply], mine-launcher [apply], smoke-hull [apply], roles-backfill [apply], pd-gear [apply], consumables-first-set [apply], pirates-faction [apply], verse-grammar [apply]");
return 1;
}
}
@ -1601,6 +1602,68 @@ public static class Program
return 0;
}
// aetheria-release cut scenarios-smoke (rulings weapon-feel-to-smoke-cut-test-hull, test-hull-both-flanks): the
// Smoke Test Hull, a copy of the Longinus hull that no product sells, so no generated ship, station or shop offers
// it and only a scenario fits it. It adds what no shipped ship hull has, where the Longinus runs out of cells: two
// rows of cells past the bow carrying a 2x2 Energy hardpoint (ChargeBlast SG) and a 2x2 Ballistic hardpoint
// (Autocannon), and a 1x1 side mount on each flank, a Clockwise Ballistic one on the starboard and a
// CounterClockwise Energy one on the port. The Longinus's own hardpoints are untouched. Its prefab is the
// Longinus's, which has no barrel for the new hardpoints: they fire from the hull centre. Dry run unless passed
// "apply".
public static int SmokeHullCatalog(bool apply, string root = null)
{
const string name = "Smoke Test Hull";
var db = AetherDb.Open(catalogWritable: apply, root: root);
if (db.Cache.GetAll<HullData>().Any(hull => hull.Name == name))
{
Console.WriteLine($"\"{name}\" is already authored; nothing to do.");
return 0;
}
var longinus = db.Cache.GetAll<HullData>().Single(hull => hull.Name == "Longinus");
var options = CultDocumentMessagePackSerialization.OptionsFor(typeof(HullData).Assembly);
var hull = MessagePackSerializer.Deserialize<HullData>(MessagePackSerializer.Serialize(longinus, options), options);
hull.Name = name;
hull.Description = "The Longinus with two forward 2x2 hardpoints and a side mount on each flank, for scenarios. No faction builds it.";
// Two rows of cells past the bow, over the width of the tail's neighbours (x 1..4).
var grown = new Shape(longinus.Shape.Width, longinus.Shape.Height + 2);
for (var x = 0; x < longinus.Shape.Width; x++)
for (var y = 0; y < longinus.Shape.Height; y++) grown.Cells[x, y] = longinus.Shape.Cells[x, y];
for (var x = 1; x <= 4; x++)
for (var y = longinus.Shape.Height; y < grown.Height; y++) grown.Cells[x, y] = true;
hull.Shape = grown;
static Shape Cells(int width, int height)
{
var shape = new Shape(width, height);
for (var x = 0; x < width; x++)
for (var y = 0; y < height; y++) shape.Cells[x, y] = true;
return shape;
}
var bow = longinus.Shape.Height;
hull.Hardpoints.Add(new HardpointData { Type = HardpointType.Energy, Position = CultMath.math.int2(1, bow), Shape = Cells(2, 2), Rotation = ItemRotation.None, Armor = 20f });
hull.Hardpoints.Add(new HardpointData { Type = HardpointType.Ballistic, Position = CultMath.math.int2(3, bow), Shape = Cells(2, 2), Rotation = ItemRotation.None, Armor = 20f });
hull.Hardpoints.Add(new HardpointData { Type = HardpointType.Ballistic, Position = CultMath.math.int2(longinus.Shape.Width - 1, 4), Shape = Cells(1, 1), Rotation = ItemRotation.Clockwise, Armor = 10f });
hull.Hardpoints.Add(new HardpointData { Type = HardpointType.Energy, Position = CultMath.math.int2(0, 4), Shape = Cells(1, 1), Rotation = ItemRotation.CounterClockwise, Armor = 10f });
Console.WriteLine($"Adds \"{name}\": a Longinus copy grown from {longinus.Shape.Width}x{longinus.Shape.Height} to {grown.Width}x{grown.Height}, no product.");
foreach (var hardpoint in hull.Hardpoints.Skip(longinus.Hardpoints.Count))
Console.WriteLine($" {hardpoint.Type,-9} {hardpoint.Shape.Width}x{hardpoint.Shape.Height} at {hardpoint.Position.x},{hardpoint.Position.y} rotation {hardpoint.Rotation}");
if (!apply)
{
Console.WriteLine("
Dry run. Pass \"apply\" to author it.");
return 0;
}
CultRecordRefs.Validate(hull);
db.Cache.Commit(batch => batch.Upsert(typeof(HullData), hull));
Console.WriteLine($"
Authored \"{name}\" in Aetheria.cc");
return 0;
}
// sim-mines-presenter: the Mine Launcher item, so a ship can be fitted with the sim's mine layer. Its numbers
// are the 2021 record's (GameData/Legacy/AetherDB.2021-03-05.msgpack, recovered in 8c71a637: mass 75, price
// 125000, damage 50, range 2000, energy 15, heat 500, visibility 10, magazine 6, reload 5, spread 5, velocity