aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/production.rs
Commit message (Collapse)AuthorAgeFilesLines
* feat(ui): inspect the current factory projectValentin Popov3 days1-0/+2
|
* feat(ui): run repeating strategic factory ordersValentin Popov3 days1-14/+41
|
* feat(ui): transfer designer projects to strategic factoriesValentin Popov3 days1-6/+20
|
* feat(ui): stop an active strategic factory orderValentin Popov3 days1-4/+30
|
* feat(ui): show strategic factories and order a warbotValentin Popov3 days1-0/+5
|
* feat(ui): build factory projects from a selected chassisValentin Popov3 days1-4/+2
| | | | | | Use researched chassis that fit the selected factory and populate a new Unit DAT from the chassis Control slots and stock default parts. The designer can remove the old chassis, preview the new model, edit its internal parts, and transfer it to the factory. Verified the stock start of Field Camp: remove S-12w, select S-31, install another battery, and queue the resulting project with Vulkan validation enabled.
* feat(factory): register new designs in a running missionValentin Popov3 days1-37/+63
| | | | Load control devices and visuals for saved Unit DAT designs, keep the project bytes pinned for later orders, and select mine reserve drafts by identity. The Field Camp runtime test registers a design without a startup reserve, supplies the factory from a new mine, and checks the released mounts and devices. Stock mission window starts with Vulkan validation clean. Connecting the in-game designer order and world rendering is the next step.
* feat(ui): preview new warbot geometry during a missionValentin Popov3 days1-6/+15
| | | | On stock Field Camp, open a compatible Unit DAT created after start, resize the preview, switch to a resident project, reopen the new project, and return to the mission with Vulkan validation clean. The factory reserve for new geometry is still prepared at mission load.
* feat(ui): open saved warbot projects with distinct geometryValentin Popov3 days1-8/+69
| | | | Prepare saved Unit DAT geometry alongside factory reserves at mission entry and expose compatible, researched files through the designer. Verified a single-gun assembly in the Field Camp window and after factory release with the ore and power supply established in the test.
* feat(ui): save and reopen warbot projectsValentin Popov3 days1-2/+5
| | | | Use original designer art and names for named Unit DAT files. Restore researched designs onto the prepared mounts of a compatible factory scheme. Verified saving, restoring and ordering from the Field Camp window, and production after decoding the saved design in the Constructor.
* feat(ui): edit installed warbot equipmentValentin Popov3 days1-16/+117
| | | | Choose researched internal equipment per mount and build the resulting Unit DAT with the projected Control devices. Verified pointer selection and order in Field Camp with Vulkan validation, and produced the edited two-gun design at the Constructor factory.
* feat(ui): render assembled warbots in the designerValentin Popov3 days1-6/+11
|
* feat(ui): open and transfer recent factory designsValentin Popov3 days1-0/+15
|
* fix(ui): preserve native recent factory project orderValentin Popov3 days1-64/+1
|
* fix(ai): resume building capture after losing its assigneeValentin Popov4 days1-3/+3
|
* feat(factory): offer starter warbots on missions without designsValentin Popov4 days1-2/+4
| | | | Assemble compatible starter designs from local template layouts and the player clan technology table. Keep those layouts out of enemy factory fallback selection. The Constructor replay walked from spawn, captured the factory, ordered from the communicator, boarded the released warbot and won after capturing the hangar. The interactive constructor remains open.
* fix(ai): choose fast combat designs for factory ordersValentin Popov4 days1-17/+56
| | | | | | Prepare a combat catalog entry for SELECT_FASTEST alongside SELECT_STRONGEST. Rank the fast choice using the projected Control forward limit and preserve catalog order on ties. The GOG selector picks 12hel1.dat from the initial scream catalog. Both newly built small factories in Third Part now complete that design from a stock start.
* fix(factory): allocate orders within the selected design reserveValentin Popov8 days1-10/+42
| | | | The renderer prepares eight roots per design. Remove the additional shared gate that blocked an unrelated player blueprint when enemy designs filled eight roots. The licensed allocation case and a stock Vulkan window order through release both pass.
* test(factory): use communicator floors in the paid order fixtureValentin Popov9 days1-9/+15
| | | | The Field Camp fixture used the previous height of the factory communicator. Take its standing point and the bunker standing point from their loaded floors. This restores the licensed test for completing four paid orders and releasing the scripted patrol.
* feat(factory): order schemes with selected internal partsValentin Popov9 days1-21/+39
| | | | On the stock Constructor map, walk to the factory communicator, claim it, order the revised scheme, and walk back outside. The released custom robot advances the production objective. Check that an unresearched part prevents a new custom order before it uses the free quota.
* fix(factory): rank researched combat designs for clan ordersValentin Popov9 days1-7/+58
| | | | Use the clan technology table to qualify candidates for SELECT_STRONGEST, then compare their projected Control endurance and weapon banks. The stock Two Fortresses factory releases 12spd1.dat in about ten seconds. Checked the selector with the original DLL, the first release and reservation in licensed tests, and the new model in the game window.
* feat(factory): release assembled warbots above the roofValentin Popov9 days1-31/+28
| | | | Find the factory roof with a vertical ray, apply the native height offsets, and keep the departure task active through descent and apron clearance. Verify both stock Two Fortresses factories and transport delivery, and check the descent in a fixed-camera Vulkan run.
* feat(production): let new units clear the factory before taking ordersValentin Popov9 days1-4/+29
| | | | The exterior path reuses shared steering, terrain support, and traffic checks. The stock Two Fortresses test observes completed departures and an ore delivery. Validate a window run from mission start.
* fix(production): wait for a clear ground release pointValentin Popov9 days1-3/+38
| | | | Validate stock completions from Single.01 with Vulkan validation and check produced hulls against live occupancy. The licensed long transport scenario still fails at storage unloading with both the previous and the new release point.
* fix(research): advance laboratory Control energy budgetsValentin Popov9 days1-2/+2
| | | | | | | | | | | | | | | | | | | | Paid laboratory work read a work-device coefficient that never received a Control budget update. Run the recovered resource clock and budget for laboratories as well as factories, so energy work follows the actual device allocation. Generalize the state and report counters to control_resource_*. A licensed outage regression drains the lab reserve and removes external power: energy work stays fixed while task time advances, then resumes when the original generation is restored. Stock research for both AI clans, player free research and paid factory production still pass. The original laboratory task reaches its class-3 Control owner, whose native budget runs on the same quarter-second resource path as the factory. Verified this in the running stock mission through Behavior 0x2f76e and Control 0x2d340. Workspace fmt/check/tests and release build pass. All 29 stock missions run 900 seconds without script or resource-budget stops. A stock mission-28 window completes paid technologies and starts subsequent projects. Control initial phase, RNG seed, other owners and global ordering remain approximate.
* fix(production): use Control energy budgets for factory workValentin Popov9 days1-9/+39
| | | | | | | | | | | | | | | | | | | | Factories now run the recovered Control resource-budget pass on its own randomized clock before Behavior task updates. Paid production reads its current work-device E00 value, including the local power reserve and allocation, instead of gating full speed on any clan generation. The clock redraws jitter on every accepted frame and uses a separate Control RNG. Initial phase, seed and ordering with other owners remain explicit approximations. Budget failures preserve the table and are counted per owner. Original DLL calls verify the budget callbacks, strict deadline, per-call RNG, forced update and inactive baseline. A live class-3 factory executes the same budget with the default 250 ms setting. Licensed regressions cover an empty factory power reserve, subsequent generator capture, four completed paid orders, the Behavior task deadline and scripted warbot/transport/builder births. Workspace fmt/check/tests and release build pass. All 29 stock missions run 900 seconds without script or new budget stops. Stock mission 28 accepts and completes a free and then a paid player order in the Vulkan-validation window.
* fix(production): pace factory tasks with the Behavior timerValentin Popov9 days1-3/+94
| | | | | | | | | | | | | | Factory orders used to advance on every render/headless step, although the ore request contains a per-call increment. Gate active free and paid orders with the shared Behavior 1/1 task clock, without catch-up updates. Report admitted steps per clan and factory; idle owner phase and full RNG ordering remain explicit approximations. Live GOG Behavior.dll calls at RVA 0x2a4f0 pass through 0x34a30 and 0x54a0 with timer words 1/1. A licensed regression verifies the strict deadline and resource pull; paid production and scripted warbot, transport and builder regressions pass. Workspace fmt/check/tests and release build pass. Stock 29-mission simulation and a stock mission-28 window check cover integration.
* feat(ai): build requested builders from the clan catalogValentin Popov9 days1-20/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scripted builder requests could not reach production: Handler(15) only accepted warbots/transports, and the factory searched player prebuilds for a builder. Prepare a clan's unique qualified builder design alongside its transport design and allow that class through the factory order callback. Register the produced builder's logical ID and ore state so clan queries and construction tasks can use it. Rename the shared design module by its factory mechanic and retain the existing single-qualified-design boundary. Native evidence: GOG ai.dll SHA-256 c19cd6cd31cd2896f8c4ba0f0e700dd3408aec8182daaf4863d98a7d233a2abc, selector RVA 0x107c0, selects sml_bldr.dat for class 0x01004000 / SELECT_FASTEST from a captured stock Single.01 catalog; clearing its eligibility rejects the request. The same call still selects sml_cargo.dat for transport. Ore initialization reuses the previously executed Behavior RVA 0x8790 class initializer; this does not prove the full native factory lifecycle. Validated fmt, workspace check/tests, release build and all 29 stock --sim-report 900 runs. The licensed regression first exposed the missing scheme, then caught the remaining callback class gate. It now removes the starting builder as a debug casualty, lets the real scenario request its replacement, and checks its birth, owner, clan registration and ore state. The adapted transport regression also passes the joint player/AI queue, player scheme visibility and transport cargo checks with the shared list. Window checks: normal stock mission 28 ran with continuing research and production. A separate debug copy transferred the old builder and moved the hero near the factory; the scenario ordered and visibly produced sml_bldr.dat, then reached a construction request with the new builder. These debug conditions do not establish mission acceptance from stock start. Temporary roots were removed and the original probe's map restored. Handler(58) remains explicit: its candidate predicate still needs Control 0x209/0x20c, next-stage BuildDat lookup and builder order 0x18. Native AI priorities/full chronology, multi-design ranking/RNG and factory timing remain approximate. A live native sample yielded other unit births, so it is not evidence of native builder replacement timing or starting cargo.
* fix(ai): account for occupied clan mind slotsValentin Popov9 days1-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Handler(49) read the immutable Init snapshot and always reported all clan minds as free. Project occupied slots from live mobile units (including the hero) and valid factory reservations, including orders queued in the current script pass. Unit loss, capture and factory ownership loss release capacity. Expose per-clan query counts and current capacity/free/reserved values through script_free_minds_approx; retain explicit native-ID and admission boundaries. GOG ai.dll SHA-256 c19cd6cd31cd2896f8c4ba0f0e700dd3408aec8182daaf4863d98a7d233a2abc: native calls to Handler(49), RVA 0xdb2e, confirm that only 0xffffffff is free. In stock Single.01 clan 1 starts with five occupied slots out of nine. Hardware watches in Behavior.dll SHA-256 ddfbdbde07832358fe6e35e01c8dba9b58e7313789498b6049ed51d4ed9baf99 show the factory reserve zero at RVA 0x2a0bb and release it at 0x2a7e5 before birth. Validated fmt, workspace check/tests, release build, ordinary lifecycle tests and an ignored licensed Single.01 test covering startup, order, birth and factory ownership loss. All 29 stock missions finish --sim-report 900 without new script stops. Stock mission 28 also ran in the window: four orders now fill the clan instead of the previous eight over the simulation interval. This does not establish complete mission playthrough or full AI parity. Warbot design ranking still uses the explicit compatible-prebuild fallback; factory logs now include the requested class and selection mode. Native mind IDs, full-capacity order admission and factory timing remain approximate.
* fix(ai): advance clan cycles when units registerValentin Popov10 days1-6/+5
| | | | | | | | | | | | | | | Advance the signed AI deadline by 1400 ms when an active clan receives a new unit. Connect production, construction, mines, reinforcements and ownership transfers through the shared spawn path. Preserve negative deadlines and count registration notifications per clan. Move the common spawn code and result type out of AutoDemo without changing its public API. Native ai.dll calls cover duplicate and missing IDs, the disabled guard, both registration kinds, negative deadlines and unchanged RNG. A live original warbot registration confirms the same advance. Workspace checks, the licensed stock factory timing test and all 29 900-second reports pass; a stock mission-28 window runs through successive factory outputs. Initial clock phase, complete RNG ordering and full G7 chronology remain open.
* feat(ai): construct clan factories, storage and laboratoriesValentin Popov10 days1-16/+24
| | | | | | | | | | | | | | | | 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.
* feat(ai): execute tower construction ordersValentin Popov2026-11-141-3/+3
| | | | | | 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): carry ore from clan mines to storageValentin Popov2026-11-141-0/+60
| | | | 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-141-8/+63
| | | | | | 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.
* fix(ai): wait for the factory before restarting robot jobsValentin Popov2026-11-141-0/+7
| | | | 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.
* fix(production): let separate factories build concurrentlyValentin Popov2026-11-141-16/+50
| | | | 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-141-2/+63
| | | | 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(game): order robots remotely at allied factoriesValentin Popov2026-11-141-23/+78
|
* feat(game): let players choose factory robot schemesValentin Popov2026-11-141-46/+129
|
* feat(runtime): enable free technology orders at laboratoriesValentin Popov2026-11-141-29/+15
|
* feat(runtime): use the mission prebuild for factory ordersValentin Popov2026-11-141-2/+55
|
* feat(runtime): execute scripted place patrol ordersValentin Popov2026-11-141-4/+56
|
* feat(runtime): deploy mines and supply ore to factoriesValentin Popov2026-11-141-19/+23
|
* feat(runtime): build factory robots with ore and powerValentin Popov2026-11-141-26/+369
|
* fix(runtime): recognize the generator capture platformValentin Popov2026-11-141-0/+1
|
* feat(runtime): support successive factory robot ordersValentin Popov2026-11-141-20/+34
|
* feat(runtime): build a free robot at a captured factoryValentin Popov2026-11-141-0/+215