Asset conversion lineage

Every accepted original format, its offline transformation, native extension, mapped ownership, and final Bevy or renderer handoff. Source archives stop at preflight; the game opens only the resolved .ozp profile.

Mapped custom assetsAll immutable archives remain ranges inside one Arc<MappedPack>. Bevy handles point to custom asset wrappers over those ranges.
Bevy-native zero-copyNone of Bevy’s stock payload assets currently borrow arbitrary mmap ranges. Where payload borrowing matters, OpenZT2 supplies the custom asset and preparation path.
Owned preparationOnly bounded metadata, decoder state, ECS components, or GPU resources are created. Payload-sized CPU Vec copies are limited to decoded video frames and save snapshots.
FamilyOriginal extension / inputPreflight transitionNative extension and rkyv rootResolved profileBevy asset boundaryCPU ownership after loadFinal handoff
Container.z2f (ZIP)central directory → normalize paths → later archive wins → inflate winner only.ozp PackHeader + sorted cataloguePage-aligned winning payloads and typed bindingsArc<MappedPack> shared by custom Bevy loadersmmap borrow No decoded copyAllocation-free catalogue lookup
Persistence.z2s original saveruntime boundary; never accepted as preflight content.ozs OpenZT2 snapshotOutside .ozpPersistence systems, not a Bevy content assetowned Vec Explicit save/load snapshotECS snapshot application
UI.xml .maxml .zt2 .trk .oldBFXML repair → semantic classification → widget, style, command and reference binding.ozui UiArchiveFlat nodes, child ranges, strings, bindings and dependenciesUiDocumentAsset (custom Bevy Asset)mmap borrow No second document treeOrdinary Bevy UI entities/components
Localization.xml .maxml .zt2decode → merge locale fragments → resolve fallback order.ozloc LocalizationArchiveSorted keys and string rangesLocalizationAsset (custom Bevy Asset)mmap borrowBorrowed localized strings
Behavior.tsk .beh and behavior XMLcompile task sets, subjects, callbacks and typed operations.ozbehavior BehaviorArchiveTask tables, subject joins and operation streamsBehaviorProgramAsset (custom Bevy Asset)mmap borrowFocused ECS behavior systems
World data.xml .maxml .zt2resolve inheritance, managers, catalogues, placeables and gameplay definitions.ozdefs WorldDefinitionsArchiveConsumer-shaped flat definition tablesWorldDefinitionsAsset (custom Bevy Asset)mmap borrowECS spawn and domain systems
Scenarios.xml .maxml .zt2compile campaigns, maps, objectives, rewards and scenario operations.ozworlds WorldScenarioArchiveScenario and map tablesWorldScenarioAsset (custom Bevy Asset)mmap borrowScenario lifecycle ECS systems
Species.xml .maxml .zt2compile species, needs, compatibility and authored defaults.ozspecies SpeciesArchiveSorted species and relationship tablesSpeciesCatalogAsset (custom Bevy Asset)mmap borrowAnimal prefab and lifecycle systems
Lua.luaparse supported Lua 5.0 source → typed behavior or scenario operations.ozbehavior or .ozworldsOperation streams joined to their authoritative ownerOwning mapped behavior/scenario assetmmap borrow No runtime Lua VMFocused ECS systems
Lua residue.bin compiled Lua twinvalidate against source twin → omitNot packedomittedSource-authored typed operations win
Schemas.xdrvalidate tooling schema → omit from runtimeNot packedomittedPreflight validation only
Launcher.dlread launcher metadata only → omitNot packedomittedPreflight UI metadata
Models.nif .bfbparse block graph → resolve hierarchy, materials and skeleton → write GPU vertex/index tables.ozmodel ModelArchiveGPU-ready vertex/index/meshlet ranges plus draw metadataModelAsset → custom GpuModelAssetmmap borrow Small boxed draw metadata onlyOne upload to wgpu buffers; no CPU Mesh
Scenes.nif .bfbflatten authored prefab hierarchy and dependencies.ozscene ScenePrefabArchiveFlat entities, child ranges, attachments, colliders and renderablesScenePrefabAsset (custom Bevy Asset)mmap borrowBevy entities and small components
NIF materials.nif embedded propertieslower each geometry’s resolved render properties and texture references.ozmaterial MaterialArchiveDeterministic per-geometry material recordsMaterialAsset → custom GpuMaterialAssetmmap borrow Small uniform/IDs preparedwgpu uniform and texture bind groups
Rigging.nif .bfb skeleton dataresolve joint order, inverse bind pose and skin weights into model contract.ozmodel ModelArchive skeleton tablesSkeleton identity also keys animation binding catalogueModelAsset plus ECS SkinnedPosemmap borrow Pose buffer is bounded owned stateSkinned render shader
Animation.bf .kfparse clips/controllers → join to resolved skeleton → quantize key tables.ozanim AnimationArchiveTracks, keys, clips and skeleton bindingAnimationAsset (custom Bevy Asset)mmap borrow Bounded pose scratch onlyECS animator sampling → skin palette
Animation graph.bfmcompile graph, transitions, sequences and clip references.ozanim AnimationArchive graph tablesGraph data co-located with clip contractAnimationAsset (custom Bevy Asset)mmap borrowECS animation graph state
Animation events.txtkeysparse authored key events → compile sorted marker table.ozanim AnimationArchive event tablesMarkers share clip identityAnimationAsset (custom Bevy Asset)mmap borrowBevy animation messages
Animation residue.kfm .kfinfo .bipvalidate exact authored residue and preferred same-stem source → omitNot packed independentlyomittedResolved .ozanim owns behavior
Materials.bfmatparse parameters → resolve textures, modes and fixed-function render state.ozmaterial MaterialArchiveFlat parameters, texture IDs and render stateMaterialAsset → custom GpuMaterialAssetmmap borrow Tiny uniform/ID arrays preparedwgpu pipeline and bind groups
Shaders.fx .hparse supported technique vocabulary → validate variants → compile GPU modules.ozshader ShaderArchivePreflight-produced module bytes and variant tablesShaderAsset (custom Bevy Asset)mmap borrowBorrow module bytes for pipeline creation
Effects.fx .h .psyscompile emitters, modifiers, curves, clocks and dependencies.ozeffect EffectArchiveFlat effect tablesEffectAsset (mapped) → Bevy Hanabi assetsbounded Vec Hanabi graph/modifiers once; payload stays mappedBevy Hanabi particle simulation/rendering
Textures.ddstranslate identifiers → validate authored mips → preserve compatible BC blocks; convert only unsupported branch.oztexture TextureArchiveTight GPU subresources; no pad/unpad cycleTextureAsset → custom render preparation → Bevy GpuImagemmap borrow No Bevy Image.data copyOne upload from &[u8] to wgpu texture
Textures.tga .bmp .jpg .jpeg .curdecode offline → generate mips only when absent/invalid → encode target-native GPU format.oztexture TextureArchiveTight GPU subresourcesTextureAsset → custom render preparation → Bevy GpuImagemmap borrow No decoded runtime image VecOne upload from mapped bytes
Image residue.psdnot an original runtime loader input; audit and omitNot packedomittedNo runtime path
Audio.wav .wavedecode offline → small resident PCM16 or large streamed Vorbis according to usage policy.ozaudio AudioArchivePCM or encoded stream payload with timing/loop metadataAudioAsset + custom Bevy NativeAudioSourcemmap borrow Decoder cursor owns no payload copyBevy AudioPlayer / rodio decoder
Audio.mp3validate headers, duration and loop policy → retain authored MP3 bytes.ozaudio AudioArchiveAuthored MP3 stream plus metadataAudioAsset + custom Bevy NativeAudioSourcemmap borrowBevy AudioPlayer / rodio MP3 cursor
Audio metadata.gpkparse envelope → resolve owning encoded clip, cues, aliases and stages.ozdefs audio corpus tables + referenced .ozaudioAssociations only; duplicate envelope bytes omittedMapped definitions and audio handlesmmap borrowAudio cue ECS systems
Video.bikFFmpeg/libav demux and decode → colour conversion → native AV1 packets.ozvideo VideoArchiveBlocked until approved Bink frontend/backend is installedVideoAsset + bounded decoder pooldecoded Vec Reused frame slots onlyReusable Bevy GPU images
Terrain.datparse height/cell data → orient units → compile tiles, layers, water and bounds.ozterrain TerrainArchiveFlat terrain chunks and GPU rangesTerrainAsset (custom Bevy Asset)mmap borrowTerrain entities, sampling and renderer upload
Navigation.dat plus resolved world definitionsderive immutable navigation topology offline.oznav NavigationArchiveCompact cells, links and lookup rangesNavigationAsset (custom Bevy Asset)mmap borrow Per-agent routes are bounded ECS stateLocomotion/pathfinding systems
Residue.txt .corelog .bat and extensionless entriesaudit corpus role → omit when no original runtime owner existsNot packedomittedNo runtime path
FontsOS font API; no archive extensionresolve recovered alias, size and fallback policyExternal boundary; no invented font archiveNot packed as source contentOrdinary Bevy text/font and glyph-cache pathBevy owned Platform/font cache dataBevy text renderer
Custom Bevy Asset borrows mapped rkyv bytesBevy-native ownership/handoffBounded owned preparationValidated then omittedBlocked route

The Vec fields visible in converter-side Rust structures are archive-construction inputs. After rkyv serialization they are archived vectors traversed in place; they are not reconstructed as runtime heap vectors. Small handle arrays, draw metadata, pose buffers, decoder state, and GPU objects are deliberate runtime state rather than copies of source payloads.