aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-07-18 21:18:49 +0300
committerValentin Popov <valentin@popov.link>2026-07-18 21:18:49 +0300
commit14096788fccf47e24a93d7b13f8124e84381f339 (patch)
tree8d3755a209fb2f58ecb76208becc1153bd5efcc4 /docs
parentd91e63fa9a5d311b8c4e398da2b0d91ecc6f9c9a (diff)
downloadfparkan-14096788fccf47e24a93d7b13f8124e84381f339.tar.xz
fparkan-14096788fccf47e24a93d7b13f8124e84381f339.zip
feat(runtime): apply clan init varsets
Diffstat (limited to 'docs')
-rw-r--r--docs/appendices/script-vm.md9
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/appendices/script-vm.md b/docs/appendices/script-vm.md
index dbcd539..59c1512 100644
--- a/docs/appendices/script-vm.md
+++ b/docs/appendices/script-vm.md
@@ -204,11 +204,14 @@ during mission loading: each selected clan's TMA anchor is accepted only in the
`0..=10000` base range, truncated through the recovered x87 rule, and paired
with its zero-based clan index. For every `Init` instruction whose selector is
`Handler(19)`, `VarSet::resolve_handler19` produces the three per-clan DWORD
-immutable `MissionScriptInitState` writes. Other Init selectors and all other events remain decoded but
-unexecuted. AutoDemo validates the path end-to-end: its non-integral first
+writes. The runtime then materializes an independent declaration-ordered value
+array for each selected clan and applies those writes, so later recovered
+handlers can consume `ClanBaseX`, `ClanBaseY`, and `ClanID` as runtime cells
+rather than loader defaults. Other Init selectors and all other events remain
+decoded but unexecuted. AutoDemo validates the path end-to-end: its non-integral first
anchor (`500.2857`) yields captured `ClanBaseX=500`, and the live GOG process
contains two initialized SuperAI entries `(500, 752, 0)` and `(728, 449, 1)`;
-the Rust loader reports `script_init_states=2`.
+the Rust loader reports `script_init_states=2` and `script_varset_states=2`.
`GetSuperAI` returns element `n` of the 64-pointer global table at preferred
`ai.dll + 0x55398` for `n <= 63`. The read-only