OpenZT2 Original Game Functional Specification
The Rust reconstruction preserves Zoo Tycoon 2's product-domain contract: native types, source-hydrated data, runtime managers, hardcoded message/method surfaces, and adapter boundaries.
- source data from Z2F XML/MAXML, localization, scripts, materials, models, sounds, and scenario files remains data driven;
- native C++ managers, widget classes, message handlers, registries, mode classes, and algorithms remain native-domain contracts;
- renderer, audio, windowing, archive, parser, script, and OS mechanics may be replaced only behind adapters that preserve the original contracts.
Named native types are registered with a known name, parent, and owner domain. The architecture is described at the product-domain level: inheritance, source data, runtime ownership, message surfaces, state transitions, and host-adapter boundaries.
Architecture At A Glance
Every concrete game object is a BFTyped object; almost everything is a BFComponent.
Authored Z2F data hydrates these objects; singleton managers interpret them; the
renderer/audio/host layers project them behind a preservation boundary. The class names
in each layer are registered native types.
flowchart TB Source["Shipped source data
Z2F XML/MAXML, AI .tsk/.beh, scenarios, Lua,
ui/layout, skins, lang, materials, models, sounds"] Runtime["Generic source runtime
BFResourceMgr, BFXMLObj/BFXMLDocument, BFXMLSchemaMgr,
BFLocaleMgr, BFTypedBinder, register_type"] Mgrs["Native game managers
ZTApp, ZTWorldMgr, ZTAIMgr, ZTEconomyMgr,
ZTDiseaseMgr, ZTScenarioMgr, ZTResearchMgr"] State["Runtime domain state
entities (component graphs), AI tokens, world grid,
UI widget tree, profile/save/scenario state"] Proj["Projection + host adapters (REPLACEABLE)
Gamebryo/D3D, sound factories, Win32/winit,
registry/profile/fs, Lua/CRT, network/MOTD"] Source --> Runtime --> Mgrs --> State Mgrs -.project.-> Proj State -.project.-> Proj
Modern adapters may replace renderer/audio/windowing/archive/parser/script/OS mechanics. Animal, UI, economy, placement, disease, scenario, save, and manager semantics stay on the original class boundary.
Foundational Type System: BFTyped
Every native object is a node in one single-inheritance hierarchy rooted at
BFTypedObj. Each class registers lazily: a per-type cache global guarded by an init
flag, the parent obtained from the parent's own getter, and the class-name string
interned by register_type. The type registry enumerates this
hierarchy completely — 2,068 registered types over 128 distinct parents; the spine is
BFComponent (186 direct children), then BFXMLObj (75), BFBehavior (78),
BFPhysComponent (42), and ZTMode (24).
classDiagram
BFTypedObj <|-- BFSafeHandledObj
BFSafeHandledObj <|-- BFXMLObj
BFXMLObj <|-- BFComponent
BFXMLObj <|-- BFXMLNode
BFXMLNode <|-- BFXMLDocument
BFComponent <|-- BFComponentContainer
BFComponentContainer <|-- BFComponentNameMap
BFComponentContainer <|-- BFComponentList
BFComponentNameMap <|-- BFBinder
BFBinder <|-- BFTypedBinder
BFComponentNameMap <|-- BFGEntity
BFComponentList <|-- BFAIEntityData
BFAIEntityData <|-- BFAIEntityDataShared
class BFTypedObj { type identity + cache global }
class BFSafeHandledObj { safehandleID }
class BFXMLObj { read_xml_node() write_xml_node() }
class BFComponentNameMap { name-keyed component map }
class BFTypedBinder { binderName/Type/Version; shared+instance XML }
class BFGEntity { entity = component graph }
Reconstructed members: BFComponent carries type_name,
component_name, owner_entity; BFComponentContainer holds components : Vec~BFComponent~
plus a name_map : BFComponentNameMap and a stack : BFComponentStack: the
literal "everything is a named component bag" shape.
Contract consequences (each traced to a ledger parent edge):
- A binder (
BFBinder/BFTypedBinder) is a named, typed, versioned component map. - An entity (
BFGEntity, parentBFComponentNameMap) is itself a named component graph; "animal" is aBFGEntitybinder type carrying AI/locomotion components. BFAIEntityDataSharedis aBFComponentListdescendant (sibling of the binder chain), holding theb_*/s_*/f_*/p_*property maps.
Hardcoded Native vs Data-Driven Hydration
The original game's data-driven surfaces hydrate native source objects via
BFTypedBinder and BFGEntity; source keys are read through the XML attribute
reader, and messages are interned via register_type. Native registries and
managers then interpret those objects through hardcoded C++ classes, vtables,
message handlers, and update algorithms.
flowchart LR XML["authored XML / assets"] --> Schema["BFXMLSchemaMgr validate"] Schema --> Binder["BFTypedBinder create"] Binder --> Comp["component tree (BFComponent*)"] Comp --> Mgr["managers interpret + update"] Mgr --> Msg["UI_/BFAI_/ZT_ message + value handlers"]
| Surface | Data-driven source | Hardcoded native contract |
|---|---|---|
| Entity and animal content | Binder XML, ancestry paths, components, attributes, assets, localization | BFTypedBinder, entity/component factories, catalog queries, AI/world/economy managers |
| UI screens | ui/layout, ui/template, skin replacements, localization, image/font refs, event blocks |
UIApp, UIRoot, widget classes, message dispatch, value handlers, focus/input semantics |
| AI behavior | .tsk and .beh task templates, selectors, scores, completion/failure nodes |
BFAIMgr, thinkers, sensors, behavior node classes, scheduler/tie-break/update policy |
| Economy/fame/research/disease | config/*.xml, source transactions, disease records, research items, scripts |
manager algorithms, message handlers, reward/status side effects, persistence |
| World placement | placement data, footprints, biome config, terrain/path/fence/tank source | mode classes, validators, transactions, undo, collision/traversability updates |
| Renderer/audio | .bfmat, .fx, models, textures, UI images, sound tags |
resource managers and projection semantics; backend mechanics are replaceable |
Source Object Model
The generic document layer turns authored Z2F XML into native objects. It has
four cooperating pieces under the BFTyped hierarchy: an XML DOM, a
schema validator, a component-container spine, and the binder that
loads typed entity/source documents. Game classes declare components and let this
layer hydrate them.
XML document model
classDiagram BFTypedObj <|-- BFSafeHandledObj BFSafeHandledObj <|-- BFXMLObj BFXMLObj <|-- BFXMLNode BFXMLNode <|-- BFXMLDocument BFXMLNode <|-- BFXMLElement BFXMLNode <|-- BFXMLText BFXMLNode <|-- BFXMLComment BFXMLNode <|-- BFXMLDeclaration BFXMLNode <|-- BFXMLUnknown BFTypedObj <|-- BFXMLAttribute BFEvent <|-- BFXMLObjEvent BFEvent <|-- BFXMLNodeEvent BFEvent <|-- BFXMLObjHandleEvent
Reconstructed: BFXMLDocument holds path, declaration,
root : BFXMLElement, schema; BFXMLElement holds name, attributes : Vec~BFXMLAttribute~,
children : Vec~BFXMLNode~; BFXMLAttribute is name/value. Every binder
reads this parsed DOM.
BFXMLObj is the universal base (every game object can read/write itself as XML);
BFXMLNode and its subtypes are the parsed DOM; change events propagate as
BFXMLObjEvent/BFXMLNodeEvent.
Schema
classDiagram BFTypedObj <|-- BFXMLSchemaType BFXMLSchemaType <|-- BFXMLSchemaElementType BFXMLSchemaType <|-- BFXMLSchemaAttributeType BFXMLSchemaType <|-- BFXMLSchemaRestriction BFComponent <|-- BFXMLSchemaMgr
BFXMLSchemaMgr validates documents against .xdr/schema types
(e.g. schema/bfgentitymorphdata.xdr) before hydration; BFRegistry
(app_key, types : BTreeMap~String,BFType~, factories) is the global type/factory
registry, and BFTypedBinderSchema (binder_type, type_rules, sub_binders) is the
binder's declared shape.
Component containers and binders
classDiagram BFXMLObj <|-- BFComponent BFComponent <|-- BFComponentContainer BFComponentContainer <|-- BFComponentList BFComponentContainer <|-- BFComponentNameMap BFComponentList <|-- BFComponentStack BFComponentNameMap <|-- BFBinder BFBinder <|-- BFTypedBinder BFComponent <|-- BFBinderRoot BFXMLObj <|-- BFComponentHandleVector BFXMLObj <|-- BFComponentPointerVector
The container spine is what makes "everything is a component map" work: a
BFComponentNameMap keys components by name; a BFBinder/BFTypedBinder is that map
plus name/type/version identity. Entities, animals, and source documents are all binders. BFTypedBinder holds binder : BFBinder, type_name,
unique_name, version, version_replace, shared_xml : BFXMLDocument; BFBinder
holds path, load_status, binder_type, children : Vec~BFBinder~ — the recursive
binder tree.
Source-object inheritance
The generic source objects are nodes in the BFTypedObj single-inheritance
hierarchy. Because BFBinder/BFTypedBinder descend from
BFComponentNameMap, a binder is a named, typed, versioned component map.
BFAIEntityDataShared is a sibling type registered on the same hierarchy.
BFTypedBinder Document Schema
The binder document root element is binder. The create/open/save path and the binder property-name table define these
source keys:
- identity/versioning:
binderName,binderType,binderUniqueName,binderVersion,version,versionReplace - declaration flags:
abstract,required,suppressed,repopulateMethod - declared child sets:
types,entity,instance,shared,fence - lookup kinds:
byName,byType,byKind - safe-handle identity:
safehandleID
shared versus instance separate per-type shared XML from per-entity instance
XML. Concrete typed entity classes named at the binder create path include
BFGEntity and ZTFenceEntity; binder files persist with the .xml extension.
BFAIEntityDataShared Property Maps
Shared entity/animal attribute data is hydrated by a property-child reader that dispatches on the key prefix into typed containers:
b_*-> bool / bool-expression maps_*-> string-token mapf_*-> float / float-expression mapp_*-> point/vector map
read_property_children clears and repopulates these maps from XML children; the
A binder read-node additionally resolves randomized float-expression
entries (rand(...)) into concrete float values at read time. Observed concrete
keys at consumer callsites: s_Species, s_Zoopedia, b_NoPerceiveOverride,
f_adoptRarity, f_needPointsGood, f_needPointsGoodCum, f_needPointsBad,
f_needPointsBadCum. Descriptor-table field strings include fadeHold,
wrapValue, minRange, maxRange, maxAlpha, stateList.
BFAITaskTemplate Source Schema
BFAITaskTemplate is a native BFComponent subtype. Its type getter registers
the class name with register_type under the BFComponent parent getter, with
its own type-cache global. Sibling registered native types in the same task
family are BFAITaskRoot, BFAITaskTemplateList, BFAITaskThinker,
BFAICreateData, BFAIEvalData, BFAICompletionData, BFBehExecTask, and
BFBehExecPath; these are separate component classes.
The template's XML read method hydrates these source keys via the binder attribute readers:
- identity/version:
UniqueID,version,useFromTokenQualifiers - scheduling:
Priority,TaskDelayMin,TaskDelayMax - flags:
CursorTask,UseForKeeperPanel,DoNotDisturb - selection sets (each with an
_ANDcompanion):Subjects,Targets,Objects,Qualifiers - tagging/containers:
reserveTag,attachTag,sensorTag,defaultSensorTag,objectContainer,objectName
The template is a hydrated configuration component. Scoring, execution,
completion, and failure are runtime behaviors owned by the AI thinker/behavior
classes (BFAITaskThinker, BFAIEvalData, BFBehExecTask).
catalog relationship model
classDiagram AdoptionConfig "*" --> AdoptionSlot : slots CatalogItem "1" --> CatalogFilters : filters CatalogItem "1" --> PlacementAffordance : placement EntityAuthoredEvent "*" --> EntityDataNode : payload_nodes EntityDefinition "*" --> EntityTypePath : type_paths EntityDefinition "1" --> SharedEntityData : shared EntityDefinition "0..1" --> EntityInstanceData : instance EntityDefinition "*" --> EntitySubBinder : sub_binders EntityFileBinder "*" --> EntityFileState : open_files EntityFileBinder "1" --> BFTypedBinderSchema : schema EntityFileBinderCommand "1" --> EntityFileCommandKind : command
classDiagram EntityFileCommandResult "1" --> EntityFileCommandStatus : status EntityInstanceData "*" --> EntityDataNode : nodes EntityInstanceData "*" --> EntityAuthoredEvent : authored_events EntityInstanceData "*" --> EntityComponentRef : components EntityInstanceData "0..1" --> BFComponentContainer : component_container EntitySubBinder "*" --> EntityDataNode : instance_nodes EntitySubBinder "*" --> EntityDataNode : shared_nodes EntitySubBinder "*" --> EntityAuthoredEvent : authored_events PlacementAffordance "1" --> CrateVisibility : crate_visibility SelectedEntityState "1" --> EntityInfoPanel : panel SharedEntityData "*" --> EntityDataNode : nodes SharedEntityData "*" --> EntityAuthoredEvent : authored_events
data relationship model
classDiagram DataDocument "1" --> DataRoot : root
Open Contracts (Source Object Model)
BFXMLObjvirtual read/write method names, node storage layout, and include resolution are not yet reconstructed; only its position in the type chain is established.BFTypedBinderancestry/precedence rules,repopulateMethod/versionReplacesemantics, and howbyName/byType/byKindresolve remain native-behavior unknowns.BFAITaskTemplatekeys are defined. Subject/target selection throughSubjects/Targets/Objectsand sibling attachment forBFAIEvalData/BFBehExecTask/BFAICompletionDataare runtime behaviors owned by the AI section.- The
UI XML Source Objectis authored data with defined keys (UIRegion,UIAspect,UIState,ui/template*paths, loc ids, event blocks); the native widget-tree construction and ordered message emission belong to the UI Runtime section (class-checked: messages are interned tokens). - The full
BFAIEntityDataSharedshared schema (descriptor-table entry shape per field group) is not enumerated. BFUserProfilekeys adjacent in the binder property table (saveDirectory,tempDirectory,options.xml,config/options.xml,lang/) belong to the Profile/Persistence sections.
Primary hydrated source families:
| Family | Source-owned data | Native consumer |
|---|---|---|
BFTypedBinder / BFTypedObj |
binder name/type/version, ancestry, shared and instance XML, child binders, safe-handle identity | entity catalog, component factories, source queries |
BFAIEntityDataShared |
b_*, s_*, f_*, p_* property maps and expressions |
AI, animal/entity attributes, filters, task evaluation |
BFAITaskTemplate (BFComponent subtype) |
UniqueID/version/Priority, TaskDelayMin/Max, CursorTask/UseForKeeperPanel/DoNotDisturb flags, Subjects/Targets/Objects/Qualifiers(_AND) selection sets, reserve/attach/sensor/defaultSensor tags, objectContainer/objectName |
task family components (BFAICreateData, BFAIEvalData, BFBehExecTask, BFAICompletionData); AI thinker scheduler and behavior runtime |
| UI XML | retained widget tree, images, loc ids, state, events, templates, skins | UIApp/UIRoot/widget classes and message handlers |
ZTTransaction |
min/max/step, frequency, costType, aggregate, parent tracking, next transaction | economy manager and placement validation |
ZTDiseaseMgr XML |
disease definitions, filters, cause/cure records, chance/reward fields | disease manager, cure mode, status/scenario hooks |
| Renderer/audio assets | .bfmat, .fx, model/material/texture/sound tags |
resource managers and projection adapters |
Native Managers and Global Runtime Ownership
Managers are singleton BFComponent subtypes registered in the type system like
any other native type. Each manager owns one domain's runtime state and exposes
it through messages/value-handlers. The 66 managers share ownership and
singleton lifetime, then stack in three layers under the application.
flowchart TB
App["ZTApp < BFGApp < UIApp < BF3DApp (owns all managers)"]
subgraph Source["Source runtime layer"]
R[BFResourceMgr]
L[BFLocaleMgr]
X[BFXMLSchemaMgr]
Reg[BFRegistry]
Sc[BFScriptContextMgr]
P[BFUserProfileMgr]
T[BFTimeKeeper]
end
subgraph Domain["Domain layer"]
W[ZTWorldMgr]
AI[ZTAIMgr]
E[ZTEconomyMgr]
D[ZTDiseaseMgr]
Sn[BFSoundMgr]
end
subgraph Proj["Projection layer"]
Rn[BFRenderer]
Sp[BFSpriteMgr]
end
App --> Source --> Domain --> Proj
Source runtime managers
These cross-cutting managers underpin every domain:
BFResourceMgr— mounts Z2F archives and serves source entries/assets.BFLocaleMgr— localization (loc ids → strings,lang/<id>/).BFXMLSchemaMgr— XML schema/type validation (BFXMLSchemaType/…ElementType/…AttributeType/…Restriction).BFRegistry— the global key/value registry.BFScriptContextMgr— ownsBFScriptContext/BFLuaContextinstances.BFUserProfileMgr— player profile,saveDirectory/tempDirectory/options.xml.BFTimeKeeper(withBFTimeKeyInfo,BFTimeTriggersComponent) — the simulation clock that drivesThinkerInterval-style scheduled updates.
Reconstructed fields: BFResourceMgr holds root_path, zip_paths,
archive_paths, binder_roots, entries : Vec~BFResourceEntry~, resource_tree;
BFLocaleMgr holds locale + string_tables; BFTimeKeeper holds elapsed_seconds, delta_seconds, paused, and a
BFTimeEventRoot — the sim clock that fans out scheduled updates; BFXMLSchemaMgr holds
schemas : BTreeMap~String, BFXMLSchema~.
Domain managers
Each domain manager is documented in its own section. The game-level subclass usually
descends from a Blue Fang base: ZTWorldMgr, ZTAIMgr (< BFAIMgr), ZTEconomyMgr,
ZTResearchMgr, ZTDiseaseMgr, ZTAdoptionMgr (→ ZTAdoptionSlotMgr), ZTAwardMgr,
ZTScenarioMgr (< BFScenarioMgr), ZTTankMgr, ZTTransportationMgr
(< BFGTransportationMgr), ZTWorldSndMgr, BFGTraversabilityMgr, BFGPathFinderMgr,
BFGRampageMgr, BFGInfluenceMgr, BFGCollisionMgr, BFSteeringMgr, BFLocomotionMgr,
the ZTAI*Mgr per-entity-type managers, BFSoundMgr/BFSoundStageMgr, BFRenderer/
BFSpriteMgr, and the undo chain (BFUndoMgr → BF3DUndoMgr → BFGUndoMgr → ZTUndoMgr).
Cross-cutting/tooling managers
Managers without a dedicated domain section: ZTToolMgr (active tool), ZTGestureMgr
(gesture input, with cloning/training gesture modes), ZTLocationMgr (named map
locations), ZTViewableObjectMgr/ZTViewableSubMgr (< BFGViewableObjectMgr — visible
object tracking for tours/photos), ZTFeedbackMgr (player feedback), ZTPuzzleMgr
(< BFGPuzzleMgr), ZTFavoriteAnimalMgr, ZTTrickButtonMgr.
Registration and lifetime contract
Every manager is obtained through its lazy type getter (guarded cache global, parent via
the parent getter, name interned by register_type). The application root
(ZTApp) constructs and owns them; their state is what Persistence serializes.
Runtime config and the simulation clock
The game-speed/tick controller is reconstructed: ZTSimController
holds paused, speed_index, feedback_control/gain, min_interval_seconds/
max_interval_seconds, and a simulation_time : BFTimeKeeper. It is the adaptive clock
that paces all scheduled component updates.
Manager behaviour is config-driven; each manager has an authored *Config schema, e.g.
ZTAIGuestMgrConfig (max_guests_base, max_guests_per_star, spawn_at_entrance,
displacement_*), BFGRampageConfig (the rampage formula — see World), and
BFGCollisionTesterConfig/BFGTraversabilityViewingConfig.
app relationship model
classDiagram UiListRowChildProjection "0..1" --> BFUITextDocument : rich_text UiListRowChildProjection "*" --> UiEvent : activate_events UiListRowProjection "*" --> UiListRowChildProjection : children UiListRowProjection "*" --> UiEvent : on_events UiRuntimeValues "*" --> UiNamedTextValue : named_text UiTemplateDocument "1" --> UiDocument : document UiWidgetRuntimeState "0..1" --> UiRegion : region UiWidgetRuntimeState "1" --> UiPoint : scroll_position UiWidgetRuntimeState "0..1" --> UIDragAxis : thumb_axis UiWidgetRuntimeState "0..1" --> UiSliderThumbTrack : thumb_track ZTConfirmationRuntime "0..1" --> ZTExitConfirmation : exit_confirmation
managers relationship model
classDiagram BFGPathRequest "0..1" --> BFGPathResult : result BFGPathGraph "*" --> BFGPathNode : nodes BFGPathGraph "*" --> BFGPathEdge : edges BFGTraversabilityRuntimeCollections "*" --> BFGTraversableArea : area_collection_offset_44 BFGTraversabilityRuntimeCollections "*" --> ChangedTriangleRecord : changed_triangles_offset_b4 BFGTraversabilityRuntimeCollections "*" --> ChangedTriangleRecord : immediate_changed_triangles_offset_c0 BFGTraversabilityInvalidationQueue "*" --> ChangedTriangleRecord : delayed BFGTraversabilityInvalidationQueue "*" --> ChangedTriangleRecord : immediate BFGTraversabilityCollisionTest "1" --> BFGCollisionTesterConfig : tester BFGTraversabilityCollisionTest "0..1" --> BFGTraversabilityCollisionResult : result ZTFeedbackGlobalThought "0..1" --> ZTMessageInfo : message ZTFeedbackGlobalDisplay "*" --> ZTFeedbackDisplayTemplate : templates
classDiagram ZTPAPTBFAICognitiveMgr "*" --> ZTPAPTCognitiveTemplate : registered_templates ZTPAPTBFAICognitiveMgr "*" --> ZTPAPTCognitiveInstance : active_instances ZTPAPTBFBehaviorMgr "*" --> ZTPAPTBehaviorTemplate : behavior_templates ZTPAPTBFBehaviorMgr "*" --> ZTPAPTBehaviorInstance : active_behaviors
runtime support relationship model
classDiagram BFBinder <|-- BFNamedBinder BFXMLObj <|-- BFRefCountedXMLObj BFGManagerContextComponent "*" --> BFContextComponent : children BFLuaConfig "0..1" --> BFLuaLogConfig : log BFLuaLogConfig "*" --> BFLuaLogChannelConfig : channels BFNamedBinder "1" --> BFBinder : binder BFPerformanceCommandQueue "*" --> BFPerformanceCommand : pending BFPerformanceCommandQueue "*" --> BFPerformanceCommand : completed BFPerformanceMonitor "1" --> BFPerformanceCommandQueue : commands BFRefCountedXMLObj "1" --> BFXMLObj : object BFTypedBinderDescriptor "*" --> BFTypedBinderDataRoot : data_roots BFTypedBinderDescriptor "*" --> BFTypedBinderTypeRule : type_rules BFTypedBinderCommandDispatcher "*" --> BFTypedBinderCommand : commands BFTypedBinderCommandDispatcher "0..1" --> BFTypedBinderCommandResult : last_result
classDiagram BFUndoEventRoot "0..1" --> BFUndoActivateTransaction : active_transaction BFUserOptions "1" --> BFGraphicsOptions : graphics BFUserOptions "1" --> BFAudioOptions : audio BFUserProfileEventRoot "*" --> BFUserProfileCommand : commands BFUserProfileEventRoot "*" --> BFUserProfileActionResult : results DxDiag "*" --> DxDiagSoundDevice : sound_devices DxDiag "*" --> DxDiagDisplayDevice : display_devices DxDiag "*" --> DxDiagResultCopy : copied_results UIRootAppConfig "0..1" --> UIRootRegionConfig : region UIRootAppConfig "*" --> UIRootHotKeyConfig : hotkeys UIRootAppConfig "*" --> UiHotKeyBinding : hotkey_bindings UIRootAppConfig "0..1" --> UiDocument : document UserSettings "1" --> BFGraphicsOptions : safe_graphics
classDiagram VinceLog "0..1" --> VinceLogGuid : guid ZT2Client "1" --> BF3DApp : app ZTCommandStateSet "*" --> ZTCommandStateEvent : history ZTDebugCommandQueue "*" --> ZTDebugCommand : pending ZTDebugCommandQueue "*" --> ZTDebugCommand : completed ZTDevConsole "*" --> ZTDevConsoleCommand : commands ZTDevConsole "*" --> ZTDevConsoleAlias : aliases ZTDevConsole "*" --> ZTDevConsoleResponse : bad_word_responses ZTDevConsole "*" --> ZTDevConsoleMessageCommand : pending_messages ZTDownloadsState "*" --> ZTWebFileTransfer : active_downloads ZTEULACheckAppConfig "*" --> ZTEulaConfig : eulas
classDiagram ZTFilePathResolver "0..1" --> ZTAbsoluteFilePathRequest : last_request ZTHardwareConfigRegistry "*" --> ZTHardwareRequirementSet : requirement_sets ZTHardwareRequirementSet "1" --> ZTGraphicsRequirement : graphics ZTWEB "*" --> ZTWebEvent : events ZTWEB "*" --> ZTWebFileTransfer : transfers ZTWEB "1" --> ZTWebRequestQueue : requests ZTWEB "1" --> ZTWebCommandQueue : commands ZTWEB "1" --> ZTWebMotdState : motd ZTWebCommandQueue "*" --> ZTWebCommand : pending ZTWebCommandQueue "*" --> ZTWebCommand : completed ZTWebFileTransfer "1" --> ZTWebRequestKind : request_kind ZTWebMotdState "0..1" --> ZTWebMotdDefaultIconResource : default_icon ZTWebMotdState "*" --> ZTWebMotdMessage : messages ZTWebMotdMessage "1" --> BFUITextDocument : content ZTWebRequestQueue "*" --> ZTWebRequest : pending ZTWebRequestQueue "*" --> ZTWebRequest : completed ZTWebRequest "1" --> ZTWebRequestKind : kind
Open contracts (Managers)
- Manager construction order and inter-manager update sequencing per frame/tick are not yet reconstructed.
BFTimeKeepertick rate and how it fans out to scheduled component updates are unrecovered.- Which managers are save-persisted vs reconstructed on load is not enumerated.
UI Runtime and App Lifecycle
The UI is a custom retained widget tree. Widgets are BFComponent subtypes
hydrated from ui/layout XML into a tree; behaviour runs through a message bus
of 183 interned UI_* tokens; widget values are bound to game state through
value-handlers. The whole application is a UI app.
The application is a UI app
classDiagram BFComponentList <|-- BFApp BFApp <|-- BF3DApp BF3DApp <|-- UIApp UIApp <|-- BFGApp BFGApp <|-- ZTApp UIContainer <|-- UIRoot
ZTApp is a BFGApp is a UIApp is a BF3DApp: the game application is layered on the
UI/3D app stack. UIApp owns the active widget tree whose root is UIRoot
(< UIContainer), focus/hover, input routing, and the message/value registries.
Widget class tree
classDiagram BFComponent <|-- UIComponent UIComponent <|-- UIStatic UIComponent <|-- UIContainer UIContainer <|-- UIRoot UIContainer <|-- UIWindow UIContainer <|-- UILayout UIContainer <|-- UIDropList UIContainer <|-- UISlider UIWindow <|-- UIListBox UIWindow <|-- UITool UIListBox <|-- UIToggleSet UIListBox <|-- UITreeElement UIListBox <|-- UIXMLEdit UILayout <|-- UIText UILayout <|-- UIGraph UILayout <|-- UIDrag UILayout <|-- UICompositeButton UICompositeButton <|-- UICompositeHoverButton UIText <|-- UIButton UIText <|-- UITextEdit UIText <|-- UITooltip UITextEdit <|-- UITextBuffer UIButton <|-- UIPushButton UIButton <|-- UIHoverButton UIButton <|-- UIToggleButton UIButton <|-- UIMultiIcon UIToggleButton <|-- UIToggleHoverButton
Reconstructed widget base (UiComponentBase): every widget carries
type_name, template, name, cursor, modal, and
can_be_cached_when_called_from_lua — confirming widgets are Lua-addressable, cached
source objects.
Note the real lineage: a button is a text widget (UIButton < UIText < UILayout < UIContainer < UIComponent), so every button carries text/layout/containment capability.
Reconstructed widget fields
Each widget nests a typed state struct:
classDiagram
class UIButtonState { +auto_size; +min_height; +toggle; +sticky; +repress }
class UITextState { +auto_size; +text_type; +text_format; +loc_id }
class UIListBoxState { +columns; +rows; +x_spacer; +y_spacer; +column_width }
class UISliderState { +value_type; +span; +min; +max; +increment }
class UITextEditState { +max_length; +change_sound; +error_sound; +legal_filename_only; +highlight }
class UIDropList { +droplist_layout; +horizontal_layout; +selected_index; +items[] }
class UIToggleSet { +active_toggle; +toggles[]; +allow_repress }
UIButton *-- UIButtonState
UIText *-- UITextState
UIListBox *-- UIListBoxState
UISlider *-- UISliderState
UITextEdit *-- UITextEditState
UISlider carries a typed range (value_type/span/min/max/increment);
UITextEdit carries max_length, validation (legal_filename_only), and edit
sounds; UIListBox is a grid (columns/rows/spacers).
Geometry, data, and presentation objects
Non-widget UI data are BFXMLObj/BFTypedObj value objects: geometry UIRegion,
UIRectObj, UIPointObj, UIColorObj; data UIChildData, UIEventList, UIFontData,
UIKeyData, UIMouseData, UINotifyData; presentation/state UIState, UIAspect,
UIAnimation, UIHelpInfo, UIHotKeys. UISoundMgr (< BFComponent) plays UI sound.
Message bus
The 183 UI_* names are interned tokens, registered through the same register_type
registrar as native types via the registration table. They form the dispatch
contract, grouped by role:
- tree/lifecycle:
UI_CHILD,UI_GET_CHILD,UI_DESTROY_CHILD(_DELAYED),UI_DESTROY_CHILDREN,UI_SHOW/UI_HIDE,UI_SHOW_CHILD_EX,UI_ENABLE/UI_DISABLE - identity/nav:
UI_GET_NAME/UI_SET_NAME,UI_GET_PARENT,UI_SET_NEXT/UI_SET_PREVIOUS - activation:
UI_ACTIVATE,UI_ACTIVATE_ON/UI_ACTIVATE_OFF,UI_ACTIVATE_DATA,UI_ADD_ACTIVATE_EVENT(_ON/_OFF) - value/state:
UI_CHANGED_VALUE,UI_CHANGED_STATE,UI_CHANGED_TEXT,UI_MODIFY,UI_QUERY,UI_SET_EDIT_LOCK - animation:
UI_SET_ANIM_RECT_START/_END,UI_SET_ANIM_COLOR_START/_END - input:
UI_GET_MOUSE_DATA,UI_SETCURSOR,UI_SETTINGS_CHANGED - region/aspect: the
UI_*_REGION/UI_*_ASPECTfamilies
Reconstructed dispatch infrastructure: a BFMessageBus holds
listeners : Vec~BFMessageListener~ + queued_events : BFEventList; each
BFMessageListener binds owner/message/callback_name. Widget values cross the bus
as UIInlineTypedValue (value_type : UiValueTypeHandle, ref_count, payload), with
typed payloads UIFloatPayloadValue/UIStringPayloadValue/UIPointerPayloadValue — the
ref-counted value objects behind UI_CHANGED_VALUE.
Reconstructed field detail (UI animation)
Modeled fields: UIAnimation carries start_region/end_region (BfRect),
colors (UiShowHideColors), and a UIAnimationRuntime (running, elapsed_seconds,
exit_rate, initial_time, initial_dir) with UIAnimationKeyFrames
(time_seconds/region/color/alpha), the concrete backing for the
UI_SET_ANIM_RECT_*/UI_SET_ANIM_COLOR_* messages.
Value-handler binding (UI <-> game state)
Managers register named value-handlers that widgets bind to. Examples are
register_globe_ui_value_handlers,
register_scenario_campaign_ui_value_handlers, and handle_<x>_ui_value bodies; the
producer/consumer side is the economy/fame make_<x>_value/accept_<x>_value pattern.
ZT_GET_ZOO_CASH etc. reach labels through this value-handler path.
Startup lifecycle
stateDiagram-v2 [*] --> Boot Boot --> LoadSources : mount Z2F, UI, loc, assets LoadSources --> Splash : source UI visible Splash --> Title : ZT_SPLASH_CLOSED Title --> MainMenu : ui/layout/mainmenu MainMenu --> InGame : profile/campaign/scenario -> ZT_SETMODE
ZT_SPLASH_CLOSED is a lifecycle transition interpreted by ZTApp;
ui/layout/mainmenu.xml drives the menu widget tree. App bootstrap is authored
(ZTAppConfig): components, log : BFLogAppConfig,
resource_mgr : BFResourceMgrAppConfig, registry, extra_paths, eula_check,
xp_info_folder — the startup component/config graph (options/app.xml).
Data flow
sequenceDiagram participant XML as ui/layout XML participant Root as UIRoot / UIApp participant W as widget (UIButton ...) participant Bus as UI_* message bus participant H as value handler -> manager XML->>Root: hydrate widget tree (+skins, loc, fonts) W->>Bus: user input -> UI_ACTIVATE / UI_CHANGED_VALUE Bus->>H: routed event block (authored order) H->>W: UI_MODIFY / push value back (make_*_value)
Boundary
Data-driven: widget instances, event message order, child target names, image/skin
paths, loc ids, font/format ids. Hardcoded native: the set of legal UI_* messages and
their meaning, value-handler registration, focus/input routing, and widget vtable
methods. Lua remains a scenario/script surface.
ui contract relationship model
classDiagram BFLocaleMgrConfig "1" --> BFLocaleDateFormats : date_formats BFLocaleMgrConfig "1" --> BFLocaleMonthAbbreviations : month_abbreviations BFUITextDocument "*" --> BFUITextNode : nodes BfFont "0..1" --> BfColor : color LocalizationTextFormat "0..1" --> BfColor : color UIButtonVisualState "0..1" --> BfRect : region UIButtonVisualState "0..1" --> BfColor : text_color UIDragCommand "1" --> UiComponentBase : base UIDragCommand "1" --> UIDragAxis : axis UIGraphState "*" --> UIGraphSeries : series UIGraphState "1" --> UIGraphAxis : x_axis UIGraphState "1" --> UIGraphAxis : y_axis UIGraphState "*" --> UIGraphLabel : labels
classDiagram UIMultiIconState "*" --> UIMultiIconEntry : entries UIMultiIconEntry "0..1" --> UiMetricRect : rect UiAspect "1" --> UiAspectHitPolicy : always_hit UiAspect "0..1" --> UiVisualState : default UiAspect "*" --> UiNamedVisualState : standard UiAspect "*" --> UiNamedVisualState : alternate UiDocument "1" --> UiNode : root UiDocument "*" --> UiSkin : skins UiEvent "0..1" --> BfColor : color UiEvent "0..1" --> BfColor : child_color UiEvent "*" --> UiPayloadNode : payload_nodes UiEventBlock "1" --> UiEventTrigger : trigger UiEventBlock "*" --> UiEvent : events UiHotKeyBinding "1" --> UiHotKeyTrigger : trigger UiHotKeyBinding "1" --> UiEvent : event UiMetricRect "1" --> UiMetric : x UiMetricRect "1" --> UiMetric : y UiMetricRect "1" --> UiMetric : width UiMetricRect "1" --> UiMetric : height UiNamedVisualState "1" --> UiVisualState : visual
classDiagram UiNode "1" --> UiWidget : widget UiNode "0..1" --> UiRegion : region UiNode "1" --> UiState : state UiNode "0..1" --> UiShowHideAnim : show_hide_anim UiNode "0..1" --> UiAspect : aspect UiNode "0..1" --> UiAspectHitPolicy : always_hit UiNode "0..1" --> UiHelpInfo : help UiNode "*" --> UiFieldBinding : fields UiNode "*" --> UiHotKeyBinding : hotkeys UiNode "*" --> UiEventBlock : events UiNode "*" --> UiAttribute : unknown_attributes UiPayloadNode "*" --> UiAttribute : attributes UiRegion "1" --> UiMetric : x UiRegion "1" --> UiMetric : y UiRegion "1" --> UiMetric : width UiRegion "1" --> UiMetric : height UiRegion "1" --> UiRegionAlign : x_align UiRegion "1" --> UiRegionAlign : y_align UiRegion "1" --> UiRegionAlign : width_align UiRegion "1" --> UiRegionAlign : height_align UiShowHideAnim "0..1" --> BfRect : start_region UiShowHideAnim "0..1" --> BfRect : end_region UiShowHideAnim "0..1" --> UiShowHideColors : colors
classDiagram UiSkin "*" --> UiSkinReplacement : replacements UiSkin "*" --> UiSkinTheme : themes UiSkinTheme "*" --> UiSkinReplacement : replacements UiState "1" --> UiActiveState : active UiVisualState "0..1" --> UiAspectHitPolicy : always_hit UiVisualState "0..1" --> UiMetricRect : rect UiVisualState "0..1" --> BfColor : color UiVisualState "0..1" --> BfFont : font ZTUITimedEvents "1" --> UiComponentBase : base ZTUITimedEvents "*" --> ZTUITimedEvent : events ZTUITimedEvent "1" --> UiEvent : event
ui binding relationship model
classDiagram BFFontData "1" --> UIFontData : font UIActivationCommand "1" --> UICommandTarget : target UIAlphaCommand "1" --> UICommandTarget : target UIColorCommand "1" --> UICommandTarget : target UIEnableCommand "1" --> UICommandTarget : target UIEventNotification "1" --> UIEventRoute : route UIHotKeyDocument "1" --> UIHotKeys : hotkeys UIHotKeyDocument "*" --> UIHotKeyBinding : bindings UIPositionCommand "1" --> UICommandTarget : target UIRegionCommand "1" --> UICommandTarget : target UIRegionCommand "0..1" --> UIRectObj : rect UIScrollCommand "1" --> UICommandTarget : target UISizeCommand "1" --> UICommandTarget : target UITextCommand "1" --> UICommandTarget : target
classDiagram UIVisibilityCommand "1" --> UICommandTarget : target
classDiagram UiBindingDomain "1" --> UiValueHandlerRegistry : handler_registry UiBindingDomain "1" --> BFMessageBus : message_bus UiBindingDomain "1" --> UiNamedValueAssignmentList : named_assignments UiBindingDomain "1" --> ZTUITimedEvents : timed_events UiBindingDomain "1" --> UIHotKeyDocument : hotkeys UiBindingDomain "1" --> ZTMessagesDocument : messages UiBindingDomain "1" --> ZTEntriesDocument : entries UiBindingDomain "1" --> ZTChallengesDocument : challenges UiBindingDomain "*" --> UiMoneyEvent : money_events UiBindingDomain "*" --> ZTUITypeList : type_lists UiBindingDomain "*" --> ZTUIResearchButton : research_buttons UiBindingDomain "*" --> ZTUIAdoptionButton : adoption_buttons UiBindingDomain "0..1" --> ZTUIFullscreenButton : fullscreen_button UiBindingDomain "1" --> ZTBuyInfoPanel : buy_info_panel UiBindingDomain "1" --> ZTGoalPanel : goal_panel UiBindingDomain "*" --> ZTMultiList : multi_lists UiBindingDomain "1" --> ZTAwardPanel : award_panel UiBindingDomain "1" --> ZTZoopediaTOC : zoopedia_toc UiBindingDomain "*" --> ZTGenericConfirmation : confirmations UiBindingDomain "*" --> ZTNamedEventRoute : named_event_routes UiBindingDomain "*" --> ZTUIAutoPopulateList : auto_populate_lists UiBindingDomain "*" --> ZTUITypeFilterCommand : type_filter_commands UiBindingDomain "*" --> ZTUIActivateButtonCommand : activate_button_commands UiBindingDomain "*" --> ZTMultiListCommand : multi_list_commands UiBindingDomain "*" --> ZTZoopediaNavigation : zoopedia_navigation UiBindingDomain "1" --> ZTLogEntitySelection : log_entity_selection
classDiagram UiMoneyEvent "1" --> UiMoneyEventKind : kind UiMoneyEvent "1" --> UIFloatPayloadValue : amount_payload UiNamedValueAssignment "1" --> UiValueTypeHandle : value_type UiNamedValueAssignment "1" --> UiValueAssignmentBase : base UiNamedValueAssignmentList "*" --> UiNamedValueAssignment : assignments UiPayloadTypedValue "1" --> UiValueTypeHandle : value_type UiPayloadTypedValue "1" --> UiPayloadValue : payload UiValueAssignmentBase "0..1" --> UiTypedValue : current_value UiValueAssignmentBase "*" --> UiValueAssignmentDependentRef : dependent_refs UiValueAssignmentDependentRef "1" --> UiDependentRefKey : key UiValueHandlerEntry "1" --> UiHandlerOwner : owner UiValueHandlerRegistry "*" --> UiValueHandlerEntry : entries ZTAwardPanel "*" --> ZTAwardPanelEntry : current_awards ZTAwardPanel "*" --> ZTAwardPanelEntry : persistent_awards
classDiagram ZTBuyInfoPanel "0..1" --> ZTBuyInfoKind : info_kind ZTBuyInfoPanel "*" --> ZTBuyInfoFilter : filters ZTBuyInfoPanel "*" --> ZTBuyInfoRow : property_rows ZTChallengesDocument "*" --> ZTMessageInfo : challenge_messages ZTEntriesDocument "*" --> ZTZoopediaEntry : entries ZTFeedbackData "*" --> ZTFeedbackRecord : records ZTFeedbackDataSet "*" --> ZTFeedbackRecord : records ZTFeedbackRecord "0..1" --> ZTFeedbackClickTarget : click_target ZTMessagesDocument "*" --> ZTMessageInfo : messages ZTMultiList "*" --> ZTMultiListTab : tabs ZTMultiList "*" --> ZTMultiListRow : rows ZTNamedEventRoute "*" --> UiValueMessage : events
classDiagram ZTSharedFeedbackData "*" --> ZTFeedbackDataSet : feedback_sets ZTSharedFeedbackData "*" --> ZTFeedbackData : feedback_data ZTUIAutoPopulateList "*" --> ZTUITypeListFilter : filters ZTUIAutoPopulateList "*" --> ZTUITypeListEntry : rows ZTZoopediaNavigation "1" --> ZTZoopediaNavigationDirection : direction
Open contracts (UI)
- Widget vtable method bodies (
UI_HIT_TEST/UI_MODIFY/UI_QUERYhandlers) are not reconstructed; only the message set and inheritance are established. - Font metrics, text wrapping, and
UIAnimationshow/hide timing are unrecovered. - Skin selection seed/order and focus/sound routing edges are open.
Entity and Animal Model
An entity is a component aggregate. BFGEntity (parent
BFComponentNameMap) is a named component map. Its single native C++ subtype in
the binary is ZTFenceEntity. Every other kind of object the player sees —
animal, guest, staff, scenery, building, food, path, tank, gate, ride, vehicle —
uses the same BFGEntity class, distinguished by binder type and aggregated
BFComponent subtypes. "Animal" is a composition over that shared entity class.
classDiagram
class BFGEntity {
name-keyed component map
mainObjName component (cached)
read_instance_xml_node()
resolve_main_object_name_value()
}
BFComponentNameMap <|-- BFGEntity
BFGEntity <|-- ZTFenceEntity : ONLY native subtype
BFGEntity *-- BFGEntityContainer : containment
BFGEntity *-- BFGEntitySndComponent : sound
BFGEntity *-- BFGEnvironmentComponent : environment
BFGEntity *-- BFGInfluenceComponent : influence field
BFGEntity *-- BFGridCollisionComponent : collision
BFGEntity *-- BFSceneGraphComponent : render/scene attach
BFGEntity *-- BFGEntityTriggerMgr : triggers
BFGEntity *-- BFGPlacementData : placement footprint
BFGEntity ..> BFAIEntityDataShared : AI/animal entities only
BFGEntity ..> BFAICognitiveComponent : AI/animal entities only
BFGEntity ..> BFLocomotion : moving entities only
Component roles
Each aggregated component is itself a registered native type (a BFComponent unless
noted). The entity's behaviour is the union of whichever components its binder
attaches:
| Component | Parent | Role |
|---|---|---|
BFGEntityContainer (+ …Slot, …SlotHeavy/Light) |
BFComponent / BFXMLObj |
holds other entities (guests on rides, animals in tanks) |
BFGEntitySndComponent |
BFComponent |
per-entity sound emission |
BFGEnvironmentComponent |
BFComponent |
local environment contribution/effect |
BFGInfluenceComponent (+ BFGInfluenceMgr, BFGInfluenceController) |
BFComponent / BFAIDataController |
influence-field source read by AI |
BFGridCollisionComponent |
BFPhysComponent |
grid collision footprint |
BFSceneGraphComponent |
BFPhysComponent |
attaches the entity into the render scene graph |
BFGEntityTriggerMgr |
BFComponent |
event triggers (config/entitytriggers.xml); rules are BFGEntityTriggerRule (primary/secondary/count/proximity/attribute -> on_message/off_message) |
BFGPlacementData |
BFComponent |
placement footprint/flags |
BFGContainerData, BFGEntityMoveData, BFGEntityMorphData, BFGEntitySharedEventData, BFGEntityFittingSurface |
BFXMLObj / BFWorldFittingSurface |
per-entity data holders (BFGEntityMorphData has schema bfgentitymorphdata.xdr) |
Hydration
An entity is created through a BFTypedBinder,
which separates per-type shared XML from per-instance instance XML.
The instance document is read to populate the entity's component set. The main-object-name
component is built lazily from the s_mainObjName key by querying the entity's own
component provider, then cached on the entity.
Animal = entity + AI/animal components
An animal is a BFGEntity binder type that additionally aggregates the AI/animal
component set:
BFAIEntityDataShared(parentBFAIEntityData<BFComponentList) — theb_*/s_*/f_*/p_*property maps, with concrete keyss_Species,s_Zoopedia,f_adoptRarity,f_needPointsGood/Bad(Cum),b_NoPerceiveOverride.BFAICognitiveComponent/BFAICognitiveMgr(parentBFAIEntityComponent) — the thinking/needs cognition.BFLocomotion/BFLocomotionMgr,BFAnimController,BFSecondaryAnimComponent— movement and animation.
The reconstruction aggregates the component-derived animal state into a
ZTAnimal runtime view, and the authored type into ZTAnimalTypeDefinition. These
are the real animal state surfaces, sourced across the entity's binder + components:
classDiagram
class ZTAnimal {
+entity_id; +source_identity
+species; +family; +biome; +endangerment; +sex
+variant : ZTAnimalVariantState
+status_flags : ZTAnimalStatusFlags
+life_cycle : ZTAnimalLifeCycleState
+needs / training / disease_state / conservation
+adoption_state / release_state / crate_state / family_tree
}
class ZTAnimalLifeCycleState {
+stage; +adult; +pregnant
+pregnancy_months_remaining; +offspring_count
+total_endangered_births; +pregnancy; +pending_birth
}
class ZTAnimalVariantState { +adult_type; +young_type; +male_type; +female_type; +current_variant_type }
class ZTAnimalTypeDefinition {
+entity_type; +binder_type; +abstract_type
+species; +family; +biome; +source_identity
}
ZTAnimal *-- ZTAnimalLifeCycleState
ZTAnimal *-- ZTAnimalVariantState
ZTAnimalTypeDefinition ..> ZTAnimal : hydrate_runtime_animal_from_source_type
Lifecycle (ZTAnimalLifeCycleState) and breeding (ZTAnimalPregnancyRecord:
mother_entity/father_entity/offspring_source_type/litter_size/
inherited_variant) are concrete; select_runtime_variant resolves adult/young/
male/female variants. update_status_from_components shows the state is read from the
entity's components, confirming the composition model. Adoption is owned by
ZTAdoptionMgr/ZTAdoptionSlotMgr, favorites by ZTFavoriteAnimalMgr.
Open (from todo!()): breeding/offspring rules, training learning deltas, and the
component→status read for several flags.
Consumers
World/AI managers read and mutate entities through their components: BFGManager,
BFGPlacementGrid, BFGTraversabilityMgr, BFGPathFinderMgr, BFGRampageMgr,
BFGTransportationMgr, BFGInfluenceMgr, BFGEntityTriggerMgr, ZTWorldMgr,
ZTAIMgr. Cross-entity commands travel as BFG_EVENT / BFGECONOMY_EVENT messages.
Adoption/buy is owned by ZTAdoptionMgr / ZTAdoptionSlot. Selection/info: ZTSelectedEntity (entity_id/entity_type/panel_family) and
ZTEntitySelector drive the entity-info panels. The buy/catalog panels are backed by
ZTUITypeList (root_type/type_filter/selected_type) over ZTUITypeListEntry
(entity_type/display_name/icon/loc_id) with ZTUITypeListFilter
(property_name/selected_value).
animal relationship model
classDiagram ZTAdoptionMgr <|-- ZTAdoptionSlotMgr AnimalDomain "1" --> ZTAdoptionMgr : adoption_mgr AnimalDomain "1" --> ZTAdoptionSlotMgr : adoption_slot_mgr AnimalDomain "1" --> ZTFavoriteAnimalMgr : favorite_animal_mgr AnimalDomain "*" --> ZTAnimal : animals AnimalDomain "*" --> ZTAnimalSourceIdentity : source_resolutions AnimalDomain "*" --> ZTAnimalBirthEvent : birth_events AnimalDomain "*" --> ZTAnimalUiAction : user_actions ZTAnimalFamilyTree "*" --> ZTAnimalLineageRecord : relation_rows ZTAnimalNeeds "*" --> ZTAnimalNeed : rows ZTAnimalNeeds "1" --> ZTHappyFactors : happy_factors
entity info relationship model
classDiagram EntityInfoDomain "0..1" --> ZTSelectedEntity : selected EntityInfoDomain "1" --> ZTEntitySelector : selector EntityInfoDomain "*" --> ZTEntitySelectionRequest : selection_requests EntityInfoDomain "*" --> ZTEntityInfoActionCommand : action_commands EntityInfoDomain "*" --> ZTEntityInfoPanel : panels EntityInfoDomain "1" --> ZTBuyInfoPanel : buy_panel ZTAnimalFamilyTreePanel "*" --> ZTAnimalFamilyRelationRow : rows ZTDonationListPanel "*" --> ZTDonationListRow : rows ZTEntityInfoPanel "1" --> ZTEntityActionControls : action_controls ZTEntityInfoPanel "1" --> ZTEntityNeedsPanel : needs ZTEntityInfoPanel "1" --> ZTAnimalFamilyTreePanel : family_tree ZTEntityInfoPanel "1" --> ZTTrainingAreaListPanel : training ZTEntityInfoPanel "1" --> ZTDonationListPanel : donations ZTEntityInfoPanel "1" --> ZTInventoryPanel : inventory ZTEntityInfoPanel "1" --> ZTGenderDisplay : gender ZTEntityInfoPanel "1" --> ZTQuantityDisplay : quantity ZTEntityNeedsPanel "*" --> ZTEntityNeedRow : rows
classDiagram ZTEntitySelectionRequest "0..1" --> ZTEntitySelectionQuery : query ZTInventoryPanel "*" --> ZTInventoryRow : rows ZTTrainingAreaListPanel "*" --> ZTTrainingAreaRow : rows
Open contracts (Entity)
- The exact component set attached per binder type (animal vs guest vs scenery vs
tank) is authored data; the universal
BFGEntityshape is the native surface. BFGEntitymember layout beyond the main-object-name cache and its full method list is not yet modeled.- How
BFGEntityContainerslot weight (Heavy/Light) selects containment behaviour is not yet reconstructed.
AI, Behavior, Guests, Staff, and Shows
AI is a four-layer component stack mounted on an entity, plus per-entity-type
managers. Cognition decides what, the task pipeline picks a concrete job, a
behavior carries it out, and steering/locomotion moves the body. Every layer is a
registered BFComponent subtype attached by the entity's binder.
Cognition layer (perceive and decide)
BFAIComponent descends from BFScriptComponent — AI components are scriptable.
The cognition base BFAICognitiveComponent fans out into perception (BFAISensor)
and two thinkers (state-machine and task-selection); the game subclasses each.
classDiagram BFScriptComponent <|-- BFAIComponent BFAIComponent <|-- BFAIEntityComponent BFAIComponent <|-- BFAIEntityMgr BFAIEntityComponent <|-- BFAICognitiveComponent BFAICognitiveComponent <|-- BFAISensor BFAICognitiveComponent <|-- BFAIStateThinker BFAICognitiveComponent <|-- BFAITaskThinker BFAISensor <|-- BFAISensorSelf BFAISensor <|-- ZTAISensor ZTAISensor <|-- ZTAISensorExplore ZTAISensor <|-- ZTAISensorTour BFAIStateThinker <|-- ZTAIStateThinker BFAITaskThinker <|-- ZTAITaskThinker BFAITaskThinker <|-- ZTAIStaffTaskThinker BFAITaskThinker <|-- ZTAITourTaskThinker
Reconstructed cognition fields: BFAISensor has sensor_type/subject_type/
target_types; BFAIStateThinker has current_state + state_vars : Vec~BFAIStateVar~;
BFAIDataController holds thresholds : Vec~BFAIDataThresholdController~
(property_name/minimum/maximum); and BFAIEntityDataShared is literally the
b_*/s_*/f_*/p_* maps — bool_properties, string_properties, float_properties,
float_maps, vector_properties (keyed BTreeMaps).
Sensors are a wide family (ZTAISensorExplore, …Land, …Path, …Show, …Tour,
…Transport, …VA view-area, …TA traversable-area, …FossilSites, …Rampage,
…RampagingAnimals). Cognition reads attribute data — BFAIAttributeFloatMap
(BFAIBiomeMap, BFAINeedAdjusts), BFAISubjectData/BFAITargetData — and is
driven on a ThinkerInterval schedule.
Task pipeline (pick a concrete job)
BFAITaskThinker selects from BFAITaskTemplates (authored under BFAITaskCatalog/
BFAITaskDocument):
classDiagram
class BFAITaskTemplate {
+name : Name
+unique_id : UniqueID
+task_delay_min_seconds : TaskDelayMin
+task_delay_max_seconds : TaskDelayMax
+create_data / eval_data / execution_data
+completion_data / failure_data
+follow_up_behaviors[] / sections[]
+evaluate() TODO
+instantiate() BFAITaskRoot TODO
}
class BFAICreateData {
+behavior_type / subject_type / target_type
+subject_selectors[] / target_selectors[] / object_selectors[]
+qualifiers[]
}
class BFAIEvalData {
+evaluator_name; +fixed_score; +need_points_bad; +threshold
+evaluators[]; +controllers[]; +multi_controller
}
class BFAICompletionData {
+token_name; +success
+mutations[]; +feedback[]; +follow_up
}
class BFAITaskRoot {
+template_name; +behavior; +execution; +state
+run() TODO
+complete() TODO
+fail() TODO
}
class BFAIToken {
+name; +give_to; +payload; +force
+owner_entity; +target_entity; +target_position
}
BFAITaskTemplate *-- BFAICreateData
BFAITaskTemplate *-- BFAIEvalData
BFAITaskTemplate *-- BFAICompletionData
BFAICompletionData <|-- BFAIFailureData
BFAITaskTemplate ..> BFAITaskRoot : instantiate
BFAITaskThinker --> BFAITaskTemplateList : candidates
BFAITaskThinker o-- BFAITaskRoot : active_task
BFAITaskRoot ..> BFAIToken : reserves
BFAICreateData selects subjects/targets/objects via selector lists + qualifiers
(BFAISubjectSelector wraps a BFAISelector + BFAISubjectData subject_type/token_name;
BFAIQualifier carries required_tokens/rejected_tokens/required_properties);
BFAIEvalData scores (fixed score, need-points, threshold, evaluators + data
controllers); instantiate turns a chosen template into a BFAITaskRoot whose run
drives a behavior tree and whose complete/fail apply mutations, feedback, and
follow-up behaviors. BFAIToken/BFAITokenList reserve targets (give_to, force).
Open (from todo!()): template evaluate/instantiate, BFAITaskRoot run/
complete/fail, and the suppress-failure-message policy.
Behavior layer (do the job)
BFBehavior < BFComponent has ~78 subtypes — the verbs of the simulation.
BFBehExecTask is the bridge from the task pipeline; BFBehaviorMgr sequences them.
classDiagram BFComponent <|-- BFBehavior BFBehavior <|-- BFBehExecTask BFBehavior <|-- BFBehaviorMgr BFBehavior <|-- BFBehRoute BFBehavior <|-- BFBehDock BFBehavior <|-- BFBehGotoPos BFBehavior <|-- BFBehFollowEntity BFBehavior <|-- BFBehAnimate BFBehavior <|-- BFBehSendEvent BFBehRoute <|-- BFBehExecPath BFBehRoute <|-- ZTBehPathRoute BFBehRoute <|-- ZTBehTransportRoute BFBehDock <|-- BFBehDockSpline BFBehDockSpline <|-- ZTBehDockPortal BFBehDockSpline <|-- ZTBehDockTankWall BFBehavior <|-- ZTBehUseGate ZTBehUseGate <|-- ZTBehUsePortal ZTBehUseGate <|-- ZTBehUseTankGate ZTBehUseGate <|-- ZTBehExitTankGate BFBehavior <|-- ZTBehVehicleBase ZTBehVehicleBase <|-- ZTBehVehicleGround ZTBehVehicleBase <|-- ZTBehVehicleSky
Reconstructed: BFBehavior base carries behavior_type, subject,
target, event_root; each subtype adds its own params.
Behavior families: routing (BFBehRoute/ExecPath/PathRoute/TransportRoute),
docking (BFBehDock* Now/Queue/Radial/Spline/TAP), movement (GotoPos, FollowEntity,
FollowSpline, Wander, Fall, EscapeObstacle, Evasion), animation
(BFBehAnimate*, AnimSwitchSet), messaging (SendEvent, SendToken, SendTrigger,
SetAttribute, Spawn, Script), and the ZT verbs (CureDisease, DigArtifact,
Tour, WatchShow, RideVehicle, ClimbLadder, Morph, SplashGuest,
StaffTrainAnimal, ChangeWaterDirtiness, KickOffRider, ...).
Motor layer (move the body)
classDiagram BFComponent <|-- BFSteer BFComponent <|-- BFSteeringMgr BFSteer <|-- BFSteerSeek BFSteer <|-- BFSteerPursuit BFSteer <|-- BFSteerAvoidObstacle BFSteer <|-- BFSteerAvoidEntity BFSteer <|-- BFSteerWander BFComponent <|-- BFLocomotion BFLocomotion <|-- BFLocoAnimate BFComponentContainer <|-- BFLocomotionMgr
BFSteeringMgr blends active BFSteer behaviors (Seek/Pursuit/Avoid*/Align/Depth/
Evasion/Wander/Vector) into a desired vector; BFLocomotionMgr realizes it as animated movement (BFLocoAnimate). BFSteeringProfiles
aggregates the per-entity active steering set (align / avoid_entity / avoid_obstacle(_ahead) /
avoid_vehicle / depth / evasion / pursuit / seek / wander vectors).
Runtime loop
sequenceDiagram participant Mgr as BFAIMgr / ZTAIMgr participant Cog as BFAICognitiveComponent participant Sen as BFAISensor participant TT as BFAITaskThinker participant Beh as BFBehExecTask -> BFBehavior participant Steer as BFSteeringMgr + BFLocomotionMgr Mgr->>Cog: tick on ThinkerInterval Cog->>Sen: perceive (targets, biome, needs) Sen-->>TT: candidate subjects/targets TT->>TT: score BFAITaskTemplates (BFAIEvalData) TT->>TT: reserve target (BFAIToken) TT->>Beh: execute chosen task Beh->>Steer: request movement Steer-->>Beh: arrived / blocked Beh-->>TT: BFAICompletionData / BFAIFailureData
Managers
BFAIMgr < BFAIComponentList (game: ZTAIMgr) owns the AI world. Per-entity-type
cognition managers derive from BFAIEntityMgr: ZTAIGuestMgr, ZTAIStaffMgr,
ZTAIAmbientsMgr. Specialized managers: BFAIRelationshipMgr, BFAIShowMgr
(ZTAIShowMgr), BFAITrickMgr (ZTAITrickMgr), BFAICognitiveMgr,
ZTAIStaffWaterCleaningMgr, ZTAITrickPopularityMgr.
Shows, tricks, tours
Shows are a scheduled state machine (ZTAIShowMgr/ZTAIShowScheduler/ZTAIShow/
ZTAIShowComponent/ZTAIShowEvent):
stateDiagram-v2 [*] --> BETWEENSHOWS BETWEENSHOWS --> PRESHOW PRESHOW --> CONDUCTING CONDUCTING --> POSTSHOW POSTSHOW --> BETWEENSHOWS
Show runtime fields: ZTAIShowMgr holds show_songs, score_table
(ShowScoreBand), show_size_table, effect_sets; a ShowSong is song_name/sound, a ShowScoreBand is
min_tricks/min_score/show_score. ZTAIShow carries
show_token_name, state : ShowState, animal_data, guests_invited,
ran_to_completion; ZTAIShowScheduler holds queued_shows, between_shows_time_block,
pre_show_time_seconds, post_show_time_seconds. Staff: ZTAIStaffMgr
adds job_safe_distance, steal_job_threshold, time_category_duration_seconds; staff roles are interned as
StaffRoleTypeHandle (role/type_token/runtime_handle).
Tricks: ZTAITrickComponent/Data/Level/Mgr/TargetComponent/PopularityMgr.
Tours: ZTAITourTaker/Data/TourTaskThinker/ZTAISharedTourTaker. Guest viewing
and donations are behavior-driven (ZTBehViewAnimals, ZTBehViewEvent,
process_guest_animal_donation_candidates, the edDonate functions).
Guest viewing and donation
The guest donation/education loop is reconstructed — and recovers some of the donation formula the open contracts flagged:
classDiagram
class ZTGuestDonationCandidate {
+target_entity; +target_species; +view_key
+education_value; +donation_value; +max_tour_view_value
}
class ZTGuestDonationScoreFactors {
+base_donation_amount
+max_species_donation_factor
+preferred_animal_view_factor; +preferred_animal_donate_factor
+view_species_discount; +view_species_discount_cap
}
class ZTGuestViewedSpeciesMemory { +guest_entity; +scores; +preferred_animal; +view_species_discount }
class ZTEdDonateTask { +view_key; +ed_value; +ed_donate; +view_radius; +target_type }
ZTGuestViewedSpeciesMemory ..> ZTGuestDonationCandidate : scores
ZTGuestDonationScoreFactors ..> ZTGuestDonationCandidate : weights
A guest accumulates ZTGuestViewedSpeciesMemory (per-species view scores + a
preferred_animal); a ZTGuestDonationCandidate weighs education_value/
donation_value/max_tour_view_value; ZTGuestDonationScoreFactors carries the
weighting constants (base_donation_amount, max_species_donation_factor,
preferred_animal_*_factor, repeat-view view_species_discount/cap). ZTEdDonateTask
is the education-donate behavior (ed_value/ed_donate/view_radius). Behaviours
ZTBehViewAnimals/ZTBehViewEvent drive it.
Message surface
102 registered BFAI_*/ZTAI_* tokens form the AI query/command/event vocabulary:
the BFAI_EVENT root; queries (BFAI_GET_CRITICAL, …GET_ARRIVAL,
…GET_RELATED_ENTITIES, ZTAI_GET_SHOW_STAR_RATING, ZTAI_GET_TRICK_SCORE,
ZTAI_GET_DONATION_POINTS, ...); tests (BFAI_IS_ENTITY_CONTAINED, …IN_HABITAT,
…ON_BIOME, BFAI_HAS_TOKEN); commands (BFAI_CREATE_ENTITY,
BFAI_REGISTER_ENTITY, BFAI_ADD_RELATIONSHIP, BFAI_SET_TOKEN_TARGET,
BFAI_REMOVE_TOKEN); attribute-changed notifications
(BFAI_ATTRIBUTE_CHANGED_BOOL/FLOAT/POINT3/STRING); and the BEH_EVENT_ROOT/
LOCO_EVENT_ROOT/STEER_EVENT_ROOT per-layer roots.
show relationship model
classDiagram BFAITrickMgr <|-- ZTAITrickMgr ShowDomain "1" --> ZTAIShowMgr : show_manager ShowDomain "1" --> BFAITrickMgr : bf_trick_manager ShowDomain "1" --> ZTAITrickMgr : trick_manager ShowDomain "1" --> ZTAITrickPopularityMgr : popularity_manager ShowDomain "1" --> ZTShowMixerManager : mixer_manager ShowDomain "1" --> ZTShowTimerManager : timer_manager ShowDomain "*" --> ZTAIShow : active_shows ShowDomain "*" --> ZTShowMixerEvent : mixer_events ShowDomain "*" --> ZTShowSchedulerEvent : scheduler_events ShowDomain "1" --> ZTShowSelectionState : show_selection ShowEffectSet "*" --> ShowEffect : effects ZTAITrickTrainingRequest "0..1" --> ZTAITrickLevel : selected_level
classDiagram ZTAITrickData "0..1" --> ZTAITrickPrerequisite : prerequisite ZTAITrickData "0..1" --> ZTAITrickTargetData : target ZTAITrickData "*" --> ZTAITrickLevel : levels ZTAITrickData "1" --> ZTAITrickResultTokens : result_tokens ZTShowMix "*" --> ShowEffect : effects ZTShowMixerManager "*" --> ZTShowMixerIcon : icons ZTShowMixerManager "0..1" --> ZTShowMixerHighlightColor : highlight_color ZTShowMixerManager "*" --> ZTShowMix : mixes ZTShowMixerManager "*" --> ZTShowMixerChannel : channels ZTShowTimerManager "*" --> ZTShowTimer : timers ZTShowTimerManager "*" --> ZTShowTimerState : active_timers
ai relationship model
classDiagram BFAIEntityData <|-- BFAIEntityDataShared AiDomain "1" --> BFAITaskCatalog : task_catalog AiDomain "1" --> BFBehaviorMgr : behavior_mgr AiDomain "1" --> BFLocomotionMgr : locomotion_mgr AiDomain "*" --> BFAIEntityDataShared : entity_shared_data AiDomain "*" --> BFAIEntityData : entity_data AiDomain "*" --> ZTBehaviorType : behavior_types AiDomain "*" --> BFAIToken : tokens AiDomain "*" --> ZTAISensor : sensors AiDomain "*" --> BFAISensorSelf : self_sensors AiDomain "*" --> ZTAISensorPath : path_sensors AiDomain "*" --> ZTAISensorTA : ta_sensors AiDomain "*" --> ZTAISensorVA : va_sensors AiDomain "*" --> BFAINoPerceive : no_perceive_rules AiDomain "*" --> BFAIScriptData : script_data AiDomain "*" --> ZTAIInfluenceWatcher : influence_watchers AiDomain "*" --> BFGInfluenceController : influence_controllers AiDomain "*" --> BFGPhysAnimController : phys_anim_controllers AiDomain "*" --> ZTBeh : active_behaviors AiDomain "*" --> ZTAIStateThinker : zt_state_thinkers AiDomain "*" --> ZTAITaskThinker : zt_task_thinkers AiDomain "*" --> ZTAIViewData : view_data AiDomain "*" --> ZTAITourTaker : tour_takers AiDomain "*" --> ZTAIViewAnimals : view_animals
classDiagram BFAIMultiDataController "*" --> BFAIDataController : controllers BFAIBehaviorSetDocument "*" --> BFAIBehaviorSetRecord : behavior_sets BFAIBehaviorSetRecord "1" --> BFAIBehaviorSet : behavior_set BFAIBehaviorSetRecord "*" --> BFAITaskSection : sections BFAIExecutionData "1" --> BFAIBehaviorSet : behavior_set BFAIExecutionData "*" --> BFAITaskSection : sections BFAIEvaluator "0..1" --> BFAIEvaluatorKind : kind BFAIBiomeMapEval "1" --> BFAIBiomeMap : map BFAITargetSelector "1" --> BFAISelector : selector BFAITargetSelector "0..1" --> BFAITargetData : target_data BFAIObjectSelector "1" --> BFAISelector : selector BFAIBehaviorSet "*" --> BFBehavior : behaviors BFAIBehaviorSet "1" --> BFAIBehaviorSequence : sequence
classDiagram BFAISensor <|-- ZTAISensorPath BFAISensor <|-- ZTAISensorTA BFAISensor <|-- ZTAISensorVA BFAICogShared "*" --> BFAIStateVar : shared_state_vars BFAIFadeController "1" --> BFAIFadeHoldData : fade_hold ZTAISensorPath "1" --> BFAISensor : sensor ZTAISensorTA "1" --> BFAISensor : sensor ZTAISensorVA "1" --> BFAISensor : sensor ZTAISensorVA "*" --> ZTAIViewData : view_data ZTAIInfluenceWatcher "*" --> ZTAIInfluenceEffectData : effects ZTAIViewComponent "*" --> ViewedSpeciesScore : viewed_species ZTAIVisibleAnimalTarget "0..1" --> ZTAIViewpointCandidate : traversable_viewpoint ZTBehAnimateForViewFromTransport "1" --> ZTBehaviorInstance : instance ZTBehChangeWaterDirtiness "1" --> ZTBehaviorInstance : instance
classDiagram ZTBehFollowBase <|-- ZTBehFollowCable ZTBehFollowBase <|-- ZTBehFollowTrack ZTBehClimbLadder "1" --> ZTBehaviorInstance : instance ZTBehDigArtifact "1" --> ZTBehaviorInstance : instance ZTBehDockFence "1" --> ZTBehaviorInstance : instance ZTBehDockWater "1" --> ZTBehaviorInstance : instance ZTBehEconomy "1" --> ZTBehaviorInstance : instance ZTBehFeedback "1" --> ZTBehaviorInstance : instance ZTBehFindArtifact "1" --> ZTBehaviorInstance : instance ZTBehFollowBase "1" --> ZTBehaviorInstance : instance ZTBehFollowCable "1" --> ZTBehaviorInstance : instance ZTBehFollowTrack "1" --> ZTBehaviorInstance : instance ZTBehKickOffRider "1" --> ZTBehaviorInstance : instance ZTBehMorph "1" --> ZTBehaviorInstance : instance ZTBehPlaceTarget "1" --> ZTBehaviorInstance : instance ZTBehReplaceTrickObject "1" --> ZTBehaviorInstance : instance ZTBehRideVehicle "1" --> ZTBehaviorInstance : instance ZTBehShowEvent "1" --> ZTBehaviorInstance : instance ZTBehSplashGuest "1" --> ZTBehaviorInstance : instance
classDiagram ZTBehStaffTrainAnimal "1" --> ZTBehaviorInstance : instance ZTBehTargetFence "1" --> ZTBehaviorInstance : instance ZTBehTeleportToLoc "1" --> ZTBehaviorInstance : instance ZTBehTestTargetPos "1" --> ZTBehaviorInstance : instance ZTBehTour "1" --> ZTBehaviorInstance : instance ZTBehUseTransport "1" --> ZTBehaviorInstance : instance ZTBehWatchShow "1" --> ZTBehaviorInstance : instance ZTGuestDonationMemory "*" --> ZTGuestDonationCandidate : candidates ZTGuestDonationMemory "0..1" --> ZTAIDonationTaskState : active_task ZTGuestDonationMemory "1" --> ZTGuestViewedSpeciesMemory : viewed_species ZTGuestDonationMemory "1" --> ZTGuestDonationPruning : pruning ZTPAPTBFAIEntityDataInstance "*" --> ZTPredicate : predicates ZTPAPTBFPhysObj "*" --> ZTQUERY : position_queries
staff relationship model
classDiagram StaffDomain "1" --> ZTAIStaffMgr : manager StaffDomain "*" --> ZTStaffRequestData : requests StaffDomain "*" --> ZTAIStaffAssignment : assignments StaffDomain "*" --> ZTAIStaffAssignmentComponent : assignment_components StaffDomain "*" --> ZTStaffTimeCategory : time_categories StaffDomain "1" --> ZTStaffAssignmentUi : assignment_ui StaffDomain "1" --> ZTAIStaffCandidateSet : candidate_cache StaffDomain "*" --> ZTUserStaffAction : user_actions ZTAIStaffRequestController "*" --> ZTStaffRequestData : pending ZTAIStaffRequestController "*" --> ZTStaffRequestData : accepted ZTAIStaffRequestController "*" --> ZTAIStaffRequestEvaluation : rejected ZTAIStaffRequestController "*" --> ZTAIStaffBadEntityRecord : bad_entities ZTAIStaffJobQueue "*" --> ZTAIStaffJob : pending_jobs ZTAIStaffJobQueue "*" --> ZTAIStaffJob : active_jobs ZTAIStaffJobQueue "*" --> ZTAIStaffJob : completed_jobs ZTAIStaffJobQueue "*" --> ZTAIStaffJob : failed_jobs ZTAIStaffJobQueue "*" --> ZTStaffTimeCategory : time_categories ZTAIStaffJob "0..1" --> ZTStaffTimeCategory : time_category ZTAIStaffJob "1" --> ZTAIStaffJobStatus : status ZTAIStaffAssignmentComponent "*" --> ZTAIStaffAssignment : assignments ZTAIBadEntityCleanupQueue "*" --> ZTAIStaffBadEntityRecord : bad_entities ZTAIStaffRequestEvaluation "0..1" --> ZTStaffRequestData : request ZTAIStaffRequestEvaluation "*" --> ZTAIStaffCandidate : candidates ZTAIStaffCandidateSet "*" --> ZTAIStaffCandidate : candidates ZTAIStaffCandidate "0..1" --> StaffRole : role
classDiagram ZTDinoRecoveryTargetSet "*" --> ZTDinoRecoveryTarget : active_targets ZTStaffAssignmentUi "1" --> ZTStaffAssignmentCursor : cursor ZTStaffAssignmentUi "*" --> ZTStaffAssignmentPanel : panels ZTStaffAssignmentUi "1" --> ZTStaffAssignmentTargetSelector : target_selector ZTStaffAssignmentPanel "0..1" --> StaffRole : role ZTStaffRoleTypeIntern "*" --> StaffRoleTypeHandle : registered_roles ZTStaffTaskTokenBinding "0..1" --> StaffRole : staff_role ZTStaffTokenConfig "1" --> BFAITokenList : tokens ZTUserStaffAction "0..1" --> ZTStaffRequestData : request
Open contracts (AI)
- The task scoring/tie-break formula and the exact
ThinkerIntervalcadence per cognitive type are not yet reconstructed. - Token reservation lifetime and conflict-resolution policy are not yet modeled.
BFSteeringMgrblend weights and arbitration order between activeBFSteercomponents are unknown.- The show scheduler's timeslot selection and trick-difficulty/popularity formulae are open.
World, Terrain, Placement, Fences, Paths, and Tanks
The world is five cooperating systems: a terrain heightfield + biome paint, a
placement grid of tiles, collision/traversability/pathfinding over that grid,
linear-structure systems (fences, tanks, paths, transport) that occupy it, and an
editing-mode + transaction/undo front end. All world objects are BFComponent
subtypes; editing tools are ZTMode subtypes; mutations are BFGTransactions that the
undo stack can reverse.
Terrain and biome
classDiagram
BFComponent <|-- BFTerrain
BFComponent <|-- BFTerrainBiome
BFTerrainBiome <|-- BFGBiome
BFComponent <|-- BFWorldEnvironment
BFComponent <|-- BFWaterfall
BFPhysComponent <|-- BFTerrainPaintComponent
BFNISceneGraphComponent <|-- BFTerrainDecalComponent
BFDecalComponent <|-- BFTerrainShadowComponent
BFWorldFittingSurface <|-- BFTerrainFittingSurface
BFTypedObj <|-- BFWorldFittingSurface
class BFGBiome { autoplacement variation masks; weighted object lists }
BFGBiome (< BFTerrainBiome) carries autoplacement data; it updates the variation-type
mask and reads a weighted object list to scatter foliage/rocks per biome.
BFWorldFittingSurface (and BFTerrain/BFGEntity fitting-surface variants) is the
query interface entities use to sit on the ground (see ground-fit below).
Placement grid
classDiagram
BFComponent <|-- BFGPlacementGrid
BFComponent <|-- BFGPlacementData
BFGPlacementData <|-- ZTPlacementData
BFTypedObj <|-- BFGPlacementTile
BFGPlacementTile <|-- BFGElevatedPlacementTile
BFComponent <|-- BFGElevatedSupportTracker
BFXMLObj <|-- ZTPlacementInfo
class BFGPlacementGrid { tile grid; occupancy }
class BFGElevatedSupportTracker { elevated path/track support }
BFGPlacementGrid owns the tile grid; BFGPlacementData/ZTPlacementData is the
per-object footprint authored data; elevated structures add
BFGElevatedPlacementTile + BFGElevatedSupportTracker (support columns) with
BFGElevatedTileData/Serializer persistence.
Collision, traversability, pathfinding
classDiagram BFTraversabilityMgr <|-- BFGTraversabilityMgr BFComponent <|-- BFGTraversableArea BFComponent <|-- BFGCollisionMgr BFComponent <|-- BFGCollisionHandler BFComponent <|-- BFGCollisionTester BFComponent <|-- BFGCollisionData BFPhysComponent <|-- BFGridCollisionComponent BFComponent <|-- BFGPathFinderMgr BFComponent <|-- BFGRampageMgr
BFGTraversabilityMgr answers the
placement predicates and the OUT_OF_ANIMAL_TRAVERS_AREA
check; BFGPathFinderMgr routes movers; BFGRampageMgr handles escaped-animal rampage over the
same grid, driven by BFGRampageConfig (the formula): update_interval_seconds,
max_good_points/max_bad_points, base_rampage_chance/max_rampage_chance,
rampaging_animal_factor, rampage_timeout_seconds.
Linear structures: fences, tanks, gates, paths, transport
The fence system is the base for aquatic tanks — ZTTankSegment is a ZTFence.
Gates generalize across tanks and transport. Transport is circuits + tracks +
stations + gates.
classDiagram BFComponent <|-- ZTFence ZTFence <|-- ZTTankSegment ZTTankSegment <|-- ZTTankGateSegment BFComponent <|-- ZTFenceSegmentInfo BFGEntity <|-- ZTFenceEntity BFComponent <|-- ZTGate ZTGate <|-- ZTTankPortal ZTGate <|-- ZTTransportCrossingGate ZTGate <|-- ZTTransportVehicleGate BFComponent <|-- ZTPathBase ZTPathBase <|-- ZTPath ZTPathBase <|-- ZTPathElevated BFComponent <|-- ZTTank BFComponent <|-- ZTTankMgr ZTExpandoComponent <|-- ZTTankSupport
classDiagram BFGTransportationMgr <|-- ZTTransportationMgr BFComponent <|-- ZTTransportCircuitPrivateBase ZTTransportCircuitPrivateBase <|-- ZTTransportCircuitBase ZTTransportCircuitBase <|-- ZTTransportGroundCircuit ZTTransportCircuitBase <|-- ZTTransportSkyCircuit BFComponent <|-- ZTTransportTrack ZTTransportTrack <|-- ZTTransportGroundTrack ZTTransportTrack <|-- ZTTransportSkyTrack BFComponent <|-- ZTTransportStationBase ZTTransportStationBase <|-- ZTTransportStationGround ZTTransportStationBase <|-- ZTTransportStationSky
Reconstructed field detail (transport)
Modeled fields: ZTTransportationMgr holds circuits : Vec~ZTTransportCircuit~,
route_direction, paused_circuits, selected_vehicle_type; BFGTransportationMgr
holds stations/vehicles/tracks. A ZTTransportCircuit links
station_ids/track_ids/vehicle_ids with a closed flag — the runtime ride loop. A ZTTransportVehicle has entity_type,
seat_count/occupied_seats, route_token; ZTTransportStation has station_kind,
capacity/occupancy; ZTTransportTrack has track_kind + endpoints.
Reconstructed field detail (terrain / placement / tank / fence)
Modeled fields:
classDiagram
class BFTerrain {
+grid_width / grid_height
+height_map : AssetPath
+terrain_biomes : Vec~BFTerrainBiome~
+vertices : Vec~BFTerrainVertex~
+triangles : Vec~BFTerrainTriangle~
}
class ZTPlacementData {
+mode_name; +cursor_xml; +footprint_xml
+validation_messages[]; +failure_catalog
}
class ZTFootprintPreview { +footprint_xml; +grid_cells[]; +blocked_cells[] }
class ZTTankMgr {
+water_height_offset; +floor_height_offset
+minimum_water_depth; +minimum_show_tank_depth
+selected_tank; +pending_height_commands[]
}
class ZTFence { +fence_id; +fence_type; +entities : Vec~ZTFenceEntity~ }
class ZTFenceEntity { +entity_id; +segment_info; +health }
class ZTFenceType { +entity_type; +segment_entity; +gate_entities[]; +cost }
ZTFence "1" *-- "*" ZTFenceEntity
ZTFenceType ..> ZTFence : authors
ZTPlacementData *-- ZTFootprintPreview
ZTFenceType is the authored fence definition (segment/gate entities, cost);
ZTTankMgr adds water/floor depth tuning and pending height commands over the fence
base. ZTPlacementData carries the cursor/footprint assets and a
ZTPlacementFailureCatalog (messages : Vec~ZTPlacementFailureMessage~) that maps each
place_*/too_steep/CANNOT_AFFORD/UNRESEARCHED result token to its UI message.
Editing modes (tool layer)
The ZTMode base (ZTModeRuntimeFields) is an XML-configured interaction
handler: cursor, ui_layout, active, state_token, config_fields, layout_guis,
hotkeys/inline_hotkeys, event_blocks : Vec~ZTModeEventBlock~, and
message_handlers : Vec~ZTModeMessageHandler~. The reconstruction also models the native
surface explicitly — ZTModeClassSurface { runtime, type_cache, vtable, input_state }.
World editing is driven by ZTMode subtypes (a shared interaction-mode base used
across the game). The placement/world tools are ZTPlacementMode
(< ZTEntityMovementMode), ZTFenceMode, ZTPathMode, ZTElevatedPathMode,
ZTElevatedCurbMode, ZTBiomeMode (< ZTEntityMovementMode), ZTGroundTrackMode,
ZTTankCommandReader, ZTTerrainCommandReader. (The full ZTMode catalog also
covers camera/file/game/photo/gesture/training/overhead/main interaction modes.)
Placement transaction flow
sequenceDiagram participant Mode as ZTPlacementMode participant Val as validators participant Grid as BFGPlacementGrid + BFGTraversabilityMgr participant Tx as BFGTransaction / ZTTransaction participant Undo as BFGUndoMgr / ZTUndoMgr Mode->>Val: preview at cursor tile Val->>Grid: footprint + traversability + slope test Val->>Val: money (CANNOT_AFFORD) + research (UNRESEARCHED) Val-->>Mode: place_yes | place_no + reason (too_steep, place_fence_overlap, no_headroom_path, OUT_OF_ANIMAL_TRAVERS_AREA) Mode->>Tx: commit (charge, mutate grid, attach entity) Tx->>Undo: push BFUndoTransactionData Tx->>Grid: refresh collision/traversability/pathfinding queries
Result tokens are native string constants emitted by the validators/modes:
place_yes/place_no, place_fence/place_fence_overlap, place_path/
no_headroom_path, place_track, place_tree/place_plant/place_rock,
place_vehicle_ground/place_vehicle_sky, place_animal_entity, plus
too_steep, CANNOT_AFFORD, UNRESEARCHED, OUT_OF_ANIMAL_TRAVERS_AREA.
Transactions and undo
classDiagram BFComponent <|-- BFGTransaction BFGTransaction <|-- ZTTransaction BFComponent <|-- BFGTransactionTracker BFComponent <|-- BFUndoMgr BFUndoMgr <|-- BF3DUndoMgr BF3DUndoMgr <|-- BFGUndoMgr BFGUndoMgr <|-- ZTUndoMgr BFXMLObj <|-- BFUndoTransactionData BFXMLObj <|-- BFGEconomyTransactionData
Ground-fit (entities sitting on the world)
BFGroundFitComponent and its specializations (BF2LegsGroundFitComponent,
BF4LegsGroundFitComponent, BFBirdGroundFitComponent, BFHoverGroundFitComponent,
BFWaterGroundFitComponent, BFAboveGroundFitComponent, BFMultiGroundFitComponent,
BFLegFitComponent, ZTFPSCameraGroundFitComponent,
ZTUnderwaterFloatGroundFitComponent) query a BFWorldFittingSurface to place an
entity's height/tilt/contact. Hydrated keys:
heightOffset, maxTilt, fitRadius, fitLowest, tiltGain, groundFitSatisfied,
autoHeightOffset, floatOnWater, waterOffset. The fit algorithm is native.
transport relationship model
classDiagram TransportDomain "1" --> ZTTransportationMgr : manager TransportDomain "1" --> ZTTourData : tour_data TransportDomain "1" --> ZTTourRecorderData : recorder TransportDomain "*" --> ZTTransportCircuit : circuits TransportDomain "*" --> ZTTransportGroundCircuit : ground_circuits TransportDomain "*" --> ZTTransportSkyCircuit : sky_circuits TransportDomain "*" --> ZTTransportVehicle : vehicles TransportDomain "*" --> ZTTransportStation : stations TransportDomain "1" --> ZTTransportQuerySet : queries ZTChangeCircuitDirectionCommand "0..1" --> RouteDirection : requested_direction ZTTourData "*" --> ZTTourDataAttr : tours ZTTourData "*" --> ZTTourDataFeedback : feedback ZTTourRecorderData "*" --> ZTTourWaypoint : waypoints
classDiagram ZTTransportQuerySet "1" --> ZTGetCircuitQuery : circuit_query ZTTransportQuerySet "1" --> ZTClosedCircuitQuery : closed_circuit_query ZTTransportQuerySet "1" --> ZTConnectedSkyPieceQuery : connected_sky_piece_query ZTTransportQuerySet "1" --> ZTTransportPassengerQuery : passenger_query ZTTransportQuerySet "1" --> ZTTourStarRatingQuery : tour_star_rating_query ZTVehicleGround "1" --> ZTTransportVehicle : vehicle ZTVehicleSky "1" --> ZTTransportVehicle : vehicle
fence relationship model
classDiagram FenceDomain "*" --> ZTFenceType : fence_types FenceDomain "*" --> ZTFence : fences FenceDomain "*" --> ZTFenceSegmentInfo : segments FenceDomain "*" --> ZTGate : gates FenceDomain "*" --> ZTTankPortalSegment : tank_portals FenceDomain "1" --> FencePlacementShape : current_shape FenceDomain "1" --> ZTFenceModeState : placement_mode FenceDomain "*" --> ZTFenceTopologyEvent : topology_events ZTFenceModeState "1" --> FencePlacementShape : shape ZTFenceModeState "0..1" --> ZTFenceModeRotation : last_rotation ZTFenceModeCommandDecision "0..1" --> FencePlacementShape : shape ZTFenceModeCommandDecision "0..1" --> FencePlacementShape : previous_shape ZTFenceModeCommandDecision "0..1" --> ZTFenceModeRotation : rotation ZTFenceModeCommandDecision "0..1" --> ZTFenceModeUndoAction : undo_action ZTFenceModeUndoAction "0..1" --> ZTFenceModeRubberBandUndo : rubber_band_restore ZTFenceModeUndoAction "0..1" --> ZTFenceModeGateUndo : gate_restore ZTFenceModeGateUndo "1" --> FencePlacementShape : restored_shape ZTFenceModeRotation "1" --> FencePlacementShape : shape
world relationship model
classDiagram BFCameraComponent <|-- BFFPSCameraComponent AutoPlacementVariation "1" --> ObjectTypeMask : object_mask AutoPlacementVariation "*" --> WeightedObject : weighted_objects BFBoundedObjectComponent "1" --> BFEntityComponentCommon : common BFBoundedObjectComponent "0..1" --> GridRect : bounds BFCollisionComponent "1" --> BFEntityComponentCommon : common BFCollisionComponent "1" --> BFGCollisionData : collision_data BFCollisionComponent "0..1" --> BFGCollisionTest : last_test BFDebugComponent "1" --> BFEntityComponentCommon : common BFDockingComponent "1" --> BFEntityComponentCommon : common BFEntityComponentCommon "*" --> BFComponentProperty : properties BFEnvMapSwapComponent "1" --> BFEntityComponentCommon : common BFFPSCameraComponent "1" --> BFCameraComponent : base BFFallComponent "1" --> BFMovingComponent : base BFForceUpdateWhenVisibleComponent "1" --> BFEntityComponentCommon : common
classDiagram BFGEntityContainerSlot <|-- BFGEntityContainerSlotHeavy BFGEntityContainerSlot <|-- BFGEntityContainerSlotLight BFGPlacementTile <|-- BFGTerrainPlacementTile BFForwardMovingComponent "1" --> BFMovingComponent : base BFGEntityContainerSlot "1" --> EntityContainerSlotClass : slot_class BFGEntityContainerSlotLight "1" --> BFGEntityContainerSlot : base BFGEntityContainerSlotHeavy "1" --> BFGEntityContainerSlot : base BFGEventRoot "*" --> BFGEventRecord : events BFGFittingSurfaceComponent "0..1" --> BFWorldFittingSurface : fitting_surface BFGGame "*" --> BFGWorld : worlds BFGGame "1" --> BFGEventRoot : event_root BFGRemoveEntityBatch "*" --> BFGRemoveEntityBatchEntry : entries BFGTerrainPlacementTile "1" --> BFGPlacementTile : base
classDiagram BFGWorld "*" --> BFGEntity : entities BFGWorld "1" --> BFGPlacementGrid : placement_grid BFGWorld "1" --> BFGWorldMutationQueue : mutation_queue BFGWorld "1" --> BFGGameAttachment : attached_game BFGWorld "1" --> BFGWorldAttachment : attached_world BFGWorld "1" --> BFGEntityTypeIndex : entity_type_index BFGWorld "1" --> BFGEventRoot : event_root BFGWorldMutationQueue "*" --> BFGSpawnEntityRequest : spawn_requests BFGWorldMutationQueue "*" --> BFGRemoveEntityBatch : remove_batches BFGWorldMutationQueue "*" --> BFGEntityColorCommand : color_commands BFGWorldMutationQueue "*" --> BFGComponentLookup : component_lookups BFGWorldMutationQueue "*" --> BFGEntityBatchActionEvent : batch_events BFGestureSplineComponent "1" --> BFEntityComponentCommon : common BFHasParticleComponent "1" --> BFEntityComponentCommon : common BFHelpComponent "1" --> BFEntityComponentCommon : common BFManipSensorComponent "1" --> BFEntityComponentCommon : common
classDiagram BFCameraComponent <|-- BFOverheadCameraComponent BFMovingComponent "1" --> BFEntityComponentCommon : common BFOverheadCameraComponent "1" --> BFCameraComponent : base BFOverheadCameraComponent "0..1" --> BFOverheadCameraFrustum : frustum BFOverheadCameraComponent "0..1" --> GridRect : pan_bounds BFOverheadCameraUDVComponent "1" --> BFEntityComponentCommon : common BFOverheadCameraUDVComponent "*" --> BFOverheadCameraZoomSpeedMod : zoom_speed_mod BFPhysObj "1" --> BFPhysicsComponent : physics BFPhysObj "0..1" --> BFOverheadCameraComponent : overhead_camera BFPhysObj "0..1" --> BFOverheadCameraUDVComponent : overhead_camera_udv BFPhysObj "0..1" --> BFBoundedObjectComponent : bounded_object BFSpineBendComponent "1" --> BFEntityComponentCommon : common BFStaticBlobShadowComponent "1" --> BFEntityComponentCommon : common BFSuicideComponent "1" --> BFEntityComponentCommon : common BFSwimComponent "1" --> BFMovingComponent : base BFTextTagMacrosComponent "1" --> BFEntityComponentCommon : common BFTextTagMacrosComponent "*" --> BFTextTagMacro : macros BFTravAnimPathComponent "1" --> BFEntityComponentCommon : common
classDiagram BFTriggeredEventsComponent "1" --> BFEntityComponentCommon : common BFTriggeredEventsComponent "*" --> BFTriggeredEvent : triggers BFUserDrivenVehicleComponent "1" --> BFEntityComponentCommon : common BFWindowComponent "1" --> BFEntityComponentCommon : common BFWindowComponent "0..1" --> GridRect : region BiomeDefinition "0..1" --> WaterDefinition : water BiomeDefinition "*" --> WeightedObjectList : detail_objects BiomeDefinition "*" --> WeightedObjectList : decorative_detail_objects BiomeDefinition "*" --> AutoPlacementVariation : auto_placement EntityContainerSchema "*" --> EntityContainerSlotSchema : slots EntityContainerSlotSchema "1" --> EntityContainerSlotClass : slot_class PlacementPredicateInput "1" --> PlacementMode : mode PlacementPredicateInput "1" --> GridRect : bounds PlacementPredicateInput "1" --> ObjectPlacementFlags : object_flags
classDiagram TraversabilityConfig "1" --> ViewingConfig : viewing TraversabilityConfig "*" --> TraversalEntityConfig : entities TraversabilityConfig "*" --> CollisionTesterConfig : collision_testers WeightedObjectList "*" --> WeightedObject : objects WorldDomain "1" --> BFGGame : game WorldDomain "0..1" --> BFGWorld : active_world WorldDomain "1" --> BFGPlacementGrid : placement_grid WorldDomain "1" --> BFGCollisionMgr : collision_mgr WorldDomain "*" --> ZTZooSurveyAdjustment : zoo_survey_adjustments ZTDevComponent "1" --> BFEntityComponentCommon : common ZTDevComponent "0..1" --> ZTComponentLock : profile_lock ZTDevComponent "0..1" --> ZTComponentLock : game_lock ZTDevComponent "0..1" --> ZTEyedropperState : eyedropper
classDiagram BFTriggeredEventsComponent <|-- ZTTriggeredEventsComponent ZTFeedbackComponent "1" --> BFEntityComponentCommon : common ZTFeedbackComponent "0..1" --> ZTMessageInfo : current_message ZTFeedbackComponent "0..1" --> ZTThoughtInfo : current_thought ZTFeedbackComponent "0..1" --> ZTEmoticonInfo : current_emoticon ZTFeedbackComponent "0..1" --> ZTFeedbackClickTarget : click_target ZTOverviewComponent "1" --> BFEntityComponentCommon : common ZTOverviewComponent "*" --> ZTOverviewLayer : layers ZTOverviewComponent "1" --> ZTOverviewExport : export ZTTriggeredEventsComponent "1" --> BFTriggeredEventsComponent : base ZTTriggeredEventsComponent "*" --> ZTTriggeredEventRecord : pending_events
terrain relationship model
classDiagram BFTerrainEvent "*" --> ZTChangedTriangle : changed_triangles BFTerrainEvent "0..1" --> BFTerrainChargeCommand : charge BFTerrainMeshPatch "*" --> BFTerrainVertex : vertices BFTerrainMeshPatch "*" --> BFTerrainTriangle : triangles BFTerrainUndoData "*" --> BFTerrainUndoRecord : records BFTerrainUndoData "0..1" --> BFTerrainChargeCommand : final_charge BFTerrainUndoData "*" --> BFTerrainUndoBoundary : boundaries BFTerrainUndoRecord "0..1" --> BFTerrainMeshPatch : before_patch BFTerrainUndoRecord "0..1" --> BFTerrainMeshPatch : after_patch BiomeOptions "*" --> BiomeBrushSet : brush_sets MapsConfig "*" --> MapConfigEntry : entries TerrDeformationUI "*" --> TerrDeformationCursorTexture : cursor_textures TerrDeformationUI "*" --> TerrainBrush : brushes TerrPaintUI "*" --> TerrainBrush : biome_brushes
classDiagram TerrainDomain "1" --> ZTTerrainGrid : grid TerrainDomain "1" --> BFTerrain : bf_terrain TerrainDomain "*" --> BFTerrainMeshPatch : mesh_patches TerrainDomain "1" --> BFTerrainUndoData : undo_data TerrainDomain "*" --> BFTerrainChargeCommand : charge_queue TerrainDomain "1" --> BiomeOptions : biome_options TerrainDomain "1" --> TerrDeformationUI : deformation_ui TerrainDomain "1" --> TerrPaintUI : paint_ui TerrainDomain "1" --> MapsConfig : maps TerrainDomain "*" --> BFGBiome : biomes TerrainDomain "1" --> ZTAutoPlacementController : autoplacement TerrainDomain "1" --> ZTBiomeModeState : biome_mode TerrainDomain "1" --> ZTTerrainModeState : terrain_mode TerrainDomain "0..1" --> ZTTerrainCommandReader : active_command_reader TerrainDomain "*" --> ZTChangedTriangle : changed_triangles TerrainDomain "*" --> ZTBiomeObjectEvent : biome_events TerrainDomain "*" --> BFTerrainEvent : events TerrainDomain "1" --> ZTTerrainBrushPreview : brush_preview TerrainDomain "*" --> BFTerrainWaterEdit : water_edits TerrainDomain "*" --> ZTBiomeUndoDeleteFlattening : flattening_deletions TerrainDomain "0..1" --> BFTerrainWorldSurface : loaded_world_surface
classDiagram ZTAutoPlacementController "*" --> ZTAutoPlacementVariation : variations ZTAutoPlacementController "*" --> ZTAutoPlacementObjectSpawn : pending_spawns ZTAutoPlacementController "*" --> ZTAutoPlacementObjectSpawn : pending_removals ZTAutoPlacementVariation "1" --> ZTAutoPlacementObjectMask : object_mask ZTAutoPlacementVariation "*" --> ZTAutoPlacementWeightedObject : weighted_objects ZTBiomeModeState "0..1" --> BiomeBrushSet : brush_set ZTBiomeModeState "*" --> ZTAutoPlacementObjectSpawn : added_objects ZTBiomeModeState "*" --> ZTAutoPlacementObjectSpawn : removed_objects ZTBiomeModeState "*" --> ZTBiomeCommand : commands ZTTerrainCommandRecord "1" --> ZTTerrainCommand : command ZTTerrainCommandRecord "0..1" --> BFTerrainUndoRecord : undo_record ZTTerrainCommandRecord "0..1" --> BFTerrainChargeCommand : charge ZTTerrainModeState "0..1" --> TerrainBrush : active_brush ZTTerrainModeState "0..1" --> ZTTerrainCommandReader : command_reader ZTTerrainModeState "0..1" --> ZTTerrainCommandRecord : last_command ZTTerrainModeState "0..1" --> BFTerrainMeshPatch : preview_patch
tank relationship model
classDiagram TankDomain "1" --> ZTTankMgr : manager TankDomain "*" --> ZTTank : tanks TankDomain "1" --> ZTTankTopology : topology TankDomain "*" --> ZTTankWallSegment : wall_segments TankDomain "*" --> ZTTankWallGlassMaterialSelector : glass_material_selectors TankDomain "*" --> ZTTankGateSegment : gates TankDomain "*" --> ZTTankPortal : portals TankDomain "*" --> ZTTankSupport : supports TankDomain "*" --> ZTTankLinkDetachRecord : link_detach_records TankDomain "1" --> ZTTankCommandQueue : commands TankDomain "1" --> ZTTankCommandReader : command_reader TankDomain "1" --> ZTTankQuerySet : queries ZTTankAlternateLink "0..1" --> ZTTankLink : link ZTTankCommandQueue "*" --> ZTTankCommand : pending ZTTankCommandQueue "*" --> ZTTankCommand : completed ZTTankManipulationUi "*" --> ZTTankManipulationCursorTexture : cursor_textures
classDiagram ZTTankSegment <|-- ZTTankGateSegment ZTTankPrimaryLink "0..1" --> ZTTankLink : link ZTTankQuerySet "1" --> ZTIsTankInWorldQuery : world_query ZTTankQuerySet "1" --> ZTTankFloorHeightQuery : floor_height_query ZTTankQuerySet "1" --> ZTTankWaterHeightQuery : water_height_query ZTTankTopology "*" --> ZTTankSegment : segments ZTTankTopology "*" --> ZTTankGateSegment : gates ZTTankTopology "*" --> ZTTankPortal : portals ZTTankTopology "*" --> ZTTankLink : links ZTTankTopology "*" --> ZTTankTopologyChange : pending_changes ZTTankWallSegment "0..1" --> ZTTankWallGlassMaterialSelector : tankwallglass_selector ZTTankWallGlassMaterialSelector "1" --> ZTTankWallGlassSelectorGeometry : geometry ZTTankWallGlassSelectorGeometry "*" --> ZTTankWallGlassSelectorVertex : vertices ZTTankWallGlassSelectorSweep "*" --> ZTTankWallGlassMaterialSelector : selectors
placement relationship model
classDiagram PlacementDomain "1" --> ZTPlacementData : placement_data PlacementDomain "0..1" --> ZTPlaceEntityComponent : active_entity PlacementDomain "*" --> ZTSpawnEntityComponent : spawned_entities PlacementDomain "0..1" --> ZTPlacementConfirmation : pending_confirmation PlacementDomain "1" --> ZTPlacementPreview : preview PlacementDomain "1" --> ZTPlacementCursor : cursor PlacementDomain "*" --> ZTPlacementFailure : failure_history PlacementDomain "1" --> ZTPlacementRuleSet : rules PlacementDomain "1" --> ZTPlacementCommandQueue : commands PlacementDomain "1" --> ZTToolCommandQueue : tool_commands PlacementDomain "1" --> ZTUserDraggingState : user_dragging PlacementDomain "1" --> ZTClickableObjectSelection : clickable_object ZTPlaceEntityComponent "1" --> ZTPlacementFlags : placement_flags ZTPlacementCommandQueue "*" --> ZTPlacementCommand : pending ZTPlacementCommandQueue "*" --> ZTPlacementCommand : completed ZTPlacementCommand "0..1" --> FencePlacementShape : fence_shape ZTPlacementCommand "0..1" --> ZTFenceModeUndoAction : fence_undo_action ZTPlacementPreview "0..1" --> ZTFootprintPreview : footprint
classDiagram ZTPlacementRuleSet "0..1" --> ZTPlacementAffordabilityRule : affordability ZTPlacementRuleSet "0..1" --> ZTPlacementResearchRule : research ZTPlacementRuleSet "0..1" --> ZTPlacementFootprintRule : footprint ZTPlacementRuleSet "0..1" --> ZTPlacementTerrainRule : terrain ZTPlacementRuleSet "0..1" --> ZTPlacementFenceRule : fence ZTPlacementRuleSet "0..1" --> ZTPlacementPathRule : path ZTPlacementRuleSet "0..1" --> ZTTankPlacementRule : tank ZTPlacementRuleSet "0..1" --> ZTElevatedPathPlacementRule : elevated_path ZTToolCommandQueue "*" --> ZTToolCommand : pending ZTToolCommandQueue "*" --> ZTToolCommand : completed
path relationship model
classDiagram PathDomain "*" --> ZTPath : paths PathDomain "*" --> ZTPathElevated : elevated_paths PathDomain "*" --> ZTPathPlacementCommand : placement_commands PathDomain "*" --> ZTElevatedPathCommand : elevated_commands PathDomain "*" --> ZTConnectedPathQuery : connected_queries ZTElevatedPathSegment "1" --> ZTPathSegment : path ZTElevatedPathSegment "0..1" --> ZTElevatedCurbPlacement : curb_mode ZTPathPlacementCommand "0..1" --> ZTPathValidation : validation
Consumers and open contracts (World)
Consumers: ZTWorldMgr, BFGManager, ZTAIMgr (pathing/rampage), the economy
(charges), and the renderer (terrain/decal/shadow projection).
- Grid coordinate units, exact footprint-shape schema, and slope thresholds are not yet reconstructed.
- Elevated support/topology rules (
BFGElevatedSupportTracker) and tank/show-tank edge cases are open. BFSteeringMgr/pathfinder interaction with traversability updates is not modeled.- The ground-fit per-leg contact math and bird-registry payload remain native unknowns.
Modes (Interaction Tools)
classDiagram
class ZTMode { cursor; ui_layout; event_blocks; message_handlers; hotkeys }
ZTMode <|-- ZTEntityMovementMode
ZTEntityMovementMode <|-- ZTPlacementMode
ZTEntityMovementMode <|-- ZTBiomeMode
ZTMode <|-- ZTSelectionMode
ZTMode <|-- ZTFPActionModeBase
ZTFPActionModeBase <|-- ZTCureDiseaseMode
ZTFPActionModeBase <|-- ZTTranquilizeMode
ZTFPActionModeBase <|-- ZTFPTrainingMode
ZTMode <|-- ZTFossilFindingMode
ZTMode <|-- ZTGestureTraceModeBase
ZTGestureTraceModeBase <|-- ZTCloningGestureMode
ZTMode <|-- ZTGfxOptionsMode
ZTMode <|-- ZTFileMode
ZTFileMode <|-- ZTSaveMode
ZTFileMode <|-- ZTLoadMode
ZTMode <|-- ZTCameraCommandReader
ZTMode <|-- ZTTerrainCommandReader
ZTMode <|-- ZTTankCommandReader
First-person and gameplay modes
classDiagram
class ZTFPTrainingMode {
+training_area; +animal_entity; +trick_token
+time_to_reward_animal_seconds
+time_out_for_teleporting_animals_seconds
}
class ZTTranquilizeMode { +target_entity; +charge; +range; +user_prompt }
class ZTFossilFindingMode { +sonar_beep; +sonar_graphic; +artifact_marker; +user_prompt }
class ZTCloningGestureMode { +cloning_center_entity; +goo_level; +countdown_seconds; +score }
class ZTSelectionMode {
+default_cursor; +pickup_cursor; +rotate_cursor; +selection_texture
+info_panel_update_seconds; +mouse_over_check_seconds
}
class ZTGfxOptionsModeState {
+graphics : ZTGraphicsOptions; +audio : ZTAudioOptions; +vince : ZTVinceOptions
+settings_document; +pending_confirmation; +selected_detail_level
}
ZTFPTrainingMode runs trick training (reward/teleport timers); ZTTranquilizeMode
darts an animal (charge/range); ZTFossilFindingMode is the dig-site sonar tool;
ZTCloningGestureMode is the cloning-center minigame (goo_level/countdown/score);
ZTSelectionMode is the default pick/move/rotate cursor handler; ZTGfxOptionsMode
edits graphics/audio/VINCE options with confirmation. World-editing modes
(ZTPlacementMode, ZTFenceMode, ZTPathMode, ZTBiomeMode, ZTTankCommandReader,
ZTTerrainCommandReader) and camera (ZTCameraCommandReader) are detailed in the World
and Renderer sections.
Gesture system (cloning / training minigames)
ZTGestureMgr (cross-cutting manager) owns the gesture minigame used by
ZTCloningGestureMode and training. Authored ZTGestureDefinitions describe the target
shape; the player's live ZTGestureTrace is matched against them to produce a score
:
classDiagram
class ZTGestureMgr { +gestures; +committed_traces; +definitions; +tracer_visuals; +editing_directory }
class ZTGestureDefinition {
+gesture_type; +parent_obj; +parent_node
+camera_pos; +plane_normal; +bounding_box_scale
}
class ZTGestureTrace { +gesture_type_hint; +strokes : Vec~ZTGestureStroke~; +source_mode; +subject_entity }
class ZTGestureMatch { +gesture_type; +event_count; +trace_score; +score }
class ZTGestureComponent { +gesture_type; +subject_entity; +target_entity; +dispatched_trace_events }
ZTGestureMgr "1" *-- "*" ZTGestureDefinition
ZTGestureMgr "1" *-- "*" ZTGestureTrace
ZTGestureTrace ..> ZTGestureMatch : scored against definition
ZTGestureComponent ..> ZTGestureTrace : produces
A ZTGestureDefinition fixes the gesture plane (camera_pos/plane_normal) and a
bounding_box_scale; the live ZTGestureTrace is a set of ZTGestureStrokes; matching
samples observed-vs-expected points (ZTGestureTraceSample) into a ZTGestureMatch
score. ZTGestureComponent attaches the minigame to an entity and dispatches
ZTGestureTraceEvents at score thresholds.
Reconstructed mode-state records
Remaining mode structs (state/native-contract/config records), fields per type:
- ZTShellModeTransition — previous, current, previous_path, current_path, changed, cursor, layout_guis, active_hotkeys, off_events, on_events
- ZTModeRecord — class_name, name, attributes, layout_guis, hotkeys, inline_hotkeys, on_events, off_events, event_blocks, config_children, children
- ZTModeConfigNode — name, attributes, text, children
- ZTModeDescriptor — type_name, parent_type, command_token, vtable_range, descriptor_range
- ZTModeClassRegistry — zt_mode, game, main, overhead, overview, first_person, placement, selection, toolset, delete, download, file, load, save …
- ZTModeTypeCache — type_name, cached_type_handle, init_guard, type_string_address
- ZTModeUiBinding — control_name, layout_name, value_message, command_token
- ZTModeInputState — cursor_name, shift_pressed, control_pressed, screen_point, world_point
- ZTDownloadModeNativeContract — base_url_template, index_file, items_list_control, downloads_root, cannot_disable_token, enabled_field, ui_name_field, site_name_field, version_field, viewable_field, confirmed_token, confirm_exit_token, cancel_downloads_token, downloads_title …
- ZTFileModeNativeSchema — record_type, name_field, display_name_field, file_time_low_field, file_time_high_field, zip_kind, dir_kind
- ZTLoadModeNativeContract — save_glob, row_layout, list_control, name_control, preview_control, delete_button, saved_root
- ZTUILayoutModeNativeCommands — set_background, load_ui, clear_ui, reload, send, quit
- ZTSkyTrackModeNativeContract — first_trip_token, return_trip_token, construction_marker_3, construction_marker_4, tower_type_token, test_rope_object
- ZTOverheadMode — surface, camera, cursor, stars_display
- ZTStarsDisplay — animation_delay_seconds, appear_animation_token, disappear_animation_token, visuals
- ZTModePhysObjVisual — token, model_file, scale, controllers_only, auto_start, duration_seconds, loop_animation
- ZTGestureCreationBounds — min_x, max_x, min_y, max_y, min_z, max_z
- ZTPuzzleMode — common, help_text_loc_id, camera, snap_distance, piece_rotation_degrees, completion_burst_system, auto_exit_delay_seconds, colors
- ZTStaffAssignMode — surface, active_cursor, keeper_cursor, trainer_cursor, waiting_cursor, marker, effect, prevent_multiple_flags, collision_tester
- ZTDeleteMode — surface, cursor, color_animation_cycle, ground_cursor_rotation_cycle, ground_cursor_grow_time, ground_cursor_radius, ground_cursor_effect_radius, cursor_texture, default_delete_sound, multi_delete_sound, colors, delete_groups
- ZTGuestViewMode — surface, tag_file, ground_cursor, cursor, highlight_alpha
- ZTPhotoMode — surface, zoom_speed, move_speed, turn_speed_out, turn_speed_in, last_pic_wait_time, message_wait_time
- ZTPlacementFootprintAssets — place_yes, place_yes_small, place_no, place_no_small
- ZTModeColor — r, g, b, a
- ZTModeGridPreview — token, cardinal_image, diagonal_image, radius
- ZTFenceModeTankWallConfig — default_height, minimum_height, maximum_height, default_base_depth, minimum_base_depth, maximum_base_depth, hill_threshold, default_portal
- ZTFirstPersonMode — common, carrying_avatar_token, camera_set, help_flags, action_mode, prompt_delay_seconds, screen_dither, keyboard_rotate_speed, move_speed, turn_speed, center_mouse_on_hide, native_state
- ZTFirstPersonModeNativeState — mouse_look_active, mouse_prompt_visible, yaw, pitch, strafe, forward, transitions, resource_updates, movement_events, camera_moved_messages
- ZTFPClimbLadderMode — base, ladder_entity, direction, time_per_meter, target_platform, native_state
- ZTTrainingNativeUiBinding — field, lookup_name, native_field_offset, projection
- ZTTrainingNativePresentation — reset_message, player_training_layout, player_training_activate_message, player_training_show_message, player_training_master_listbox, player_training_item_layout, player_training_trick_button, training_complete_trick_image_layout, training_complete_trick_image, training_locked_icon, new_trick_border, reward_message_control, reward_message_show_message, reward_message_hide_message …
- ZTSuperStaffMode — common, staff_entity, active_usage_object, max_usage_object_distance, usage_object_labels, user_prompt
- ZTFPTrainingResultFeedbackAdvance — crowd_cheer_token, show_reward_message, apply_reward, cleanup_result_ui
- ZTFPTrainingModeState — active_task_token, selected_gesture_token, active_learning_delta, active_keyboard_tokens, last_keyboard_action, event_count, gesture_trace, score_percent, final_score, result_bucket, result_feedback_token, result_feedback_phase, result_feedback_elapsed_seconds, crowd_feedback_sent …
- ZTOverviewModeState — selected_filter, view_filters, animal_icons, building_icons, visible_objects, map_projection, click_target
- ZTOverviewVisibleObject — entity_id, entity_type, world_position, icon_name
- ZTDeleteModeState — mode_value, delete_groups, selected_entities, pending_request, confirmation
- ZTDeleteRequest — target_entity, target_type, return_station, first_station, destroy_command
- ZTDownloadModeState — index, items, queue, selected_item, document, items_list, confirmation
- ZTDownloadModeDocument — base_url_template, index_file, downloads_root, version
- ZTDownloadItemsListRow — item_id, ui_name, site_name, enabled, viewable, status
- ZTDownloadItem — item_id, ui_name, site_name, file_path, enabled, viewable, version, status
- ZTDownloadQueue — requests, active_request, completed_requests, cancelled_requests
- ZTDownloadRequest — item_id, url, target_path, cancel_message
- ZTDownloadConfirmation — item_id, confirm_exit_token, cancel_downloads_token, confirmed
- ZTFileModeState — root_path, file_mode, files, selected_file, file_info_list
- ZTGfxOptionsModeSnapshot — graphics, audio, vince, selected_detail_level, selected_detail_token, custom_detail_active, display_mode_dirty, detail_settings_dirty, sound_settings_dirty, free_mouse_look, use_low_mem_defaults, native_float_controls, selected_settings, pending_value_writes
- ZTGfxOptionsNativeFloatControls — sound_volume, music_volume, two_d_sound_fx_volume, three_d_sound_fx_volume
- ZTGfxOptionsFloatMessage — control, slider_widget, value, native_field_offset, descriptor_global, route
- ZTGfxOptionsAcceptance — profile_writes, safe_graphics_writes, motd_enabled, confirmation_message, save_profile_options
- ZTGraphicsSafeMode — fullscreen, screen_width, screen_height, screen_depth
- ZTOptionsSelectedSetting — token, label_locid, setting_widget, preset_attribute, selected_index, locid, values
- ZTOptionsTypedValue — name, value_type, value, attributes
- ZTGroundTrackModeState — construction_markers, selected_endpoint, circuit, conservation_state
- ZTGuestViewModeState — tag_file, ground_cursor, highlight_alpha, target, camera_binding
- ZTElevatedCurbModeState — place_no, replace, anchor, locked
gesture relationship model
classDiagram GestureDomain "1" --> ZTGestureMgr : manager GestureDomain "*" --> GesturesDocument : documents GestureDomain "1" --> ZTGestureRecognizer : recognizer GestureDomain "1" --> ZTGestureSplineEditor : editor GestureDomain "0..1" --> ZTGestureComponent : active_gesture GestureDomain "0..1" --> ZTGestureTrace : active_trace GestureDomain "*" --> ZTGestureEventFail : failed_events GesturesDocument "*" --> ZTGestureDefinition : definitions GesturesDocument "0..1" --> ZTGestureEditingConfig : editing GesturesDocument "0..1" --> ZTGestureEventFail : failed_event ZTGestureComponentNativeContract "1" --> ZTGestureProjectionFrame : projection_frame ZTGestureComponentNativeContract "*" --> ZTGestureTraceEventTextureBinding : event_textures ZTGestureRecognizer "*" --> ZTGestureDefinition : definitions ZTGestureRecognizer "0..1" --> ZTGestureMatch : last_match ZTGestureSplineEditor "0..1" --> ZTEditableGestureSpline : active_spline ZTGestureSplineEditor "*" --> ZTGestureSplineCommand : commands
classDiagram ZTGestureTraceEventVisual "1" --> ZTGesturePoint : expected ZTGestureTraceEventVisual "1" --> ZTGestureProjectionFrame : projection_frame ZTGestureTraceEventVisual "1" --> ZTGestureTraceEventMarkerSurface : marker_surface ZTGestureTraceEventAssetDispatch "1" --> ZTGestureTraceEvent : event ZTGestureTraceAdvance "*" --> ZTGestureTraceEventPoint : due_events ZTGestureTraceAdvance "*" --> ZTGestureTraceEventPoint : expired_events ZTGestureTraceScore "1" --> ZTGestureTraceScoreBand : band ZTGestureTraceEventPoint "1" --> ZTGestureTraceEvent : event ZTGestureTraceEventPoint "1" --> ZTGesturePoint : expected ZTGestureTracerNativeVisualContract "1" --> ZTGestureTraceEventTexture : event_textures ZTGestureTracerEntitySurface "1" --> ZTGestureTracerEntityBinding : tracer ZTGestureTracerEntitySurface "1" --> ZTGestureTracerEntityBinding : pointer_pointer ZTGestureTracerEntityBinding "*" --> ZTGestureTracerBinderBinding : binders
modes relationship model
classDiagram ModesDomain "0..1" --> ZTModeKind : current_mode ModesDomain "0..1" --> ZTModeToken : current_shell_mode ModesDomain "*" --> ZTModeToken : current_shell_mode_path ModesDomain "*" --> ZTModeToken : shell_mode_history ModesDomain "1" --> ZTShellModeCatalogue : shell_modes ModesDomain "1" --> ZTModeHotKeyRegistry : shell_hotkeys ModesDomain "*" --> ZTModeConfigDocument : mode_config_documents ModesDomain "*" --> UiHotKeyBinding : active_hotkeys ModesDomain "*" --> ZTModeKind : stack ModesDomain "*" --> ZTModeRequest : requests ModesDomain "*" --> ZTModeDescriptor : registered_modes ModesDomain "1" --> ZTModeClassRegistry : mode_classes ModesDomain "1" --> ZTDeleteModeState : delete_mode ModesDomain "1" --> ZTDownloadModeState : download_mode ModesDomain "1" --> ZTFileModeState : file_mode ModesDomain "1" --> ZTGfxOptionsModeState : gfx_options_mode ModesDomain "1" --> ZTGroundTrackModeState : ground_track_mode ModesDomain "1" --> ZTGuestViewModeState : guest_view_mode ModesDomain "1" --> ZTOverviewModeState : overview_mode ModesDomain "1" --> ZTElevatedCurbModeState : elevated_curb_mode ModesDomain "1" --> ZTFirstPersonModeState : first_person_state ModesDomain "1" --> ZTFossilFindingModeState : fossil_finding_state ModesDomain "1" --> ZTFPTrainingModeState : fp_training_state ModesDomain "1" --> ZTTranquilizeModeState : tranquilize_state ModesDomain "1" --> ZTCloningGestureModeState : cloning_gesture_state ModesDomain "1" --> ZTSuperStaffModeState : super_staff_state ModesDomain "1" --> ZTBiomeModeState : biome_mode_state ModesDomain "*" --> ZTModeCommand : commands ModesDomain "*" --> ZTKeyboardAction : keyboard_actions
classDiagram ZTDownloadIndex "*" --> ZTDownloadItem : items ZTFPClimbLadderModeNativeState "*" --> ZTFPClimbLadderDurationRequest : duration_requests ZTFileInfoList "*" --> FileInfo : rows ZTFirstPersonResourceUpdate "1" --> ZTFirstPersonResourceValue : value ZTFirstPersonMovementEvent "1" --> ZTFirstPersonMovementAxis : axis ZTFirstPersonModeState "0..1" --> ZTModeKind : entered_from_mode ZTGestureCreationMode "1" --> ZTModeClassSurface : surface ZTGestureCreationMode "1" --> ZTGestureCreationBounds : trick_bounds ZTGestureTraceModeBaseNativeState "0..1" --> ZTGestureTraceScore : last_trace_score
classDiagram ZTGfxOptionsBackRevert "1" --> ZTGfxOptionsModeSnapshot : restored ZTGfxOptionsBackRevert "*" --> ZTGfxOptionsFloatMessage : dispatched_float_messages ZTGfxOptionsSafeGraphicsRestore "1" --> ZTGraphicsSafeMode : restored ZTGfxOptionsSettingsDocument "*" --> ZTOptionsSettingDefinition : settings ZTMainMode "1" --> ZTModeClassSurface : surface ZTModeColorBinding "1" --> ZTModeColor : color ZTModeConfigDocument "1" --> ZTModeConfigNode : root ZTModeHotKeyRegistry "*" --> ZTModeHotKeyDocument : documents ZTModeHotKeyDocument "*" --> ZTModeHotKeyNode : nodes ZTModeHotKeyNode "*" --> UiHotKeyBinding : hotkeys
classDiagram ZTModeVTable "0..1" --> ZTModeAddressRange : table_range ZTModeVTable "0..1" --> ZTModeAddressRange : descriptor_subtable ZTModeVTable "*" --> ZTModeVirtualSlot : virtual_slots ZTOptionsSettingDefinition "*" --> ZTOptionsSettingChoice : choices ZTOptionsSettingChoice "*" --> ZTOptionsTypedValue : values ZTOptionsValueWrite "1" --> ZTOptionsValueType : value_type ZTShellModeCatalogue "0..1" --> ZTModeRecord : root ZTShellModeCatalogue "*" --> ZTModeRecord : standalone_modes ZTToolsetMode "1" --> ZTModeClassSurface : surface ZTToolsetMode "0..1" --> ZTToolsetModeDocument : config_document ZTToolsetModeDocument "1" --> ZTModeRecord : mode_record
Open contracts (Modes)
- Per-mode input state machines and the full
event_blocks/message_handlersdispatch for each tool are structurally reconstructed. Original tick/transition logic is largelytodo!(). - The
ZTModeClassSurfacevtable/type-cache modeling mirrors the native shape. Individual mode method bodies are not yet reconstructed.
Economy, Fame, Research, Disease, and Status
The progression systems share one shape: a manager (a BFComponent or
BFScriptComponent) owns persisted state, registers named value-handlers that the
UI binds to (make_<x>_value produces, accept_<x>_value consumes), and responds to
ZT_* messages. Eligibility everywhere is decided by the shared ZTPredicate family.
Economy
classDiagram
class ZTEconomyMgr {
+context_configs : Vec~ZTEconomyContextConfig~
+configs : Vec~EconomyConfig~
+components : Vec~ZTEconomyComponent~
+zt_transactions : Vec~ZTTransaction~
+bfg_components : Vec~BFGEconomyComponent~
+transaction_tracker : BFGTransactionTracker
+money_events : Vec~MoneyEvent~
+ui_price_selections : Vec~ZTPriceIndexSelection~
+from_root() / read_config_xml_node()
+process_transaction(name)
+set_price_index(...) / process_fame_update(fame)
}
class ZTEconomyComponent {
+name; +category; +no_binder; +active
+transactions : Vec~TransactionConfig~
+read_xml_node()/write_xml_node()
+find_transaction_by_name(name)
}
class ZTTransaction {
+name; +config; +subject_entity; +target_entity; +applied_amount
+apply(); +evaluate_cost(); +set_cost_clamped(cost)
}
class ZTEconomyComponentBase {
+component_name; +owner_entity; +active
+activate()/deactivate()
}
class ZTEconomyComponentGuest { +guest_entity; +donation_multiplier; +score_donation(target) }
ZTEconomyMgr "1" *-- "*" ZTEconomyComponent
ZTEconomyMgr "1" *-- "*" ZTTransaction
ZTEconomyMgr *-- BFGTransactionTracker
BFGEconomyComponent <|-- ZTEconomyComponentBase
ZTEconomyComponentBase <|-- ZTEconomyComponentGuest
ZTEconomyComponentBase <|-- ZTEconomyComponentStub
ZTEconomyComponentBase <|-- ZTEconomyComponentHistoryBase
ZTEconomyMgr owns cash via per-context ZTEconomyContextConfig (initial_cash,
saveable, config_data), aggregates ZTEconomyComponents (each a named set of
TransactionConfigs), and runs ZTTransactions — evaluate_cost/set_cost_clamped
compute the charge, apply commits it, and BFGTransactionTracker holds
pending/completed. ZTEconomyComponentGuest.score_donation scores guest donations;
ZTEconomyComponentHistoryBase keeps FameHistoryEntry history feeding fame.
Open (from todo!()): process_transaction aggregation, set_price_index admission
Economy cluster relationships
Relationship model (composition/aggregation with cardinality + field role, inheritance) for the full cluster, generated from the reconstruction field types:
classDiagram BFGEconomyComponent <|-- ZTEconomyComponentBase BFGTransaction <|-- ZTTransaction ZTEconomyComponentBase <|-- ZTEconomyComponentGuest ZTEconomyComponentBase <|-- ZTEconomyComponentHistoryBase ZTEconomyComponentBase <|-- ZTEconomyComponentStub ZTEconomyComponentHistoryBase <|-- ZTEconomyComponent ZTEconomyMgr "*" --> ZTEconomyContextConfig : context_configs ZTEconomyMgr "0..1" --> EconomyConfig : config ZTEconomyMgr "*" --> EconomyConfig : configs ZTEconomyMgr "*" --> ZTEconomyComponent : components ZTEconomyMgr "*" --> ZTTransaction : zt_transactions ZTEconomyMgr "*" --> BFGEconomyComponent : bfg_components ZTEconomyMgr "1" --> BFGTransactionTracker : transaction_tracker ZTEconomyMgr "*" --> MoneyEvent : money_events ZTEconomyMgr "*" --> ZTPriceIndexSelection : ui_price_selections ZTEconomyComponent "*" --> TransactionConfig : transactions ZTTransaction "0..1" --> TransactionConfig : config ZTEconomyComponentGuest "1" --> ZTEconomyComponentBase : base ZTEconomyComponentStub "1" --> ZTEconomyComponentBase : base ZTEconomyComponentHistoryBase "1" --> ZTEconomyComponentBase : base ZTEconomyComponentHistoryBase "*" --> FameHistoryEntry : history BFGEconomyComponent "1" --> BFGEconomyData : data BFGEconomyComponent "*" --> BFGTransaction : transactions BFGTransactionTracker "*" --> BFGTransaction : pending BFGTransactionTracker "*" --> BFGTransaction : completed EconomyConfig "0..1" --> EconomyComponentConfig : general_component EconomyConfig "*" --> EconomyComponentConfig : components EconomyConfig "*" --> CostFactor : cost_factors TransactionConfig "0..1" --> TransactionFrequency : frequency TransactionConfig "0..1" --> TransactionType : transaction_type TransactionConfig "0..1" --> TransactionPeriod : period TransactionConfig "0..1" --> CostType : cost_type TransactionConfig "0..1" --> CostChoice : cost_choice MoneyEvent "1" --> MoneyEventKind : kind
coupling, and process_fame_update hand-off to ZTFameData.
Fame: a value-handler registry
ZTFameData (< BFXMLObj) is the clearest instance of the value-handler pattern — it
exposes dozens of computed status values and persists them:
- producers (
make_*_value):zoo_fame,num_halfstars,zoo_is_open,all_species_released,all_animals_released,last_animal_released,num_extinct_species_released,admission_price_index,donation_by_animal_type,donation_all_animals,donation_by_endangerment,has_expansion_pack,is_freeform. - consumers (
accept_*_value):zoo_is_open,fame_halfstars,admission_price_index,tutorial_rule_active. - lifecycle:
process_fame_update,read/write_status_xml_node,read/write_fame_msgtype_node.
Research
classDiagram
class ZTResearchMgr {
+items : Vec~ZTResearchItem~
+buttons : Vec~ZTUIResearchButton~
+unlocked_entities[]; +unlocked_fences[]
+active_research[]; +completed_research[]
}
class ZTResearchItem {
+item_id; +entity_type; +fence_type
+loc_id; +button_template; +unlocked
}
class ZTResearchUnlock { +entity_type; +fence_type; +fame_requirement }
BFScriptComponent <|-- ZTResearchMgr
ZTResearchMgr "1" *-- "*" ZTResearchItem
ZTResearchMgr tracks unlock state; ZTResearchItem is a research entry. Gating
messages: ZT_RESEARCH_IS_UNLOCKED, ZT_RESEARCH_UNLOCK_ENTITY_KIND. Placement
validation consults research (the UNRESEARCHED token in the World section).
Disease
Fields carry their XML-attribute provenance; todo!() in the code marks
behaviour still open.
classDiagram
class ZTDiseaseMgr {
+half_star_minimum : halfStarMinimum
+disease_check_interval_seconds : diseaseCheckInterval
+update_interval_seconds : updateInterval
+cure_timeout_seconds : cureTimeout
+diseases : Vec~ZTDisease~
+from_root(root)
+read_config_xml_node(doc)
+update() TODO
+force_disease(name, target) TODO
}
class ZTDisease {
+name, name_loc_id, token, cure_token
+clear_tokens[], target_types[]
+chance, chance_multiplier
+single_qualifier, search_for_targets
+research_loc_id_base, base_reward, reward_delta, force_only
+qualifier, cause, cure
}
class ZTDiseaseClue { +types[]; +hint; +product }
class ZTDiseaseCase {
+disease_name; +target_entity
+cause_entity; +cure_entity; +research_state
}
ZTDiseaseMgr "1" *-- "*" ZTDisease
ZTDisease *-- ZTDiseaseQualifier
ZTDisease *-- ZTDiseaseClue : cause / cure
ZTDiseaseQualifier *-- ZTDiseaseZooTest
ZTDiseaseQualifier *-- ZTDiseaseAnimalFilter
ZTDiseaseMgr (< BFComponent) hydrates from config/diseasemgr.xml and holds the
ZTDisease records; each ZTDisease carries cause/cure ZTDiseaseClues
(types/hint/product) and a ZTDiseaseQualifier. Qualifiers combine zoo tests
(ZTEntityTypePredicate, ZTZooFamePredicate) and animal filters
(ZTAnimalAttributeFilter attribute/boolValue/stringValue,
ZTAnimalProximityFilter type/distance/closer) — these are the predicate family
shared with scenario/AI. A live infection is a ZTDiseaseCase whose research progresses
through a state machine:
stateDiagram-v2 [*] --> Unknown Unknown --> Unsampled Unsampled --> Sampled Sampled --> CauseKnown CauseKnown --> CureKnown CureKnown --> Cured Cured --> [*]
ZTCureDiseaseMode (< ZTFPActionModeBase) drives sampling/curing with fields
analysis_duration_seconds, indicator_duration_seconds, sample_distance,
ignored_sample_types, active_target; behaviours ZTBehCureDisease/
ZTBehAddSubjectAsDiseaseTarget carry it out; query ZT_DISEASE_CURE_QUERY.
Open (from todo!()): the disease check/update interval target-search loop
(ZTDiseaseMgr::update), forced-disease application (force_disease), and the
sample→cure scoring inside ZTCureDiseaseMode.
Predicate system (cross-cutting eligibility)
classDiagram BFXMLObj <|-- ZTPredicate ZTPredicate <|-- ZTEntityTypePredicate ZTPredicate <|-- ZTZooFamePredicate ZTPredicate <|-- ZTAnimalFilter ZTAnimalFilter <|-- ZTAnimalAttributeFilter ZTAnimalFilter <|-- ZTAnimalProximityFilter ZTAnimalFilter <|-- ZTTAEntityFilter ZTAnimalFilter <|-- ZTTAPerimeterFilter
ZTPredicate objects are authored eligibility tests reused by disease targeting,
scenario rules, adoption filters, and AI selection.
Status, Zoopedia, awards, adoption
ZTStatus (< BFScriptComponent) is the zoo status aggregate. Its UI surface is a set
of native widget subclasses under the UI framework:
ZTZooStatusComponent/ZTZoopediaComponent (< UILayout), ZTZoopediaTOC/
ZTZooSurveyComponent (< UIListBox); ZTZooMessageData carries zoo messages.
ZTAdoptionMgr (< BFComponent) → ZTAdoptionSlotMgr, with ZTAdoptionSlot
entries, owns the buy/adopt panel; ZTAwardMgr grants awards.
Message surface and data flow
sequenceDiagram participant Src as gameplay (sale, birth, view) participant Eco as ZTEconomyMgr / ZTFameData / ZTStatus participant Bus as ZT_ECONOMY_EVENT / value handlers participant UI as bound UI value Src->>Eco: ZT_ADD_INCOME / ZT_ADD_EXPENSE / fame delta Eco->>Eco: update state, run make_*_value Eco->>Bus: emit ZT_ECONOMY_EVENT / refresh handler Bus-->>UI: ZT_GET_ZOO_CASH / FAME / PROFIT / ...
Tokens: ZT_GET_ZOO_CASH/FAME/OPEN/NAME/INCOME/PROFIT, ZT_SET_ZOO_CASH,
ZT_ADD_INCOME/ZT_ADD_EXPENSE, ZT_ECONOMY_EVENT, ZT_RESEARCH_IS_UNLOCKED/
UNLOCK_ENTITY_KIND, ZT_DISEASE_CURE_QUERY.
research relationship model
classDiagram ResearchDomain "1" --> ZTResearchMgr : manager ZTResearchMgr "*" --> ZTResearchItem : items ZTResearchMgr "*" --> ZTResearchUnlock : config_unlocks ZTResearchMgr "*" --> ZTUIResearchButton : buttons ZTResearchMgr "*" --> ZTResearchActiveRecord : active_research ZTResearchMgr "*" --> ZTResearchCompletedRecord : completed_research ZTResearchActiveRecord "1" --> ZTResearchProgressionRef : progression ZTResearchCompletedRecord "1" --> ZTResearchProgressionRef : progression
donation relationship model
classDiagram DonationDomain "*" --> DonationAcceptor : acceptors DonationDomain "1" --> ZTDonationStatus : totals ZTDonationStatus "*" --> ZTDonationBucket : by_animal_type ZTDonationStatus "*" --> ZTDonationBucket : by_endangerment
disease relationship model
classDiagram DiseaseDomain "1" --> ZTDiseaseMgr : manager DiseaseDomain "*" --> ZTDiseaseCase : cases DiseaseDomain "*" --> ZTDiseaseUiCommand : ui_commands
economy relationship model
classDiagram DonationTotals "*" --> DonationByAnimalType : by_animal_type DonationTotals "*" --> DonationByEndangerment : by_endangerment FameStatus "*" --> FameHistoryEntry : fame_history ZTStatusConfig "1" --> ZTStatusHappyFactors : happy_factors
Open contracts (Progression)
- Fame half-star thresholds, admission-price-index formula, and donation weighting are not yet reconstructed (only the value-handler names are established).
- Disease progression/spread cadence and cure scoring are native and unrecovered.
- Research tree source schema and unlock dependencies are not enumerated.
- Adoption slot availability/rarity rules and
ZTAwardMgraward criteria are open.
Profile, Campaign, Scenario, Tutorial, and Scripts
A scenario is a tree of rules that fire actions; actions run script through the
BFScriptComponent/Lua runtime; the BFS_* message family is the scripting API the
rules and Lua use to read and mutate game state. Campaign/tutorial/challenge are
scenario variants over the same machinery.
Scenario rule tree
classDiagram BFComponent <|-- BFScenarioRule BFScenarioRule <|-- BFScenarioGroup BFScenarioGroup <|-- BFScenarioMgr BFScenarioMgr <|-- ZTScenarioMgr BFScriptComponent <|-- BFScenarioAction BFScenarioAction <|-- BFScenarioScriptAction BFXMLObj <|-- BFScenarioAltTextData BFScenarioRule "1" *-- "*" BFScenarioRule : nested rules BFScenarioRule ..> BFScenarioAction : fires
Because BFScenarioMgr is a BFScenarioGroup is a BFScenarioRule, the whole
scenario is one recursive rule structure. Rules carry state (visible/hidden, set/reset)
queried and mutated by the BFS_* API; BFScenarioScriptAction runs a script when a
rule triggers; BFScenarioAltTextData supplies alternate overview/help text.
Script runtime
BFScriptComponent (< BFComponent) is the root of every scriptable component (AI,
economy, status, research all descend from it). Lua sits behind a generic script
context:
classDiagram BFComponent <|-- BFScriptComponent BFComponent <|-- BFScriptContextMgr BFXMLObj <|-- BFScriptContext BFScriptContext <|-- BFLuaContext BFTypedObj <|-- BFLuaStack BFXMLObj <|-- BFLuaArgs BFEvent <|-- BFLuaResponse BFEvent <|-- BFScriptComponentArgs
BFScriptContextMgr owns script contexts; BFLuaContext is the Lua binding, exchanging
BFLuaArgs/BFLuaStack in and BFLuaResponse out. ZT_RUN_SCRIPT/ZT_RUN_LOP
invoke scripts.
Scenario scripting API (BFS_*)
The BFS_* tokens are the contract between rules/Lua and native state, grouped by role:
- rule control:
BFS_GETRULESTATE,BFS_SETRULESTATE,BFS_RESET_RULE_STATES,BFS_SHOWRULE,BFS_HIDERULE,BFS_GET_RULE_NAMES - scenario lifecycle:
BFS_ADDSCENARIO,BFS_CLEARSCENARIO,BFS_LOADSCENARIO,BFS_ADD_SCENARIO_OBJECT - variables:
BFS_GETGLOBALVAR,BFS_SETGLOBALVAR,BFS_GETUSERVAL,BFS_SETUSERVAL - challenges:
BFS_GETALLCHALLENGES,BFS_PICKCHALLENGE,BFS_GET_CHALLENGE_DELAY,BFS_SET_CHALLENGE_DELAY,BFS_VALIDATEALLCHALLENGES - text/loc:
BFS_GETLOCID,BFS_LOCALIZEFLOAT,BFS_SETALTTEXT,BFS_SETALTOVERVIEWTEXT - misc:
BFS_SAVEOPTIONS,BFS_PROCESS_VINCE(telemetry),BFS_EVENT/BFS_OK/BFS_ERROR
Reconstructed field detail (scenario / scripts)
Modeled fields:
classDiagram
class ZTScenarioMgr {
+scenario_groups : Vec~BFScenarioGroup~
+campaign_documents : Vec~BFCampaign~
+campaign_state : ZTCampaignState
+event_root : BFScenarioEventRoot
+pending_script_actions
}
class BFScenarioMgr { +groups[]; +rules_by_name : Vec~BFScenarioRuleState~; +active_challenge }
class Campaign { +campaign_id; +xpack; +display_name; +scenarios : Vec~BFScenarioMapEntry~ }
class BFScriptContextMgr {
+config_path; +cache_scripts
+loaded_contexts : Vec~BFScriptContext~
+context_records[]
}
class BFScriptContext {
+context_name; +script : AssetPath
+exported_functions[]; +function_bindings[]; +actions[]; +loaded
}
class BFScriptFunctionBinding { +function_name; +command_name; +argument_signature[]; +return_signature[] }
ZTScenarioMgr *-- BFScenarioMgr
ZTScenarioMgr *-- Campaign
BFScriptContextMgr "1" *-- "*" BFScriptContext
BFScriptContext *-- BFScriptFunctionBinding
BFScriptFunctionBinding is the concrete BFS_* API surface: each exported Lua function
maps to a command_name with typed argument_signature/return_signature. Campaigns
(BFCampaign/Campaign) carry unlock_rules and a current_scenario over the rule tree.
Campaign, maps, photo challenges, profile
ZTMapData (< BFComponent) holds map/campaign list data; ZTGameMode (< ZTMode)
is the in-game interaction mode; ZTGoalPanel (< UIListBox) shows goals. Photo
challenges are their own cluster: ZTPhotoChallenge, ZTPhotoChallengeSet,
ZTPhotoChallengeMgr, ZTPhotoChallengesComponent (< BFScriptComponent). Photo capture: ZTPhotoManager holds active_album, abstractions
(ZTPhotoAbstraction: matched_subjects, subject_bounds, score), pending_photo,
and options; ZTPhotoSubjectBounds records entity_id/screen_rect/percent_seen
for challenge scoring. Player
profile is owned by BFUserProfileMgr (< BFComponent).
Lifecycle and data flow
sequenceDiagram participant Menu as main menu / ZTGameMode participant Mgr as ZTScenarioMgr participant Rule as BFScenarioRule tree participant Act as BFScenarioScriptAction participant Lua as BFLuaContext Menu->>Mgr: ZT_LOADGAME / select scenario Mgr->>Rule: evaluate rule states Rule->>Act: trigger fires action Act->>Lua: ZT_RUN_SCRIPT Lua->>Mgr: BFS_SETRULESTATE / BFS_SETGLOBALVAR / BFS_GETLOCID Mgr-->>Menu: goal/status updates (ZTGoalPanel)
Game-lifecycle tokens: ZT_LOADGAME, ZT_SAVEGAME, ZT_SETMODE,
ZT_SCENARIO_SELECTION_CHANGED, ZT_LOAD_AFTER_SAVE, ZT_SAVE_SCREENSHOT.
scenario relationship model
classDiagram BFScenarioChallengeState "*" --> BFScenarioChallenge : challenges BFScenarioCommand "1" --> BFScenarioCommandKind : kind BFScenarioCommand "0..1" --> BFScenarioTypedCommand : typed BFScenarioCommandResult "1" --> BFScenarioCommandStatus : status BFScenarioGlobalVars "*" --> BFScenarioVar : values BFScenarioScriptActionPendingRecords "*" --> BFScenarioScriptActionPendingRecord : records BFScenarioScriptActionPendingRecord "1" --> BFScenarioScriptAction : action BFScenarioUserVars "*" --> BFScenarioVar : values
classDiagram ScenarioDomain "1" --> ZTScenarioMgr : manager ZTScenarioMgr "1" --> BFScenarioMgr : bf_manager ZTScenarioMgr "*" --> BFScenarioGroup : scenario_groups ZTScenarioMgr "*" --> BFCampaign : campaign_documents ZTScenarioMgr "1" --> ZTCampaignState : campaign_state ZTScenarioMgr "1" --> ZTScenarioRuntimeState : runtime ZTScenarioMgr "*" --> BFScenarioAction : pending_actions ZTScenarioMgr "1" --> BFScenarioEventRoot : event_root ZTScenarioMgr "1" --> BFScenarioChallengeState : challenge_state ZTScenarioRuntimeState "0..1" --> BFScenarioRuntimeRef : active_scenario ZTScenarioRuntimeState "*" --> BFScenarioObjectiveProgress : objective_progress
scripting relationship model
classDiagram BFScriptContext <|-- BFLuaContext BFResourceCacheFlush "*" --> BFResourceCacheRecord : copied_records BFScriptCache "*" --> BFScriptCacheEntry : entries BFScriptContextVector "*" --> BFScriptContextRecord : records ScriptingDomain "1" --> BFScriptContextMgr : context_mgr ScriptingDomain "*" --> BFScriptContext : contexts ScriptingDomain "*" --> BFLuaContext : lua_contexts ScriptingDomain "1" --> BFScriptCache : cache ScriptingDomain "1" --> BFResourceCacheFlush : resource_cache_flush
photo relationship model
classDiagram PhotoDomain "1" --> ZTPhotoManager : manager PhotoDomain "1" --> ZTPhotoChallengeMgr : challenge_mgr PhotoDomain "*" --> ZTPhotoAlbumComponent : albums PhotoDomain "*" --> ZTPhotoAnalysisComponent : analysis_components PhotoDomain "*" --> ZTPAParseTree : parse_trees PhotoDomain "1" --> ZTPhotoModeState : mode PhotoDomain "*" --> ZTPhotoEventCommand : event_commands ZTPAPTPhotoAnalysisComponent "*" --> ZTPAParseTree : queries ZTPAParseTree "*" --> ZTPAParseNode : nodes ZTPAParseTree "*" --> ZTPAGetterBinding : getters ZTPAParseNode "0..1" --> ZTPAGetterBinding : getter ZTPAGetterBinding "1" --> ZTPAGetterTarget : target ZTPhotoAlbumComponent "*" --> ZTPhotoInfo : photos ZTPhotoAnalysisComponent "0..1" --> ZTPAParseTree : parse_tree ZTPhotoAnalysisComponent "*" --> ZTPhotoAbstraction : abstractions ZTPhotoAnalysisComponent "*" --> ZTPhotoAnalysisResult : results ZTPhotoAnalysisContext "*" --> ZTPhotoAnalysisEntity : entities ZTPhotoAnalysisContext "*" --> ZTPhotoAbstraction : abstractions ZTPhotoAnalysisEntity "*" --> ZTPhotoAnalysisProperty : properties
classDiagram ZTPhotoEventCommand "1" --> ZTPhotoEvent : event ZTPhotoOptions "0..1" --> ZTPhotoCaptionScript : caption_script
menu profile campaign scenario relationship model
classDiagram MenuProfileCampaignScenarioDomain "*" --> ZTMapData : maps MenuProfileCampaignScenarioDomain "1" --> ZTCampaignIndex : campaign_index MenuProfileCampaignScenarioDomain "1" --> ZTCampaignSelectionState : campaign_state MenuProfileCampaignScenarioDomain "1" --> ZTGlobe : globe MenuProfileCampaignScenarioDomain "*" --> ZTUserProfile : profiles MenuProfileCampaignScenarioDomain "1" --> ZTMovieList : movies MenuProfileCampaignScenarioDomain "*" --> ZTMenuPopulationRequest : population_requests MenuProfileCampaignScenarioDomain "1" --> ZTMenuPopulatedLists : populated_lists ZTCampaignIndex "*" --> ZTCampaignIndexEntry : campaigns ZTCampaignSelectionState "0..1" --> ZTMenuCachedMapData : cached_map_data ZTGlobe "*" --> ZTGlobeDot : visible_dots ZTMenuPopulatedLists "*" --> ZTMenuMapListEntry : map_entries ZTMenuPopulatedLists "*" --> ZTMenuCampaignListEntry : campaign_entries ZTMenuPopulatedLists "*" --> ZTMenuCampaignScenarioListEntry : campaign_scenario_entries ZTMovieList "*" --> ZTMovieInfo : movies
Open contracts (Scenario/Scripts)
- Rule trigger/condition evaluation order and the campaign progression graph are not yet reconstructed.
- Lua call/return marshalling details (
BFLuaArgs/BFLuaStacklayout) and error semantics are unrecovered. - Compiled
.bin/.lopscenario-object semantics andBFS_PROCESS_VINCEtelemetry payload are open. - Profile/save file format is unrecovered (see Persistence).
Renderer, Materials, Models, Animation, Camera, Audio
The projection/output layer consumes domain state (entities, world, UI) and
renders/sounds it behind the preservation boundary. The original backend is
Gamebryo/NetImmerse (the BFNi* classes) over Direct3D plus a sound engine; a
modern host may replace those mechanics while preserving the component inputs
below.
Scene graph and render components
classDiagram BFPhysComponent <|-- BFSceneGraphComponent BFSceneGraphComponent <|-- BFRSceneGraphComponent BFRSceneGraphComponent <|-- BFRActorComponent BFNISceneGraphComponent <|-- BFCameraComponent BFNISceneGraphComponent <|-- BFDecalComponent BFNISceneGraphComponent <|-- BFNiBoneLODComponent BFDecalComponent <|-- BFTerrainShadowComponent BFPhysComponent <|-- BFDecalTextureCycleComponent BFPhysComponent <|-- BFRealPhysicsComponent BFPhysComponent <|-- BFRotYawMovingComponent BFComponent <|-- BFRenderer BFComponent <|-- BFResourceMgr BFComponent <|-- BFParticleDictionary
An entity attaches into the scene through BFSceneGraphComponent →
BFRSceneGraphComponent → BFRActorComponent (its renderable). BFNISceneGraphComponent
is the Gamebryo node base used by camera, decals, and bone-LOD. BFRenderer drives the
frame; BFResourceMgr owns GPU resources.
Materials and textures
Materials are authored .bfmat/.fx source consumed by the renderer (the class
BFRMaterialManager is evidenced only by its ::load log string — no standalone type).
Texture animation/variation is native data: BFGSetTextureData, BFTextureSwapInfo,
BFSharedRandomTextureInfo, BFDecalTextureCycleComponent,
ZTTransportGroundTrackTextureData.
Animation
classDiagram BFTypedObj <|-- BFAnimController BFComponent <|-- BFAnimGraph BFComponent <|-- BFAnimManager BFComponent <|-- BFAnimTable BFXMLObj <|-- BFAnimRequestData BFPhysComponent <|-- BFAnimatedObjectControllerComponent
BFAnimController selects animations from a BFAnimTable/BFAnimGraph driven by
BFAnimRequestData; BFAnimManager coordinates. AI's BFLocoAnimate and BFAITextureController feed this layer. The animation graph
is a node/transition machine:
classDiagram
class BFAnimGraph { +graph_name; +nodes : Vec~BFAnimGraphNode~; +transitions : Vec~BFAnimGraphTransition~ }
class BFAnimGraphNode { +node_name; +animation_name; +looped; +blend_seconds }
class BFAnimGraphTransition { +from; +to; +condition }
class BFAnimationSequence { +sequence_name; +current_node; +elapsed_seconds }
BFAnimGraph "1" *-- "*" BFAnimGraphNode
BFAnimGraph "1" *-- "*" BFAnimGraphTransition
BFAnimGraph ..> BFAnimationSequence : plays
BFAnimController holds a BFAnimTable + current_animation and steps
the graph; transitions fire on condition, blending over blend_seconds.
Sprites and UI rendering
classDiagram BFUIRenderer <|-- BFSpriteMgr BFSpriteMgr <|-- BFNISpriteMgr
BFSpriteMgr is part of the UI renderer (< BFUIRenderer); BFNISpriteMgr is the
Gamebryo-backed implementation. It bridges the retained UI tree and the screen.
Camera
BFCameraComponent (< BFNISceneGraphComponent) is the camera node; ZTCameraCommandReader
(< ZTMode) is the input mode. Camera commands travel as messages:
ZT_CAMERA, ZT_CAMERA_ZOOM, ZT_CAMERA_ROTATE, ZT_CAMERA_PAN, ZT_CAMERA_POSITION,
ZT_CAMERA_MOVED. ZT_BLIT requests a frame blit.
Camera detail
Modeled fields: ZTCameraCommandReader binds input to camera commands via
command_state_bindings (ZTCameraCommandStateBinding: trigger/code/char_value/
ctrl_state/allow_repeat) producing command_state_events; active_command_states
holds the live set, providing the concrete backing for the ZT_CAMERA_*
messages.
Audio
classDiagram BFSnd <|-- BF2DSnd BFSnd <|-- BF3DSnd BFComponent <|-- BF2DSndFactory BFComponent <|-- BF3DSndFactory BFComponent <|-- BFSoundMgr BFComponent <|-- BFSoundStage BFComponent <|-- BFSoundStageMgr BFComponent <|-- BFSoundtag BFComponent <|-- BFWorld3DSndMgr
BFSoundMgr/BFSoundStageMgr own playback; BF2DSndFactory/BF3DSndFactory mint
2D/3D sound instances (BF2DSnd/BF3DSnd < BFSnd); BFWorld3DSndMgr places world
sound; BFSoundtag names a cue; BFSndCrossFader blends. Audio is fully
message-driven (BFSND_EVENT/BFSND_CMD):
- playback:
BFSND_PLAY,BFSND_PLAY_FROM_ENTITY - transport:
BFSND_PAUSE/BFSND_RESUME,BFSND_FULLPAUSE/BFSND_FULLRESUME - mix:
BFSND_MODIFY_PAN,BFSND_MODIFY_VOLUME
Reconstructed field detail (renderer / audio)
Modeled fields:
classDiagram
class BFDX9Renderer {
+init_config : BFDX9RendererConfig
+capability_report : BFRendererCapabilityReport
+texture_memory_kib / vertex_buffer_kib / index_buffer_kib
}
class BFDX9RendererConfig {
+minimal_graphics; +graphics_detail
+screen_width; +screen_height
}
class BFRendererCapabilityReport {
+video_ram_mib; +max_texture_width
+vertex_shader_version; +overall_graphic_detail
}
class BFSoundMgr {
+categories : Vec~SoundCategory~
+options : BFSoundOptions
+sound_tags; +pending_events
}
class BFSoundOptions { +want_sound; +sample_rate; +bits; +channels; +mixer_channels }
BFDX9Renderer *-- BFDX9RendererConfig
BFDX9Renderer *-- BFRendererCapabilityReport
BFSoundMgr *-- BFSoundOptions
BFDX9Renderer is the concrete Direct3D 9 backend (the replaceable mechanism behind
BFRenderer); its config/capability fields are the projection inputs a host adapter
must satisfy. BFSoundMgr carries mixer BFSoundOptions and per-tag sound dirs.
Reconstructed model / effect / particle detail
Modeled fields:
classDiagram
class BFRModelResource {
+path; +source_document
+subclass_kind; +nodes : Vec~BFRModelNode~; +meshes : Vec~BFRModelMesh~
}
class BFRNetImmerseNifModel { +nif geometry/skin/controllers }
class BFRMaterialResource { +effect; +parameters; +textures }
class BFREffectResource { +emitters }
class BFREffectEmitter { +particle emit params }
class BFParticleDictionary { +dictionaries[]; +entries : Vec~BFParticleDictionaryEntry~ }
class ZTSunLayer { +texture; +base_models[]; +sun_models[]; +sun_position_model }
BFRModelResource <|-- BFRNetImmerseNifModel : NIF backend
BFRModelResource *-- BFRModelMesh
BFREffectResource "1" *-- "*" BFREffectEmitter
BFRModelResource is the model loader (nodes/meshes); BFRNetImmerseNifModel is the
concrete Gamebryo .nif backing. Materials (BFRMaterialResource) bind an effect +
parameters + textures (authored .bfmat/.fx). Effects/particles
(BFREffectResource/BFREffectEmitter/BFRParticleEmitter, indexed by
BFParticleDictionary) drive VFX; ZTSunLayer renders the sky/sun; BFWaterGroup
groups water surfaces. Vertex formats (BFRVertexFormatElement, BFRVertexPND*) are
the GPU layouts the host adapter must reproduce.
Adapter boundary
flowchart LR Domain["entities / world / UI / status (native domain state)"] Render["BFRenderer + BFSpriteMgr + BFAnim* + BFSoundMgr"] Backend["Gamebryo/NetImmerse + D3D + sound engine (REPLACEABLE)"] Domain -->|component inputs| Render -->|adapter| Backend
The reconstruction may swap Backend entirely; it must preserve the component inputs
(BFRActorComponent transforms, BFAnimController selections, BFSpriteMgr UI
projection, BFSND_* cues) that Render consumes.
camera relationship model
classDiagram CameraDomain "1" --> ZTCameraCommandReader : command_reader CameraDomain "1" --> ZTUserCameraData : user_camera CameraDomain "0..1" --> BFPhysObj : startup_phys_obj CameraDomain "*" --> ZTRailCam : rail_cams CameraDomain "1" --> ZTCameraActiveCommands : active_commands CameraDomain "*" --> ZTCameraCommandEvent : command_events CameraDomain "1" --> ZTFollowCameraState : follow_camera ZTCameraActiveCommands "*" --> ZTCameraActiveCommandState : states ZTCameraActiveCommandState "1" --> ZTCameraCommandKind : kind ZTCameraCommandReaderNativeState "*" --> ZTCameraFreeMouseLookRequest : free_mouse_look_requests ZTCameraCommandReaderNativeState "*" --> ZTCameraCrouchRequest : crouch_requests ZTCameraCommandReaderNativeState "*" --> ZTCameraOutputCommandState : output_command_states ZTCameraCommandEvent "1" --> ZTCameraCommandKind : kind ZTCameraOutputCommandState "1" --> ZTCameraOutputCommand : command
audio relationship model
classDiagram AmbientAllowedDocument "*" --> AmbientAllowedEntry : entries AmbientBiomeDocument "*" --> AmbientBiomeBinding : bindings AmbientSoundDocument "*" --> AmbientSoundSet : sets AmbientSoundSet "*" --> AmbientSoundCue : cues AudioAmbientDocuments "*" --> AmbientSoundDocument : ambient AudioAmbientDocuments "*" --> AmbientBiomeDocument : ambient_biomes AudioAmbientDocuments "*" --> AmbientAllowedDocument : ambients_allowed
classDiagram AudioDomain "1" --> BFSoundMgr : sound_mgr AudioDomain "1" --> BFSoundStageMgr : sound_stage_mgr AudioDomain "1" --> ZTWorldSndMgr : world_sound_mgr AudioDomain "1" --> ZTAIAmbientsMgr : ambients_mgr AudioDomain "1" --> SoundTags : sound_tags AudioDomain "*" --> SoundTagsDocument : sound_tag_documents AudioDomain "1" --> AudioAmbientDocuments : ambient_documents AudioDomain "*" --> BFSoundtag : bf_soundtags AudioDomain "1" --> BF2DSndFactory : two_d_factory AudioDomain "1" --> BF3DSndFactory : three_d_factory AudioDomain "1" --> BFAmbient2DSndFactory : ambient_two_d_factory AudioDomain "1" --> BFAmbient3DSndFactory : ambient_three_d_factory AudioDomain "*" --> BFSoundEvent : sound_events BFAmbient3DSndFactory "*" --> BFAmbient3DSndGenerator : generators BFAmbient3DSndGenerator "0..1" --> BF3DSnd : active_sound
classDiagram SoundTag "0..1" --> BF2DSndFactory : two_d_factory SoundTag "*" --> SoundTagVariant : variants SoundTag "1" --> SoundTagPlaybackPolicy : playback SoundTag "1" --> SoundTagDistancePolicy : distance SoundTag "1" --> SoundTagRandomPolicy : random SoundTagGroup "*" --> SoundTag : tags SoundTags "*" --> SoundTag : tags SoundTags "*" --> SoundTagAlias : aliases SoundTags "*" --> SoundTagGroup : groups SoundTagsDocument "1" --> SoundTags : root ZTWaterEnvSizes "1" --> ZTWaterSoundStages : natural ZTWaterEnvSizes "1" --> ZTWaterSoundStages : tanks ZTWorldSndMgrContextConfig "*" --> BFContextComponent : children
renderer relationship model
classDiagram AmbientBiomesConfig "*" --> AmbientBiomeEntry : entries AmbientConfig "*" --> AmbientWeight : day_weights AmbientConfig "*" --> AmbientWeight : night_weights BFBinderResourceEntry "1" --> BFResourceEntry : entry BFDirectoryResourceEntry "1" --> BFResourceEntry : entry BFLODComponent "0..1" --> BFLODPixelData : pixel_data BFPosInterpolateComponent "1" --> BFPosInterpolate : interpolation BFRD3DStateBlock "*" --> BFRRenderState : render_states BFRD3DStateBlock "*" --> BFRRenderState : texture_stage_states BFRD3DStateBlock "*" --> BFRShaderConstant : shader_constants BFREffectManager "1" --> BFRResourceManager : base BFREffectManager "*" --> BFREffectResource : effects
classDiagram BFREffectIncludeManager "1" --> BFRResourceManager : base BFREffectIncludeManager "*" --> BFREffectIncludeRecord : include_records BFRMaterialMode "*" --> BFRRenderState : render_states BFRMaterialMode "*" --> BFRMaterialParam : params BFRMaterialParam "1" --> BFRMaterialParamType : param_type BFRMaterialParam "1" --> BFRMaterialParamValue : value BFRMaterialParam "0..1" --> BFRMaterialAnimation : animated BFRMaterialAnimation "*" --> BFRMaterialAnimationTrack : tracks BFRMaterialAnimationTrack "0..1" --> BFRMaterialAnimationChannel : channel BFRMaterialAnimationTrack "*" --> BFRMaterialKeyFrame : keys BFRMaterialSelector "*" --> BFRMaterialResource : variants BFRMaterialSelector "0..1" --> BFRSelectorBounds : bounds
classDiagram BFRModelManager "1" --> BFRResourceManager : base BFRModelManager "*" --> BFRModelResource : models BFRModelManager "*" --> BFRModelPathParts : path_parts BFRModelManager "*" --> BFRModelFactoryDispatch : factory_dispatches BFRModelFactoryDispatch "0..1" --> BFRModelSubclassKind : product_kind BFRModelFactoryProduct "0..1" --> BFRModelSubclassKind : kind BFRModelFactoryProduct "0..1" --> BFRModelResource : resource BFRModelGeometryCollection "*" --> BFRModelGeometryRecord : records BFRModelGeometryCollection "*" --> BFRModelGeometryChildRecord : child_records BFRModelGeometryCollection "0..1" --> BFRBoundingSphere : bounds BFRModelGeometryRecord "1" --> BFRModelGeometryRecordFlags : record_flags BFRModelGeometryRecord "0..1" --> BFRModelGeometryStream : stream BFRModelGeometryExtendedRecord "1" --> BFRModelGeometryRecord : base BFRModelGeometryChildRecord "1" --> BFRModelGeometryRecord : record BFRModelGeometryStream "0..1" --> BFRModelVertexFormatDescriptor : format BFRModelGeometryStream "*" --> BFRVertexFormatElement : format_elements BFRModelGeometryStream "*" --> BFRVertex : vertices BFRModelGeometryStream "*" --> BFRModelGeometryStreamRecord : stream_records
classDiagram BFRNetImmerseNifBlock "1" --> BFRNetImmerseNifBlockPayload : payload BFRParticleManager "1" --> BFRResourceManager : base BFRParticleManager "*" --> BFRParticleSystem : systems BFRParticleSystem "0..1" --> BFRParticleEmitter : emitter BFRParticleSystem "*" --> BFRParticleModifier : modifiers BFRParticleSystem "0..1" --> BFRParticleDefinition : default_particle BFRParticleModifier "*" --> BFRParticleParam : params BFRResourceManager "1" --> BFRResourceCache : cache BFRResourceCache "*" --> BFRResourceHandle : handles BFRShaderConstant "1" --> BFRMaterialParamValue : value BFRTextureResourceCache "*" --> BFRResourceHandle : resident_textures BFRTextureManager "1" --> BFRResourceManager : base BFRTextureManager "*" --> BFRTextureResource : textures BFRTextureManager "1" --> BFRTextureResourceCache : texture_cache BFRTextureResource "0..1" --> BFRTextureFormat : format BFResourceEntryLifecycle "*" --> BFRResourceHandle : retained_handles
classDiagram BFResourceImportRequest "*" --> BFResourceArchiveVariant : variants BFResourceImportRequest "0..1" --> BFResourceZipPrefixImport : zip_prefix BFResourceOpenRequest "1" --> BFResourceOpenMode : mode BFResourceOpenRequest "0..1" --> BFResourcePathNormalization : normalized BFResourceOpenResult "1" --> BFResourceEntryKind : entry_kind BFResourceQueryResult "1" --> BFResourceEntryKind : entry_kind BFResourceTree "*" --> BFResourceTreeNode : nodes BFUITextRenderOptions "1" --> BFUITextRenderSetting : shadows BFUITextRenderOptions "1" --> BFUITextRenderSetting : textures BFZ2FResourceEntry "1" --> BFResourceEntry : entry BFZ2SResourceEntry "1" --> BFResourceEntry : entry BFZipResourceEntry "1" --> BFResourceEntry : entry
classDiagram Bink "0..1" --> BinkFrameCopy : last_copy BinkVideoRuntime "*" --> Bink : videos BinkVideoRuntime "*" --> BinkFrameCopy : pending_frames CrowdConfig "*" --> Graph : density_curves CrowdDocument "*" --> CrowdDensityBand : density_bands CrowdDocument "*" --> Graph : graphs CurveMap "*" --> CurvePoint : points FogDocument "*" --> FogLayer : layers FogDocument "*" --> FogTimeSlice : time_slices FogLayer "*" --> FogKeyFrame : keyframes
classDiagram GamebryoRuntime "1" --> NiMain : main GamebryoRuntime "1" --> NiSystem : system GamebryoRuntime "1" --> NiD3D : d3d GamebryoRuntime "1" --> NiDX9 : dx9 GamebryoRuntime "1" --> NiDX9Renderer : renderer GamebryoRuntime "*" --> NiNode : root_nodes GamebryoRuntime "*" --> NiParticles : particles GamebryoRuntime "*" --> NiParticlesData : particle_data GamebryoRuntime "*" --> NiParticleModifier : particle_modifiers GamebryoRuntime "*" --> NiColorData : color_data GamebryoRuntime "*" --> NiFloatData : float_data GamebryoRuntime "*" --> NiCamera : cameras GamebryoRuntime "*" --> NiTriShape : tri_shapes GamebryoRuntime "*" --> NiSourceTexture : source_textures GamebryoRuntime "*" --> NiRenderedTexture : rendered_textures GamebryoRuntime "*" --> NiZBufferProperty : z_buffer_properties GamebryoRuntime "*" --> NiVertexColorProperty : vertex_color_properties GamebryoRuntime "*" --> NiStringExtraData : string_extra_data GamebryoRuntime "*" --> NiMaterialProperty : material_properties GamebryoRuntime "*" --> NiTexturingProperty : texturing_properties GamebryoRuntime "*" --> NiAlphaProperty : alpha_properties GamebryoRuntime "*" --> NiAlphaController : alpha_controllers GamebryoRuntime "*" --> NiControllerManager : controller_managers GamebryoRuntime "*" --> NiParticleSystemController : particle_controllers GamebryoRuntime "*" --> NiCollisionObject : collision_objects GamebryoRuntime "1" --> NiAccumulatorSet : accumulators
classDiagram LightRig "*" --> LightConfig : lights LightRig "*" --> LightKeyFrame : keyframes LightsConfig "*" --> LightConfig : lights LightsDocument "*" --> LightRig : rigs LodDistances "*" --> LodDistanceLevel : levels LodDistancesDocument "*" --> LodDistanceLevel : levels NiAVObject "1" --> NiObjectNET : object NiAVObject "1" --> NiTransform : local_transform NiAVObject "1" --> NiTransform : world_transform NiAVObject "*" --> NiPropertyRef : properties NiAVObject "0..1" --> NiCollisionObject : collision NiAVObject "0..1" --> NiObjectRef : collision_ref NiAccumulatorSet "1" --> NiAlphaAccumulator : alpha NiAccumulatorSet "1" --> NiTextureAccumulator : texture NiAlphaAccumulator "*" --> NiObjectRef : sorted_objects NiAlphaAccumulator "*" --> NiAlphaProperty : alpha_properties
classDiagram NiAlphaController "1" --> NiObjectNET : object NiAlphaController "0..1" --> NiControllerRef : next_controller NiAlphaController "0..1" --> NiObjectRef : target NiAlphaController "0..1" --> NiObjectRef : data NiAlphaProperty "1" --> NiObjectNET : object NiAnimation "*" --> NiControllerRef : controllers NiAnimation "0..1" --> NiTextKeyExtraData : text_keys NiCamera "1" --> NiAVObject : av_object NiCamera "1" --> NiCameraFrustum : frustum NiCamera "1" --> NiViewport : viewport NiCollision "0..1" --> NiObjectRef : subject NiCollision "0..1" --> NiObjectRef : target NiCollisionObject "1" --> NiObjectNET : object NiCollisionObject "0..1" --> NiObjectRef : target NiCollisionObject "0..1" --> NiCollisionData : data NiColorData "1" --> NiObjectRef : ref_id NiColorData "1" --> NiColorKeyGroup : keys NiColorKeyGroup "*" --> NiColorKey : keys NiControllerManager "1" --> NiObjectNET : object NiControllerManager "*" --> NiAnimation : sequences
classDiagram NiD3DShaderInterface "*" --> NiShaderConstant : constants NiDX9 "1" --> NiD3D : d3d NiDX9 "0..1" --> NiDX9Renderer : renderer NiDX9 "0..1" --> NiD3DShaderInterface : shader_interface NiDX9Renderer "*" --> NiRenderedTexture : render_targets NiDX9Renderer "1" --> NiTextureAccumulator : texture_accumulator NiDX9Renderer "1" --> NiAlphaAccumulator : alpha_accumulator NiFloatData "1" --> NiObjectRef : ref_id NiFloatData "1" --> NiFloatKeyGroup : keys NiFloatKeyGroup "*" --> NiFloatKey : keys NiGeometry "1" --> NiAVObject : av_object NiGeometry "0..1" --> NiObjectRef : data NiGeometry "0..1" --> NiObjectRef : skin_instance NiGeometry "0..1" --> NiGeometryShader : shader NiMain "*" --> NiObjectRef : object_roots NiMaterialProperty "1" --> NiObjectNET : object
classDiagram NiNode "1" --> NiAVObject : av_object NiNode "*" --> NiObjectRef : children NiNode "*" --> NiObjectRef : effects NiObjectNET "1" --> NiObjectRef : ref_id NiObjectNET "*" --> NiExtraDataRef : extra_data NiObjectNET "0..1" --> NiControllerRef : controller NiParticleModifier "1" --> NiObjectNET : object NiParticleModifier "1" --> NiParticleModifierKind : kind NiParticleModifier "0..1" --> NiObjectRef : next_modifier NiParticleModifier "0..1" --> NiObjectRef : controller NiParticleModifier "0..1" --> NiObjectRef : color_data NiParticleSystemController "1" --> NiObjectNET : object NiParticleSystemController "0..1" --> NiControllerRef : next_controller NiParticleSystemController "0..1" --> NiObjectRef : target NiParticleSystemController "0..1" --> NiObjectRef : emitter NiParticleSystemController "*" --> NiParticleInfo : particles NiParticleSystemController "0..1" --> NiObjectRef : particle_extra NiParticleSystemController "0..1" --> NiObjectRef : unknown_link NiParticleSystemController "0..1" --> NiObjectRef : unknown_link_2 NiParticles "1" --> NiGeometry : geometry NiParticlesData "1" --> NiObjectRef : ref_id NiParticlesData "1" --> NiGeometryData : geometry NiRenderedTexture "1" --> NiObjectNET : object NiShaderTextureSlot "0..1" --> NiTextureSlot : texture
classDiagram NiSkinBone "1" --> NiTransform : transform NiSkinBone "*" --> NiSkinWeight : weights NiSkinData "*" --> NiSkinBone : bones NiSkinData "1" --> NiTransform : bind_transform NiSourceTexture "1" --> NiObjectNET : object NiSourceTexture "0..1" --> NiObjectRef : pixel_data NiStringExtraData "1" --> NiObjectRef : ref_id NiTextKeyExtraData "*" --> NiTextKey : keys NiTextureAccumulator "*" --> NiSourceTexture : queued_textures NiTextureSlot "0..1" --> NiObjectRef : source NiTexturingProperty "1" --> NiObjectNET : object NiTexturingProperty "0..1" --> NiTextureSlot : base_texture NiTexturingProperty "0..1" --> NiTextureSlot : dark_texture NiTexturingProperty "0..1" --> NiTextureSlot : detail_texture NiTexturingProperty "0..1" --> NiTextureSlot : gloss_texture NiTexturingProperty "0..1" --> NiTextureSlot : glow_texture NiTexturingProperty "0..1" --> NiTextureSlot : bump_map_texture NiTexturingProperty "0..1" --> NiTextureSlot : decal_0_texture NiTexturingProperty "*" --> NiShaderTextureSlot : shader_textures NiTriShape "1" --> NiAVObject : av_object NiTriShape "0..1" --> NiTriShapeData : data NiTriShape "0..1" --> NiSkinData : skin NiVertexColorProperty "1" --> NiObjectNET : object
classDiagram NiZBufferProperty "1" --> NiObjectNET : object RenderEnvironmentDocumentSet "*" --> FogDocument : fog RenderEnvironmentDocumentSet "*" --> LightsDocument : lights RenderEnvironmentDocumentSet "*" --> SkyLayersDocument : sky_layers RenderEnvironmentDocumentSet "*" --> WaterDocument : water RenderEnvironmentDocumentSet "*" --> CrowdDocument : crowd RenderEnvironmentDocumentSet "*" --> SuspenseDocument : suspense RenderEnvironmentDocumentSet "*" --> LodDistancesDocument : lod_distances
classDiagram RenderEnvironmentDocuments "1" --> AmbientConfig : ambient RenderEnvironmentDocuments "1" --> AmbientBiomesConfig : ambient_biomes RenderEnvironmentDocuments "1" --> AmbientsAllowedConfig : ambients_allowed RenderEnvironmentDocuments "1" --> CrowdConfig : crowd RenderEnvironmentDocuments "1" --> FogConfig : fog RenderEnvironmentDocuments "1" --> LightsConfig : lights RenderEnvironmentDocuments "1" --> LodDistances : lod_distances RenderEnvironmentDocuments "1" --> SkyLayersConfig : sky_layers RenderEnvironmentDocuments "1" --> SuspenseConfig : suspense RenderEnvironmentDocuments "1" --> WaterRenderConfig : water RenderEnvironmentDocuments "1" --> RenderEnvironmentDocumentSet : authored_roots
classDiagram RendererDomain "0..1" --> BFDX9Renderer : dx9_renderer RendererDomain "0..1" --> BFUIRenderer : ui_renderer RendererDomain "1" --> BFRResourceCache : resource_cache RendererDomain "1" --> BFRD3DStateBlock : d3d_state RendererDomain "1" --> BFRTextureManager : texture_manager RendererDomain "1" --> BFRMaterialManager : material_manager RendererDomain "1" --> BFREffectManager : effect_manager RendererDomain "1" --> BFREffectIncludeManager : effect_include_manager RendererDomain "1" --> BFRModelManager : model_manager RendererDomain "1" --> BFRParticleManager : particle_manager RendererDomain "1" --> BFParticleDictionary : particle_dictionary RendererDomain "*" --> BFParticleDefinition : particle_definitions RendererDomain "1" --> BFRSceneGraph : scene_graph RendererDomain "1" --> RenderEnvironmentDocuments : environment_documents RendererDomain "*" --> ZTVista : vistas RendererDomain "*" --> ZTSunLayer : sun_layers RendererDomain "*" --> BFWaterGroup : water_groups RendererDomain "*" --> BFWaterfall : waterfalls RendererDomain "*" --> BFRModeVisualEffectRequest : mode_visual_effects RendererDomain "1" --> GamebryoRuntime : gamebryo RendererDomain "1" --> BinkVideoRuntime : bink
classDiagram BFFPSUDVComponent <|-- ZTFPSUDVComponent SkyLayersConfig "*" --> ZTSunLayer : layers SkyLayersDocument "*" --> SkyLayerDocumentEntry : layers SkyLayersDocument "0..1" --> TimeOfDayUpdateInterval : update_interval SuspenseConfig "*" --> Graph : mix_graphs SuspenseDocument "*" --> SuspenseCue : cues SuspenseDocument "*" --> Graph : graphs WaterDocument "*" --> WaterLayer : layers WaterDocument "*" --> WaterScroll : scroll ZTFPSUDVComponent "1" --> BFFPSUDVComponent : base
model relationship model
classDiagram NetImmerseColorKeyGroup "*" --> NetImmerseColorKey : keys NetImmerseFloatKeyGroup "*" --> NetImmerseFloatKey : keys NetImmerseNiAlphaController "1" --> NetImmerseNiTimeController : controller NetImmerseNiAlphaProperty "1" --> NetImmerseNiObjectNet : object NetImmerseNiAvObject "1" --> NetImmerseNiObjectNet : object NetImmerseNiColorData "1" --> NetImmerseColorKeyGroup : data NetImmerseNiFloatData "1" --> NetImmerseFloatKeyGroup : data NetImmerseNiGeometry "1" --> NetImmerseNiAvObject : av_object NetImmerseNiGeometry "0..1" --> NetImmerseNiGeometryShader : shader NetImmerseNiMaterialProperty "1" --> NetImmerseNiObjectNet : object NetImmerseNiNode "1" --> NetImmerseNiAvObject : av_object NetImmerseNiParticleColorModifier "1" --> NetImmerseNiParticleModifier : modifier NetImmerseNiParticleGrowFade "1" --> NetImmerseNiParticleModifier : modifier
classDiagram NetImmerseNiParticleRotation "1" --> NetImmerseNiParticleModifier : modifier NetImmerseNiParticleSystemController "1" --> NetImmerseNiTimeController : controller NetImmerseNiParticleSystemController "*" --> NetImmerseNiParticleInfo : particles NetImmerseNiParticles "1" --> NetImmerseNiGeometry : geometry NetImmerseNiParticlesData "1" --> NetImmerseNiGeometryData : geometry NetImmerseNiSourceTexture "1" --> NetImmerseNiObjectNet : object NetImmerseNiTexturingProperty "1" --> NetImmerseNiObjectNet : object NetImmerseNiTexturingProperty "0..1" --> NetImmerseTextureSlot : base_texture NetImmerseNiTexturingProperty "0..1" --> NetImmerseTextureSlot : dark_texture NetImmerseNiTexturingProperty "0..1" --> NetImmerseTextureSlot : detail_texture NetImmerseNiTexturingProperty "0..1" --> NetImmerseTextureSlot : gloss_texture NetImmerseNiTexturingProperty "0..1" --> NetImmerseTextureSlot : glow_texture NetImmerseNiTexturingProperty "0..1" --> NetImmerseTextureSlot : bump_map_texture NetImmerseNiTexturingProperty "0..1" --> NetImmerseTextureSlot : decal_0_texture NetImmerseNiTexturingProperty "*" --> NetImmerseShaderTextureSlot : shader_textures NetImmerseNiVertexColorProperty "1" --> NetImmerseNiObjectNet : object NetImmerseNiZBufferProperty "1" --> NetImmerseNiObjectNet : object
classDiagram NetImmerseNifDocument "1" --> NetImmerseNifHeader : header NetImmerseNifDocument "1" --> NetImmerseNifFooter : footer NetImmerseNifDocument "*" --> ModelBlockRecord : block_records NetImmerseNifDocument "*" --> ModelBlockTypeCount : block_type_counts NetImmerseNifDocument "*" --> NetImmerseNifBlock : block_payloads NetImmerseShaderTextureSlot "0..1" --> NetImmerseTextureSlot : texture
Open contracts (Renderer/Audio)
.bfmat/.fxparameter/animation syntax and material slot binding are not modeled.BFAnimControllerblend/transition rules andBFAnimGraphstructure are unrecovered.- Camera transition curves and
BFSndCrossFadertiming are open. - Sound mixing categories/ducking policy beyond the message set are unknown.
Persistence
Persistence reuses the BFXMLObj read_xml_node/write_xml_node contract that
every component already implements. A save is the serialized component/entity
tree written into a .z2s container; load replays it back into the same binders
and components. Save and load are file-mode tools.
classDiagram
ZTMode <|-- ZTFileMode
ZTFileMode <|-- ZTSaveMode
ZTFileMode <|-- ZTLoadMode
ZTMode <|-- ZTDownloadMode
BFComponent <|-- BFUserProfileMgr
BFComponent <|-- BFGElevatedTileSerializer
BFXMLObj <|-- BFUndoTransactionData
class BFUserProfileMgr { profile id; saveDirectory; tempDirectory; options.xml }
What is persisted
The save captures the source-defined zoo: profile/options (BFUserProfileMgr,
options.xml), selected map/scenario/campaign, zoo session (cash/economy
history, fame, research unlocks, status), the world (terrain/biome, fences/tanks,
paths, transport, placement grid + elevated support via BFGElevatedTileSerializer),
entity instances and their component state, AI tokens and task-relevant state,
scenario/tutorial rule state, disease/cure state, adoption slots, and
photos/challenges.
Reconstructed: a ZTSavedGame row carries name, path, preview
thumbnail, file_time_low/high, and scenario_name; ZTSaveRequest/ZTLoadModeState
drive the file-mode flow.
Save/load flow
sequenceDiagram participant UI as menu participant Mode as ZTSaveMode / ZTLoadMode participant Tree as binder + component tree participant File as .z2s container UI->>Mode: ZT_SAVEGAME / ZT_LOADGAME Mode->>Tree: walk roots Tree->>File: write_xml_node() per component (save) File->>Tree: read_xml_node() per component (load) Mode-->>UI: ZT_SAVE_SCREENSHOT / ZT_LOAD_AFTER_SAVE
handle_saveEntityFile_command shows the same path for single entity-file export;
ZT_SAVE_SCREENSHOT attaches the save thumbnail.
save relationship model
classDiagram SaveDomain "1" --> ZTLoadModeState : load_mode SaveDomain "1" --> ZTSaveModeState : save_mode SaveDomain "0..1" --> ZTSavedGame : current_game SaveDomain "0..1" --> ZTLoadRequest : pending_load_request SaveDomain "0..1" --> ZTSaveRequest : pending_save SaveDomain "0..1" --> ZTDeleteGameRequest : pending_delete SaveDomain "*" --> BFUserProfileEvent : profile_events SaveDomain "0..1" --> ZTLoadAfterSave : load_after_save ZTSaveModeState "*" --> ZTSaveLoadAlert : alerts
Open contracts (Persistence)
- The
.z2sbyte/container format, section ordering, and version handling are unrecovered. The recovered contract is thewrite_xml_nodetree. - The transient-vs-persisted boundary per component (which members serialize) is not enumerated.
- Profile/
options.xmlschema is partly modeled:BFGraphicsOptions(full_screen/screen_width/height/depth/graphics_detail/anti_aliasing) andBFAudioOptions(want_sound/sample_rate/bits/channels/mixer_channels/master_volume/music_volume);BFStartupWindow(class_name/title/width/height/icon/dialog_resource) is the Win32 startup window. Autosave cadence is open.
Reconstructed Type Reference (Appendix)
Field coverage for reconstructed flat config/state/helper records.
ai.rs
- BFSharedPhysVars — source_name, floats, strings, bools
- BFAITokenTargetPosition — grid_x, grid_y, height
- BFAITaskRuntimeState — active, completed, failed, elapsed_seconds, current_behavior_index
- BFAITaskEvaluationResult — accepted, score, failed_evaluator, selected_subject, selected_target
- BFAIFixedValueEval — value
- BFAIEntityAttributeEval — attribute_name, subject_entity, target_entity, missing_value
- BFAISpeciesViewEval — species, viewed_species_memory, donation_factor_key
- BFAIThresholdEval — controller_name, threshold_name, minimum, maximum
- BFAIFollowUpBehavior — behavior_type, delay_seconds, token_payload
- BFAITaskMutation — mutation_name, target_entity, attribute_name, value, event_token
- BFAIFeedbackMessage — message_token, thought_token, feedback_entity, sound_token
- BFAIUnhideComponent — hidden_component, unhide_token
- BFSteerVector — x, y, z
- ZTAISharedInfluenceWatcher — watcher_type, watched_influence
- ZTAIEducationData — education_value, topic
- ZTAIFeedbackController — feedback_token, message_type
- ZTAIViewpointSwapPolicy — swap_chance, min_swap_distance, max_swap_distance
- ZTEdDonateValueRange — min_score, max_score, value
- ZTAITourTakerData — weight, donate_min, donate_max, favorite_animal_bonus
- ZTAIVehicleData — vehicle_type, capacity, route_token
- ZTAIWaterFilterComponent — clean_tank_token, water_dirtiness
- ZTPAPTEntityStub — entity_type, component_names
animal.rs
- ZTAnimalTypeLifeCycle — adult, pregnant
- ZTAnimalTypeStatusFlags — predator, extinct, large_animal, marine, show_animal, can_be_ridden, can_swim_with
- ZTAnimalTrickKnowledge — trick_token, min_score, max_score
- ZTAnimalRuntime — rampaging, eyedropper_selected
- ZTAnimalAdoptionState — show_adopt, adoptable, adoption_slot, adoption_message
- ZTAnimalReleaseState — show_release, releasable, release_message, conservation_reward
- ZTAnimalDiseaseState — disease_token, cure_token, target_for_disease
- ZTAnimalCrateState — crated, show_crate, crate_entity, tranquilized
- ZTAnimalConservationState — endangerment_token, release_bonus, donation_bonus
- ZTAnimalTrainingState — training_area, learned_tricks, trick_scores, active_trick
- ZTAnimalTrainingProgress — trick_token, previous_score, new_score, completed_before, completed_after
- ZTAdoptionMgrContextConfig — source_path, config_data, saveable, attributes
- ZTAdoptionSlotMgrContextConfig — source_path, config_data, saveable, attributes
- ZTAdoptionFameSlot — fame, slots, loc_id
- ZTAdoptionLoadEvent — msg, data, name, child_msg, child_data, child_name
- ZTFavoriteAnimalMgrContextConfig — source_path, config_data, saveable, attributes
app.rs
- ZTStartupUiSurfaces — native_tool_roots, startup_splash_roots
audio.rs
- ZTWorldSoundGeneralData — env_transition_seconds, max_distance_to_hear_lapping_water, lapping_sound_interp_scalar, smallest_water_area_for_lapping
- BF2DSndRequest — event_token, sound_asset, volume, pitch, pan, category, emitter_entity, world_position, looping, streamed
- ZTMainMenuMusicState — track_token, playing, volume
camera.rs
- ZTCameraCommandStateEvent — token, active
catalog.rs
- BFBinderSubtree — name, binder_type, children
disease.rs
- ZTCureDiseasePanelState — cure_panel_visible, cause_panel_visible, sample_panel_visible, alert_status, hint_index
economy.rs
- ZTFameMessageType — token, value_type, loc_id
- ZTStatusContextConfig — source_path, config_data, saveable, attributes
entity_info.rs
- ZTEntityCrater — entity_type, crater_radius, decal
fence.rs
- ZTFenceModeCommandRequest — command_name, payload
- ZTFenceModeCursorTypeQuery — command_name, requested_type, active_cursor_entity_type, matched
gesture.rs
- ZTGestureTraceInputToken — token
managers.rs
- ZTAppLifecycleCommand — message, target_context, payload
- ZTViewableObjectRecord — entity_id, entity_type, view_value, max_tour_view_value
- ZTViewableStationRecord — station_entity, viewed_entities, score
- ZTAwardRecord — award_id, loc_id, persistent
- ZTFeedbackMgrContextConfig — source_path, config_data, saveable, attributes
- ZTPuzzleState — puzzle_id, layout_name, solved
- ZTPuzzleAction — action_name, target
- ZTPuzzleStep — step_id, required_action, target, complete
- ZTWorldMgrContextConfig — source_path, config_data, default_world_size, attributes
- ZTUndoMgrContextConfig — source_path, saveable, attributes
- BFUndoAction — action_type, target_id, payload
- ZTUndoStation — station_entity, return_station
- BFAITokenDispatch — token_name, source_entity, target_entity, forced
- BFAICognitiveCompletion — entity_id, task_name, succeeded
- BFAIRelationshipEvent — subject, target, relation_type, message
- BFAIRelationshipRecord — subject, target, relation_type, score
- BFGEntityTriggerEvent — trigger_name, entity_id, payload
- BFGInfluenceMgrContextConfig — source_path, config_data, saveable, attributes
- BFGInfluenceTerrainRule — rule_name, key, value, radius, radius_dropoff
- BFGInfluenceEffect — source_entity, target_entity, influence_type, scalar
- BFGPathFinderMgrContextConfig — source_path, config_data, saveable, attributes
- BFGConnectedPathRecalc — entity_id, elapsed_seconds, interval_seconds
- BFGRampageSuppressionRecord — animal_entity, timeout_seconds, elapsed_seconds
- BFGRampageEvent — animal_entity, message, triggered_drt, sound_distance
- BFGRampageSoundPolicy — interp_scalar, max_distance, distance_for_max_volume
- BFGDinoRecoveryDispatch — animal_entity, team_entity, crate_entity, task_token
- BFGTraversabilityCommand — command_name, payload
- BFGTraversabilityAreaWrite — area_id, changed_triangle_indices, immediate_triangle_indices
- BFGTraversabilityEntityRule — entity_type, motion_class, required_open_area_size
- BFGDistantViewType — view_type, display_motion_class
- BFGTraversabilityMgrContextConfig — source_path, config_data, saveable, attributes
- ZTLocationEntry — location_id, entity_id, position, biome
- ZTViewableSubMgrStation — station_entity, viewed_animals, score
- ZTAIGuestMgrContextConfig — source_path, config_data, saveable, attributes
- ZTSpawnPriceEffect — percent_range_min, percent_range_max, percent_delta, percent_adjust
- ZTSpawnAnimalEffects — num_species_per_adjust, percent_adjust_per_num_species, max_percent_adjust
- ZTSpawnNeedEffects — critical_check_interval, max_critical_need_hits_per_month, max_edu_points_per_view, max_ent_points_per_view, monitored_needs
menu_profile_campaign_scenario.rs
- ZTExpansionInfo — expansion_id, display_name, version, enabled
modes.rs
- ZTModeHotKeyFile — file, node
- ZTSelectionEndangermentLocId — token, loc_id
- ZTThoughtItemTemplate — priority, file
- ZTDeleteGroup — name, type_tokens
- ZTFirstPersonMouseLookTransition — active
- ZTModeDelayConfig — name, delay_seconds
- ZTTrainingEventPercentValue — event_count, percent_of_score
- ZTTrainingNativeCursorContract — wait_cursor, training_cursor
- ZTTrainingNativeGesturePointerContract — texture_sequence, terminal_frame
- ZTUIParticleEffects — effects
- ZTFPTrainingRewardEffect — animal_entity, effect
- ZTOverviewModeAnimalIcon — entity_type, icon_name
- ZTOverviewModeBuildingIcon — entity_type, icon_name
- ZTOverviewFilter — category, type_name, enabled
- ZTViewFilterState — token, visible
- ZTOverviewMapProjection — world_bounds, screen_region, zoom
- ZTOverviewClickTarget — entity_id, screen_x, screen_y
- ZTDeleteConfirmationState — message_token, confirmed, cancel_token
- ZTGroundTrackEndpoint — entity_id, endpoint_token, station_token
- ZTGroundTrackCircuit — circuit_id, forward_segments, closed_circuit
- ZTGuestViewTarget — guest_entity, tag_file
- ZTGuestViewCameraBinding — yaw, pitch, zoom
- ZTCurbAnchor — tile_x, tile_y, level
photo.rs
- ZTPhotoChallengeScoreThresholds — dist_from_camera, percent_seen, percent_seen_in_center
- ZTPhotoChallengeMgrContextConfig — source_path, init_data, config_data, saveable, attributes
placement.rs
- ZTPlacementValidation — accepted, message_token
- ZTPlacementModeCommandRequest — command_name, entity_type
- ZTPlacementModeCommandDecision — command_name, entity_type, active_entity_type, single_object_placement, accepted
- ZTPlacementCommitRequest — command_name, entity_type, target_entity, platform_confirmation_branch
- ZTPlacementCommitDecision — command_name, entity_type, target_entity, platform_confirmation_branch, fallback_mode_token, accepted
- ZTEntityMovementModeState — selected_entity, original_location, candidate_location
- ZTElevatedPathPlacementState — mode_token, height, anchor_entity, supports_required
- ZTItemFilter — filter_name, selected_values
renderer.rs
- BFComponentNode — component_type, component_name, children
- BFResourceEntryVirtualInterface — open_slot, enumerate_slot, predicate_slot, refresh_tree_slot, delete_slot
- BFResourceEntryPredicate — normalized_key, helper_key, include_archives
- BFRMaterialUvTransform — offset_u, offset_v, rotation_w, scale_u, scale_v
- BFRMaterialTextureBinding — semantic, texture_path
- BFRTransformBinding — semantic, matrix_source
- BFRMaterialFlags — alpha_blend_enable, src_blend, dest_blend, no_render
- BFREffectRenderer — renderer_type, emitter_name
- BFREffectModifierBinding — emitter_name, modifier_name, usage, param
- BFRModelMaterialSlot — slot_name, material_path, usage, param
- BFRModelSourceBlockRecord — index, block_type
- BFRModelSourceBlockTypeCount — block_type, count
- BFRModelGeometryVisitor — visited_records, output_count, output_size_bytes
- BFRModelGeometryIntersectionQuery — origin, direction, max_distance
- BFRModelGeometryHit — distance, triangle_index, record_index
- BFRModelTransform — position, direction, up
- BFRModelCacheRecord — usage, param, looped, linked_resource
- BFRModelParameterRecord — usage, param, value, looped
- BFRTextureByteSizeRequest — format_code, width, height
- BFRTextureByteSizeResult — bytes, block_width, block_height
- BFDecorativeDetailObjectComponent — detail_level
- BFSimpleLODComponent — standard_model, special_model
- BFRVertexPT0 — position, tex0
- BFRVertexPNT0 — position, normal, tex0
- BFRVertexPNDT0T1 — position, normal, diffuse, tex0, tex1
- BFRVertexPNDT0T1T2 — position, normal, diffuse, tex0, tex1, tex2
- BFRVertexXPD — position, packed_data
- BFWaterGroupMember — entity_id, tank_id, bounds
research.rs
- ZTResearchMgrContextConfig — source_path, init_data, config_data, saveable, attributes
runtime_support.rs
- ZTAppComponentConfig — component_type, init_data, attributes
- BFLogChannelConfig — channel, cutoff
- BFRegistryAppConfig — app_key
- ZTExtraPathsAppConfig — source_path, component_type, attributes
- BFWindowComponentAppConfig — width, height, class_name, window_title, icon
- BFContextCommand — message, target, payload
- ZT2Strings — tables, locale, fallback_locale
- ZTExtraPaths — bootstrapped, source_path, component_type, bootstrap_attributes, profile_root, save_root, download_root, screenshots_root
- BFString — value
- BFPoint — x, y
- BFRect — left, top, right, bottom
- BFTypedBinderChildRecord — name, binder_type, type_name, shared_node, instance_node
- BFLoadListener — listener_name, phase
- ZTLoadListener — listener_name, target_phase, layout, blit_rate_seconds
- BFSafeHandleBase — handle_id, generation
- BFUserProfileMgrOptionsInfo — app_name, extra_path, save_directory, temp_directory
- BFUserProfileAddProfile — profile_name, source_path
- BFUserProfileRemoveProfile — profile_name, delete_files
- BFUserProfileSetProfile — profile_name
- BFUserProfileOptionsChanged — profile_name, options_path
- BFPerfIncreaseCommand — counter_name, amount
- BFPerfDecreaseCommand — counter_name, amount
- BFGraphicsPerfIncreaseCommand — counter_name, renderer_bucket
- BFTimeHeartbeatEvent — elapsed_seconds, delta_seconds
- BFTimeSimTickEvent — tick_index, sim_seconds
- BFTimeSlowTickEvent — tick_index, elapsed_seconds
- BFLogRecord — channel, message
- BFStackTrace — frames
- ZTCDCheck — last_result, failure_message
- ZTWebIndexGetCommand — index_url, target_file
- ZTWebMotdGetCommand — motd_url, target_file
- ZTWebFileGetCommand — transfer_id, url, target_file
- ZTWebFileEnableCommand — transfer_id, enabled
- ZTWebFileGetCancelCommand — transfer_id, target_file
- ZTWebGetFileDoneEvent — transfer_id, target_file, succeeded
- ZTWebShowUpdateCommand — item_id, layout_path, force_visible
- ZTLoggingConsent — accepted, registry_value, prompt_layout
- ZTUsageObject — object_id, entity_id, active
- ZTMemTrackingDumpCommand — destination, include_stack_traces
- ZTMemTrackingClearCommand — reset_counters
- ZTPerformanceStatsDumpCommand — destination, include_graphics_perf
- ZTOptimizationToggle — optimization_name, enabled
- ZTUiDrawToggle — draw_ui, source_message
- ZTDebugToggleCommand — command_name, enabled, payload
- ZTDebugActionCommand — command_name, payload
- ZTRetailBuild — retail_flag, build_token
- ZTVinceQuestionAnswer — question_id, answer, accepted
scenario.rs
- BFScenarioRuleTest — predicate, subject, value
- ZTScenarioMgrContextConfig — source_path, init_data, config_data, saveable, attributes
- BFScenarioSetChallengeDelayCommand — challenge_id, delay_seconds
- BFScenarioHideRuleCommand — rule_name
- BFScenarioSetGlobalVarCommand — variable_name, value
- BFScenarioSetUserValCommand — key, value
- BFScenarioGetRuleNamesCommand — include_hidden
- BFScenarioLoadScenarioCommand — scenario_path, load_count
- BFScenarioSaveOptionsCommand — profile_name, options_path
- BFScenarioGetAllChallengesCommand — campaign_id
- BFScenarioOkCommand — request_id
- BFScenarioErrorCommand — request_id, message
- BFScenarioClearScenarioCommand — clear_world, clear_rules
- BFScenarioLocalizeFloatCommand — value, format_token
- BFScenarioResetRuleStatesCommand — include_completed
- BFScenarioGetGlobalVarCommand — variable_name
- BFScenarioShowRuleCommand — rule_name
- BFScenarioAddScenarioCommand — scenario_id, group_name
- BFScenarioGetRuleStateCommand — rule_name
- BFScenarioValidateAllChallengesCommand — campaign_id
- BFScenarioPickChallengeCommand — challenge_id
- BFScenarioAddScenarioObjectCommand — object_type, object_id, target_rule
- BFScenarioProcessVinceCommand — answer_id, accepted
- BFScenarioGetUserValCommand — key
scripting.rs
- BFScriptActionRecord — action_name, script, function_name, payload
- ZTScriptRunRequest — scope, script, function_name, arguments, raw_payload
- ZTScriptUiReplacementText — target_name, locid, replacement
show.rs
- BFAITrickMgrData — trick_templates
- BFAITrickTemplate — trick_token, default_trick, behavior_set, required_target
- ZTAITrickMgrData — source_documents, tricks, tricks_by_animal_type, default_trick_by_variant, variants_by_default_trick
- ZTAITrickComponentData — trick_token, display_loc_id, reward
- ZTAITrickTargetComponent — trick_area, target_node
- ZTTrickButtonPipConfig — dimension, scaled_width, scaled_height
staff.rs
- ZTAIStaffMgrContextConfig — source_path, config_data, saveable, cleanup_interval_seconds, attributes
- ZTAIStaffTrainerComponent — trainee_animal, trick_token, training_area
- ZTAIStaffJobStealPolicy — job_safe_distance, steal_job_threshold
- ZTStaffWaterCleaningRequest — tank_entity, filter_entity, priority
tank.rs
- ZTTankChildEntry — entry_index, child_entity, child_type
- ZTTankGateChildEntry — entry_index, child_entity, primary_tank_id, alternate_tank_id
- ZTTankSegmentDetachState — primary_detached, alternate_detached, child_entries_released
- ZTTankContainedEntity — entity_id, entity_type, water_compatibility
- ZTTankWaterVolume — floor_height, water_height, depth
- ZTTankCleanlinessState — cleanliness, active_filter_entities, dirty
- ZTTankMaterialPolicy — high_detail_suffix, low_detail_suffix, texture_reflect, water_detail
- ZTTankHeightCommand — tank_id, height, from_ui_message
- ZTTankModeCommand — mode, source_message
- ZTTankFillCommand — tank_id, source_message
- ZTTankDrainCommand — tank_id, source_message
- ZTTankDeleteCommand — tank_id, preserve_contents
- ZTReplaceZooWallsCommand — old_wall_type, new_wall_type, selected_only
terrain.rs
- BFGBiomeData — display_name_token, water, overview_color, draw_order
- BFGBiomeObjects — detail_objects, decorative_detail_objects, autoplacement_variations
transport.rs
- ZTToggleCircuitStatusCommand — circuit_id, active
- ZTSelectStationComponentCommand — station_entity, component_name
- ZTSelectVehicleTypeCommand — vehicle_type, circuit_id
- ZTGenerateVehicleCommand — vehicle_type, station_entity, circuit_id
ui_binding.rs
- ZTGoalPanelEntry — goal_id, loc_id, completed, hidden
- ZTZoopediaTOCEntry — entry_id, parent_id, loc_id, page_path
- BFNullEvent — message
- BFBooleanEvent — message, value
- BFIntEvent — message, value
- BFUIntEvent — message, value
- BFFloatEvent — message, value
- BFDoubleEvent — message, value
- BFStringEvent — message, value
- BFStringTokenEvent — message, token
- BFTypeEvent — message, type_name
- BFRefCountedXMLObjEvent — message, object_type, ref_count
- UIKeyboardEvent — key_code, raw_key, command
- UIMouseEvent — event_name, x, y, wheel_delta, dragging
- BFStringObj — value
- BFPoint — x, y, z
- UIHandle — component_name, runtime_handle, object_type
- UIAck — ok, error
- UISettingsChangedData — graphics_changed, audio_changed, controls_changed, profile_changed
- UICursorState — cursor_name, visible, owner_component
- UIModalState — modal_component, previous_focus, blocked_components
- UINameData — name, parent_name
- UIParentData — parent_name, child_name
- ZTActionInfo — action_token, loc_id, icon, enabled
- ZTMoneyText — amount, formatted, positive_color, negative_color
- ZTOverviewData — animal_icons, building_icons, filters
ui_contract.rs
- UIButtonEventBinding — event_name, command, data, target
- UIHoverState — hovered, enter_event_count, leave_event_count
- UIContainerLayout — auto_size, auto_size_parent, columns, rows, x_spacer, y_spacer, column_width, row_height, initial_x, initial_y
- UIListBoxEntry — entry_id, layout, text, icon, selected
- UIDragBounds — min_width, max_width, min_height, max_height, bounded, dragging
- UIDropListItem — item_id, text, value
- UISoundBinding — name, path, event
- UIStaticState — rows
- UITextBufferState — lines, scroll_offset
- UIToolState — command, active
- UITooltipState — target, tooltip_type, float, appear_seconds, display_seconds, help_ids, name_help, short_help, long_help, help_token
- UITreeElementState — item_id, expanded, selected
- UIWindowState — title, modal, draggable, horizontal, vertical, wheel_scroll, hscroll, vscroll
- UIXMLEditState — document_path, dirty
- BFUITextFontTag — name, size, image, shadow_x, shadow_y, shadow_alpha
- BFUITextImageTag — source, source_x, source_y, source_width, source_height, width, height
- BFUITextCellTag — width, pad_x, pad_y
world.rs
- BFGEventRoot — root_name, listeners, events
- BFGEventRecord — message, subject_entity, target_entity, payload_type, payload
- BFGAttachWorldCommand — world_id, map_path, source_message
- BFGAttachGameCommand — game_id, profile_name, startup_context
- BFGCameraYawQuery — camera_entity, yaw
- BFGEntityRemovalResult — removed_entities, failed_entities, emitted_event
- BFGDerivedTypesQuery — base_type, include_abstract, results
- BFGPlacementGridContextConfig — source_path, saveable, attributes
- BFGCollisionMgrContextConfig — source_path, saveable, attributes
- BFGDetachInfo — detach_action, detach_beh_set, parent_obj, child_obj, parent_entity, child_entity
- BFGPoint3Attribute — name, value
- BFGFloatAttribute — name, value
- BFGStringAttribute — name, value
- BFGBooleanAttribute — name, value
- BFFakePhysicsComponent — velocity, acceleration
- BFComponentScriptHook — event_name, function_name
- ZTExpandoHeight — height_absolute, min_height, default_height, current_height
- ZTExpandoPiece — name, binder_name, attach_node
- ZTAdmissionControls — adult_admission_token, selected_index, members_token
- ZTBalanceSheetView — category_list, item_list, month_labels, monthly
- ZTZooSurveyQuestion — question_id, loc_id, value_type
- ZTZooSurveyAnswer — question_id, value
- ZTZoopediaPage — entry_id, page_number, text_token, previous_entry, next_entry
Registered Class Roster (node-level)
Thin registered subtypes/records (behaviour in base + message vocabulary), with parent:
- < (root):
BFAIStateVarBaseType,BFColor,BFRect,getActiveSequenceName,getActiveSequenceTime,getBM,getCM,getCurrTask,getCurrentPlaySet,getDistFromCamera,getEDI,getFirstContainedEntity,getFirstInterestingEntity,getFirstInterestingEntity2,getFirstPhysObj,getID,getIsCrated,getIsDiseased,getIsElevatedShot,getIsInWater,getIsOnElevatedTile,getIsSuper,getIsUnderwaterShot,getNextContainedEntity,getNextInterestingEntity,getNextInterestingEntity2,getPAC,getPercentOfScreen,getPercentSeen,getPercentSeenInCenter,getPosition,getRotation,getSharedVar,getStateVar,getTaskTarget,getType,getVar,getVehicleShot,hasRelationship,isKindOf,isPlaySetInContext,localize,testRelationship - < BFComponent:
BFAITrickMgrData,BFAIUnhideComponent,BFBehSetMap,BFGBiomeData,BFGDetachInfo,BFLoadListener,BFSharedPhysVars,BFSkyLayer,BFSndComponent,BFXMLNodeComp,ZTAIEducationData,ZTAISharedInfluenceWatcher,ZTAIStaffTrainerComponent,ZTAITourTakerData,ZTAITrickComponentData,ZTAITrickTargetComponent,ZTAIVehicleData,ZTAIWaterFilterComponent,ZTCDCheck,ZTCloningCenterComponent,ZTCloningCenterInstanceComponent,ZTElevatedTriangleGraphic,ZTEntityCrater,ZTEntityDestructionComponent,ZTEntityDestructionData,ZTExtraPaths,ZTFossilSkeletonComponent,ZTItemFilter,ZTLocationEntry,ZTOverviewData,ZTOverviewModeAnimalIcon,ZTOverviewModeBuildingIcon,ZTPhysObjSwapComponent,ZTPuzzlePiece,ZTTransportGroundTrackShared,ZTVehicleBase,ZTWebComponent,ZTWetsuitComponent,ZTWitheredPlantComponent - < BFBehavior:
BFBehAnimSwitchSet,BFBehAnimateRandom,BFBehAnimateSwitch,BFBehAnimateTAP,BFBehAttachObject,BFBehDetachObject,BFBehDirectPursuit,BFBehDockNow,BFBehDockQueue,BFBehDockRadial,BFBehDockTAP,BFBehEnter,BFBehEscapeObstacle,BFBehEvasion,BFBehExit,BFBehFacePos,BFBehFaceTarget,BFBehFade,BFBehFall,BFBehFollowLine,BFBehFollowSpline,BFBehHeadLook,BFBehHide,BFBehInterpolate,BFBehKill,BFBehLocoSwitchSet,BFBehMove,BFBehPlaySet,BFBehPursuit,BFBehRandomSet,BFBehScript,BFBehSendToken,BFBehSendTrigger,BFBehSetAttribute,BFBehSpawn,BFBehSyncSet,BFBehWaitQueue,BFBehWander,BFBehWhap - < BFXMLObj:
BFAIRelationData,BFAIRemoveTokenInfo,BFAITargetPos,BFAIValidationData,BFBehScriptParams,BFFloatVector,BFGBiomeFeatureData,BFGBooleanAttribute,BFGDetachAction,BFGFakePhysicsData,BFGFloatAttribute,BFGPoint3Attribute,BFGRealPhysicsKickData,BFGStringAttribute,BFHeartbeatData,BFKeyValObj,BFMatrix3Obj,BFModeDesc,BFPoint3Obj,BFStringFloatObj,BFStringVector,BFWindowsMessage,TriangleID,ZTAdmissionData,ZTEconomyInfo,ZTFeedbackString,ZTRelationshipQueryData - < BFEvent:
BFBooleanEvent,BFDoubleEvent,BFFloatEvent,BFIntEvent,BFNullEvent,BFPoint3Event,BFRefCountedXMLObjEvent,BFStringEvent,BFStringTokenEvent,BFTypeEvent,BFUIntEvent - < BFPhysComponent:
BFDistanceCullComponent,BFFadeControllerComponent,BFFakePhysicsComponent,BFHeadLookComponent,BFHighlightComponent,BFScaleControllerComponent,BFShadowComponent,BFShadowLODComponent,BFSkewComponent,BFTravAnimPathMoverComponent,BFUserDrivenComponent - < BFAnimController:
BFNodeBezierEulerRotAnimController,BFNodeBezierPosAnimController,BFNodeBezierRotAnimController,BFNodeBezierScaleAnimController,BFNodeLinearEulerRotAnimController,BFNodeLinearScaleAnimController,BFNodePosAnimController,BFNodeRotAnimController,BFNodeTCBPosAnimController,BFNodeTCBRotAnimController - < BFSteer:
BFSteerAlign,BFSteerAvoidObstacleAhead,BFSteerAvoidVehicle,BFSteerDepth,BFSteerEvasion,BFSteerVector - < BFAISensor:
ZTAISensorFossilSites,ZTAISensorRampage,ZTAISensorRampagingAnimals,ZTAISensorShow - < BFNISceneGraphComponent:
BFDecorativeDetailObjectComponent,BFLineComponent,BFSimpleLODComponent - < ZTAISensor:
ZTAISensorLand,ZTAISensorTransport,ZTAIStaffSensor - < ZTViewableSubMgr:
ZTTransportViewable,ZTViewableSubMgrStation - < BFCameraComponent:
BFDeflectedCamera,BFShadowCamera - < UIText:
ZTMoneyText - < ZTUITypeList:
ZTUIContextList - < ZTEconomyComponentHistoryBase:
ZTEconomyComponentSimple - < ZTFeedbackString:
ZTActionInfo - < BFLoadListener:
ZTLoadListener - < BFShadowComponent:
BFMovingBlobShadowComponent - < BFTypedObj:
BFSafeHandleBase - < BFAIComponent:
BFAIAttributeData - < BFWorldFittingSurface:
BFGTileFittingSurface - < BFLineComponent:
BFRopeComponent - < BFSkyLayer:
BFColorInterpolateSkyLayer - < BFNiBoneLODComponent:
BFNIActorComponent - < BFAITrickMgrData:
ZTAITrickMgrData - < BFAIDataThresholdController:
ZTAIFeedbackController - < BFAISensorSelf:
ZTAIStaffSensorSelf - < BFScriptComponent:
ZTPAPTEntityStub
Message Token Registry
All 1084 registered message/event tokens (no fields/methods) by family.
- ZT_… (509):
ZT_ACCEPT_LOGGING,ZT_ACTION_CONFIRMED,ZT_ACTIVATE_CLONING_LEVEL,ZT_ACTIVATE_MODE_HELP,ZT_ACTIVATE_ON_UI_BUTTON,ZT_ACTIVATE_UI_BUTTON,ZT_ADDSPLINEPOINT,ZT_ADD_ADDITIONAL_AMBIENT,ZT_ADD_ANIMAL_FOR_CREATION,ZT_ADD_TO_FILTER_HISTORY,ZT_ALLOW_FAILURE,ZT_ANIMAL_RELEASE,ZT_ANIMAL_RELEASE_WILD,ZT_ANIMAL_RELEASE_ZOO,ZT_APPMSG,ZT_ASSIGN_KEEPER,ZT_ASSIGN_WORKER,ZT_AUTOPOPULATE_LIST,ZT_BIOME_PAINT_FOLIAGE,ZT_BIOME_PAINT_ROCKS,ZT_BIOME_PAINT_TREES,ZT_BIOME_UNDO_DELETE_FLATTENING,ZT_BIOME_UNDO_RECREATE_FLATTENING,ZT_BOARD_SELECTED_ENTITY,ZT_CACHE_MAPDATA,ZT_CANCEL_EXITCONFIRMATION,ZT_CANCEL_GENERIC_CONFIRMATION,ZT_CHANGEGESTUREBB_SCALE_X,ZT_CHANGEGESTUREBB_SCALE_Y,ZT_CHANGEGESTUREBB_SCALE_Z,ZT_CHANGE_CIRCUIT_DIRECTION,ZT_CHECK_FOR_DISEASE,ZT_CHOOSE_RANDOM_PUZZLE,ZT_CLEANUP_TRASHED_BINDERS,ZT_CLEARMODE,ZT_CLEAR_COMMAND_STATE,ZT_CLEAR_GLOBE,ZT_CLEAR_MEMTRACKING,ZT_CLEAR_USAGE_OBJECT,ZT_CLOSE_MAP,ZT_CONFIRM_ENTITY_PLACEMENT,ZT_CONFIRM_EXIT,ZT_CONFIRM_EXIT_WAIT,ZT_CRASH,ZT_CRATE_ENTITY,ZT_CREATE_NEW_SPLINE,ZT_DECLINE_ADOPTION,ZT_DECLINE_ALL_ADOPTIONS,ZT_DECLINE_LOGGING,ZT_DELETEGAME,ZT_DELETE_KEEPER_ASSIGNMENT,ZT_DELETE_TANK,ZT_DIG_ARTIFACT,ZT_DISABLE_AUTO_EXIT,ZT_DISPLAYCHANGED,ZT_DISPLAYSPLINE,ZT_DISPLAYUPDATED,ZT_DISPLAY_ZOO_MESSAGE,ZT_DOUBLE_SPECIES_ADOPTPANEL_MULTIPLIER,ZT_DOWNLOAD_SHOW_UPDATE_TIMER,ZT_DRAIN_TANK,ZT_DUMP_MEMTRACKING,ZT_DUMP_PERFORMANCE_STATS,ZT_EDITFILE,ZT_EDITOR_MODIFY_TARGET,ZT_EDITOR_SET_TARGET,ZT_ELEVATED_PATH_PLACEMENT_HEIGHT,ZT_ELEVATED_PATH_PLACEMENT_MODE,ZT_ENABLE_ADOPTION,ZT_ENABLE_TUTORIAL_EYEDROPPER,ZT_ENDOFDAY,ZT_ENDOFMONTH,ZT_ENDOFYEAR,ZT_ENTER_CLONING_MODE,ZT_ENTER_DISEASE_MODE,ZT_ENTER_FOSSIL_MODE,ZT_ENTER_PUZZLE_MODE,ZT_ENTER_TRANQ_MODE,ZT_ENTITY_SELECTED,ZT_ESCAPE_KEY,ZT_EVENT,ZT_EVENTCAPTURED,ZT_EXITAPP,ZT_EXITMODE,ZT_EXITTOMAINMENU,ZT_EXIT_AFTER_SAVE,ZT_EXIT_DOWNLOADS,ZT_EXPANDO_TOP_CHANGED,ZT_EXPORT_OVERVIEW_MAP,ZT_EYEDROPPER,ZT_FEEDBACK_EVENT,ZT_FILL_TANK,ZT_FIND_ANIMAL_ON_PANEL,ZT_FIRE_STAFF,ZT_FORCE_DISEASE,ZT_FORCE_MODE_SELECTION,ZT_FP_ACCEPTANIMALDONETRAINING,ZT_FP_FLOATINGCAM_TRANSITIONTO,ZT_FP_SETANIMALTOTRAIN,ZT_FP_SETFLOATINGCAM_FACINGAT,ZT_FP_SETFLOATINGCAM_POSITION,ZT_FP_SETFLOATINGCAM_STATE,ZT_FP_SETGESTUREBYTRICK,ZT_FP_SETTRAININGAREA,ZT_FP_SETTRANSITIONCAMERA,ZT_FP_TRACINGSTART,ZT_FP_TRAIN_ANIMAL,ZT_FP_TRAIN_ANIMAL_FROM_TA,ZT_GENERATE_VEHICLE,ZT_GENERIC_CONFIRMATION_PROCEED,ZT_GENERIC_TRANSACTION,ZT_GESTURE_PROP_SELECTED,ZT_GET_ABSOLUTE_FILE_PATH,ZT_GET_ADMISSION_PRICE,ZT_GET_ADMISSION_PRICE_INDEX,ZT_GET_ALL_ANIMALS_RELEASED,ZT_GET_ALL_SPECIES_RELEASED,ZT_GET_ANIMALS_PUTUPFORADOPTION,ZT_GET_ANIMALS_RELEASED,ZT_GET_ANIMAL_CREATED,ZT_GET_AVAILABLE_SPECIES,ZT_GET_BIOME_COUNT,ZT_GET_BIOME_LIST,ZT_GET_BIOME_WATER_COUNT,ZT_GET_BIRTH_GENDER,ZT_GET_BIRTH_MOTHER_NAME,ZT_GET_CIRCUIT,ZT_GET_CLOSED_CIRCUIT,ZT_GET_CONNECTED_SKY_PIECE,ZT_GET_COST_BY_BINDER,ZT_GET_CURRENT_DAYOFMONTH,ZT_GET_CURRENT_DISEASE,ZT_GET_CURRENT_MODE_NAME,ZT_GET_CURRENT_MONTH,ZT_GET_CURRENT_TIMEOFDAY,ZT_GET_DONATIONBYANIMALTYPE,ZT_GET_DONATION_ALLANIMALS,ZT_GET_DONATION_ENDANGERMENT,ZT_GET_ECONOMY_COMPONENT,ZT_GET_ENTITY_TYPE_INDEX,ZT_GET_FAMEREQFROMTYPE,ZT_GET_FAME_HALFSTARS,ZT_GET_GUEST_VIEW_TILE_COUNT,ZT_GET_INFO,ZT_GET_IS_CAMPAIGN,ZT_GET_IS_CHALLENGE,ZT_GET_IS_FREEFORM,ZT_GET_LAST_ANIMAL_PUTUPFORADOPTION,ZT_GET_LAST_ANIMAL_RELEASED,ZT_GET_LAST_SPECIES_RELEASED,ZT_GET_LIFETIME_INCOME,ZT_GET_LIFETIME_USERS,ZT_GET_LOG_MESSAGES,ZT_GET_NUM_ANIMALS_UNLOCKED,ZT_GET_NUM_ASSIGNMENTS,ZT_GET_NUM_DINOS_TRANQD,ZT_GET_NUM_DISEASES_CURED,ZT_GET_NUM_EXTINCT_SPECIES_RELEASED,ZT_GET_NUM_FORWARD_SEGMENTS,ZT_GET_NUM_PASSENGERS_ON_CIRCUIT,ZT_GET_NUM_PIECES_FOUND,ZT_GET_NUM_PUZZLES,ZT_GET_NUM_PUZZLES_BUILT,ZT_GET_NUM_PUZZLES_READY,ZT_GET_NUM_WATER_GROUP,ZT_GET_PUZZLE_COMPLETE,ZT_GET_REAL_TIME,ZT_GET_RIDING_SEAT_INDEX,ZT_GET_SIM_TIME,ZT_GET_SONAR_LEVEL,ZT_GET_SPECIES_ADOPTPANEL_MULTIPLIER,ZT_GET_TANK_FLOOR_HEIGHT,ZT_GET_TANK_WATER_HEIGHT,ZT_GET_TOUR_RECORDER,ZT_GET_TOUR_STARRATING,ZT_GET_ZOO_FAME,ZT_GET_ZOO_INCOME,ZT_GET_ZOO_NAME,ZT_GET_ZOO_OPEN,ZT_GET_ZOO_PROFIT,ZT_GIVE_AWARD,ZT_GIVE_CASHGRANT,ZT_GRAPHTYPE_SELECTION,ZT_GRAPH_SELECTION,ZT_HALVE_SPECIES_ADOPTPANEL_MULTIPLIER,ZT_HAS_ANIMAL_BEEN_RELEASED,ZT_HAS_AWARD,ZT_HAS_XPACK,ZT_HIDE_MOUSE_PROMPT,ZT_HIRE_STAFF,ZT_INCREMENT_DISEASE_HINT,ZT_INC_AWARD_POINTS,ZT_IS_ANIMAL_CRATED,ZT_IS_CAMERA_OVER_BIOME,ZT_IS_PUZZLE_COMPLETE,ZT_IS_RESEARCHABLE,ZT_IS_TANK_IN_WORLD,ZT_IS_TYPE_ON_CURSOR,ZT_KEEPER_ASSIGNMENT_SELECTED,ZT_KEYBOARD_ACTION_PRESS,ZT_KEYBOARD_ACTION_RELEASE,ZT_MAINMENUMUSIC_START,ZT_MAINMENUMUSIC_STOP,ZT_MAINMENUMUSIC_VOLUME,ZT_MAINMENU_AFTER_SAVE,ZT_MAX_STATIONS_ON_SKYTRACK,ZT_MONEY_CHEAT,ZT_MOUSELOOK,ZT_MOVE_SELECTION_ENTITY,ZT_MULTILIST_SORT_BY_ANIMAL_HAPPINESS_DOWN,ZT_MULTILIST_SORT_BY_ANIMAL_HAPPINESS_UP,ZT_MULTILIST_SORT_BY_FAVORITE_ANIMAL,ZT_MULTILIST_SORT_BY_INT_GREATER,ZT_MULTILIST_SORT_BY_INT_LESS,ZT_MULTILIST_SORT_BY_NEED_DOWN,ZT_MULTILIST_SORT_BY_NEED_UP,ZT_MULTILIST_SORT_BY_PREGNANCY_DOWN,ZT_MULTILIST_SORT_BY_PREGNANCY_UP,ZT_MULTILIST_SORT_BY_STRING,ZT_MULTILIST_SORT_BY_STRING_REVERSE,ZT_MULTILIST_SORT_BY_TYPE,ZT_NAME_ENTITY,ZT_NEW_ENTITY_PLACED,ZT_NEW_PUZZLE_AVAILABLE,ZT_NOTIFY_OF_BIRTH,ZT_NO_PLACEMENT_IN_TANK_WITH_ANIMALS,ZT_NUM_SUPER_CLONES,ZT_NUM_SUPER_CLONE_SPECIES,ZT_NUM_SUPER_SPECIES_INSTANCES,ZT_NUM_TRAINING_PERFECTS,ZT_OBJECT_ROTATE,ZT_PAUSE,ZT_PAUSE_KEY,ZT_PHOTOEVENT,ZT_PHOTOEVENT_ALBUM,ZT_PHOTOEVENT_ALBUM_DESELECT_PICTURE,ZT_PHOTOEVENT_ALBUM_INCREASE_SIZE,ZT_PHOTOEVENT_ALBUM_NEXTPAGE,ZT_PHOTOEVENT_ALBUM_PREVPAGE,ZT_PHOTOEVENT_ALBUM_SAVE_AS_HTML,ZT_PHOTOEVENT_ALBUM_SELECT_PICTURE,ZT_PHOTOEVENT_CAMERA_DELETE_ALL_PICTURES,ZT_PHOTOEVENT_CAMERA_DESELECT_PICTURE,ZT_PHOTOEVENT_CAMERA_SELECT_PICTURE,ZT_PHOTOEVENT_DELETE_ALBUM,ZT_PHOTOEVENT_DELETE_ALBUM_PICTURE,ZT_PHOTOEVENT_DELETE_CAMERA_PICTURE,ZT_PHOTOEVENT_DELETE_SELECTED_PICTURE,ZT_PHOTOEVENT_ENLARGE,ZT_PHOTOEVENT_ENLARGE_ALBUM_PIC,ZT_PHOTOEVENT_GET_CHALLENGESET_LOCID,ZT_PHOTOEVENT_GET_CHALLENGES_COMPLETED,ZT_PHOTOEVENT_GET_CHALLENGE_LOCID,ZT_PHOTOEVENT_GET_CURRENT_CHALLENGE,ZT_PHOTOEVENT_GET_NUM_CHALLENGE_PHOTOS,ZT_PHOTOEVENT_GET_OBTAINED_CHALLENGE_STARS,ZT_PHOTOEVENT_GET_REQUIRED_CHALLENGE_STARS,ZT_PHOTOEVENT_MOVE_ENTER,ZT_PHOTOEVENT_MOVE_EXIT,ZT_PHOTOEVENT_MOVE_SELECTED_PICTURE,ZT_PHOTOEVENT_MOVE_SELECTED_PICTURE_CANCELED,ZT_PHOTOEVENT_MOVE_SELECTED_TARGET,ZT_PHOTOEVENT_NEW_ALBUM,ZT_PHOTOEVENT_NUM_PICTURES,ZT_PHOTOEVENT_PICTURE_TAKEN,ZT_PHOTOEVENT_SELECT_ALBUM,ZT_PHOTOEVENT_SET_CHALLENGES_COMPLETED,ZT_PHOTOEVENT_SET_CURRENT_CHALLENGE,ZT_PHOTOEVENT_SET_OBTAINED_CHALLENGE_STARS,ZT_PHOTOEVENT_SET_REQUIRED_CHALLENGE_STARS,ZT_PHOTOEVENT_SHRINK,ZT_PHOTOEVENT_SUBMIT_CHALLENGE_PHOTOS,ZT_PHOTOEVENT_TAKE_PHOTO,ZT_PHOTOEVENT_TYPE,ZT_PHYSOBJSWAP_OFF,ZT_PHYSOBJSWAP_ON,ZT_PLACEOBJECT,ZT_PLACE_FOSSIL_MARKERS,ZT_PLAY_NEXT_SCENARIO,ZT_PLAY_TUTORIAL,ZT_POPULATE_ANIMATIONS,ZT_POPULATE_CAMPAIGN_UI,ZT_POPULATE_SCENARIO_UI,ZT_POST_ENTER_VEHICLE,ZT_PREPARE_UNDO,ZT_PRE_ENTER_VEHICLE,ZT_PROCESS_FAME_UPDATE,ZT_QUICKGESTURETEST,ZT_REFILL_CONTAINER,ZT_REINITIALIZE_MOUSE_PROMPT,ZT_RELOAD_BINDER,ZT_REMOVESPLINEPOINT,ZT_REMOVE_CASHGRANT,ZT_REMOVE_TRACK_CONNECTION,ZT_REPLACE_ZOO_WALLS,ZT_REQUEST_IN_GAME_OPTIONS,ZT_RESET_ALL_SPECIES_ADOPTPANEL_MULTIPLIERS,ZT_RESET_GUI,ZT_RESET_PUZZLE,ZT_RESET_TERRAIN,ZT_RETURN_SCRIPT_AS_STRING,ZT_SELECTNEXT_DISEASED_ANIMAL,ZT_SELECTNEXT_RAMPAGING_ANIMAL,ZT_SELECT_STATION_COMPONENT,ZT_SELECT_VEHICLE_TYPE,ZT_SELL_ENTITY,ZT_SELL_PHYSOBJ,ZT_SET3DPROVIDER,ZT_SETENTITYPOSITION,ZT_SETFENCEPLACEMENTMODE,ZT_SETLOADNAME,ZT_SETPATHPLACEMETNMODE,ZT_SETPLACEMENTFENCE,ZT_SETPLACEMENTOBJECT,ZT_SETPLACEMENTPATH,ZT_SETSCREENRESOLUTION,ZT_SETSINGLEOBJECTPLACEMENT,ZT_SETTANKFLOOR_SPEED,ZT_SETTANKMODE,ZT_SETTANKWALL_SPEED,ZT_SETTERRAINFLATTEN_HEIGHT,ZT_SETTERRAINFLATTEN_HEIGHTABSOLUTE,ZT_SETTERRAINFLATTEN_SPEED,ZT_SETTERRAINHILL_SPEED,ZT_SETTERRAINMODE,ZT_SETTERRAINSMOOTH_SPEED,ZT_SETWORLDPOSOFMOUSE,ZT_SET_ADMISSION_PRICE,ZT_SET_ADMISSION_PRICE_INDEX,ZT_SET_ATTR_FILTER,ZT_SET_BINDERROOT_RELOADABLE,ZT_SET_BIOME,ZT_SET_BIOME_FILTER,ZT_SET_BIRTH_MOTHER_NAME,ZT_SET_CAMPAIGN,ZT_SET_CLONING_CENTER,ZT_SET_CLONING_SPECIES,ZT_SET_COMMAND_STATE,ZT_SET_CURRENT_SHOW_FOR_DONATIONS,ZT_SET_DELETION_MODE,ZT_SET_DEVMODE,ZT_SET_DISEASE_CAUSE,ZT_SET_DISEASE_CURE,ZT_SET_DISEASE_HINT_TABLE,ZT_SET_ENTITY_NAME,ZT_SET_EVENT_SCORE_OVERRIDE,ZT_SET_EXITCONFIRMATION,ZT_SET_EXPANSION_FILTER,ZT_SET_FAME_HALFSTARS,ZT_SET_FILTER_MAINTENANCE,ZT_SET_FPS_MOVE_SPEED,ZT_SET_FPS_TURN_SPEED,ZT_SET_FPS_ZOOM,ZT_SET_GAME_MODE,ZT_SET_GENDER,ZT_SET_LOG_ENTITY,ZT_SET_LOP_DURATION,ZT_SET_MAX_FAME_REACHED,ZT_SET_MODE_ANCHOR_OBJECT,ZT_SET_NEXT_CLONED_SPECIES,ZT_SET_NO_FILTER,ZT_SET_OVERRIDE_UI_FLAG,ZT_SET_PRICE_INDEX,ZT_SET_PUZZLE_SPECIES,ZT_SET_PUZZLE_TO_FIND,ZT_SET_RESEARCH_ENTITY,ZT_SET_RESEARCH_FILTER,ZT_SET_RESEARCH_TIME_REMAINING,ZT_SET_RESEARCH_TIME_TO_UNLOCK,ZT_SET_SECONDARY_GLOBE,ZT_SET_SELECTED_ENTITY,ZT_SET_SHOW_NAME,ZT_SET_SHOW_TO_SELECT,ZT_SET_SPECIAL_PLACEMENT_RULE,ZT_SET_SPECIES_METERS_START,ZT_SET_SPLINETOTRACE,ZT_SET_SPRITE_DEBUG_MODE,ZT_SET_STARTING_SCENARIO_CASH,ZT_SET_STATUS_FILTER,ZT_SET_STOP_AT_FENCES,ZT_SET_TANK_FLOOR_HEIGHT,ZT_SET_TANK_WALL_HEIGHT,ZT_SET_THEME_FILTER,ZT_SET_TUTORIALRULE_ACTIVE,ZT_SET_TYPE_FILTER,ZT_SET_UNDO_STATION,ZT_SET_UNDO_STATION_IS_RETURN_STATION,ZT_SET_USERSEATNUMBER,ZT_SET_USER_ATTRIBUTE,ZT_SET_VEHICLE_UNDO_IN_PROGRESS,ZT_SET_WORLD_LOCATION,ZT_SET_XPACK_FILTER,ZT_SHOWGESTURE,ZT_SHOWMIXER_CANCELEDIT,ZT_SHOWMIXER_CHANGEANIMAL,ZT_SHOWMIXER_CHANGETRICK,ZT_SHOWMIXER_CLEARHOVEREDPROP,ZT_SHOWMIXER_DELETETRICK,ZT_SHOWMIXER_DROPDOWNBACKGROUNDACTIVATED,ZT_SHOWMIXER_ENABLE_ALL_ANIMALS,ZT_SHOWMIXER_ENABLE_ALL_TRICKS,ZT_SHOWMIXER_ENABLE_ANIMAL,ZT_SHOWMIXER_ENABLE_TRICK,ZT_SHOWMIXER_EVENT,ZT_SHOWMIXER_FILLLISTBOX,ZT_SHOWMIXER_GETSHOWOPEN,ZT_SHOWMIXER_GET_NUM_AVAILABLE_ANIMALS,ZT_SHOWMIXER_HIDESECONDARYDROPLIST,ZT_SHOWMIXER_HIDETRICKTARGETS,ZT_SHOWMIXER_IS_WAIT_TRICK,ZT_SHOWMIXER_OPENANIMALDROPDOWN,ZT_SHOWMIXER_OPENSECONDARYTRICKDROPDOWN,ZT_SHOWMIXER_OPENTRICKDROPDOWN,ZT_SHOWMIXER_REQUEST_CANCELEDIT,ZT_SHOWMIXER_REQUEST_TOGGLEEDITSHOW,ZT_SHOWMIXER_SETHOVEREDPROP,ZT_SHOWMIXER_SETSHOWBYINDEX,ZT_SHOWMIXER_SETSHOWOPEN,ZT_SHOWMIXER_SETSHOWPLATFORM,ZT_SHOWMIXER_SHOWMIXERPANEL,ZT_SHOWMIXER_SHOWTRICKTARGETS,ZT_SHOWMIXER_SHUTDOWN_UI,ZT_SHOWMIXER_TOGGLEEDITSHOW,ZT_SHOWMIXER_UPDATEAVAILABLEANIMALS,ZT_SHOWMIXER_ZOOM_TO_PROP,ZT_SHOWPLATFORM_TRANSACTCURRENTUPGRADE,ZT_SHOWPLATFORM_UPDATEUPGRADECOST,ZT_SHOWSCHEDULER_ADDBREAK,ZT_SHOWSCHEDULER_ADDSHOW,ZT_SHOWSCHEDULER_DELETESHOW,ZT_SHOWSCHEDULER_EDITSHOW,ZT_SHOWSCHEDULER_ENTRYDOUBLECLICK,ZT_SHOWSCHEDULER_EVENT,ZT_SHOWSCHEDULER_MOVEDOWN,ZT_SHOWSCHEDULER_MOVEUP,ZT_SHOWSCHEDULER_REQUEST_ADDSHOW,ZT_SHOWSCHEDULER_REQUEST_DELETESHOW,ZT_SHOWSCHEDULER_REQUEST_EDITSHOW,ZT_SHOWSCHEDULER_SCHEDULERTABCLICKED,ZT_SHOWSCHEDULER_TOGGLEENABLE,ZT_SHOWSCHEDULER_VIEWSHOW,ZT_SHOW_GLOBE_DOT,ZT_SKYTOWER_PLACEMENT_HEIGHT,ZT_SPACEBAR_ACTION,ZT_SPLINEMODEUNDO,ZT_SPLINEMODE_ADJUSTEVENTSCALE,ZT_SPLINEMODE_ADJUSTEVENTWINDOWS,ZT_SPLINEMODE_ADJUSTSCORINGPROXIMITIES,ZT_SPLINEMODE_CHANGESELECTION,ZT_SPLINEMODE_EVENT_TYPE_SELECTED,ZT_SPLINEMODE_LOADSPLINE,ZT_SPLINEMODE_MOVECAMPITCH,ZT_SPLINEMODE_PLACEEVENT,ZT_SPLINEMODE_SAVESPLINE,ZT_SPLINEMODE_SETEVENTHIDDEN,ZT_SPLINEMODE_SETSPLINERADIUS,ZT_SPLINEMODE_SETSPLINESPEED,ZT_SPLINEMODE_SETSPLINEVISIBLE,ZT_SPLINEMODE_SLIDEVALUE,ZT_SPLINEMODE_TESTFROMTRAINERMODE,ZT_SPLINEMODE_TESTPLAYSPLINE,ZT_SPLINE_DEMOTRACE,ZT_SPLINE_PLAYGESTURE,ZT_STAFF_CANCEL_REQUEST,ZT_STAFF_REQUEST,ZT_START_FOLLOWCAM,ZT_START_RECORDING,ZT_START_RESEARCHING_ENTITY,ZT_STOP_FOLLOWCAM,ZT_STOP_RECORDING,ZT_SUPPRESS_DISEASES,ZT_TAKE_AWARD,ZT_TEMPORARY_PAUSE,ZT_TERRAINCURSOR_SIZE,ZT_TOGGLE_CIRCUIT_STATUS,ZT_TOGGLE_OBJECT_WIREFRAME,ZT_TOGGLE_OPTIMIZATION,ZT_TOGGLE_SKYTOWER_AUTOADJUST,ZT_TOGGLE_SNAP_TO_ADJACENT,ZT_TOGGLE_TERRAIN_WIREFRAME,ZT_TOGGLE_UI_DRAW,ZT_TOOL_COMMAND,ZT_TOOL_SAVE_ICON_OFFSET,ZT_TRAINER_ASSIGNMENT_SELECTED,ZT_TRAINER_DONT_TRAIN_TRICK,ZT_TRAINER_TRAIN_TRICK,ZT_UNASSIGN_WORKER,ZT_UNCRATE_ENTITY,ZT_UNDOACTION,ZT_UNLOCK_PUZZLE,ZT_UNLOCK_RANDOM_PUZZLE,ZT_UPDATE_FAME,ZT_UPDATE_SELL_MESSAGE,ZT_UPDATE_TIME_OF_DAY,ZT_USERBOARDOBJECT,ZT_USERCLICKED_CLICKABLEOBJ,ZT_USERCLIMBLADDER,ZT_USERDISEMBARKOBJECT,ZT_USER_DRAGGING,ZT_USER_DRAGGING_OFF,ZT_USE_OBJECT,ZT_VIEWFILTER_HIDE,ZT_VIEWFILTER_SHOW,ZT_VINCE_QUESTION_ANSWERED,ZT_ZOOPEDIA_BACK,ZT_ZOOPEDIA_FORWARD,ZT_ZOOPEDIA_NEXT_ENTRY,ZT_ZOOPEDIA_PREV_ENTRY,ZT_ZOO_OPEN - UI_… (151):
UI_ACK,UI_ADD_ACTIVATE_OFF_EVENT,UI_ADD_ACTIVATE_ON_EVENT,UI_ADD_DOUBLE_CLICK_EVENT,UI_ADD_POS,UI_ADD_SIZE,UI_ADD_TARGET,UI_ADD_TEXTCHANGED_EVENT,UI_ALERT_RETURN,UI_ANIMATION_COMPLETED,UI_AUTOSIZE_REGION,UI_BROADCAST,UI_CAN_BE_TOGGLED,UI_CHANGED_ASPECT,UI_CHANGED_ATTR,UI_CHANGED_HTML,UI_CHANGED_REGION,UI_CHANGED_TARGET,UI_CHANGED_TEXT_ENTER,UI_CHANGED_TEXT_FOCUS,UI_CHAR,UI_CMD,UI_COLLAPSE,UI_COPY,UI_COPY_NAME,UI_COPY_TEXT,UI_CUT,UI_DESTROY_CHILD_DELAYED,UI_EDIT_WATCH,UI_ERROR,UI_EVENT,UI_EVENTLIST,UI_EXPAND,UI_GET_CHILDREN,UI_GET_HTML,UI_GET_IMAGE,UI_GET_IMAGE_SRC_RECT,UI_GET_LINEAGE_VISIBLE,UI_GET_LOCID,UI_GET_SCREEN_RECT,UI_GET_SCROLL,UI_GET_SRC_RECT,UI_GET_STRING_SIZE,UI_GET_TEXT,UI_GET_TEXT_FORMAT,UI_GET_VALUE,UI_GET_XML,UI_HANDLE,UI_HIGHLIGHT_TEXT,UI_HYPERLINK,UI_IS_ACTIVATED,UI_IS_ALTERNATE,UI_IS_DISABLED,UI_IS_HIDDEN,UI_IS_HIGHLIGHTED,UI_IS_NORMAL,UI_KEYBOARD,UI_KEYBOARD_CMD,UI_KEYBOARD_ENTER,UI_KEYBOARD_LEAVE,UI_KEYBOARD_RAW,UI_KEYDOWN,UI_KEYUP,UI_LBUTTONDBLCLK,UI_LBUTTONDOWN,UI_LBUTTONUP,UI_LOAD_CHILD,UI_LOWER,UI_MBUTTONDBLCLK,UI_MBUTTONDOWN,UI_MBUTTONUP,UI_MODAL_INTERRUPT,UI_MODIFY_ASPECT,UI_MODIFY_ATTR,UI_MODIFY_REGION,UI_MODIFY_STATE,UI_MODIFY_TARGET,UI_MONEY_RECEIVE,UI_MONEY_SPEND,UI_MOUSE,UI_MOUSEMOVE,UI_MOUSEWHEEL,UI_MOUSE_CMD,UI_MOUSE_DRAG,UI_MOUSE_ENTER,UI_MOUSE_HOVER,UI_MOUSE_LEAVE,UI_MOUSE_LEAVEAPP,UI_MOUSE_RAW,UI_MOVE_TO_BACK,UI_MOVE_TO_FRONT,UI_NEXT_CACHED_MSG,UI_NOTIFY,UI_NOTIFY_CHILD,UI_NOTIFY_PARENT,UI_NOTIFY_TARGET,UI_OK,UI_PAGE_DOWN,UI_PAGE_UP,UI_PASTE,UI_PLAY_SOUND,UI_QUERY_ASPECT,UI_QUERY_ATTR,UI_QUERY_REGION,UI_QUERY_STATE,UI_QUERY_TARGET,UI_RAISE,UI_RBUTTONDBLCLK,UI_RBUTTONDOWN,UI_RBUTTONUP,UI_REMOVE_CHILD,UI_REMOVE_HIGHLIGHT_TEXT,UI_REMOVE_TARGET,UI_REPRESS,UI_ROOT_CHILD,UI_ROOT_SETDISABLEMODAL,UI_SCROLL,UI_SELF,UI_SEND_NAMED_EVENTS,UI_SEND_TEXT,UI_SET_ALPHA,UI_SET_ANIM_COLOR_END,UI_SET_ANIM_RECT_END,UI_SET_COLOR,UI_SET_HTML,UI_SET_IMAGE,UI_SET_LOCID,UI_SET_LTT,UI_SET_MODAL,UI_SET_POS,UI_SET_RANGE,UI_SET_REGION,UI_SET_SCROLL,UI_SET_SIZE,UI_SET_SRC_RECT,UI_SET_STT,UI_SET_TARGET,UI_SET_TEXT,UI_SET_TEXT_ALPHA,UI_SET_TEXT_COLOR,UI_SET_TEXT_FORMAT,UI_SET_VALUE,UI_SET_XML,UI_SUPRESS_SIZING,UI_SYSCHAR,UI_SYSKEYDOWN,UI_SYSKEYUP,UI_TARGET,UI_UPDATE_REGION,UI_UPDATE_TREE,UI_WIND_ANIMATION - BFG_… (116):
BFG_ACTIVATE_GLOBALSOUNDDUCKING,BFG_ADD_ELEVATED_TILE_EVENT,BFG_ADD_NODE,BFG_ATTACH_ENTITY,BFG_ATTACH_GAME,BFG_ATTACH_GRID,BFG_ATTACH_WORLD,BFG_BATCH_ACTION_HAPPENED,BFG_CAN_MATE_WITH,BFG_COUNT_ENTITIES,BFG_COUNT_ENTITIES_DIRECT,BFG_DEACTIVATE_GLOBALSOUNDDUCKING,BFG_DESELECT_ENTITY,BFG_DESTROY_ENTITY,BFG_DETACH_GAME,BFG_DETACH_GRID,BFG_DETACH_WORLD,BFG_DO_CURVE_CHECK,BFG_ELEVATED_CURB_EVENT,BFG_ELEVATED_HIDE,BFG_ELEVATED_HIDE_HEIGHT,BFG_ELEVATED_SHOW,BFG_ENTITY_GET_TRANSACTION_COST,BFG_ENTITY_MORPH_TO_NEW_ENTITY,BFG_ENTITY_MOVED,BFG_ENTITY_SELECTED,BFG_ENTITY_SHARED_EVENT,BFG_FIND_CONTAINED_ENTITY,BFG_FIND_DERIVED_TYPES_IMMEDIATE,BFG_FORCE_RAMPAGE,BFG_GET_ATTRIBUTES,BFG_GET_ATTR_BOOLEAN,BFG_GET_ATTR_FLOAT,BFG_GET_ATTR_POINT3,BFG_GET_ATTR_STRING,BFG_GET_AVG_ATTRIBUTE,BFG_GET_BINDER_TYPE,BFG_GET_CAMERA_X,BFG_GET_CAMERA_Y,BFG_GET_CAMERA_YAW,BFG_GET_CAMERA_Z,BFG_GET_CAMERA_ZOOM,BFG_GET_COMPONENT,BFG_GET_DERIVED_LEAF_TYPES,BFG_GET_DERIVED_TYPES,BFG_GET_ENTITIES,BFG_GET_ENTITIES_DIRECT,BFG_GET_ENTITY_FACING_DIRECTION,BFG_GET_ENTITY_FROM_ID,BFG_GET_ENTITY_ID,BFG_GET_ENTITY_NODE_POSITION,BFG_GET_ENTITY_POSITION,BFG_GET_FIRST_CHILD,BFG_GET_IS_PROTECTED,BFG_GET_LEGAL_ATTR_NAME,BFG_GET_LEGAL_NODE_NAME,BFG_GET_LOCATION,BFG_GET_NAMED_CHILD,BFG_GET_NAMED_ENTITY,BFG_GET_NEXT_SIBLING,BFG_GET_NODE_NAME,BFG_GET_NUM_ANIMALS,BFG_GET_NUM_GUESTS,BFG_GET_NUM_UNIQUE_SPECIES,BFG_GET_PARENT,BFG_GET_PRIMARY_BIOME,BFG_GET_SELECTED_ENTITY,BFG_GET_SHARED_COMPONENT,BFG_GET_SUB_BINDER,BFG_GET_TOTAL_GUEST_EDUCATION,BFG_GET_TRAVERSABLE_AREA,BFG_INFLUENCE_CHANGED,BFG_INIT_AFTER_LOAD,BFG_INIT_AFTER_UNDO,BFG_KICK_REAL_PHYSICS,BFG_MORPH_ENTITY,BFG_MOVE_ENTITY,BFG_PLACE_ENTITY,BFG_PLACE_ENTITY_BATCH,BFG_PLACE_ENTITY_FROM_XML,BFG_PLACE_ENTITY_FROM_XML_BATCH,BFG_PLAY_PARTICLE,BFG_PREPARE_FOR_DELETION,BFG_PUSHPHYSANIM,BFG_RANDOM_ANIM,BFG_REMOVE_ATTRIBUTE,BFG_REMOVE_ELEVATED_TILE_EVENT,BFG_REMOVE_ENTITY,BFG_REMOVE_ENTITY_BATCH,BFG_REMOVE_NODE,BFG_REMOVE_SELF,BFG_SELECT_ENTITY,BFG_SEND_SIGNAL_SHARED,BFG_SEND_TOKEN,BFG_SETPHYSANIM,BFG_SET_ALLOW_FP_TRANQ,BFG_SET_ATTR_BOOLEAN,BFG_SET_ATTR_FLOAT,BFG_SET_ATTR_POINT3,BFG_SET_ATTR_STRING,BFG_SET_CURRENT_ATTR,BFG_SET_DRT_TIMEIN_OVERRIDE,BFG_SET_ENTITY_COLOR,BFG_SET_ENTITY_FACING_DIRECTION,BFG_SET_INVISIBLE,BFG_SET_TEXTURE,BFG_SET_VISIBLE,BFG_START_FAKE_PHYSICS,BFG_SUPPRESS_RAMPAGE_TIMEOUT,BFG_TAKE_PHOTO,BFG_TA_COUNT_BIOME,BFG_TA_GET_COUNT,BFG_TA_HAS_BIOME_FEATURE,BFG_TRAVERSABLE_AREA_INVALID,BFG_UPDATEONCE,BFG_UPDATE_CONNECTIVITY - ZTDEV_… (89):
ZTDEV_ADDPS,ZTDEV_ADD_HEADLOOK,ZTDEV_ADD_LIGHT,ZTDEV_ADD_RELATIONSHIP,ZTDEV_ADD_TOD,ZTDEV_ANIMSCALE,ZTDEV_CACHESCRIPTS,ZTDEV_CLEAR_PROTECTED_AREA,ZTDEV_DISPLAY_ENTITY_TA,ZTDEV_DO_TRICK,ZTDEV_DRAWTOGGLE,ZTDEV_DRY,ZTDEV_DUMPSCENEGRAPH_EVENT,ZTDEV_DUMPTASKDATA,ZTDEV_EVENT,ZTDEV_EXIT,ZTDEV_FORCE_RAMPAGE,ZTDEV_GENERATE_MAP_INDEX,ZTDEV_GET,ZTDEV_GETAI,ZTDEV_GETZOOFAME,ZTDEV_GET_TRICK_INFO,ZTDEV_GET_WATER_DIRTINESS,ZTDEV_GUST,ZTDEV_HIDENODE,ZTDEV_KICK,ZTDEV_KILLHUMANS,ZTDEV_LIMIT_LIGHTS,ZTDEV_LIST,ZTDEV_LIST_CONTEXTS,ZTDEV_LIST_LIGHT_NODES,ZTDEV_LIST_TOD_NODES,ZTDEV_LOCK_TOD,ZTDEV_MFDEVTEST,ZTDEV_MINFRESNEL,ZTDEV_OPENAREAS,ZTDEV_PLACE,ZTDEV_PSYSTOGGLE,ZTDEV_RELOAD_CONTEXT,ZTDEV_RELOAD_FILE,ZTDEV_RELOAD_LOC,ZTDEV_RELOAD_MATERIALS,ZTDEV_RELOAD_PSYS,ZTDEV_RELOAD_SHADERS,ZTDEV_RELOAD_WATER,ZTDEV_REMOVE_HEADLOOK,ZTDEV_REMOVE_LIGHT,ZTDEV_REMOVE_RELATIONSHIP,ZTDEV_REMOVE_TOD,ZTDEV_REMOVE_UNUSED_BINDERS,ZTDEV_RENDER_STATS,ZTDEV_RUNPS,ZTDEV_RUNSCRIPT,ZTDEV_RUNSLOW,ZTDEV_RUNSPEED,ZTDEV_SAVE_SCENE,ZTDEV_SEND_EVENT,ZTDEV_SEND_SELECTED_EVENT,ZTDEV_SET,ZTDEV_SETAI,ZTDEV_SET_AMBIENT,ZTDEV_SET_CLONING_PERF_FACTOR,ZTDEV_SET_CONTEXT,ZTDEV_SET_FOSSIL_LOCATION,ZTDEV_SET_FOSSIL_SITE_VISIBILITY,ZTDEV_SET_LIGHT_COLOR,ZTDEV_SET_LIGHT_DIR,ZTDEV_SET_LIGHT_INTENSITY,ZTDEV_SET_LIGHT_NODE,ZTDEV_SET_PROTECTED_AREA,ZTDEV_SET_SAVE_PATH,ZTDEV_SET_TIME_OF_DAY,ZTDEV_SET_TOD_NODE,ZTDEV_SET_TRICK_LEVEL,ZTDEV_SET_WATER_DIRTINESS,ZTDEV_SET_ZOO_GUESTS,ZTDEV_SHOWCOLL,ZTDEV_SHOWCOMMANDS,ZTDEV_SHOWGROUNDFIT,ZTDEV_SHOWNODE,ZTDEV_SMOOTHSHORE,ZTDEV_SPAM_SHOW_TOKENS,ZTDEV_SPLASH,ZTDEV_SPRAY,ZTDEV_TEST_RELATIONSHIP,ZTDEV_TOGGLE_TRACK_DEBUG,ZTDEV_VIEWTILES,ZTDEV_WHAP,ZTDEV_WINDSPEED - ZTAI_… (41):
ZTAI_ADJUST_SURVEYDATA,ZTAI_CREATE_GUEST,ZTAI_DEPART_STATION,ZTAI_EVENT,ZTAI_GET_ALL_OPEN_SHOWS,ZTAI_GET_ALL_SHOWS,ZTAI_GET_ALL_TRICKS,ZTAI_GET_ANIMALS_IN_SHOW,ZTAI_GET_ENTERTAINMENT,ZTAI_GET_NUMBER_SPECIES_SEEN,ZTAI_GET_NUMBER_VIEW_EVENTS,ZTAI_GET_NUM_TRICK_SLOTS,ZTAI_GET_SEEN,ZTAI_GET_SHOW_ATTENDANCE,ZTAI_GET_SURVEYDATA,ZTAI_GET_TOTAL_DONATION_POINTS,ZTAI_GET_TOTAL_ENT_POINTS,ZTAI_GET_TOTAL_VIEW_EVENTS,ZTAI_GET_TYPES_SEEN,ZTAI_LEAVE_ZOO,ZTAI_NEWSURVEY_AVAILABLE,ZTAI_PLATFORM_DISABLED,ZTAI_PLATFORM_ENABLED,ZTAI_RANDOM_GUEST_NAME,ZTAI_REPLACE_PROP,ZTAI_SET_FAVORITE_ANIMAL,ZTAI_SET_TRICK_LEVEL,ZTAI_SHOW_ADD_DONATION,ZTAI_SHOW_DELETED,ZTAI_SHOW_DISABLED,ZTAI_SHOW_ENABLED,ZTAI_SHOW_NUM_DONORS,ZTAI_SHOW_STATE_BETWEENSHOWS,ZTAI_SHOW_STATE_CONDUCTING,ZTAI_SHOW_STATE_POSTSHOW,ZTAI_SHOW_STATE_PRESHOW,ZTAI_SHOW_TIMESLOT_CHANGED,ZTAI_SHOW_TRICKCHANGEERROR,ZTAI_SHOW_UNDO_PROP_DELETION,ZTAI_SHOW_WAITDELTA,ZTAI_VIEW_EVENT - BFAI_… (26):
BFAI_ACTIVATE,BFAI_ADD_TASK_TO_CACHE,BFAI_ATTRIBUTE_CHANGED_FLOAT,BFAI_ATTRIBUTE_CHANGED_POINT3,BFAI_ATTRIBUTE_CHANGED_STRING,BFAI_CLEAR_RELATIONSHIP,BFAI_DESTROY_ENTITY,BFAI_FLUSH_TASK_CACHE,BFAI_GET_ARRIVAL,BFAI_GET_CRITICAL_THRESHOLD,BFAI_GET_PRESSING_THRESHOLD,BFAI_GET_RELATED_ENTITIES,BFAI_GET_RELATED_ENTITY,BFAI_GET_TIMES_CRITICAL,BFAI_GET_TRICK_DIFFICULTY,BFAI_GET_TRICK_POPULARITY,BFAI_GET_TRIGGERED,BFAI_IS_ENTITY_IN_HABITAT,BFAI_IS_ENTITY_ON_BIOME,BFAI_REMOVE_RELATIONSHIP,BFAI_REMOVE_TOKENS,BFAI_SET_ARRIVAL,BFAI_SET_RANDOM_VALUES,BFAI_TEST_RELATIONSHIP,BFAI_TOKEN,BFAI_UNREGISTER_ENTITY - BFSND_… (19):
BFSND_2D_VOLUME,BFSND_3D_VOLUME,BFSND_ADD,BFSND_FINISH,BFSND_GET_VOLUME,BFSND_MASTER_VOLUME,BFSND_MUSIC_VOLUME,BFSND_OPTIONS_CHANGED,BFSND_PAUSE_ALL,BFSND_PLAY_ALL,BFSND_POSITION_AND_ORIENT_LISTENER,BFSND_RELOAD_SOUND_FILE,BFSND_REMOVE,BFSND_RESUME_ALL,BFSND_START_FADING,BFSND_STOP,BFSND_STOP_ALL,BFSND_UPDATE,BFSND_UPDATE_ALL - SGC_… (18):
SGC_AI_TEXT,SGC_ANIM_TEXT,SGC_ATTACH_TEXT,SGC_CREATE_TEXT,SGC_DESTROY_TEXT,SGC_DETACH_TEXT,SGC_EVENT_ROOT,SGC_GF_TEXT,SGC_KICK_TEXT,SGC_KILL_TEXT,SGC_REMOVEPROPS_TEXT,SGC_SF_TEXT,SGC_SOUND_TEXT,SGC_SPAWN_TEXT,SGC_SPLASH_TEXT,SGC_TAP_TRANS_TEXT,SGC_TEXT,SGC_WHAP_TEXT - BF3DEVENT_… (15):
BF3DEVENT_DELETE_FLATTENING_GROUP,BF3DEVENT_FADE_COMPLETE,BF3DEVENT_FADE_HOLD,BF3DEVENT_FADE_INTERRUPTED,BF3DEVENT_INTERPOLATE_COMPLETE,BF3DEVENT_OBJECT_ANIMATION_ADD_LISTENER,BF3DEVENT_OBJECT_ANIMATION_DONE,BF3DEVENT_OBJECT_ANIMATION_ERROR,BF3DEVENT_OBJECT_ANIMATION_LOOPED,BF3DEVENT_OBJECT_ANIMATION_REMOVE_LISTENER,BF3DEVENT_RECREATE_FLATTENING_GROUP,BF3DEVENT_SCALING_COMPLETE,BF3DEVENT_SCALING_INTERRUPTED,BF3DEVENT_START_OBJECT_ANIMATION,BF3DEVENT_STOP_OBJECT_ANIMATION - ZTWEB_… (15):
ZTWEB_CMD,ZTWEB_EVENT,ZTWEB_FILE_ENABLE_OFF,ZTWEB_FILE_ENABLE_ON,ZTWEB_FILE_FOR_MOTD_GET,ZTWEB_FILE_GET,ZTWEB_FILE_GET_CANCEL,ZTWEB_GETFILE_DONE,ZTWEB_GETFILE_FOR_MOTD_DONE,ZTWEB_GETINDEX_DONE,ZTWEB_GETMOTD_DONE,ZTWEB_INDEX_GET,ZTWEB_MOTD_GET,ZTWEB_SET_NUM_FILES_FOR_MOTD,ZTWEB_SHOW_UPDATE - BF3D_… (13):
BF3D_ANIMATION_BEGIN,BF3D_EVENT_CAMERA_PAN,BF3D_EVENT_CAMERA_ZOOM,BF3D_EVENT_REDO_RANDOM_TEXTURES,BF3D_EVENT_ROOT,BF3D_EVENT_SET_FREE_LOOK,BF3D_EVENT_SET_TEXTURE,BF3D_EVENT_START_DIVING,BF3D_EVENT_START_SWIMMING,BF3D_EVENT_STOP_HEADLOOK,BF3D_EVENT_STOP_SWIMMING,BF3D_TEXT_KEY,BF3D_TILE_SLOPE_CHANGED - BEH_… (10):
BEH_ABORT,BEH_APPEND,BEH_COMPLETE,BEH_END,BEH_ERROR,BEH_FAILURE,BEH_INTERRUPT,BEH_OK,BEH_RESET,BEH_SUPPRESS - TAP_… (8):
TAP_DRAW_DEBUG_LINE,TAP_EVENT_ROOT,TAP_EXIT,TAP_EXIT_REQUEST,TAP_GET_ENTRANCE_POINT,TAP_REMOVE_DEBUG_LINE,TAP_SET_DEBUG_LINE_COLOR,TAP_SUCCESS - ANIM_… (7):
ANIM_ADJUST,ANIM_END,ANIM_REQUEST,ANIM_REQUEST_FAILURE,ANIM_REQUEST_SUCCESS,ANIM_RESET_PHASE,ANIM_STOP - BFUSERPROFILE_… (7):
BFUSERPROFILE_ACTION_FAILED,BFUSERPROFILE_ACTION_SUCCEEDED,BFUSERPROFILE_ADD_PROFILE,BFUSERPROFILE_EVENT,BFUSERPROFILE_OPTIONS_CHANGED,BFUSERPROFILE_REMOVE_PROFILE,BFUSERPROFILE_SET_PROFILE - STEER_… (7):
STEER_ADD,STEER_ADDED,STEER_DESTROY,STEER_DESTROYED,STEER_DESTROY_ALL,STEER_REMOVE,STEER_REMOVED - BFTERRAIN_… (6):
BFTERRAIN_CHARGE,BFTERRAIN_END_UNDO_DATA,BFTERRAIN_EVENT,BFTERRAIN_EXECUTE_UNDO,BFTERRAIN_FINAL_CHARGE,BFTERRAIN_START_UNDO_DATA - BF_… (5):
BF_GET_HEARTBEAT,BF_GRAPHICS_PERF_DECREASE,BF_GRAPHICS_PERF_INCREASE,BF_PERF_DECREASE,BF_PERF_INCREASE - BFTIME_… (4):
BFTIME_EVENT,BFTIME_HEARTBEAT,BFTIME_SIMTICK,BFTIME_SLOWTICK - COLL_… (3):
COLL_EVENT_ROOT,COLL_GRID,COLL_TERRAIN - BFUNDO_… (2):
BFUNDO_ACTIVATETRANSACTION,BFUNDO_EVENT - GET_… (2):
GET_SEQUENCE_FAILURE,GET_SEQUENCE_SUCCESS - LOCO_… (2):
LOCO_ERROR,LOCO_OK - ZTSHOWTIMERMANAGER_… (2):
ZTSHOWTIMERMANAGER_SHOWPANEL,ZTSHOWTIMERMANAGER_SHUTDOWN_UI - ACTOR_… (1):
ACTOR_EVENT_ROOT - BFGECONOMY_… (1):
BFGECONOMY_DO_TRANSACTION - REQUEST_… (1):
REQUEST_VELOCITY - RESET_… (1):
RESET_LOCOMOTION - RESOLVE_… (1):
RESOLVE_COLLISIONS - RETURN_… (1):
RETURN_VELOCITY - ZTQUERY_… (1):
ZTQUERY_OKTOVIEW_OVERVIEWMAP
Open Contract Register
Open contracts mark native surfaces that remain explicit until established from source data and authored content. Cross-cutting unknowns:
| Surface | What is unrecovered | Owning section |
|---|---|---|
| Source schemas | full entity shared-data schema, profile/save/.z2s and scenario field layouts, descriptor-table shapes |
Source Object Model, Persistence |
| Vtable behavior | widget/manager vtable method bodies (UI_*/BFAI_* handlers); only message sets + inheritance modeled |
UI, AI, Managers |
| AI/sim policy | task scoring/tie-break, ThinkerInterval cadence, token lifetime, steering blend weights |
AI |
| World placement | grid units, footprint schema, slope thresholds, elevated topology rules, terrain visual mechanism | World |
| Economy/fame/disease | half-star/admission/donation formulae, disease spread/cure cadence, research tree schema | Economy |
| Renderer/audio | .bfmat/.fx parameter+animation syntax, material slot binding, anim blend/transition, mixing categories |
Renderer |
| Scenario/scripts | rule evaluation order, Lua arg/stack marshalling, compiled .bin/.lop + VINCE telemetry |
Scenario |
| Manager runtime | construction/update order per tick, BFTimeKeeper fan-out, which managers persist |
Managers |
| Host adapters | Win32 pump/dialog/IME edges, registry/profile mapping, network/download/MOTD | Renderer, Persistence (adapter boundary) |
Unresolved methods, globals, payloads, and formulae stay attached to the nearest original class or manager.
Binary Perimeter
The binary's function/global perimeter, library boundaries, vtable enumeration,
and identification coverage live in the Binary Perimeter (perimeter.html) as
red-team analysis artifacts. They stay separate from the product-domain contract
to preserve the clean-room boundary between binary analysis and specification.