Merge fire control Cut 6c: the formula gets fixed, and the single point of failure
Cut 6a authored the premium targeting system strictly worse than the cheap one, because Resolution is consumed as a cost while its name promises a benefit. Operator ruling: fix the formula, not the handle. HitProbability now derives its ceiling reciprocally, so higher Resolution is a sharper instrument and the unaided fallback of 1 becomes the floor by construction rather than by accident. No rename. Both designs also shipped from a single seller, and galaxy generation draws a random subset of factions -- so ship generation still threw in any galaxy that missed that draw, and Cut 6a's ten green seeds only sampled the die. Targeting now comes from the roster's own sensor factions, Finch and Lucent, alongside NiteLife; and FillInterior degrades to unaided fire instead of throwing when no seller is present, which is only safe because Cut 5.1 gave unaided fire a floor. Also records that the existing loadout command runs with a null galaxy, where IsAvailable passes everything -- so availability had never been exercised by any verification in this campaign until the exclude-sellers mode this cut adds. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
commit
6636e757c7
7 changed files with 722 additions and 20 deletions
|
|
@ -22,7 +22,10 @@ public class TargetingSystemData : BehaviorData
|
|||
|
||||
// The info level (see Entity.EntityInfoGathered) at which sensor state stops limiting hits. Below the
|
||||
// system's own resolution, an otherwise-earned hit still degrades on account of thin sensor data;
|
||||
// consumed by Cut 3's roll.
|
||||
// consumed by Cut 3's roll. Higher is better, same as every other stat here: Cut 6c.1 (operator ruling
|
||||
// 2026-09-19) has FireControl.HitProbability take Resolution's reciprocal to derive the actual info
|
||||
// ceiling (ceiling = detection + (1 - detection) / Resolution), so authoring a bigger number buys a lower
|
||||
// ceiling -- less info needed -- rather than the field's own value being read as the ceiling directly.
|
||||
[Inspectable, JsonProperty("resolution"), Key(2), RuntimeInspectable]
|
||||
public PerformanceStat Resolution = new PerformanceStat();
|
||||
|
||||
|
|
|
|||
|
|
@ -147,7 +147,15 @@ public static class FireControl
|
|||
|
||||
var settings = source.ItemManager.GameplaySettings;
|
||||
var info = source.EntityInfoGathered.TryGetValue(target, out var gathered) ? gathered : 0f;
|
||||
var pSensor = saturate(unlerp(settings.TargetDetectionInfoThreshold, Resolution(source), info));
|
||||
// Cut 6c, 6c.1 (operator ruling 2026-09-19): Resolution stays a benefit -- higher is better -- so the
|
||||
// formula takes its reciprocal to derive the actual info ceiling instead of reading Resolution as
|
||||
// that ceiling directly. Resolution 1 (the unaided fallback above) yields a ceiling of 1: needs
|
||||
// complete information, the floor by construction. A higher Resolution pulls the ceiling down toward
|
||||
// the detection threshold, needing less info before sensor state stops limiting hits. The max guards
|
||||
// a zero or negative authored Resolution; no authored value should ever reach it.
|
||||
var demandCeiling = settings.TargetDetectionInfoThreshold +
|
||||
(1f - settings.TargetDetectionInfoThreshold) / max(Resolution(source), 1e-3f);
|
||||
var pSensor = saturate(unlerp(settings.TargetDetectionInfoThreshold, demandCeiling, info));
|
||||
|
||||
float pSpread;
|
||||
if (weapon.Spread > 0)
|
||||
|
|
|
|||
|
|
@ -263,20 +263,35 @@ public class LoadoutGenerator
|
|||
// fire is a last resort, not an alternative loadout choice. EquipHardpoints runs before FillInterior
|
||||
// (OutfitEntity), so entity.Weapons is already populated here. Zenith and anything else with no
|
||||
// weapon hardpoints gets none.
|
||||
//
|
||||
// Cut 6c, 6c.2: this used to be `required: true` and throw InvalidLoadoutException when no seller was
|
||||
// available -- a galaxy that happened not to draw a targeting design's manufacturer failed entity
|
||||
// generation outright, a single point of failure the ten-seed smoke never sampled. It degrades instead:
|
||||
// required: false, so RandomProducts' own manufacturer-widening fallback never fires and an unmet
|
||||
// requirement returns null quietly rather than searching outside the galaxy for one. An entity that
|
||||
// ends up with no targeting system fires through FireControl's unaided fallback
|
||||
// (GameplaySettings.UnaidedTracking, Cut 5.1) rather than not firing at all -- that floor is what makes
|
||||
// this degrade safe. The gap is logged so it surfaces as content debt (AetherDb loadout reports it per
|
||||
// seed) instead of vanishing silently.
|
||||
if (entity.Weapons.Any())
|
||||
{
|
||||
emptyShape = entity.UnoccupiedSpace;
|
||||
|
||||
var (targetingProduct, targetingData) = RandomProduct<GearData>(2, item =>
|
||||
item.Behaviors.Any(b => b is TargetingSystemData) &&
|
||||
item.Shape.FitsWithin(emptyShape, out _, out _), required: true);
|
||||
if (targetingData == null) throw new InvalidLoadoutException("No compatible targeting system found for entity!");
|
||||
|
||||
targetingData.Shape.FitsWithin(emptyShape, out var targetingRotation, out var targetingPosition);
|
||||
var targetingSystem = ItemManager.CreateInstance(targetingProduct) as EquippableItem;
|
||||
targetingSystem.Rotation = targetingRotation;
|
||||
if (!entity.TryEquip(targetingSystem, targetingPosition))
|
||||
throw new InvalidLoadoutException("Failed to equip selected targeting system!");
|
||||
item.Shape.FitsWithin(emptyShape, out _, out _));
|
||||
if (targetingData == null)
|
||||
{
|
||||
ItemManager.Log("No targeting system available for armed entity; it will fire unaided.");
|
||||
}
|
||||
else
|
||||
{
|
||||
targetingData.Shape.FitsWithin(emptyShape, out var targetingRotation, out var targetingPosition);
|
||||
var targetingSystem = ItemManager.CreateInstance(targetingProduct) as EquippableItem;
|
||||
targetingSystem.Rotation = targetingRotation;
|
||||
if (!entity.TryEquip(targetingSystem, targetingPosition))
|
||||
throw new InvalidLoadoutException("Failed to equip selected targeting system!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue