Documentation
Docs/en/reference/particle-format/integration.md
Particle Integration Contract
Generated reference. Do not edit this page directly. Update
BuildTools/ParticleFormatInterface.json, then runpython BuildTools/docs_particle_format.py --write.
| Reference index | Source rules | Formats and backends | Rendering | Tooling | Runtime | Integration | Validation | Canonical JSON model | Guide | Authoring tools |
| Stable ID | Rule | Requirement | Why | Source |
|---|---|---|---|---|
particle-format.integration.sprite |
Sprite integration | Load particle sprites through ParticleSpriteFactory and let the backend choose atlas or direct-scene rendering. | The factory exposes enabled runtime extensions and constructs ParticleSprite from ParticleManager. | Source/Client/ParticleSprites.cpp |
particle-format.integration.model |
Model attachment | Use AttachParticles with a baked runtime resource and a valid model bone, then verify transforms and lifetime in a visible scene. | The model baker verifies the resource. Runtime poses the whole model hierarchy before prewarming its emitters so world-space particles are born at the target joint. | Source/Tools/ModelInfoBaker.cpp Source/Client/ModelInstance.cpp |
particle-format.integration.client-script |
Client script controls | Use the client API for seeded playback, prewarm, scale, or live critter-bone effects and handle a false result where the API reports one. | The exported methods narrow generic sprites to particle sprites before applying backend-neutral controls. | Source/Scripting/ClientGlobalScriptMethods.cpp Source/Scripting/ClientCritterScriptMethods.cpp |
particle-format.integration.bone-map-anchor |
Independent map sprite at a bone point | Call Critter.GetBoneMapAnchor in authored model units. Set one MapSpriteHolder’s Hex, Offset and DepthOffset from the current critter hex and both outputs. DepthOffset is finite, defaults to 0, uses logical map pixels and preserves XY; positive values are nearer. Reattach after rebuild. Invalid/unavailable anchors return false with sprite offset/zero depth; off-map critters throw. Keep the old 2D methods. | A bone point needs its posed physical depth; reconstructing it on the ground loses height. A cached model bitmap has a distinct submitted plane, so particles meeting the displayed model use GetBoneSpriteMapAnchor instead. | Source/Scripting/ClientCritterScriptMethods.cpp Source/Client/MapSprite.h Source/Scripting/ClientMapScriptMethods.cpp Source/Client/MapSprite.cpp |
particle-format.integration.bone-sprite-map-anchor |
Independent map sprite on the displayed model | Call Critter.GetBoneSpriteMapAnchor in authored bone-local units. It uses the same bone pose as GetBoneMapAnchor and resolves the submitted bitmap point and plane for an atlas model or the physical bone point for a direct scene model. Apply the current hex, Offset and DepthOffset to one holder and reattach after movement/rebuild. Hidden, unavailable or invalid anchors return false with sprite offset/zero depth; off-map throws. GetBoneMapAnchor keeps physical depth in both render modes. | An atlas model discards its physical per-pixel depth when copied to a bitmap. A physical bone depth can hide an independent particle behind its own displayed carrier. | Source/Scripting/ClientCritterScriptMethods.cpp Source/Client/SpriteManager.cpp Source/Tests/Test_ClientEngine.cpp |
particle-format.integration.item-map-anchor |
Independent map sprite on a visible item bitmap | Call Item.GetSpriteMapAnchor for the exact visible copy’s hex. localOffset uses logical sprite pixels relative to the draw root before rotation/projection. Set one MapSpriteHolder’s Hex to that same hex and use both outputs as Offset and DepthOffset. Flat/standing planes, authored roots and rounded elevation follow the renderer. Valid out-of-view hexes, unavailable/empty/direct-scene sprites and invalid or unrepresentable results return false with zero outputs. Off-map items or invalid hexes throw before changing outputs. Pixel alpha and frontmost picking remain caller-owned. | A separate holder needs the visible copy’s transformed point and plane depth; origin-only offsets and ground depth cannot represent them. | Source/Scripting/ClientItemScriptMethods.cpp Source/Client/HexView.cpp Source/Client/SpriteManager.cpp Source/Tests/Test_ClientEngine.cpp |
particle-format.integration.project-boundary |
Embedding-project ownership | Keep particle catalogs, visual policy, backend selection, resource provenance, performance budgets, and acceptance scenes in project documentation. | The Engine documents reusable mechanics but cannot define a game’s assets or production targets. | Source/Client/ParticleRuntime.h |
particle-format.integration.critter-run-particle |
Critter model particle | Critter.RunParticle requests a redraw and queues a named model-bone particle only in FO_ENABLE_3D builds; the export is a no-op otherwise. A valid full pose places each new system with Setup and Update(0), including callback-born systems before the current draw. Unposed attachment owners remain pending without drawing or expanding bounds; later pose deltas advance normally. | The script method depends on an active ModelInstance and is not a 2D critter-sprite fallback. | Source/Scripting/ClientCritterScriptMethods.cpp Source/Client/ModelInstance.cpp |
particle-format.integration.model-attachment |
.fo3d AttachParticles | A layer/value-selected .fo3d link stores a global baked .spk or .efk path and requires a valid target bone; it lives only while the selected link remains active. | ModelInfoBaker validates the resource and bone, and runtime creates/removes the particle with model composition. | Source/Tools/ModelInfoBaker.cpp Source/Client/ModelInstance.cpp |