Merge eureka/aetheria-release-faction-play-1 (cut-faction-play-1 r3, h6) into master
Catalog GameData/Aetheria.cc regenerated by replaying doctrine-catalog apply on the merged catalog, not taken from either branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
d7f30ed165
33 changed files with 1792 additions and 82 deletions
83
tools/AetherDb/DoctrineCatalog.cs
Normal file
83
tools/AetherDb/DoctrineCatalog.cs
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using GameCult.Caching;
|
||||
|
||||
// Authors the starting FactionDoctrine of the four factions the demo cast uses (aetheria-release, faction-play-1).
|
||||
// Tuning is a starting point; the operator adjusts it after play. The Pirates record is on master (cut pirates-record);
|
||||
// a faction with no Faction record is named and skipped, and apply is re-run after a cast faction's record lands.
|
||||
// A faction that already has a doctrine is kept as it is (the operator tunes after play), so a rerun that finds
|
||||
// nothing to author writes nothing.
|
||||
public static class DoctrineCatalog
|
||||
{
|
||||
private static readonly (string faction, FactionDoctrine doctrine)[] Table =
|
||||
{
|
||||
("Zhestokost", new FactionDoctrine
|
||||
{
|
||||
EngageOn = EngageOn.Trespass, Grace = 6f, Hail = "Cut thrust and hold for inspection.", ComplySpeed = 10f,
|
||||
Combatant = new RoleDoctrine { RangeExponent = .05f, MinHitProbability = .05f }
|
||||
}),
|
||||
("Lucent Media", new FactionDoctrine
|
||||
{
|
||||
EngageOn = EngageOn.Detection, Grace = 2f, Hail = "You're live.",
|
||||
Combatant = new RoleDoctrine { RangeExponent = .25f, MinHitProbability = .3f }
|
||||
}),
|
||||
("Aeronautics Unlimited", new FactionDoctrine
|
||||
{
|
||||
EngageOn = EngageOn.Detection,
|
||||
Combatant = new RoleDoctrine { RangeExponent = .25f, MinHitProbability = .05f }
|
||||
}),
|
||||
("Pirates", new FactionDoctrine
|
||||
{
|
||||
EngageOn = EngageOn.Detection, Grace = 8f, Hail = "Drop your cargo and you can go.",
|
||||
Combatant = new RoleDoctrine { RangeExponent = .5f, MinHitProbability = .15f }
|
||||
}),
|
||||
};
|
||||
|
||||
// Dry run unless apply, as the other catalog commands. The cache must be writable for apply.
|
||||
public static int Run(CultCache cache, bool apply, TextWriter output)
|
||||
{
|
||||
var factions = cache.GetAll<Faction>().ToArray();
|
||||
var changed = new System.Collections.Generic.List<Faction>();
|
||||
foreach (var (name, doctrine) in Table)
|
||||
{
|
||||
var faction = factions.FirstOrDefault(f => f.Name == name);
|
||||
if (faction == null)
|
||||
{
|
||||
output.WriteLine($"{name}: no Faction record, doctrine not written");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (faction.Doctrine != null)
|
||||
{
|
||||
output.WriteLine($"{name}: already has a doctrine, kept");
|
||||
continue;
|
||||
}
|
||||
|
||||
output.WriteLine($"{name}: engage on {doctrine.EngageOn}, grace {doctrine.Grace:0.##}s, hail \"{doctrine.Hail}\", " +
|
||||
$"comply {doctrine.ComplySpeed:0.##}, range exponent {doctrine.Combatant.RangeExponent:0.##}, " +
|
||||
$"min hit {doctrine.Combatant.MinHitProbability:0.##}");
|
||||
faction.Doctrine = doctrine;
|
||||
changed.Add(faction);
|
||||
}
|
||||
|
||||
if (!apply)
|
||||
{
|
||||
output.WriteLine("\nDry run. Pass \"apply\" to author them.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (changed.Count == 0)
|
||||
{
|
||||
output.WriteLine("Nothing to author.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
cache.Commit(batch =>
|
||||
{
|
||||
foreach (var faction in changed) batch.Upsert(typeof(Faction), faction, cache.RefOf(faction).Key);
|
||||
});
|
||||
output.WriteLine($"\nAuthored {changed.Count} doctrines in Aetheria.cc");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -56,8 +56,9 @@ public static class Program
|
|||
case "generic-designs": return GenericDesigns(args.Contains("apply"));
|
||||
case "inspection-scanner": return InspectionScannerCatalog(args.Contains("apply"));
|
||||
case "product-lines": return ProductLinesCommand.Run(args.Skip(1).ToArray());
|
||||
case "doctrine-catalog": return DoctrineCatalog.Run(AetherDb.Open(catalogWritable: args.Contains("apply")).Cache, args.Contains("apply"), Console.Out);
|
||||
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], range-falloff [apply] [--effective <fraction>] [--end <multiplier>], 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], smoke-rounds [apply], roles-backfill [apply], pd-gear [apply], consumables-first-set [apply], launch-suppressor [apply], pirates-faction [apply], verse-grammar [apply], generic-designs [apply], sensor-stat-set [apply], inspection-scanner [apply], product-lines weapons [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], range-falloff [apply] [--effective <fraction>] [--end <multiplier>], 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], smoke-rounds [apply], roles-backfill [apply], pd-gear [apply], consumables-first-set [apply], launch-suppressor [apply], pirates-faction [apply], verse-grammar [apply], generic-designs [apply], sensor-stat-set [apply], inspection-scanner [apply], product-lines weapons [apply], doctrine-catalog [apply]");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -697,7 +698,7 @@ public static class Program
|
|||
{
|
||||
var db = AetherDb.Open();
|
||||
var products = db.Cache.GetAll<FactionProductData>().ToArray();
|
||||
Console.WriteLine($"{"faction",-26} {"short",-13} {"geonames",-22} {"boss hull",-14} {"influence",-9} products");
|
||||
Console.WriteLine($"{"faction",-26} {"short",-13} {"geonames",-22} {"boss hull",-14} {"influence",-9} {"doctrine",-10} products");
|
||||
var broken = 0;
|
||||
foreach (var faction in db.Cache.GetAll<Faction>().OrderBy(f => f.Name))
|
||||
{
|
||||
|
|
@ -707,7 +708,7 @@ public static class Program
|
|||
? "none"
|
||||
: db.Cache.Get(faction.BossHull)?.Name ?? "DANGLING";
|
||||
if (geonames == "UNSET" || boss == "DANGLING") broken++;
|
||||
Console.WriteLine($"{faction.Name,-26} {faction.ShortName,-13} {geonames,-22} {boss,-14} {faction.InfluenceDistance,-9} " +
|
||||
Console.WriteLine($"{faction.Name,-26} {faction.ShortName,-13} {geonames,-22} {boss,-14} {faction.InfluenceDistance,-9} {(faction.Doctrine == null ? "none" : faction.Doctrine.EngageOn.ToString()),-10} " +
|
||||
products.Count(p => p.Manufacturer.Key.Equals(key)));
|
||||
}
|
||||
Console.WriteLine($"\n{broken} factions carry a link that would break generation");
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ public static class VerseGrammarCommand
|
|||
Roles = new[] { Role("target", VerseReferentKind.Faction) } },
|
||||
new VerseVerb { Name = "explore", RenderPath = VerseRenderPath.ShipAction, Description = "The actor surveys a region and charts what is there.",
|
||||
Roles = new[] { Role("region", VerseReferentKind.Place) } },
|
||||
new VerseVerb { Name = "follow", RenderPath = VerseRenderPath.ShipAction, Description = "The actor shadows a ship of the target faction at a standoff, as a flight does while it hails.",
|
||||
Roles = new[] { Role("target", VerseReferentKind.Faction) } },
|
||||
new VerseVerb { Name = "speak", RenderPath = VerseRenderPath.Conversation, Description = "The actor says something to whoever is in earshot. Shown as Aetheria dialogue: face to face when docked, by radio with the speaker's portrait over their ship when undocked.",
|
||||
Roles = new VerseRole[0] },
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue