feat(uxassist): generate blueprint production descriptions

Add native blueprint description generation with proliferation controls, separate power categories, and steady-state material and research reporting.

Distinguish necessary coproducts from overbuild and fractional headroom, with regression checks and updated architecture documentation.

Validation: 464 ProductionCheck checks and Release builds of UXAssist, CheatEnabler, and UniverseGenTweaks.
This commit is contained in:
soarqin committed 2026-10-25 14:23:52 +08:00
1 parent cc36edecc7
commit ae44c3ca6a
16 files changed
+2294 -51

No files matched your search

+3 -1
View File
@@ -30,9 +30,11 @@
## Architecture
- Fixed-building UXAssist power reports include each selected logistics station, distributor, or battle base at its captured configured charging maximum in watts, not its transient draw. Keep charging power separate from accumulator exchange and do not double-count advanced miners or gas collectors. Blueprint and prebuild capture use native stored settings or prefab defaults when no charging setting is applied.
- Fixed-building UXAssist power reports include each selected logistics station, distributor, or battle base at its captured configured charging maximum in watts, not its transient draw. Keep factory and logistics consumption independently usable when the other category is unknown; retain the original total-power API and never display an incomplete category as zero. Keep charging power separate from accumulator exchange and do not double-count advanced miners or gas collectors. Blueprint and prebuild capture use native stored settings or prefab defaults when no charging setting is applied.
- UXAssist production calculations must use immutable snapshots captured from loaded Proto, PrefabDesc, and Cargo data on the game thread. Keep the planner and fixed-building analyzer pure-managed, express material rates in double items per minute and power in watts, and report unknown material and power results independently with structured diagnostics. Convert native ticks, fixed-point speeds, and per-second rates explicitly. Use native facility-specific production and power rules; keep generation, accumulator charging and discharging, and Dyson-sphere demand separate. Require explicit resource and operating settings when they cannot be captured, and never capture transient runtime throttles such as the miner output damper. Treat a stored sandbox boost mode as applied only through an explicit or live-captured `BoostEnabled` state. Verify native rules against the original DLL, compile affected mods, and keep the synthetic `UXAssist/tools/ProductionCheck` checks passing; leave in-game validation to a person rather than automated gameplay or save parsing. See [production architecture](UXAssist/docs/ProductionArchitecture.md).
- Production catalog synthetic recipe IDs are calculation-only negative output item IDs; never pass them to native recipe lookups or setters. Rebuild the catalog on game begin after preload mutations, and invalidate derived caches on `ProductionCatalogService.Changed`, including catalog clearing. Preserve accumulator coating through exchange and bound spray reuse by same-item output and demand. Live-selection operating overrides use signed object IDs; blueprint overrides use blueprint indices. Keep renewable generation at ideal rated conditions and do not count gas collectors' self-fueling as grid consumption.
- Black-box material classification must use process net flows while retaining gross production and consumption. Attribute redundant whole-building output using one stable shared material budget that preserves final-product capacity and does not worsen internal shortages; derive coproduct surplus from retained whole buildings required by other products, crediting internal net consumption first. Do not relabel limiting-product or single-product headroom as a coproduct or change the original full-load report. Derive separate steady-state external inputs by throttling surplus upstream processes together with all their outputs and inputs, including fractional and multi-stage headroom; preserve independently known rated final outputs and do not worsen shortages. For incomplete materials, still cap independently known upstream inputs against known demand, but protect potential consumers of unresolved processes rather than treating their demand as zero. A blueprint research-mode lab protects all native matrices manufactured in the selection from upstream reduction; classify their positive net production after other buildings' known consumption as final research products without falsely reporting excess or adding fictitious gross consumption. Leave other uncertain overbuild, coproduct, and final-product conclusions unknown.
- Blueprint auto-description reads only the current blueprint's buildings on button click. Keep the proliferation checkbox to the right of the button on one compact row above all description boxes. Shift the first native inspector group down once and the following groups after every refresh, restoring the original layout on disable. Replace the main description with nonempty Missing, Excess, Input, Output, and Research lines; group each warning category under one prefix, omit the per-minute suffix without changing rate units, and use only an optional power custom field with absent consumption categories omitted. Format material inputs from the separate steady-state estimate without altering full-load ledgers or power. Budget every research-mode lab at full prefab working power for conservative blueprint power capacity, even if current research is idle or technology is missing or invalid; apply a supported proliferation multiplier. Blueprint research treats one lab as an outlet for all six native matrix types actually manufactured within the selected buildings; capture their IDs independently of technology requirements and do not infer matrix demand, research speed, hashes, or external inputs from the current save. Display positive net matrix output only on Research, not ordinary Output; keep precise technology-dependent research requirements for callers without this blueprint assumption. Treat research power as independently complete when no other power category is unknown. Synchronize pending native field edits; update or remove exact bilingual power fields without changing any other custom fields, including fields titled Input or Output. Check the native description and field limits before writing, use native field escaping and item tags, and refresh the inspector without automatic saving or changes to native rendering or validation. Keep Spray Coater defaults and manual proliferation overrides scoped to the editing session; keep text formatting and field updates pure-managed under `ProductionCheck`. See [production architecture](UXAssist/docs/ProductionArchitecture.md).
- CheatEnabler belt-signal upstream statistics use the shared production planner's independent production and consumption ledgers. Cache per-item material results by catalog and spray settings, keep separate per-belt fractional accumulators, and never run the solver in the logic tick. Missing data must not interrupt item generation.
- UXAssist Dark Fog buy-out belt signals keep each item ID, per-Metaverse rate, localization key, and embedded icon path in one definition. Name embedded icon files after the current English item names and synchronize resource includes and loader paths when renaming them. Preserve the legacy signal and saved-stock order. Rates represent equivalent single-material value: a native bundle of 10 Silicon-based Neurons, 10 Negentropy Singularities, and 10 Matter Recombinators per Metaverse corresponds to 30 of any one selected material per Metaverse.
- Tech downgrades must validate the full dependency cascade and capacity reductions before changing game state. Recompute non-invertible bonuses from native defaults and surviving levels; replaying unrelated unlock side effects can corrupt inventory geometry and station limits.