VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfobjcore Library API Changes

Table of Contents

The vrfobjcore library is the core simulation object framework of VR-Forces.

It defines DtLocalObject and its manager, the component/system model (DtSimComponent, DtComponentSystem, DtSimComponentManager), the controller and task controller base classes, the process state repository (PSR) hierarchy, the script interface, the navigation interfaces, and the string constants that name every component and PSR type. Almost every toolkit extension derives from something declared here, so this library carries the largest share of the source changes between 5.2 and 5.3.

Approximately one hundred public headers changed. The changes fall into a handful of themes:

Changes limited to comments, documentation, formatting, or private implementation detail are not listed.

Breaking Changes

DtLocalObject::addStateProperty was renamed to addInternalStateProperty

All six overloads were renamed. The signatures are otherwise unchanged, so the update is a direct substitution. The rename removes the ambiguity that made it look as though external state properties could be added at run time; they cannot.

// 5.2
object->addStateProperty("my-context", "my-property", 0.0);
object->addStateProperty("my-context", "my-object-property", propertyPtr);
// 5.3
object->addInternalStateProperty("my-context", "my-property", 0.0);
object->addInternalStateProperty("my-context", "my-object-property", propertyPtr);
5.2 declaration 5.3 declaration
virtual DtPropertyInterface* addStateProperty(const DtString&, const DtString&, int) virtual DtPropertyInterface* addInternalStateProperty(const DtString&, const DtString&, int)
virtual DtPropertyInterface* addStateProperty(const DtString&, const DtString&, double) virtual DtPropertyInterface* addInternalStateProperty(const DtString&, const DtString&, double)
virtual DtPropertyInterface* addStateProperty(const DtString&, const DtString&, bool) virtual DtPropertyInterface* addInternalStateProperty(const DtString&, const DtString&, bool)
virtual DtPropertyInterface* addStateProperty(const DtString&, const DtString&, const DtString&) virtual DtPropertyInterface* addInternalStateProperty(const DtString&, const DtString&, const DtString&)
virtual DtPropertyInterface* addStateProperty(const DtString&, const DtString&, const DtVector&) virtual DtPropertyInterface* addInternalStateProperty(const DtString&, const DtString&, const DtVector&)
virtual bool addStateProperty(const DtString&, const DtString&, DtPropertyInterface*) virtual bool addInternalStateProperty(const DtString&, const DtString&, DtPropertyInterface*)

Classes that override any of these methods must rename their override as well, or the override will silently stop participating in the virtual dispatch chain.

DtLocalObject::scenarioRunId changed return type

The scenario run identifier is now a UUID rather than an integer.

// 5.2
virtual int scenarioRunId() const; // -1 when not set
// 5.3
virtual const DtUUID& scenarioRunId() const; // DtUUID::nullUUID() when not set

Comparisons against -1 must be replaced with comparisons against DtUUID::nullUUID(). Code that stores the value in an int or formats it as an integer must be updated.

DtVrfObjectLocalObjectFacade::save requires a save type

// 5.2
virtual void save(std::string&);
// 5.3
virtual void save(std::string&, DtLocalObject::SaveType);

DtLocalObject::SaveType is a new enum described under Additions. Pass the value that describes the context of the save; DtLocalObject::Snapshot matches the 5.2 behavior for in-memory saves.

DtSaveOrderOfBattleHandler methods take a save type

The scenario piece save methods and the protected order-of-battle writer all gained a save type parameter. The parameter is an int holding a DtLocalObject::SaveType value and defaults to DtLocalObject::Snapshot, so most call sites compile unchanged, but any subclass that overrides these methods must add the parameter to its signature or the override will be lost.

// 5.2
virtual bool saveScenarioPiece(
const DtScenario&, const std::map<DtUUID, DtLocalObject*>&, void* userData = 0) const override;
virtual bool saveScenarioPiece(
std::vector<std::string*>&, const std::map<DtUUID, DtLocalObject*>&, void* userData = 0) const;
virtual bool writeOrderOfBattle(std::string&, const std::map<DtUUID, DtLocalObject*>&) const;
// 5.3
virtual bool saveScenarioPiece(
const DtScenario&, const std::map<DtUUID, DtLocalObject*>&, void* userData = 0,
int saveType = DtLocalObject::Snapshot) const override;
virtual bool saveScenarioPiece(
std::vector<std::string*>&, const std::map<DtUUID, DtLocalObject*>&, void* userData = 0,
int saveType = DtLocalObject::Snapshot) const;
virtual bool writeOrderOfBattle(
std::string&, const std::map<DtUUID, DtLocalObject*>&, int saveType) const;

DtScriptInterface gained a pure virtual method

// 5.3, new pure virtual
virtual void processEvents() = 0;

Any class deriving from DtScriptInterface must implement processEvents. It is called to drain enqueued events such as text or influence events. Two non-pure virtuals were also added and may be overridden where useful:

virtual bool taskFailedDuringInit() const { return false; }
virtual bool hasEventsPending() const { return false; }

taskFailedDuringInit distinguishes a script that deliberately failed its own task during init from a script that failed with an engine error.

DtScriptTaskControllerInterface gained two pure virtual methods

// 5.3, new pure virtuals
virtual void scriptSetTickWhileDestroyed(int taskId, const DtString& scriptId, bool enable) = 0;
virtual void scriptSetTickImmediately(int taskId, const DtString& scriptId, bool enable) = 0;

Every implementation of this interface must add both methods. DtScriptReactiveTaskController implements them in the library; custom script task controllers must supply their own.

Controller disable handling moved to taskHandlingOnDisable

DtSingleTaskControllerComponent::disable was removed as an override. Task disposal on disable is now expressed through a new virtual on the task controller base class:

// DtTaskControllerComponent, 5.3
virtual void taskHandlingOnDisable();
// DtSingleTaskControllerComponent, 5.3
virtual void taskHandlingOnDisable() override; // cancels in-progress tasks so plans continue

Code that overrode DtSingleTaskControllerComponent::disable to customize task cleanup should move that logic into a taskHandlingOnDisable override. DtControllerComponent also now declares virtual void disable() override so that disabling a controller resends its capable tasks and sets; subclasses that override disable must call the base implementation.

