Skip to content

zCVob

Quick Infos

Type: Virtual Object
Format Name: ZenGin Archive
File Extension: .ZEN
Class Name: zCVob
Version Identifiers:
— Gothic I: 12289
— Gothic II: 52224
ZenKit Class: VirtualObject
Sources:
spacerhilfedatei.sph
gothic-library.ru

Represents so-called virtual objects which appear in the game world. zCVob is the base class for all virtual objects which include everything from static models like boxes to interactive elements like doors and chests and invisible trigger objects. They are also referred to as VObjects in this documentation.

Properties

pack

Internal property which indicates how the data associated with this VObject is stored. Can not be changed in the Spacer and is inaccessible in ZenKit.

presetName

The name of the template used to create this VObject in the Spacer. Exposed as a normal field by ZenKit.

bbox3DWS

The 3-dimensional bounding box of this VObject to be used for collision detection. This is used in conjunction with cdStatic and cdDyn to detect whether two VObject are colliding. Depending on the kind of VObject collision with it may do different things which are documented for each VObject separately.

The bounding box is described by two opposite diagonal points in 3D world space coordinates.

trafoOSToWSRot

The rotation of this VObject in world space, represented by a 3x3 rotation matrix.

trafoOSToWSPos

The coordinates of this VObject in world space.

vobName

The name of this VObject. VObject names are not necessarily unique but are sometimes helpful for identifying them. For some VObjects, like zCVobSpot or zCTrigger setting the vobName is required

visual

The name of the visual component associated with this VObject. This is usually the name of a file containing the data for a visual object. The following file formats are supported:

  • *.3DS — Static models
  • *.PFX — Particle effects
  • *.TGA — Textures
  • *.MDS, .ASC — Interactive or rigged models
  • *.MMS — Morph-mesh animated models

showVisual

Indicates whether this VObject should display its associated visual.
TRUE — Display the visual. FALSE — Hide the visual.

visualCamAlign

Indicates how this VObject should be aligned in relation to the camera. This may be used with grass or flowers which only consist of a 2-dimensional sprite to have it always face the camera, for example. Possible value are

  • NONE — The sprite is not affected by the camera's rotation.
  • YAW — The sprite rotates with the camera's yaw axis.
  • FULL — The sprite rotates alonside the camera.

visualAniMode

The type of wind animation to apply to the VObject. One of

  • NONE — No wave animation.
  • WIND — Indicates that the object should be animated as if shifting in strong wind. Used mostly for animating grass and other small foliage.
  • WIND2 — Indicates that the object should be animated as if shifting in light wind. Used mostly for animating trees.

Warning

This property is only available in Gothic II.

visualAniModeStrength

Indicates the strength of the animation set through visualAniMode. This value is ignored if visualAniMode is set to NONE.

Warning

This property is only available in Gothic II.

vobFarClipZScale

Indicates the draw distance of this VObject. Its value should be between 0 and 2. 0 Means, that this object is never drawn on screen but collisions are still calculated. A value of 2 means, that the draw distance of this VObject is the same as the draw distance specified in the zCZoneVobFarPlane object.

Warning

This property is only available in Gothic II.

cdStatic

Indicates whether this VObject should collide with other VObjects. This is used for placing the object in the ZenGin map editor, the Spacer, where it will prevent the VObject being placed wither other VObjects. This setting is irrelevant for runtime collision detection.

  • TRUE — Collide with all other VObjects.
  • FALSE — Don't collide with other static VObjects.

cdDyn

Indicates whether this VObject should collide with dynamic objects. For this purpose, dynamic objects are the player, NPCs and items. If this flag is set, implementations should apply collision detection to this VObject.

  • TRUE — Collide with dynamic VObjects.
  • FALSE — Don't collide with dynamic VObjects.

staticVob

Indicates whether this VObject should be included during static lighting calculations. These lighting calculations are done at compile-time and will bake VObjects with this flag into the light-maps available from the world mesh.

  • TRUE — Exclude this VObject from dynamic lighting calculations.
  • FALSE — Include this VObject in dynamic lighting calculations.

dynShadow

The type of dynamic shadow to be used for this VObject.

  • DS_NONE — The VObject does not cast any shadow.
  • DS_BLOB — The VObject casts a dark circle at its base.

zbias

The depth-bias for this VObject. This value is passed directly to Direct3D when rendering the associated visual of this VObject. Sadly, because documentation is not available for the very old Direct3D version used by the ZenGin, the exact behavior it would have resulted in are unknown.

Warning

This property is only available in Gothic II.

isAmbient

Indicates that this VObject is ambient. It looks like this VObject setting was a system used during development when access to the game's source code was available. Basically, the global variable zCWorld::s_bAmbientVobsEnabled could be used to hide or show VObjects which have the isAmbient flag set. In release builds, this variable is always set to true, thus the isAmbient flag does not have any perceivable effect on the game. It follows, that this field should be ignored by most implementations.

Warning

This property is only available in Gothic II.

sleepMode

Unknown.

Warning

This property is only available in saved games.

nextOnTimer

Unknown.

Warning

This property is only available in saved games.

Hierarchy

The following list shows the virtual object class hierarchy. Click on any of the VObjects to see more details.