<feed xmlns='http://www.w3.org/2005/Atom'>
<title>fparkan/crates/fparkan-runtime/src/construction.rs, branch trunk</title>
<subtitle>Utilities and tools for the game "Parkan: Iron Strategy".
</subtitle>
<id>https://git.popov.link/fparkan/atom?h=trunk</id>
<link rel='self' href='https://git.popov.link/fparkan/atom?h=trunk'/>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/'/>
<updated>2026-11-26T12:49:57+00:00</updated>
<entry>
<title>refactor(terrain): share BAS projection for live building poses</title>
<updated>2026-11-26T12:49:57+00:00</updated>
<author>
<name>Valentin Popov</name>
<email>valentin@popov.link</email>
</author>
<published>2026-11-26T12:49:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/commit/?id=bd9d7926768296ebad9f64550ede7cd840e6e5c8'/>
<id>urn:sha1:bd9d7926768296ebad9f64550ede7cd840e6e5c8</id>
<content type='text'>
Move the authored contour projection out of the app so the same geometry can be prepared from an initial root or a live construction pose. The licensed stock Third Part construction test builds the real factory foundation and verifies that the original ground surface drops out beneath it. Constructor's normal Vulkan start retains clean validation.
</content>
</entry>
<entry>
<title>fix(render): reveal buildings when scripted construction ends</title>
<updated>2026-11-26T12:32:40+00:00</updated>
<author>
<name>Valentin Popov</name>
<email>valentin@popov.link</email>
</author>
<published>2026-11-26T12:32:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/commit/?id=ce3348883350d21821aed720a098b8515077564d'/>
<id>urn:sha1:ce3348883350d21821aed720a098b8515077564d</id>
<content type='text'>
Publish completed constructions with the same fresh world snapshot that the render tick consumes. Activate their prepared render roots and collision bindings through the existing spawn path. An unmodified Third Part start shows the actual factory appearing on the site between two Vulkan frames. Terrain rebuilding for a new basement remains open.
</content>
</entry>
<entry>
<title>fix(movement): carry frame time across route waypoints</title>
<updated>2026-11-26T00:54:04+00:00</updated>
<author>
<name>Valentin Popov</name>
<email>valentin@popov.link</email>
</author>
<published>2026-11-26T00:54:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/commit/?id=683d970343383d63eeb22219080c190769f888b1'/>
<id>urn:sha1:683d970343383d63eeb22219080c190769f888b1</id>
<content type='text'>
Route following now spends the same frame interval on turning and all reachable waypoints. Go, Patrol and pursuit keep their existing speeds and share this step. Stop counting the obsolete per-waypoint time loss.

Verified with the corner route regression, workspace checks, release AutoDemo in a window, and two-minute AutoDemo and Single.01 smoke runs. Obstacle avoidance, locomotion animation and comparison with the original remain open.
</content>
</entry>
<entry>
<title>feat(ai): build requested builders from the clan catalog</title>
<updated>2026-11-25T18:01:53+00:00</updated>
<author>
<name>Valentin Popov</name>
<email>valentin@popov.link</email>
</author>
<published>2026-11-25T18:01:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/commit/?id=547a4b1386ae022ba3c5f918f0903410cfc3040e'/>
<id>urn:sha1:547a4b1386ae022ba3c5f918f0903410cfc3040e</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>fix(ai): advance clan cycles when units register</title>
<updated>2026-11-25T15:41:17+00:00</updated>
<author>
<name>Valentin Popov</name>
<email>valentin@popov.link</email>
</author>
<published>2026-11-25T15:41:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/commit/?id=85474bcd60f66b610985c90a697351837208528b'/>
<id>urn:sha1:85474bcd60f66b610985c90a697351837208528b</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>feat(ai): resupply scripted builders before construction</title>
<updated>2026-11-25T13:04:13+00:00</updated>
<author>
<name>Valentin Popov</name>
<email>valentin@popov.link</email>
</author>
<published>2026-11-25T13:04:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/commit/?id=a4a9b7a6478c9c1efcf0aef8b37464dc0e5b339e'/>
<id>urn:sha1:a4a9b7a6478c9c1efcf0aef8b37464dc0e5b339e</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>feat(ai): execute scripted mine construction</title>
<updated>2026-11-25T12:14:57+00:00</updated>
<author>
<name>Valentin Popov</name>
<email>valentin@popov.link</email>
</author>
<published>2026-11-25T12:14:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/commit/?id=68b1043749b58e39d671e3937eef73430cbc0ab8'/>
<id>urn:sha1:68b1043749b58e39d671e3937eef73430cbc0ab8</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>feat(ai): construct clan factories, storage and laboratories</title>
<updated>2026-11-25T11:41:21+00:00</updated>
<author>
<name>Valentin Popov</name>
<email>valentin@popov.link</email>
</author>
<published>2026-11-25T11:41:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/commit/?id=7a7001c96afdbe0e5d574337bec476f230692477'/>
<id>urn:sha1:7a7001c96afdbe0e5d574337bec476f230692477</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>fix(ai): account for pending construction in class limits</title>
<updated>2026-11-25T11:20:46+00:00</updated>
<author>
<name>Valentin Popov</name>
<email>valentin@popov.link</email>
</author>
<published>2026-11-25T11:20:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/commit/?id=27d6ea19b0206b71ef6c309142e0875275882bf0'/>
<id>urn:sha1:27d6ea19b0206b71ef6c309142e0875275882bf0</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>feat(ai): execute tower construction orders</title>
<updated>2026-11-14T20:18:34+00:00</updated>
<author>
<name>Valentin Popov</name>
<email>valentin@popov.link</email>
</author>
<published>2026-11-14T20:18:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/commit/?id=66c02b87b96e63d3cfce29c8ca33a2bb28662ec6'/>
<id>urn:sha1:66c02b87b96e63d3cfce29c8ca33a2bb28662ec6</id>
<content type='text'>
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.
</content>
</entry>
</feed>
