Rework the galaxy scanner's lists (scanner overhaul, stages 1 to 5) #4
Loading…
Reference in a new issue
No description provided.
Delete branch "oasis1701/StellarisAccess:feat/scanner-systems"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The galaxy scanner now lists what a sighted player finds by panning the map, read from game data wherever the camera is, and each category answers one need. I planned it with Claude one decision at a time.
docs/plans/scanner-overhaul.mdis the design, andscanner-overhaul-stage1.mdtoscanner-overhaul-stage5.mdhold each part's engine facts with their listings, its decisions and its build steps.Changes for the player
scanner_common_resources = offinsettings.inileaves them out.settings.iniis added at startup.docs/testing-guide.mddescribes the result. The lane dial is unchanged.Decisions
Every keyboard and speech decision is mine. The plans date each one as "user" and mark the calls Claude made without me as "my call".
One decision reverses an entry of 2026-10-26. Starbases, Observation posts and Other Fleets no longer list only what is on screen, as
docs/plans/scanner-pointer.mdhad it.Your locked "an All Systems category" is still there, as the last subcategory of Systems. I took it out during the work, because in my save 565 of its 597 entries were systems under the fog, which the game does not draw, and the new lists hold every charted system. I don't find it useful, but I put the same list back in case you want it, with the system entry words every other list now has. The general log tallies the charted systems by the list that holds them, leaving All Systems out. On that save it gave 22 of the player's, 9 unclaimed and 1 of another empire, 32 in all, with none missing.
Building it
Like #3, the branch commits its manifest entries without regenerated tables, so it does not build as committed. It adds 79
[[function]]entries, 9[[global_slot]]entries and 110 hand constants, andsrc/engine/deps_generated.{hpp,cpp}are main's. Please run:The first line puts the three new pairs in
manual_pdb_vt_matches.jsoninto the pdb session; without it those three entries come out zero. Our local builds made only the Steam column (generate.py --primary-only, with the three pairs added to a copy ofvt_matches_pdb.json), so no GOG address has been looked at. Seven entries carry agog_override, each the v4.5.2 address of a name the resolver cannot pin, which is an overload, a template or a function in an anonymous namespace.resolver.pygains one rule. A leading::in a manifest name matches the global namespace only, which tells the free function::ShouldShowIconForFleetfrom a member of the same name.docs/dev/address-tables.mdnotes it.llvm-pdbutilwas not available on this machine, sogen_calls.py,just regen-offsetsandjust regen-vtable-slotscould not run. New calls go through typed function pointers with the prototype and listing cited. Several hand constants name members the PDB has (_bShouldDisplayShield,_Starbases,_PrecalcFTLMagnetPresence,_PrecalcFTLInhibitorPresence,_Claims) and could be generated instead.CPlanet::HasFTLInhibitoris reached only through its vtable and has no table entry, so its flag is read as a field.Points to check on v4.6.0
vt_matches_pdb.json.CFleet_GetFleetIconType,ShouldShowIconForFleetAtIntelandCGalacticObjectMapIconObservationItem_GetToolTiphave no exact match, so they are inmanual_pdb_vt_matches.json, each with its evidence.old.kOff_CStrategicResource_Droppedis new in v4.6.0 and has no v4.5.2 witness.map_system_contacts.cpp, one assuming that the tooltips' localiser shows a missing key as the key and one that the null mission category's key is empty. The third, inmap_system_items.cpp, is what the byte at +0x71 of a strategic resource means.map_system_contactsarekSize_*and plain constants, whichgen_deps.pydoes not track, as in the sibling units.Gate reach
coreis unchanged at 102 facts, and so is every gate but three.system_scannergrows from 168 to 377 facts, because the eight newengine/map_*units belong to it (gates.toml).hudgrows from 332 to 395 andmap_pointerfrom 161 to 224, because Enter, Ctrl+A and Space on the map reach the scanner's lists. Both gain the same 64 facts and loseCStarFleetEntry_OnClick, since no list has made a fleet group click since part 5b. Each plan gives the reach of its parts.Testing
I heard stages 2 to 4 and parts 5b and 5d in play on Steam v4.5.4 between 2026-11-18 and 2026-11-22, and each plan records the lines heard. Stage 1 has been part of every session since 2026-11-18, but its own hand test was not written up.
On v4.6.0 the code has had one muted run in a new game over the dev harness. The log showed SteamV460, the locator's self-test agreeing on every table field, no gate off and no
FAULT. Every category a new game has read as before ("Sol. capital, Starport, own Military Ship, own Science Ship, own Construction Ship, 23 Energy Credits, 23 Minerals, 8 Engineering Research"). That run caught one inverted check, the byte at +0x71, which was fixed and read again. Saves from v4.5.4 do not load on v4.6.0, and a new game does not reach other empires' fleets, colonies and systems, first contacts, contracts, espionage operations, claims, FTL inhibitors and magnets, archaeological sites, astral rifts, megastructures, wormholes, gateways or special projects. The v4.6.0 offsets behind those were checked in the code only.Four parts have not been heard at all. Part 5a needs a wormhole or gateway in one of the player's systems, part 5c needs another country's colony in a charted system, the End list's station words have not come up, and All Systems came back on 2026-11-26 and is installed but not yet heard. The Scanner row of
NEXT_STEPS.mdlists what each stage has not met yet.Left for later
mo::icon_clickinengine/map_objectshas had no caller since stage 4d.mo::icon_right_clickstill handles an on-screen fleet group, which no list has made since part 5b.map_stations::frames_ofdoes not compare the fleet's id after the lookup, though the engine does (Steam v4.5.4 0x14162f177).kOff_CFleet_IDalready reaches the gates that call it, so the compare would add no fact.map_stations::station_tooltipreturns an empty pair when its tooltip builds nothing, so it does not fall back.map_modes::country, which does not compare the id after the lookup. Other Fleets usesmap_fleets::foreign_fleet_owner_name, which does.🤖 Generated with Claude Code
https://claude.ai/code/session_01EZNZEictKLyw4wZc9sqfRZ
System entries now also say what the stations box of the system's map icon would show, between special projects and bypasses, wherever the camera is. That is the starbase ("Starport", "colony"), observation posts, other empires' stations ("Military Station"), enclave stations, megastructures and the Shroud Seal, pre-FTL civilizations, waystations, dig sites, and astral and crystal rifts, in the game's build order for a fresh box. For example "Rigel. Citadel, Observation Post, Military Station, Archaeological Site, finished". The items follow UpdateStations' rules, ported from the listing. The Details filter counts as on, so a finished dig site and a finished or aborted rift are said too, with "finished" or "aborted" after them. A rift item is said when the map would show it with Details either off or on, because with Details on the map hides an open astral rift once a finished crystal rift is marked. The generic items take their words from GetStationIconTooltip run on a stand-in icon and widget, the waystation from its item's own tooltip, and the starbase from the dial's rule, now shared as map_parts::starbase_item_words. The log check also compares the station tags of the icons on screen. Only the system_scanner gate grows; core, hud and map_pointer are unchanged. The manifest entries come without generated tables, as in PR #3. Engine facts and listings are in docs/plans/scanner-overhaul-stage4.md and docs/dev/engine/map.md. The plan also carries the part 4b hand-test notes and the decision to keep "0" for a resource total under one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZNZEi63RK7vsu2313jYNJSystem entries now also say what the map icon's contacts and operations boxes would show. After the logistics hub come the first contacts ("First contact with Unidentified Signal"), the nomad contracts by kind ("Military Contract") and the espionage operations with their category in front ("Subterfuge Espionage Operation Gather Information"). There is one item per icon, each the first line of the game's hover text. The category is what the operation's icon shows (user, 2026-11-20). As in the earlier parts they are said whatever the map mode, though the game draws operations only in the intel map mode. The code is a new unit, engine/map_system_contacts, in the system_scanner gate. It calls the engine's own builders, CFirstContactsData::GetMapIconsDataAt and CCountryEspionageManager::GetMapIconsDataAt, and frees what they build the way CGalacticObjectMapIcon::SetUpData does (BasicString_Dtor on each name, then the arrays' DeleteDataPtr). Contracts come from SetUpMissionsData on a stand-in icon and update data, with the contract array guarded as in part 4a, and then UpdateContractIcons' tests. The log check also compares the item counts of both boxes on screen. A charted system at intel NONE now has items when the game would draw its icon for a contract there (ShouldShowIconForGalacticObject). Claims are not said at intel NONE, since the claim icon never shows there. A contract in an uncharted system is on no entry, because the game has a window of its own for contracts (user, 2026-11-20). Calls made without the user, listed for the owner: - Two icons of the same kind are said one by one, as the fleets are. - A contract whose mission lookup fails is skipped. - A category or operation name with no text is said as its key, and a contract with no category says "Contract" (both UNVERIFIED against the game's localiser and null objects). - The fleets keep their intel NONE cut, because UpdateSystemFleets at intel NONE was not read. core, hud and map_pointer are unchanged. system_scanner gains 31 facts (9 table entries, 22 hand constants). The manifest entries come without generated tables, as in PR #3. Engine facts, listings, decisions and the review are in docs/plans/scanner-overhaul-stage4.md. The commit also carries the part 4e-1 hand-test notes and corrects the notes that counted the idler's editor mode byte +0xe88 among the map filters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZNZEi63RK7vsu2313jYNJBordering Systems now also lists the systems at the far end of a wormhole, gateway or other bypass in one of the player's systems. Every system entry of the galaxy scanner says how the player's bypasses reach it, right after the name, as in "Dahlberg, Natural Wormhole from Kappler, not usable, Intel High, north, 80, 4 jumps" (user, 2026-11-20). With several of the player's systems leading there, each is named once ("Gateway from Deneb and Lane"). A system that is also one lane away says it too. A bypass leads to the systems of its active connections, read the way CGalacticObject::ForEachConnectedSystem reads them. Relays (they join lane neighbours only), inactive bypasses such as a ruined gateway and wormholes the player has not explored lead nowhere. Only far ends a sighted player can find are listed (user, 2026-11-20). Those are the ones the game names, which means an explored wormhole's far end or any destination of a bypass the player's ships can use, and the ones whose own map icon shows the bypass (intel Medium or above and the nameplate). "Not usable" follows the game's pathfinding test, CBypass::CanBeUsedInPathfind, at both ends, so locks, closed borders and a type's country_can_use count (user, 2026-11-20). Jumps are still counted over hyperlanes (user, 2026-11-20). The code is a new unit, engine/map_bypass_links, in the system_scanner gate, with the new manifest entry CBypass::NeedsExploration. The kind of connection is the first line of the bypass entry's tooltip, the words the system entries already say for it (map_system_items::bypass_entry_words). The connection ids are copied under an SEH guard, because the daily update refills them on worker threads while the main thread can handle input in the middle of that loop (found by the review). Calls made without the user, listed for the owner: - Relays are skipped by connection type, as the bypass box skips them, instead of by the relay type ForEachConnectedSystem compares. - An inactive bypass in the player's system is skipped, although the engine keeps its connections. - "Not usable" is said for a kind only when none of the player's bypasses of that kind leading there is usable. - The words appear in My Systems too, for a wormhole between two of the player's systems. - A far end counts as named when the player's bypass passes CanBeUsedInPathfind, where the Use order asks CBypass::CanBeUsed. The Use order's label also names a single destination the player cannot use yet; such a far end is left out unless its icon shows. Nothing the game does not show is listed. - gateway_ness, one-to-one but with no destination in its tooltip, counts as named. - The connection-type and intel values and the size bound are plain constants gen_deps.py does not track, as in map_system_items. core is unchanged. hud and map_pointer each gain 11 facts, the bypass reads the list needs, since Enter and Ctrl+A on the map reach the scanner's lists; on an unknown build missing one of them the HUD screen switches off. system_scanner gains 5. The manifest entry comes without generated tables, as in PR #3. Engine facts, listings, decisions and the review are in docs/plans/scanner-overhaul-stage5.md, with a summary in docs/dev/engine/map.md. Nothing of this was heard yet, because the user's save has no bypass in the player's systems and no explored wormhole. The commit also carries the stage 4e-2 hand-test notes and the stage 5 decision. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZNZEi63RK7vsu2313jYNJThe testing guide's scanner section still described Systems as My, Known and All. It now gives the categories in their order, the system entry words, Home's words and the scanner_common_resources setting. The status lines of the design and the stage plans say what was heard on Steam v4.5.4 and that nothing was heard on v4.6.0, and the Scanner row of NEXT_STEPS.md says the same. Its 5b part no longer lists the Alien Menace entry as unheard. The stage 2 plan no longer calls ShouldDisplayNameForCountry unasked, since map_stations has asked it since stage 4b, and the design names the one fleet text call stage 2a made. src/engine/deps_generated.{hpp,cpp} go back to main's. The branch commits its manifest entries without their tables, so the gate lists are regenerated along with them. The design, the stage 1 plan, scanner-pointer.md, map-cursor.md, the testing guide and the Scanner row of NEXT_STEPS.md also say that All Systems is back as the last subcategory of Systems. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZNZEictKLyw4wZc9sqfRZ