DtTaskControllerComponent and DtSimTaskManager task registration gained a hidden flag

Task processors can now be registered as hidden so they do not appear in the GUI's capable-task response. The new parameter is defaulted, so call sites compile unchanged; overrides must add it.

// 5.2
virtual void addTaskProcessorCallback(
virtual void addTaskProcessorCallback(
virtual void addTaskProcessor(const DtSimTaskMessageType&, DtTaskControllerComponent*);
// 5.3
virtual void addTaskProcessorCallback(
const DtSimTaskMessageType&, DtTaskMessageCallbackFcn, void* usr, bool hidden = false);
virtual void addTaskProcessorCallback(
const DtSimTaskMessageType&, DtMessageCallbackFcn, void* usr, bool hidden = false);
virtual void addTaskProcessor(
const DtSimTaskMessageType&, DtTaskControllerComponent*, bool hidden = false);

DtSimTaskManager::DtTaskProcessorMap changed its mapped type as a consequence. Derived classes that iterate the protected map must be updated:

// 5.2
typedef std::multimap<DtSimTaskMessageType, DtTaskControllerComponent*> DtTaskProcessorMap;
// entry.second is the controller
// 5.3
struct DtTaskProcessorInfo
{
DtTaskProcessorInfo(DtTaskControllerComponent* controller, bool isHidden = false);
bool myIsHidden;
};
typedef std::multimap<DtSimTaskMessageType, DtTaskProcessorInfo> DtTaskProcessorMap;
// entry.second.myController is the controller

DtWeaponInfoInterface pure virtual changes

This interface changed substantially. Every implementation must be revisited.

5.2 declaration 5.3 status
virtual DtSimTask* createFireTask(const DtRwLocationReference&) const = 0 Replaced by a two-argument form taking a hit zone function
virtual bool targetAmmunition(const DtEntityType&) const = 0 Removed
virtual int priority() const = 0 Removed
virtual bool withinTargetRegion(const DtVector&) const = 0 Retained but marked [[deprecated]]
enum TargetApplicability { ... } Replaced by a type alias to the standalone DtTargetApplicability enum

The fire-task factory now carries the hit zone function of the intended aim point, and a defaulted overload accepts a preferred munition type:

// 5.2
virtual DtSimTask* createFireTask(const DtRwLocationReference& location) const = 0;
// 5.3
virtual DtSimTask* createFireTask(
const DtRwLocationReference& location, const DtU8 hitZoneFunction) const = 0;
virtual DtSimTask* createFireTask(const DtRwLocationReference& location,
const DtU8 hitZoneFunction, const DtEntityType& munitionType) const;

withinTargetRegion still exists but produces a deprecation warning. It is superseded by the canEngageTarget chain on DtVrfTurretedBalGunPSR (see Additions) and by bestMunitionForTarget. Plan to migrate off it.

The nested TargetApplicability enum was moved to namespace scope in the new header vrfobjcore/targetApplicability.h. DtWeaponInfoInterface re-exports the name and the five enumerators as a type alias and static constexpr constants, so existing references such as DtWeaponInfoInterface::TargetApplicability_Ideal continue to compile. Code that forward-declared the nested enum, or that relied on it being a distinct type from DtTargetApplicability, must be updated.

DtBaseWeaponComponentInterface lost the priority and selected-as-tasked accessors

// Removed in 5.3
virtual void setPriority(const int priority);
virtual int priority() const;
virtual void setTreatSelectedAsTasked(bool t);
bool treatSelectedAsTasked() const;

The protected reader-writer members myPriority and myTreatSelectedAsTasked were removed with them, so they are also gone from the checkpoint. Weapon arbitration is now driven by the engageability chain rather than a static priority number. There is no direct replacement for priority(); use targetApplicability and the canEngageTarget predicates to decide which weapon should engage.

A new status bit and reason strings were added to the same class:

enum DtWeaponStatus
{
// ... existing values ...
DT_WEAPON_BUSY = 32,
DT_CANNOT_ARTICULATE_TO_TARGET = 64 // new in 5.3
};
virtual const DtString& statusReason(DtWeaponStatus status) const;
virtual void setStatusReason(DtWeaponStatus status, const DtString& reason);

Code that switches exhaustively over DtWeaponStatus, or that masks the status word against a hard-coded "all bits" constant, must account for the new bit.

DtSensorGimbalControllerPSR re-parented onto DtAimableSystemControllerPSR

The aiming-related state of the sensor gimbal PSR was hoisted into a new base class so that search lights and laser lights can share it. DtSensorGimbalControllerPSR now derives from DtAimableSystemControllerPSR instead of DtVrfProcessStateRepository, and the following members moved to the base class rather than being removed:

aimingPoint, setAimingPoint, objectToTrack, setObjectToTrack, aimingAzimuth, setAimingAzimuth, aimingElevation, setAimingElevation, isScanningLeft, setIsScanningLeft, aimingMode, setAimingMode, lastKnownAzimuth, setLastKnownAzimuth, lastKnownElevation, setLastKnownElevation, lastKnownPositionOffset, setLastKnownPositionOffset, panDirection, setPanDirection, rotationRatePercentage, setRotationRatePercentage, manualControl, setManualControl.

Calls through a DtSensorGimbalControllerPSR pointer or reference still resolve. Two things do break:

DtSensorGimbalControllerPSR retains only zoomLevel, zoomSpeed, fieldOfViewColor, and the lasing flag as its own state.

DtLocalObjectManager object creation replaced clampToGround with terrain-relative altitude

The long-form createAndInitVrfObject overload replaced its clampToGround argument with a pair of arguments describing placement relative to terrain. Because the replacement changes the meaning of a positional argument rather than appending one, every call site that passed arguments beyond addToOrbat must be reviewed.

// 5.2 (tail of the parameter list)
const DtString& overlayParent = "",
const DtUUID& uuid = DtUUID::nullUUID(),
bool addToOrbat = false,
bool clampToGround = true,
const DtString& globalId = DtString::nullString());
// 5.3
const DtString& overlayParent = "",
const DtUUID& uuid = DtUUID::nullUUID(),
bool addToOrbat = false,
bool useAltitudeAboveTerrain = true,
double altitudeAboveTerrain = 0.,
const DtString& globalId = DtString::nullString());

