aboutsummaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* feat(ai): load clan research candidates during InitValentin Popov10 days2-27/+30
| | | | | | | | | | | | | | | | | | | Handle the no-result Handler(43) by loading direct AI DAT candidates and running the recovered selector against the clan's TRF. Keep the catalog and its context alive per clan. Share catalog enumeration with transport selection. Match the stock NTFS name order, including underscore placement. A fresh Single.02 run of the original supplied 77 ordered entries, status bytes and selected index 60 (swelbld1.dat); the licensed regression matches that state. Both captured and installed ai.dll match the documented GOG SHA-256. Keep paid laboratory work, extended candidate metadata and Handler(69) explicitly stubbed. The report exposes loaded catalogs separately from those remaining gaps. A loading failure retains an indexed Init stub. Validate workspace fmt/check/tests, licensed live-catalog comparison, all 29 stock missions at 900 seconds without stops or Handler(43) load failures, and mission 29 in a Vulkan-validation window.
* feat(ai): resupply scripted builders before constructionValentin Popov10 days2-5/+22
| | | | | | | | | | | | | | | | Use the native Building_Cost threshold to start loading from the nearest owned mine or warehouse. Transfer ore at the stock 100 units/second up to the design price, then resume the reserved building task. Mines bypass loading; direct construction can preserve native negative ore after payment. Execute Behavior.dll's config constructor, start, source selection, loading tick and resource setter in an x86 oracle. Keep exterior docking and custom Behavior configuration explicit approximations, counted per builder/source. The stock Single.02 regression now reaches another completed building after resupply without changing mission objects or resources. Validate fmt/check/ workspace tests, licensed construction and debt regressions, all 29 stock missions for 900 seconds, and mission 29 in a Vulkan-validation window.
* fix(ai): leave completed clan scripts in controlValentin Popov10 days2-2/+16
| | | | | | | | | | | | | | | Do not enable synthetic guards and factory raids merely because Init used an explicit research stub. Keep the fallback for a genuine Init stop. Completed stock scripts assign defenders and factory work themselves. Replace the fallback-raid acceptance test with a stock-start script-order and robot-production check. Move the projectile regression to unit_combat and issue its patrol explicitly; its debug poses only isolate collision. Document that native idle-unit Behavior and the research-gated assault remain open. Validation: workspace fmt/check/tests, two licensed runtime tests, all 29 stock missions at 900 seconds without stops or fallbacks, and mission 28 in a Vulkan-validation window.
* fix(ai): recognize newly built labs in research queriesValentin Popov10 days2-0/+5
| | | | | | | | | | | | | | | | | | | Handler(41) searched only the initial mission objects. A constructed lab has an issued logical ID, so the stub returned missing-object ERROR and sent the script into an unsupported ST_SOLVING transition. Resolve the lab through the live logical roster: an unloaded catalog returns false and the original script finishes the request without inventing a research job. Validation: fmt, workspace check/tests and an ignored stock-start regression build a lab, exercise 41 and confirm no script stop or granted technology. GOG ai.dll calls verify static/dynamic IDs, missing labs, cold catalogs and backend acceptance. A stock window replay reaches the lab and 41 without the old stop; the lab itself is outside the player's view. All 29 stock missions complete 900-second reports with successful exits and no Init, Mission or clan-script hard stops. Explicit research and gameplay stubs remain counted. Research catalog 43 and actual research dispatch remain explicit stubs. This coverage-blocker fix follows the visible scripted-mine construction change.
* feat(ai): execute scripted mine constructionValentin Popov10 days2-2/+38
| | | | | | | | | | | | | | | | | | | | Mission 29 stopped before choosing a deposit. Implement Handler(40)'s vacant deposit and weakest enemy mine policy, preserve its partial output writes and reserve the chosen site. Follow the script's tail transfer into BUILD_MINE with the original problem context and cells. Move event execution out of the large script module and report stops at the actual destination event. Use the existing prepared deposit slot for the builder's mine order. Completion registers its controls, ore buffer and logical ID with the regular resource loop. Track mine queries by clan, target and coordinates in --sim-report. Validation: fmt, workspace check/tests; licensed stock-start tests construct a working mine, collect ore and subsequently construct a working factory. Calls to GOG ai.dll confirm mine choices/output writes and VM event transfer behavior. The 900-second stock mission now stops only at the research transition 8. Window validation reaches mine creation from the stock start; construction animation was outside the player's view and has not been accepted visually. Native ArealMap deposit binding, builder resupply and live BAS cuts remain open.
* feat(ai): construct clan factories, storage and laboratoriesValentin Popov10 days2-2/+14
| | | | | | | | | | | | | | | | Allow ORDER_ROBOT_BUILD to use the first BuildDat scheme for factories, storage and laboratories, with the existing technology and onboard-ore gates. Register completed factories for production and reset their free-build quota when a prepared slot is reused. Exclude reserved models from initial BAS cuts using the mission object count, preserving placed neutral buildings. Validation: fmt, workspace check and tests; ignored licensed stock-start test builds a factory in mission 29 and queues a transport there. Original Behavior.dll price calls confirm 670/770/560 ore for storage/factory/laboratory. Stock simulation also builds a laboratory; a validation-enabled window reaches the first factory. The new buildings were outside the player's window view; visual construction parity is not established. G7 still needs mine query 40, research transition 8, builder resupply and live BAS updates.
* fix(ai): account for pending construction in class limitsValentin Popov10 days2-0/+18
| | | | | | | | | | | | | | | | | | | Implement Handler(11) limits for the original class set, including hangar and laboratory counters. Keep owned-object caps separate from pending thresholds; medium and large towers allow three and one active builds. Record the ordered class on construction tasks and count queries by clan, class and result. Execute ai.dll RVA 0xc5e7 with the GOG hash guard and compare owned counts, maxima, pending counts and unknown classes. Preserve these native vectors in a Rust test. Extend the licensed construction test to require pending count before registration, owner isolation and reset after completion. Validate fmt, workspace check/tests, licensed construction, release build and stock mission 29 in simulation and its window. This removes the Handler(11) coverage blocker for the following construction work; generic building orders and Handler(40) are still open. Pending counter sources and lifecycle beyond active FParkan Construction tasks remain approximate.
* feat(ai): queue scripted movement and raid ordersValentin Popov10 days2-4/+22
| | | | | | | | | | | | | | | | | | | | | Execute Go, Attack and ShutDown through one ordered queue from Init, Mission and clan AI events. Append preserves the active task; replacement clears its tail. Support the appended point patrol ending mission 19's second raid, and count accepted commands by object and order type. Execute the original ai.dll Handler(15) at RVA 0x8054 with its hash guard: move, attack, shutdown and appended patrol reach the unit without a current problem context, with native insertion modes and missing-unit flag 5. Behavior.dll RVA 0x4280 identifies append and replace paths. Native task completion and profile-dependent behavior remain approximate. Test mixed queues, replacement and deferred patrol; run the licensed mission-19 scenario from its stock start through its first movement. Validate fmt, workspace check/tests, release build and all 29 missions for 900 seconds. Mission 19 has both raid messages and no script stops; mission 29's existing counter/construction stops remain. Check the live stock-start window with normal clocks and Vulkan validation. This does not establish mission completion or native movement/combat parity.
* feat(ai): deliver clan script notifications to the playerValentin Popov10 days2-6/+14
| | | | | | | | | | | | | | | | | Handle clan Handler(30) through the same host command and first-message state as the Mission event. Carry clan notices in FrameResult and pass them to the existing text and voice queues without changing the Mission tick counter. Extract shared host dispatch and app presentation modules. Execute ai.dll RVA 0xc266 with the original hash guard: clan contexts 0 and 2 call the global host as (0, MESSAGE_INFO, index), reading live varset cells. Extend the licensed stock Convoy test to require message 0 after the delayed attack, and test shared first-message and AutoDemo behavior. Repeated native message UI branches remain explicit debt. Validate fmt, workspace check/tests, licensed stock-start test, release simulation and the mission window. Clock replay checks message delivery, not full mission completion.
* feat(ai): select convoy targets using original class queriesValentin Popov10 days2-0/+30
| | | | | | | | | | | | | | | | | | | Connect Handler(71) to least-defended hostile buildings of the requested class and Handler(72) to the object's prototype size class. The stock Convoy script now assigns its delayed attack instead of stopping at these queries. Keep descriptor binding, guard strength and candidate order explicit approximations with coverage counters. Execute the original ai.dll handlers and Behavior.dll class getter in native oracles, including strict radius, ties, missing objects and name classes. Add a Rust class rule test and a licensed stock-start test for the delayed attack; check owner independence separately with a debug change after the stock assertion. Validate fmt, workspace check/tests, licensed test, release simulation and the running mission with Vulkan validation. Accelerated scene time is a mechanic check, not mission-completion acceptance. Handler(30) message dispatch remains the next Convoy script stop.
* feat(ai): recruit free groups before assigning their targetValentin Popov10 days2-1/+14
| | | | | | | | | | | | | | | | | | | | Handler(25) TAKE_ALL_FREE takes the free roster in order and returns ERROR for an empty group. Target selection now belongs to Handler(28), so the script can form a group first and then issue its attack. Attack orders remain associated with their group; cleanup preserves a subsequent order. Coverage counts recruitments by clan and mode, including empty results. Original GOG ai.dll RVA 0xab85 confirmed membership across classes, busy and reserved exclusions, assignment updates, order and the empty result. Validated with Rust order-lifecycle checks, a licensed test that waits on the stock empty clan before a deliberate debug roster transfer, workspace fmt/check/test, and 900-second simulations of all 29 missions. Mission 12 ran from stock start in the window with clean Vulkan validation. The debug transfer verifies the attack mechanism, not a mission playthrough. Occupancy and routing remain approximate. Group orders for other classes fail explicitly. Script stops remain in missions 15 (71/72), 19 (Problems0 orders) and 29 (building counters/construction and Handler 40).
* feat(ai): select free factories for scripted productionValentin Popov10 days2-0/+18
| | | | | | | | | | | | | | | | Handler(13) UNIT_FREE_UNIT now selects the first live clan object of the requested exact class. Reserved objects, assigned runtime workers and busy factories are skipped. Coverage records each selected logical ID. Campaign mission 8 can execute PBM_ROBOT_NEEDED and replenish its guards. Original GOG ai.dll RVA 0x86fb confirmed roster order, exact class matching, exclusion of busy and reserved entries, and ERROR when none are free. Validated with matching Rust roster cases, a licensed stock mission 8 production test, fmt/check/test workspace, and 900-second simulations of missions 8 and 28. Mission 8 also ran in the window with Vulkan validation. Occupancy is inferred from runtime jobs; native problem-slot ownership, other selection modes and mission chronology beside the original remain open.
* feat(ai): patrol scripted protection pointsValentin Popov10 days2-1/+20
| | | | | | | | | | | | | | | | | PBM_PLACE_PROTECT recruits free warbots for TARGET_BY_PLACE and preserves its patrol group across Continue calls. New factory units can reinforce it; releasing the group preserves a subsequent movement or attack order. Coverage counts point orders and continuations by clan and both coordinates. Validated with fmt/check/test workspace, stock mission 10 group lifecycle, stock building and factory guard regressions, and 900-second simulations of missions 8, 10 and 12. Mission 10 ran in the window from stock start, issued the point order and reinforced it, with clean Vulkan validation. Original Behavior.dll RVA 0x2d520 confirmed point/radius parameters. Routing, free-unit recruitment and continuation timing remain approximate. Mission chronology alongside the original is open. Simulations expose Handler(13) in mission 8 and another group recruitment mode in mission 12.
* feat(ai): evaluate scripted area defence strengthValentin Popov10 days2-0/+15
| | | | | | Execute Handler(44) for XY and logical-object targets, an explicit clan or hostile clans. Reuse the strict horizontal radius calculation and report approximate query counts by clan, event and instruction. Direct GOG AI DLL calls cover target forms, DWORD coordinates, clan filtering, missing targets and the radius boundary. A stock mission regression runs the query through the script dispatcher. Five affected missions complete 900 simulated seconds, with the remaining point-group selection failures exposed explicitly. Mission 10 ran in the window with clean Vulkan validation. Workspace formatting, checking and tests pass.
* feat(ai): guard the least defended clan buildingValentin Popov10 days2-0/+16
| | | | | | Execute Handler(37) from the live clan roster, rank nearby guard strength and feed the existing protection scheduler. Keep the native strict 250-unit radius, first tie and empty-roster sentinel. Count approximate selections by clan and target in simulation reports. The GOG AI handler was called directly for weak buildings, equal strength, the radius boundary and an empty roster. Stock missions 8, 9 and 10 now assign guard patrols before reaching the next explicit script blocker. Mission 9 ran in the window with clean Vulkan validation. The existing factory protection regression and workspace checks pass.
* fix(ai): dispatch attacks after a scripted unit diesValentin Popov2026-11-152-1/+14
| | | | Match Handler(39) against the live logical-object registry and pass Problems0 attack orders to the existing task. The stock mission 20 regression exercises the branch with the checked warbot present and then removed. The original GOG AI query was called directly for present and missing IDs. Mission 20 completed 900 simulated seconds without a clan-script stop and started in the window with clean Vulkan validation.
* fix(player): board the selected friendly warbotValentin Popov2026-11-152-5/+10
| | | | | | Route the F command to the cockpit sight selection and keep that target for Enter. Use the original strict 20-unit horizontal reach and preserve the working Control gate. Select the neutral target immediately after capture. The original iron3d distance block accepts 19.99, rejects 20 and rejects larger values. A windowed stock Teleport run selected and boarded the helicopter through the ordinary input handlers, then climbed, with Vulkan validation clean.
* fix(render): arbitrate sun glare against world and foliageValentin Popov2026-11-152-2/+10
| | | | | | Sample active alpha-blended materials at the sun center ray intersection and check terrain through the scene far plane. Preserve native separate disk submission and per-pixel scene compositing. The stock Firing Range opened with Vulkan validation. Local camera views showed the disk and flare over the ridge, partial disc coverage behind a leaf, and full coverage behind a trunk. The focused regression covers opaque and transparent texels plus terrain beyond half of the far plane.
* feat(fx): render manual laser projectile trailsValentin Popov2026-11-142-0/+13
| | | | | | Load the constant-width Op5 layers and their original materials from the projectile Control group. Draw the sampled segment through its first contact and hide it after that frame. Coalesce native subdivisions while keeping both layers. Effect.dll RVA 0x2a20 was checked directly with two world positions. A diagnostic input replay started Firing Range on the original map, crossed the bridge, captured and boarded its flying warbot, climbed, and fired. The two trails are visible on the terrain-hit frame with Vulkan validation clean.
* fix(player): preserve clearance above bridge decksValentin Popov2026-11-142-2/+10
| | | | | | Resolve the preceding walking surface before switching between terrain and mesh floors. Preserve the outdoor spawn clearance across the deck while the lower bunker spawn keeps the existing near-floor behavior. The licensed Firing Range test walks from the stock spawn over both bridge sections and checks the ramp and return to terrain. The Two Fortresses bunker exit still passes. The stock Firing Range opens with Vulkan validation clean.
* feat(ai): execute tower construction ordersValentin Popov2026-11-142-2/+17
| | | | | | Use the first BuildDat scheme for the requested class, check learned components, and route the builder before spending onboard ore. The Behavior.dll oracle rejected the stock scheme and returned 1100 ore after unlocking the components. The stock mission 28 window showed the refusal with its original tech tree. A licensed prepared test exercised construction and ore deduction. Onboard supply remains required pending warehouse refill.
* feat(ai): find and reserve sites for scripted constructionValentin Popov2026-11-142-0/+18
| | | | Handler 18 scans base rings, checks terrain and clearance, and writes the site back to the script. The stock Two Fortresses window found a tower site and reached the builder order. The native DLL returned the expected site with and without a reservation, and zero for missing areas. The builder task remains explicit in coverage.
* feat(ai): carry ore from clan mines to storageValentin Popov2026-11-143-4/+15
| | | | Resolve the stock transport order against the newly produced unit. Move between owned endpoints and limit transfers by rate, source stock and destination space. The window logged the first departure and the stock simulation completed an unloading cycle. Native roster selection was called directly. Port approaches and rates remain approximations.
* feat(ai): build the clan transport from the AI catalogValentin Popov2026-11-142-2/+20
| | | | | | Let a scripted transport order survive a busy factory and use the unique eligible design from the clan technology table. The AI reserves its transport independently of the player scheme list. Two Fortresses released sml_cargo.dat from the stock start in the FParkan window and the licensed regression covers both factories. The x86 DLL chooser confirmed class, readiness, and fastest selection. Transport routes and live timing parity remain open.
* feat(ai): keep the scripted factory patrol activeValentin Popov2026-11-142-1/+18
| | | | | | Run the active factory protection event before Problems0. Its group retains assigned warbots and can recruit replacements. Release the patrol when the factory is lost. The stock Two Fortresses run assigned a patrol around the enemy factory in both simulation and the Vulkan window. A direct x86 DLL call confirmed Handler(45) sums assigned ratings and skips free slots. Live comparison with the original remains open.
* feat(ai): evaluate factory guards and threats to the baseValentin Popov2026-11-142-1/+19
| | | | Single.01 reaches the end of Problems0 and enters its building protection and construction jobs. Confirm radius boundaries, first-factory order, hero priority and duplicate exclusion via GOG ai.dll. Unavailable building upgrades log a stub and return no eligible target.
* feat(ai): wait on scripted capture and group conditionsValentin Popov2026-11-142-2/+14
| | | | Single.01 now reaches ST_SOLVING after dispatching a capturer and patrol. Compare the capture and destruction predicates with the original ai.dll at RVA 0x5180. Keep the default OR_TASK behavior and report the approximate lifecycle.
* feat(ai): dispatch scripted warbot groupsValentin Popov2026-11-142-0/+16
| | | | Single.01 selects a free warbot for the capture problem and issues a patrol around the moving capturer from stock startup. Group recruitment uses the supported TAKE_BY_HITS branch. Priority preemption and group expression scheduling remain open.
* feat(ai): select enemy buildings beyond the clan base radiusValentin Popov2026-11-142-3/+17
| | | | Connect the initial radius limit and Handler(64) target lookup. Compare target IDs with an isolated GOG ai.dll call at RVA 0xe8e7. Campaign branches still depend on their original timers and free-mind conditions.
* feat(ai): route capturing robots to building communicatorsValentin Popov2026-11-142-2/+13
| | | | Use the communicator triangles as an explicit approximation to the building approach. Share ownership and distributor transfer with player capture. Single.01 reaches the target XY in terrain routing, with the interior height gap still blocking transfer. The capture check rejects the wrong floor.
* feat(ai): send scripted capturers toward hostile buildingsValentin Popov2026-11-142-0/+9
| | | | Single.01 dispatches its placed warbot and later factory robots from stock startup. Approach uses the shared movement task. Ownership transfer, native approach points and the script completion expressions remain open.
* fix(ai): preserve raw script problem argumentsValentin Popov2026-11-141-4/+7
| | | | Keep the target logical ID across Handler(2) and Handler(29). Verified slots 0, 1 and 2 with GOG ai.dll at RVA 0xc182. Single.01 now distinguishes nearby building IDs and leaves robot selection as the next blocker.
* feat(ai): select targets for scripted capture requestsValentin Popov2026-11-142-0/+16
| | | | Confirm the target ranking, duplicate exclusion and strength output with GOG ai.dll at RVA 0xc847. Single.01 reaches PBM_BUILDING_CAPTURE from its stock start. The executor selection remains pending.
* feat(ai): evaluate clan combat strength in scriptsValentin Popov2026-11-142-0/+9
| | | | Use the live roster and Control weapon and capacity data in Handler(38). The original ai.dll rating formula was exercised with three capacity vectors. Single.01 reaches Handler(35) and retains factory production. Remaining ammunition and the exact selector 0x36 capacity are reported as an approximation.
* fix(ai): propagate problem priority to dependent ordersValentin Popov2026-11-141-0/+3
| | | | Read Handler(12) from the active problem, as verified by calling ai.dll. The Two Fortresses transport section now submits its dependent production request. Transport assignment and design selection are still uncovered.
* fix(ai): wait for the factory before restarting robot jobsValentin Popov2026-11-142-0/+4
| | | | Track the factory assigned by ST_SOLVING and the ACTION_NOTHING_DOING expression. Stock Single.01 completes the first robot at 27 seconds without duplicate busy-factory rejections. Keep other expression variants explicitly uncovered.
* feat(ai): honor clan construction class limitsValentin Popov2026-11-141-0/+3
| | | | Use the live per-class varset limits and roster count in Handler(11). Both enemy clans in stock Single.02 now request mines and enter their Start sections. Pending buildings and the hangar/lab counters are still uncovered.
* feat(ai): let clan scripts resume mining at existing shaftsValentin Popov2026-11-141-0/+3
| | | | Handle the free-mine lookup and the mine order in Problems0. Preserve a live shaft's deposit binding, claim nearby free reserves, and leave neighboring live shafts alone. Stock Single.02 now reaches the mine limit check instead of stopping on the lookup.
* fix(script): copy live DWORD values between script cellsValentin Popov2026-11-141-0/+3
| | | | The native record-copy branch covers 73 DWORD-to-DWORD instructions in the shipped shared varset. Stock mission 11 now copies the protection request value and reaches group assignment at Handler(25).
* fix(ai): check scenario deadlines in periodic clan scriptsValentin Popov2026-11-141-2/+2
| | | | Share the Handler(59/60) implementation used by Mission. The stock campaign mission 12 advances from Handler(60) to Handler(47) over 120 seconds. The AI still approximates logical seconds with the mission clock.
* fix(production): let separate factories build concurrentlyValentin Popov2026-11-142-1/+4
| | | | Reserve each slot at order time and advance one order per live factory. Hostile completion no longer changes the player's status. A stock Two Fortresses regression starts the player's factory during an enemy job and observes completions from both.
* feat(ai): build battle robots from clan factory scriptsValentin Popov2026-11-142-0/+9
| | | | Route the construct order from PBM_ROBOT_NEEDED into shared factory ownership, free quota, and paid production. Stock Single.01 builds an enemy robot at 27 seconds in the fixed-step report and about 27.4 seconds in the Vulkan window. Count accepted and rejected orders by clan and factory; configured prebuild selection and the global order slot remain approximations.
* feat(ai): advance clan jobs past unloaded laboratory researchValentin Popov2026-11-142-8/+13
| | | | Bind placed units for the duration of a Start section and report the native unloaded-catalog result with a stub counter. Consider the other pending priorities so the stock factory and transport Start sections are reached.
* feat(ai): start the highest-priority clan script problemValentin Popov2026-11-142-4/+8
| | | | Open the matching Start section after Problems0, expose its arguments, and support completion and unreserved placed-unit selection. Two Fortresses enters its laboratory job and reaches Handler(6). Timing, ties and continuation remain explicit approximations.
* feat(ai): queue clan script problems by native identityValentin Popov2026-11-142-6/+7
| | | | Pass Handler(2) operands through the existing scheduler and require matching script sections. The stock Two Fortresses clan queues research, transport, and robot problems before its combat-strength query. Pending dispatch is counted by clan and problem kind.
* feat(script): query clan storage and follow forward jumpsValentin Popov2026-11-142-3/+11
| | | | Use live storage capacity for Handler(16), expose the unbound research policy as a counted Handler(56) stub, and honor forward control-3 jumps. Checked storage arithmetic, flag truthiness and raw jump behavior by calling ai.dll. Stock Single.01 now reaches problem submission.
* fix(mining): feed placed mines from nearby depositsValentin Popov2026-11-143-3/+11
| | | | Bind stock mines to TMA reserves within the Behavior collection radius and report the live clan reserve to Problems0. Verified extraction from stock Single.01 and preserved the Field Camp mine order. Single.01 reaches Handler(56) in the 120-second report and renders with clean Vulkan validation.
* feat(ai): read free clan power in problem scriptsValentin Popov2026-11-141-0/+5
| | | | The typed event host stores the finite or negative float result in the script cell. A direct call to ai.dll verifies available minus requested power. Single.01 evaluates the energy branch and reaches its mine resource query.
* fix(ai): report unloaded research status during problem checksValentin Popov2026-11-141-0/+2
| | | | Handler(65) can continue with the native unloaded-catalog result, with an explicit per-clan count. A direct ai.dll call confirms the unloaded and no-table guards. Single.01 now reaches the float resource result.
* feat(ai): expose clan roster counts to problem scriptsValentin Popov2026-11-141-0/+6
| | | | Handler(49) counts free native-format startup slots and Handler(34) reads the live clan roster. The Two Fortresses reaches the research-dependent Handler(65) from every scheduled Problems0 invocation.