Provenance and verify
What the stamp on a generated asset holds, the drifts verify reports, and the four lint rules.
The stamp
Every asset DreamFX generates carries a provenance record:
| Field | Answers |
|---|---|
| Source path | which .dfs this asset came from |
| Source hash | whether that source has changed since |
| Generator version | which DreamFX built it |
| Module version GUIDs | whether the modules it calls have changed since |
The stamp has three direct uses: skipping unchanged sources (build), finding things out of step (verify), and recognising a generated asset — which is how the Content Browser menu knows to offer "Open Source" instead of "Export".
Where the source is recorded
The stamp is package metadata on the asset, so it is saved and committed with it. It holds no absolute path: generated assets are committed, often into other repositories, and a path on the machine that built one would carry that machine's drive and user name along. The source is recorded as a root and a path inside that root:
| Key | Holds |
|---|---|
DreamFX.SourceRoot | Game for the project's FX source directory (DreamSource/FX/, or DFX/ before a migration), Plugin.<Name> for a plugin's (the spelling Root= uses), Project for a source outside every source directory but inside the project directory, empty for a source outside the project |
DreamFX.SourcePath | the path inside that root, e.g. FX/NS_DreamCityFallingLeaves.dfs; only the file name when the root is empty |
DreamFX.SourceHash | the source hash, including the .dfe files and parents it reads |
DreamFX.GeneratorVersion | the generator version |
DreamFX.ModuleDependencies, DreamFX.ModuleVersions | the modules used, and the version of each |
DreamFX.PlanDigest | the incremental build baseline (systems only) |
The file is found when a command needs it — Open Source, Rebuild from Source, Verify, Write Back to
Source, the link on the generated-asset banner: the root is looked up among this machine's roots
(Project is the project directory) and the path is joined to it. The same tree checked out
anywhere else is the same location, so an asset built on one machine is up to date on another and
opens its source there. The root is recorded by name, not by folder, so moving the sources from
DFX/ to DreamSource/FX/ leaves every stamp current.
Moving or renaming a source without changing its text changes its location, so the next ordinary build regenerates the asset and rewrites the stamp. Verify does not compare locations.
A source outside the project has no location that means anything elsewhere, so only its file name is recorded. Such an asset builds and verifies as usual, but the editor commands cannot find its source. Keep sources under a source directory.
Stamps written by older DreamFX versions
Older versions also stored DreamFX.SourceFullPath, the absolute path on the machine that built the
asset. It is still read: when the root and path do not lead to a file, a command falls back to it. A
stamp that still carries it counts as out of date, so the next build of each such asset
regenerates it once and saves it without the key. verify neither reports it nor rewrites it. To
clear a whole tree in one pass, run dfx.ps1 build -All and commit the rebuilt assets.
Those older versions decide whether an asset is generated by looking for that key. Opened in one of them, an asset built by this version shows Export .dfs instead of Open Source; its builds still recognise it as up to date.
What verify catches
pwsh -File Plugins/DreamFX/.skill/dfx.ps1 verify -AllIt writes nothing — not the asset, not the stamp — and only compares. .dfe files are skipped: they
generate no asset, so there is nothing to compare.
| Code | Meaning |
|---|---|
| DFX7001 | the asset carries no DreamFX stamp: it was never generated from this source, or it was made by hand |
| DFX7002 | the asset is stale: it was generated from a different revision of this source |
| DFX7003 | the asset was generated by an older DreamFX (a warning; a rebuild is recommended) |
| DFX7004 | the asset does not exist: this source has never been built |
| DFX7005 | module version drift (an error under -StrictVersions) |
Note:
verifyis the one step of the four-step CI that can catch this: someone edited a.dfs, did not rebuild, and committed both.buildalone never fails on it, because build fixes it. Only comparing the stamp against the source shows that the committed asset and the committed text disagree.
-StrictVersions promotes an R7 module version mismatch from warning to error. A release gate wants
that: assets built against different modules than the text describes must not ship.
The four lint rules
Lint reads source only and touches no asset, which is why it is the fastest step to fail:
| Code | Catches |
|---|---|
| DFX7101 | a GPU emitter with no FixedBounds. GPU emitters cannot compute their own bounds |
| DFX7102 | rate-based spawning (SpawnRate / SpawnPerUnit / SpawnPerFrame) with no upper bound |
| DFX7103 | randomness without Determinism = true, so it looks different on every run |
| DFX7104 | a renderer with no Material and no default DreamFX knows for its type — it will not draw |
Note:
DFX7102 does not treat
SpawnParticlesInGridas rate-based spawning: likeSpawnBurstit is a per-loop burst (X·Y·Z), bounded by the loop. A lint rule has to track the semantics, or it becomes noise.
The same thing from the editor
Tools ▸ DreamFX ▸ Verify DFX runs the same pass and reports one toast:
| Toast | Condition |
|---|---|
DreamFX: {N} source(s) verified, all assets in step. | clean |
DreamFX: {Drifted} of {N} source(s) out of step ({Failed} failed). See the Output Log. | drift or failure |
What happens if you hand-edit a generated asset
The next rebuild wipes it, without asking. That is not a defect — it is the definition of the model: the text is the only truth.
A generated asset shows a warning banner in the editor with a link to its source file. Edit it there.
The build pipeline
What a build actually does — discovery, ordering, schema probing, writing, the Niagara compile, saving, stamping, and why an unchanged source is skipped.
Round trip and equivalence
The decompilation contract, how a gap surfaces, what each of the four verification layers answers, and three lessons in "all green is not the same as correct".