The globalId argument shifted position, so a call that passed globalId positionally will now bind it to altitudeAboveTerrain and fail to compile, or bind an unintended default.

The aggregate creation overload and the two protected helpers gained a trailing altitudeAboveTerrain parameter as well:

// 5.3
virtual DtLocalObject* createAndInitVrfObject(...,
bool addToOrbat = false, bool clampToGround = true, double altitudeAboveTerrain = 0.);
protected:
virtual void createSubObjectsFromParameters(DtLocalObject* parent, bool publishSubobjects,
unsigned long requestId, const DtString& overlayParent, bool addToOrbat,
bool useAltitudeAboveTerrain, double altitudeAboveTerrain = 0.);
// subordinate creation helper
virtual DtLocalObject* ...(...,
bool addToOrbat = true, bool clampToGround = true, double altitudeAboveTerrain = 0.);

Overrides of createSubObjectsFromParameters must be updated; note that the fifth parameter was also renamed from clampToGround to useAltitudeAboveTerrain.

DtLocalObjectManager converted-to-remote callbacks changed signature

The callback now receives a description of the transferred object rather than a DtSimObject pointer, because the object is gone by the time the callback fires.

// 5.2
virtual void addSimObjectConvertedToRemoteCallback(
virtual void removeSimObjectConvertedToRemoteCallback(
// 5.3
virtual void addSimObjectConvertedToRemoteCallback(
virtual void removeSimObjectConvertedToRemoteCallback(

Registered callback functions must change their first parameter from const DtLocalObject* to const DtObjectTransferredInformation&. The corresponding "converted to local" callbacks are unchanged.

DtLocalObjectManager::setSimulationDateTimeBasedOnLocation parameter type

// 5.2
virtual void setSimulationDateTimeBasedOnLocation(const DtVector& geocentricLocation, int timeOfDay);
// 5.3
virtual void setSimulationDateTimeBasedOnLocation(const DtVector& geocentricLocation, double timeOfDay);

Overrides must change the parameter type.

DtLocalEntitySetControllerPSR replaced the ground-clamp boolean with an enum

// 5.2
virtual bool pendingKeepGroundClamped() const;
virtual void setPendingKeepGroundClamped(bool);
// 5.3
enum ClampFlag
{
NoClamp = 0,
KeepCurrentAltitudeAboveTerrain,
ClampAboveTerrain,
KeepCurrentAltitude
};
virtual ClampFlag pendingClampFlag() const;
virtual void setPendingClampFlag(int);
virtual void setPendingAltitudeAboveTerrain(double);
virtual double pendingAltitudeAboveTerrain() const;

true maps to KeepCurrentAltitudeAboveTerrain and false maps to NoClamp. The protected member myPendingKeepGroundClamped (a DtRwBoolean) was replaced by myPendingClampFlag (a DtRwInt) and myPendingAltitudeAboveTerrain (a DtRwReal).

DtVrfObjectStateRepository removed the system enabled accessors

// Removed in 5.3
virtual bool systemEnabled(const DtString& systemName) const;
virtual void setSystemEnabled(const DtString& systemName, bool enabled);

The backing member mySystemsDisabledList was removed as well. System enablement is now derived from hit zone damage: use DtComponentSystem::isDamaged(), DtComponentSystem::hitZoneId(), and DtComponentSystem::refreshDamageState(), or query damage directly through the new DtHitZonesSimObjectFacade.

The suppression enumeration gained a level, which affects exhaustive switches:

enum suppressionLevels
{
DtNoSuppression = 0,
DtSuppressed1 = 1,
DtSuppressed2 = 2,
DtSuppressed3 = 3,
DtSuppressed4 = 4 // new in 5.3
};

DtLaunchExpendableResourcePSR removed the auto-launch accessors

// Removed in 5.3
virtual void setAutoLaunchEnabled(bool enabled);
virtual bool autoLaunchEnabled() const;
virtual bool autoLaunchEnabledOnSpecified() const;
virtual void setAutoLaunchSubtaskId(const int id);
virtual const int autoLaunchSubtaskId() const;
virtual void setAutoLaunchRange(const double range);
virtual const double autoLaunchRange() const;
virtual void setElapsedTimeBetweenAutoLaunches(const double time);
virtual const double elapsedTimeBetweenAutoLaunches() const;

The protected members myAutoLaunchEnabled, myAutoLaunchRange, myTimeElapsedBetweenAutoLaunches, and myAutoLaunchSubtaskId were removed with them. There is no replacement in this PSR; auto-launch behavior is now configured through the launch expendable resource controller's parameters.

DtLuaScriptInterfaceExtension::cleanup is now a pure virtual taking the Lua state

// 5.2
virtual void cleanup() {};
// 5.3
virtual void cleanup(lua_State*) = 0;

Every Lua script interface extension must now implement cleanup and must use the supplied lua_State to tear down whatever it registered in the global table, for example:

void MyExtension::cleanup(lua_State* L)
{
luabind::globals(L)["myModule"] = luabind::object();
}

A new optional hook was added at the same time:

virtual void clearBackingPointer(void* usr) {}

DtScenarioExtrasMgr holds the scenario extras by pointer

The protected member changed from a value to a heap-allocated pointer so that the extras object can be subclassed.

// 5.2
DtRwScenarioExtras myScenarioExtras;
// 5.3
DtRwScenarioExtras* myScenarioExtras = nullptr;

Derived classes that accessed myScenarioExtras directly must dereference it. The public scenarioExtras() accessor still returns a reference and is unaffected. To supply a derived extras class, override the new protected factory or install a creator function:

typedef DtRwScenarioExtras* (*DtRWScenarioExtrasCreatorFcn)(const DtString& name);
static DtRWScenarioExtrasCreatorFcn SetRWScenarioExtrasCreatorFcn(DtRWScenarioExtrasCreatorFcn);
static DtRWScenarioExtrasCreatorFcn RWScenarioExtrasCreatorFcn();
protected:
virtual DtRwScenarioExtras* createScenarioExtras() const;

DtVrfMovingObjectStateRepository legacy reader-writer hooks were replaced

The overrides used to stage legacy reader-writer data moved from the generic preGetSelf and prePutSelf hooks to dedicated methods on DtSimObjectStateRepository.

// 5.2
virtual void preGetSelf() override;
virtual void prePutSelf() override;
// 5.3
virtual void initializeLegacyRwDataForReading() override;
virtual void initializeLegacyRwDataForWriting() override;
virtual void cleanupLegacyRWData() override;

DtSimObjectStateRepository declares the two new initializeLegacyRwData... virtuals. State repositories that overrode preGetSelf or prePutSelf solely to prepare legacy data should move that work into the new hooks; those that override them for other reasons are unaffected.

DtLegacySimObjectStateRepositoryRWData dropped articulated parts

// Removed in 5.3
const makVrf::DtArticulatedPartManager& articulatedParts() const;

The myArticulatedParts member and its registry entry were removed. Articulated part data is no longer round-tripped through the legacy reader-writer block.

DtPhysicalWorldRWData also renamed its start-time accessors and removed one parameter entirely:

5.2 declaration 5.3 declaration
void setStartTimeIsLocal(bool) void setTimeIsSetToLocalOnFirstPlacement(bool)
bool startTimeIsLocal() const bool timeIsSetToLocalOnFirstPlacement() const
void setScenarioStartTimeAtLocalOnFirstObjectCreationToTime(int) Removed
int scenarioStartTimeAtLocalOnFirstObjectCreationToTime() const Removed

DtPhysicalWorld uses the shared world magnetic model

The VR-Forces-specific magnetic model class was removed in favor of the shared makVrv::DtWorldMagneticModel, and the header vrfobjcore/vrfWorldMagneticModel.h was deleted. Code that included that header transitively through vrfobjcore/physicalWorld.h must now include the VR-Vantage header directly.

// 5.2
DtVrfWorldMagneticModel* myWMM;
// 5.3

magneticNorth is unchanged. Two accessors and an initialization hook were added:

virtual makVrv::DtWorldMagneticModel* worldMagneticModel();
virtual const makVrv::DtWorldMagneticModel* worldMagneticModel() const;
protected:
virtual void initializeWorldMagneticModel();

Navigation interface changes

DtVrfObjectNavInterface gained a virtual hook that fires when the set of secondary nav areas changes. It has a default no-op implementation, so it is not breaking on its own, but interfaces that manage resources across multiple nav areas should override it:

virtual void onNavAreaSetChanged() {}

DtTagVolumeNavInterface, DtDynamicObstacleNavInterface, and DtNavEdgeNavInterface override it in the library.

DtTagVolumeNavInterface::calcTagVolumePoints changed signature. Overrides must be updated:

// 5.2
virtual void calcTagVolumePoints(DtNavTagVolume::PointList& pointList) const;
// 5.3
virtual void calcTagVolumePoints(
DtNavTagVolume::PointList& pointList, double& minAlt, double& maxAlt) const;

DtNavEdgeNavInterface replaced its single nav edge index with a per-area map, because a nav edge can now be present in more than one area:

// 5.2
unsigned myNavEdgeIndex;
// 5.3
std::map<DtNavArea*, unsigned> myNavEdgeIndices;

DtActiveBotNavInterface::findBestExitPoint moved from the protected section to the public section. This is source compatible for existing callers.

DtUpdateRepositoryOutputPortGroup::setLocation gained a parameter

// 5.2
virtual void setLocation(const DtVector&);
// 5.3
virtual void setLocation(const DtVector&, bool debug = false);

Call sites compile unchanged; overrides must add the parameter.

DtVrfMsdlScenarioDescriptionImporterExporter::countryCode return type

// 5.2
virtual const std::string countryCode(DtRwForceDescription* force);
// 5.3
virtual std::string countryCode(DtRwForceDescription* force);

The top-level const was removed. Overrides must match the new return type exactly.

Removed component and PSR type constants

The TDL subsystem was removed. The following constants no longer exist; code that referenced them will fail to compile and must be deleted.

Header Removed constant
simComponentTypes.h DtTDLPPLIMessageGeneratorControllerType
simComponentTypes.h DtTDLStatusMessageGeneratorControllerType
simComponentTypes.h DtTDLContactMessageGeneratorControllerType
psrTypes.h DtTDLMessageGeneratorControllerProcessStateRepositoryType
psrTypes.h DtTDLMessageGeneratorControllerProcessStateRepositoryDefaultName
psrTypes.h DtTDLPPLIMessageGeneratorControllerProcessStateRepositoryType
psrTypes.h DtTDLPPLIMessageGeneratorControllerProcessStateRepositoryDefaultName
psrTypes.h DtTDLContactMessageGeneratorControllerProcessStateRepositoryType
psrTypes.h DtTDLContactMessageGeneratorControllerProcessStateRepositoryDefaultName

Miscellaneous signature changes

These are smaller changes that affect only subclasses or direct users of the named member.

Class Change
DtSimObjectReferenceList simObjectRemoved(const DtSimObject*) is now virtual
DtDetonationManager detonationPower(...) is now declared override
DtResourceMonitor myMonitoringResourcesMutex is now mutable
DtVrfMovingObjectStateRepository Added virtual void diGuyCharacterState(DtRwDIGuyCharacterState&) const as an out-parameter overload alongside the by-value accessor; overload resolution now considers both
DtTagVolumeNavInterface The not-implemented default constructor, copy constructor, and assignment operator moved from the first private block to a later one; behavior is unchanged

Additions

Hit zones

Hit zone damage is now a first-class concept on sim objects, reachable through a facade pair rather than through ad-hoc state properties.

vrfobjcore/hitZonesSimObjectFacade.h declares DtHitZonesSimObjectFacadeInterface and the DtHitZonesSimObjectFacade typedef, giving read access to damage on any sim object:

bool isUsable() const;
std::vector<DtHitZoneId> damagedHitZones() const;
bool hitZoneDamaged(const DtHitZoneId& zoneId) const;

vrfobjcore/hitZonesLocalObjectFacade.h declares DtHitZonesLocalObjectFacadeInterface and the DtHitZonesLocalObjectFacade typedef, adding next-frame mutation for local objects:

void setNextFrameHitZoneDamaged(const DtHitZoneId& zoneId, bool isDamaged);
bool nextFrameHitZoneDamaged(const DtHitZoneId& zoneId) const;
bool isUsable() const;

vrfobjcore/hitZoneDamageParamsManager.h declares DtHitZoneDamageParamsManager, an implementation of DtHitZoneDamageParamsManagerInterface that loads and merges hitZoneDamageParams.mtl and answers damage probability queries:

DtRwHitZoneDamageParameters* createParameters();
virtual const DtRwHitZoneDamageParameters* getDamageProperties() const;
virtual bool loadParametersFromFile(const DtFilename& filename);
virtual void mergeParameters(DtRwHitZoneDamageParameters* newParams);
virtual void resetParameters();
virtual bool getProbabilities(const DtString& hitZoneDamageParameterType,
const DtDetonationContext&, DtPrbValueList& probabilities, bool isDirectDamage) const override;
virtual bool getPowerDirectKillProbabilities(const DtString& hitZoneDamageParameterType,
const DtString& surface, DtReal angleOfIncidence, DtReal range,
const std::map<DtString, double>& powers, DtPrbValueList* probabilities) const;
virtual bool getPowerCollateralDamageProbabilities(const DtString& hitZoneDamageParameterType,
const DtString& surface, DtReal angleOfIncidence, DtReal range,
const std::map<DtString, double>& powers, DtPrbValueList* probabilities) const;

Component systems are now tied to hit zones. DtComponentSystem gained:

virtual bool isDamaged() const;
virtual void refreshDamageState();
virtual DtHitZoneId hitZoneId() const;

and DtSimComponentManager gained the protected refreshDamagedSystems() that drives it each tick. This is the replacement for the removed DtVrfObjectStateRepository::systemEnabled.

Hit zone aim points were threaded through the targeting PSRs:

Class New members
DtMissileFlightPSR setTargetHitZone(const DtVector&), targetHitZone()
DtSurfaceMovementPSR setTargetHitZoneOffset(const DtVector&), targetHitZoneOffset()
DtCruiseMissileLaunchControllerPSR setTargetHitZoneOffset(const DtVector&), targetHitZoneOffset()
DtFireMissionInformation hitZoneFunction(), setHitZoneFunction(DtU8)
DtAimableSystemControllerPSR targetedEntityPositionOffset(), setTargetedEntityPositionOffset(const DtVector&)

DtRwPositionReference and DtFixedWingFlightPSR gained paired setters so that an object and an offset within it can be set atomically:

// DtRwPositionReference
virtual void setObjectAndVector(const DtUUID& object, const DtVector& v) override;
// DtFixedWingFlightPSR
virtual void setControlPointWithAimingOffset(const DtUUID& objectName, const DtVector& location);

Aimable systems, search lights, and laser lights

vrfobjcore/aimableSystemControllerPSR.h declares DtAimableSystemControllerPSR, the new generalization of the sensor gimbal aiming state. It derives from DtVrfProcessStateRepository and owns the aiming point, tracked object, fixed azimuth and elevation, scan direction, aiming mode, last known articulation state, manual pan direction and rate, manual control flag, power state, and the targeted entity position offset. It uses the DtAimableSystemTrackingMode and DtAimableSystemManualControlDirection enums from vrfExtObjects/aimableSystemEnums.h.

Two new controllers and two new actuators build on it:

Header Class Key state
searchLightControllerPSR.h DtSearchLightControllerPSR range, intensity, coneAngle, lightType, color, lockedOnTarget
searchLightActuatorPSR.h DtSearchLightActuatorPSR aimingAzimuth, aimingElevation, orientationAchieved
laserLightControllerPSR.h DtLaserLightControllerPSR spread, wavelength, signal, lockedOnTarget
laserLightActuatorPSR.h DtLaserLightActuatorPSR aimingAzimuth, aimingElevation, orientationAchieved

The controller PSRs derive from DtAimableSystemControllerPSR; the actuator PSRs derive from DtVrfProcessStateRepository.

DtSignalFlagControllerPSR

vrfobjcore/signalFlagControllerPSR.h declares DtSignalFlagControllerPSR, which stores the maritime signal flags hoisted on each of DtHalyardPositionCount halyard positions. Each halyard is a DtRwIntegerList of DtNavigationSignalFlag values, indexed by DtHalyardPosition.

virtual DtRwIntegerList* halyard(DtHalyardPosition pos);
virtual const DtRwIntegerList* halyard(DtHalyardPosition pos) const;
virtual void setHalyard(DtHalyardPosition pos, const std::vector<int>& flags);

DtPlaySoundPSR

vrfobjcore/playSoundPSR.h declares DtPlaySoundPSR and the namespace-scope enum PlaySoundState { NotPlayingSound, PlayingSound }. Because the enum is unscoped and declared at namespace scope in a public header, an application symbol named NotPlayingSound or PlayingSound will now collide.

virtual void setPlayState(enum PlaySoundState playState);
virtual enum PlaySoundState playState() const;
virtual void setSoundType(const DtEntityType& soundType);
virtual DtEntityType soundType() const;
virtual void setWaitTime(DtTime time);
virtual DtTime waitTime() const;

DtTargetApplicability

vrfobjcore/targetApplicability.h lifts the weapon applicability tier out of DtWeaponInfoInterface so that lightweight consumers can use it without pulling in the weapon interface and its transitive dependencies:

DtSidcLocalObjectDecorator

vrfobjcore/sidcDecorator.h declares DtSidcLocalObjectDecorator and DtSidcDecoratorCreator. The decorator maintains a local object's SIDC symbol code, updating the identity field from the object's force and the status field from its appearance.

{
public:
virtual void updateSidc();
protected:
virtual void tick() override;
virtual void updateIndentityFromForce();
virtual void updateStatusFromAppearance();
};

DtPlatformLocalObjectFacadeInterface now holds a protected DtSidcLocalObjectDecorator* mySidcDecorator and installs it in setupDecorator().

SIDC support reaches DtLocalObject through a new change flag and a next-frame accessor pair, and DtVrfObjectStateRepositoryRWData through a new sidc reader-writer:

// DtLocalObject
enum ChangeFlag
{
ObjectName = 1,
ForceType,
ObjectLabel,
OverlayParent,
ObjectType,
SubordinateOfForceLevel,
SidcCode // new in 5.3
};
virtual void setNextFrameSidcCode(const DtString&);
virtual const DtString& nextFrameSidcCode() const;
// DtVrfObjectStateRepositoryRWData
void setSidc(const DtString& s);
const DtString& sidc() const;
bool sidcSpecified() const;
void setSensorsKilled(bool b);
bool sensorsKilled() const;

DtLocalObject::SaveType and the save signals

DtLocalObject now describes the kind of save in progress and emits signals around it:

enum SaveType
{
SimulationObjectGroup = 1, // Saved into a simulation object group (.sogx)
FrontEnd_Checkpoint = 2, // Full scenario save to disk, front-end
BackEnd_Checkpoint = 3, // Partial scenario save to disk, back-end
Snapshot = 4 // In-memory save, also used by reinitialize
};
boost::signals2::signal<void(SaveType)> signal_preSave;
boost::signals2::signal<void(SaveType)> signal_postSave;

Other DtLocalObject additions

virtual const DtRwProperties& internalStateProperties() const;
virtual const DtRwProperties& internalStateProperties(const DtString& context) const;
DtAppearanceLocalObjectFacade* nextFrameAppearanceFacade() const;
virtual bool clampedToGround() const;
static bool canObjectBeCreated(
protected:
virtual void initializeDRThresholdSettings();
static void setRequestNotifyLevelCallback(const DtVrfObjectMessage* msg, void* usr);
virtual void processRequestNotifyLevel(const DtVrfObjectMessage* msg);

Ownership transfer

DtOwnershipTransferManager gained transfer-state queries and an acknowledgement round trip:

virtual bool awaitingTransferOf(const DtUUID&) const;
virtual bool convertingToRemote(const DtUUID&) const;
protected:
virtual void processTransferAcknowledgeEvent(const makVrfEvents::DtEvent&);
static void takeOwnershipResponseCallback(DtSimMessage* msg, void* usr);
virtual void processTakeOwnershipResponse(DtSimMessage* msg);

DtVrfObjectStateRepository gained a key/value block that is archived with the transfer. Populate it from a signal_prepareForHandoff handler triggered on the Prepare status:

virtual void setTransferData(const DtString& key, const DtString& value);
virtual void clearTransferData();
const DtRwKeyValueList& transferData() const;

Resource monitoring can now be serialized across the same boundary:

// DtResourceMonitor
virtual DtString toString(const DtUUID&) const;
virtual void restoreMonitorInformation(DtLocalObject* object, const DtString&);
// DtResourceMonitorInfo
virtual DtString toString() const;
virtual void fromString(DtSimulationServices* simManager, const DtString&);

Scenario import UUID upgrade

A new upgradeFromImport virtual was threaded through the PSR and component system hierarchy so that imported scenarios can rewrite stale UUID references. The base implementations are no-ops or simple recursions; override the PSR version in custom repositories that store UUIDs in string form.

Script ticking controls

Scripts can now be scheduled to tick while the entity is destroyed and to tick immediately.

Class New members
DtScriptInterface (owner class in scriptInterface.h) setTickWhileDestroyed(bool), virtual void setTickImmediately(bool)
DtScriptMultiTaskControllerPSR setScriptTickWhileDestroyed, scriptTickWhileDestroyed, setScriptTickImmediately, scriptTickImmediately, removeScriptInformationByTaskId(int)
DtRwScriptReactiveTaskEntry tickWhileDestroyed, setTickWhileDestroyed, tickImmediately, setTickImmediately
DtScriptReactiveTaskController tickWhileDestroyed() returns true; implements the two new DtScriptTaskControllerInterface pure virtuals

Weapon engageability chain

DtVrfTurretedBalGunPSR gained a three-stage predicate chain that replaces the removed weapon priority and the deprecated withinTargetRegion. Each stage is a std::function registered by the component that owns the relevant behavior, and each is permissive when unset.

virtual void setCanEngageTargetFcn(
std::function<bool(const DtRwLocationReference&, const DtEntityType&, DtString&)> fn);
virtual bool hasCanEngageTargetFcn() const;
virtual bool canEngageTarget(
const DtRwLocationReference& target, const DtEntityType& munitionType, DtString& reasonOut) const;
virtual void setCanFaceTargetFcn(
std::function<bool(const DtRwLocationReference&, DtString&)> fn);
virtual bool hasCanFaceTargetFcn() const;
virtual bool canFaceTarget(const DtRwLocationReference& target, DtString& reasonOut) const;
virtual void setCanAcquireTargetFcn(
std::function<bool(const DtRwLocationReference&, DtString&)> fn);
virtual bool hasCanAcquireTargetFcn() const;
virtual bool canAcquireTarget(const DtRwLocationReference& target, DtString& reasonOut) const;

canEngageTarget forwards to canAcquireTarget, which forwards to canFaceTarget. The reasonOut parameter receives a short description of the first failing check, which surfaces through DtBaseWeaponComponentInterface::statusReason.

DtVrfBalGunPSR gained the weapon registration identifier used by DtWeaponInfoList:

virtual const DtString& weaponId() const;
virtual void setWeaponId(const DtString& weaponId);

Multiple munition loaders

DtVrfWeaponPSR now supports more than one munition loader per weapon PSR, selected by weapon name or by munition type.

virtual const DtVrfMunitionLoader& munitionLoader(const DtString& weaponName) const;
virtual DtVrfMunitionLoader& munitionLoader(const DtString& weaponName);
virtual const DtVrfMunitionLoader& munitionLoader(const DtEntityType& munitionType) const;
virtual DtVrfMunitionLoader& munitionLoader(const DtEntityType& munitionType);
virtual void addMunitionLoader(const DtString& weaponName, const DtSimComponent* component);
virtual void setMunitionWeaponName(const DtEntityType& munitionType, const DtString& weaponName);
virtual const DtString& weaponNameForMunition(const DtEntityType& munitionType) const;
virtual const std::vector<std::pair<DtString, DtVrfMunitionLoader*>>& extraLoaders() const;
virtual std::vector<std::pair<DtString, DtVrfMunitionLoader*>>& extraLoaders();
virtual void logMunitionLoaders(DtOutputStream& out) const;

The no-argument munitionLoader() overloads now return the loader that corresponds to currentMunitionType() rather than a single fixed loader. If a weapon has registered extra loaders, code that assumed a single loader will observe different state.

Two more members were added to the same PSR:

virtual bool weaponAimedElevation() const;
virtual void setWeaponAimedElevation(bool aimed);
virtual const DtString& statusReason(DtBaseWeaponComponentInterface::DtWeaponStatus status) const;
virtual void setStatusReason(

DtVrfMunitionLoader gained a diagnostic dump:

virtual void log(DtOutputStream& out, const DtString& weaponName) const;

Indirect fire

DtVrfIndirectFirePSR and DtFireMissionInformation gained a flag that controls whether the height above terrain is applied to the shell target location, and the fire mission gained a structure-penetration flag:

// DtVrfIndirectFirePSR
virtual void setApplyHeightAboveTerrain(bool apply);
virtual bool applyHeightAboveTerrain() const;
// DtFireMissionInformation
virtual void setApplyHeightAboveTerrain(bool b);
virtual bool applyHeightAboveTerrain() const;
virtual void setAllowTargetInsideStructure(bool b);
virtual bool allowTargetInsideStructure() const;

DtWarheadDetonationActuatorPSR records its initialization time so that collisions can be suppressed immediately after launch:

virtual DtReal creationTime() const;
virtual void setCreationTime(DtReal time);

Notification level

The per-object notification level is now stored in the state repository and can be published on request.

// DtVrfObjectStateRepository
virtual void setNotifyLevel(DtNotifyLevelType value);
virtual DtNotifyLevelType notifyLevel() const;
// DtObjectConsole
virtual void publishNotifyLevel() const;
// DtObjectConsoleManager
virtual void publishNotifyLevel(const DtUUID&) const;

DtSimComponent additions

DtString toString(const DtEntityType& entityType) const;

New component and PSR type constants

Header Added constant
simComponentTypes.h DtSearchLightControllerType
simComponentTypes.h DtLaserLightControllerType
simComponentTypes.h DtRotaryWingFlyIntoControllerType
simComponentTypes.h DtSignalFlagsSetControllerType
simComponentTypes.h DtPlaySoundControllerType
simComponentTypes.h DtSearchLightActuatorType
simComponentTypes.h DtLaserLightActuatorType
psrTypes.h DtSearchLightControllerProcessStateRepositoryType / ...DefaultName
psrTypes.h DtSearchLightActuatorProcessStateRepositoryType / ...DefaultName
psrTypes.h DtLaserLightControllerProcessStateRepositoryType / ...DefaultName
psrTypes.h DtLaserLightActuatorProcessStateRepositoryType / ...DefaultName
psrTypes.h DtSignalFlagControllerProcessStateRepositoryType / ...DefaultName
psrTypes.h DtPlaySoundProcessStateRepositoryType / ...DefaultName

Smaller additions

Class Addition
DtAggregatedMoveToPSR clearControlObject() so that worldDestination() is used by setupDestination()
DtCreateQueueEntry Protected modifyClampedPositions() and modifyClampedPosition(DtVector&)
DtDebugDrawManager databaseToGeocentric(const DtVector&), databaseToGeocentric(const DtPoint&), geocentricToDatabase(const DtVector&) for projection-independent debug geometry
DtDynamicFeaturesManager addFeatureForObject, removeFeatureForObject, processActivationChange
DtEnvironmentalStateManager weatherObjects(), windCorridorObjects(), airTurbulenceObjects(); createGlobalWeatherCallback / processCreateGlobalWeather
DtImGuiLocalObjectList processObjectConvertedToRemote(const DtObjectTransferredInformation&), processObjectConvertedToLocal(const DtLocalObject*) and their static callbacks
DtLegacyRWData parentRegistry() accessor on the registry holder
DtResourceCheckInfo monitorPeriod()
DtRotaryWingFlightPSR setEnableTerrainAvoidance(bool), enableTerrainAvoidance()
DtScenarioService setSimEngineSnapshotFragmentDirectory, simEngineSnapshotFragmentDirectory, setTerrainFilename, terrainFilename
DtSimObjectReferenceList slot_uuidUpgradedTo(const DtUUID& oldUUID, const DtUUID& newUUID), eraseMapEntriesForListIterator(iterator)
DtVrfAggregateStateRepository pruneEngagementHistory(int clampSize), TheDefaultEnagementHistoryClampSize, updateCachedStateProperties() override
DtVrfEmbarkationPSR setClampToTerrain(bool), clampToTerrain()
DtVrfNavAreaManager findNavAreaNameForLocation(const DtVector&, const DtString&, bool loadNavAreas = true, const DtSimObject* parentObject = nullptr)

Removed Headers

Removed header Replacement
vrfobjcore/tdlContactMessageGeneratorControllerPSR.h None. The internal Tactical Data Link subsystem was removed.
vrfobjcore/tdlMessageGeneratorControllerPSR.h None. The internal Tactical Data Link subsystem was removed.
vrfobjcore/tdlPPLIMessageGeneratorControllerPSR.h None. The internal Tactical Data Link subsystem was removed.
vrfobjcore/vrfWorldMagneticModel.h The shared makVrv::DtWorldMagneticModel, reachable through DtPhysicalWorld::worldMagneticModel().

The TDL Message Sim example was removed along with the subsystem, and the \link tdlmessagesim references were removed from the documentation of DtSimObjectManager, DtSetDataManager, DtEnvironmentalStateManager, DtVrfProcessStateRepositoryManager, and DtPhysicalWorld.

Summary of Header Changes

Header Breaking Additions
activeBotNavInterface.h None findBestExitPoint promoted to public
aggregatedMoveToPSR.h None clearControlObject
baseWeaponComponentInterface.h setPriority, priority, setTreatSelectedAsTasked, treatSelectedAsTasked removed DT_CANNOT_ARTICULATE_TO_TARGET, statusReason, setStatusReason
componentSystem.h None isDamaged, refreshDamageState, hitZoneId, upgradeFromImport
controllerComponent.h disable() now overridden in the base controller None
createQueueEntry.h None modifyClampedPositions, modifyClampedPosition
cruiseMissileLaunchControllerPSR.h None setTargetHitZoneOffset, targetHitZoneOffset
debugDrawManager.h None Geocentric/database conversion helpers
detonationManager.h detonationPower now override None
dynamicFeaturesManager.h None addFeatureForObject, removeFeatureForObject, processActivationChange
dynamicObstacleNavInterface.h None onNavAreaSetChanged override
environmentalStateManager.h None Object list accessors, global weather message handler
fireMissionInformation.h None applyHeightAboveTerrain, allowTargetInsideStructure, hitZoneFunction
fixedWingFlightPSR.h None setControlPointWithAimingOffset
launchExpendableResourcePSR.h All auto-launch accessors removed None
legacyRWData.h articulatedParts removed; physical world start-time accessors renamed and one pair removed parentRegistry, sidc, sensorsKilled
localEntitySetControllerPSR.h pendingKeepGroundClamped replaced by pendingClampFlag ClampFlag enum, pendingAltitudeAboveTerrain
localObject.h addStateProperty renamed; scenarioRunId return type changed SidcCode change flag, internalStateProperties, nextFrameAppearanceFacade, clampedToGround, SIDC accessors, SaveType and save signals, canObjectBeCreated, notify-level message handling
localObjectManager.h Creation clamp parameters replaced; converted-to-remote callback signature changed; setSimulationDateTimeBasedOnLocation parameter type DtObjectTransferredInformation, DtVrfObjectTransferredToRemoteCallbackList
luaScriptInterfaceExtension.h cleanup is now a pure virtual taking lua_State* clearBackingPointer
missileFlightPSR.h None setTargetHitZone, targetHitZone
navEdgeNavInterface.h myNavEdgeIndex replaced by a per-area map onNavAreaSetChanged override
objectConsole.h None publishNotifyLevel
objectConsoleManager.h None publishNotifyLevel
ownershipTransferManager.h None awaitingTransferOf, convertingToRemote, acknowledgement handling
physicalWorld.h myWMM type changed; vrfWorldMagneticModel.h no longer included worldMagneticModel, initializeWorldMagneticModel
platformLocalObjectFacade.h None mySidcDecorator
psrTypes.h Six TDL constants removed Twelve search light, laser light, signal flag, and play sound constants
resourceCheckInfo.h None monitorPeriod
resourceMonitor.h None toString, restoreMonitorInformation
resourceMonitorInfo.h None toString, fromString
rotaryWingFlightPSR.h None setEnableTerrainAvoidance, enableTerrainAvoidance
rwPositionReference.h None setObjectAndVector
rwScriptReactiveTaskEntry.h None Tick-while-destroyed and tick-immediately accessors
saveOrderOfBattleHandler.h Save methods and writeOrderOfBattle take a save type None
scenarioExtrasMgr.h myScenarioExtras is now a pointer DtRWScenarioExtrasCreatorFcn, createScenarioExtras
scenarioService.h None Snapshot fragment directory and terrain filename accessors
scriptInterface.h processEvents added as a pure virtual taskFailedDuringInit, hasEventsPending, setTickWhileDestroyed, setTickImmediately
scriptMultiTaskControllerPSR.h None Tick-while-destroyed and tick-immediately accessors, removeScriptInformationByTaskId, upgradeFromImport
scriptReactiveTaskController.h None Implements the new script controller pure virtuals
scriptTaskControllerInterface.h Two pure virtuals added None
sensorGimbalControllerPSR.h Re-parented to DtAimableSystemControllerPSR; aiming enum types changed None
simComponent.h None toString(const DtEntityType&)
simComponentManager.h None upgradeFromImport, refreshDamagedSystems
simComponentTypes.h Three TDL constants removed Seven new component type constants
simObjectReferenceList.h simObjectRemoved is now virtual slot_uuidUpgradedTo, eraseMapEntriesForListIterator
simObjectStateRepository.h None initializeLegacyRwDataForReading, initializeLegacyRwDataForWriting
simTaskManager.h addTaskProcessor gained a hidden flag; DtTaskProcessorMap mapped type changed DtTaskProcessorInfo
singleTaskControllerComponent.h disable override removed taskHandlingOnDisable override
surfaceMovementPSR.h None setTargetHitZoneOffset, targetHitZoneOffset
tagVolumeNavInterface.h calcTagVolumePoints signature changed onNavAreaSetChanged override
taskControllerComponent.h addTaskProcessorCallback overloads gained a hidden flag taskHandlingOnDisable
updateRepositoryOutputPortGroup.h setLocation gained a parameter None
vrfAggregateStateRepository.h None pruneEngagementHistory, TheDefaultEnagementHistoryClampSize
vrfBalGunPSR.h None weaponId, setWeaponId
vrfEmbarkationPSR.h None setClampToTerrain, clampToTerrain
vrfIndirectFirePSR.h None applyHeightAboveTerrain accessors
vrfMovingObjectStateRepository.h preGetSelf / prePutSelf overrides replaced by legacy reader-writer hooks diGuyCharacterState out-parameter overload
vrfMsdlScenarioDescriptionImporterExporter.h countryCode return type changed None
vrfMunitionLoader.h None log
vrfNavAreaManager.h None findNavAreaNameForLocation
vrfObjectLocalObjectFacade.h save requires a DtLocalObject::SaveType None
vrfObjectNavInterface.h None onNavAreaSetChanged
vrfObjectStateRepository.h systemEnabled / setSystemEnabled removed; suppressionLevels gained a value Transfer data accessors, setNotifyLevel, notifyLevel
vrfProcessStateRepository.h None upgradeFromImport
vrfProcessStateRepositoryManager.h None upgradeFromImport
vrfTurretedBalGunPSR.h None canEngageTarget / canAcquireTarget / canFaceTarget predicate chain
vrfWeaponPSR.h No-argument munitionLoader() now resolves by current munition type Named and munition-keyed loaders, weaponAimedElevation, statusReason
warheadDetonationActuatorPSR.h None creationTime, setCreationTime
weaponInfoInterface.h createFireTask signature changed; targetAmmunition and priority removed; withinTargetRegion deprecated; TargetApplicability moved to namespace scope Munition-hint createFireTask overload

Return to VR-Forces 5.3 API Migration Guide.

[Home]


Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)