diff --git a/docs/zengin/worlds/Classes/zCVob.md b/docs/zengin/worlds/Classes/zCVob.md index 9fc8028909..632380dd8f 100644 --- a/docs/zengin/worlds/Classes/zCVob.md +++ b/docs/zengin/worlds/Classes/zCVob.md @@ -1,106 +1,138 @@ # zCVob -**zCVob** is a base class for all objects placed in a world. - -!!! example "Acknowledgment" - Heavily inspired by the amazing documentation site [Gothic library](http://www.gothic-library.ru/publ/class_zcvob/1-1-0-467) +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. ## Class members +Properties of a zCVob class are split into two parts. The **Internals** are hardly ever needed to be edited manually, they are changed by e.g. moving an object in [Spacer](../spacer.md). On the other hand the **Vob** properties can only be changed by the Objects context menu in [Spacer](../spacer.md). === "G1" -
- ![zCVob properties in spacer](../../../assets/images/zCVob_G1.png){width="300" } -
- - Properties of a zCVob class are split into two parts. The **Internals** are hardly ever needed to be edited manually, they are changeed by e.g. moving an object in [Spacer](../spacer.md). On the other hand the **Vob** properties can only be changed by the Objects context menu in [Spacer](../spacer.md). - **Internals** + - zCVob + {: style="list-style-image: url('/gmc/assets/icons/spacer-class.png');"} + - Internals + {: style="list-style-image: url('/gmc/assets/icons/spacer-folder.png');"} + - [pack](#pack) = 0 + {: style="list-style-image: url('/gmc/assets/icons/spacer-int.png');"} + - [presetName](#presetname) = "" + {: style="list-style-image: url('/gmc/assets/icons/spacer-string.png');"} + - [bbox3DWS](#bbox3dws) = 0 0 0 0 0 0 + {: style="list-style-image: url('/gmc/assets/icons/spacer-misc.png');"} + - [trafoOSToWSRot](#trafoostowsrot) = 0 + {: style="list-style-image: url('/gmc/assets/icons/spacer-misc.png');"} + - [trafoOSToWSPos](#trafoostowspos) = 0 0 200 + {: style="list-style-image: url('/gmc/assets/icons/spacer-vec.png');"} + - Vob + {: style="list-style-image: url('/gmc/assets/icons/spacer-folder.png');"} + - [vobName](#vobname) = "" + {: style="list-style-image: url('/gmc/assets/icons/spacer-string.png');"} + - [visual](#visual) = "" + {: style="list-style-image: url('/gmc/assets/icons/spacer-string.png');"} + - [showVisual](#showvisual) = TRUE + {: style="list-style-image: url('/gmc/assets/icons/spacer-bool.png');"} + - [visualCamAlign](#visualcamalign) = NONE + {: style="list-style-image: url('/gmc/assets/icons/spacer-enum.png');"} + - [CdStatic](#cdstatic) = FALSE + {: style="list-style-image: url('/gmc/assets/icons/spacer-bool.png');"} + - [CdDyn](#cddyn) = FALSE + {: style="list-style-image: url('/gmc/assets/icons/spacer-bool.png');"} + - [staticVob](#staticvob) = FALSE + {: style="list-style-image: url('/gmc/assets/icons/spacer-bool.png');"} + - [dynShadow](#dynshadow) = DS_NONE + {: style="list-style-image: url('/gmc/assets/icons/spacer-enum.png');"} + - visual = NULL + {: style="list-style-image: url('/gmc/assets/icons/spacer-class.png');"} + - ai = NULL + {: style="list-style-image: url('/gmc/assets/icons/spacer-class.png');"} - - [pack](#pack) - - [presetName](#presetname) - - [bbox3DWS](#bbox3dws) - - [trafoOSToWSRot](#trafoostowsrot) - - [trafoOSToWSPos](#trafoostowspos) - - **Vob** +=== "G2A" - - [vobName](#vobname) - - [visual](#visual) - - [showVisual](#showvisual) - - [visualCamAlign](#visualcamalign) - - [CdStatic](#cdstatic) - - [CdDyn](#cddyn) - - [staticVob](#staticvob) - - [dynShadow](#dynshadow) + - zCVob + {: style="list-style-image: url('/gmc/assets/icons/spacer-class.png');"} + - Internals + {: style="list-style-image: url('/gmc/assets/icons/spacer-folder.png');"} + - [pack](#pack) = 0 + {: style="list-style-image: url('/gmc/assets/icons/spacer-int.png');"} + - [presetName](#presetname) = "" + {: style="list-style-image: url('/gmc/assets/icons/spacer-string.png');"} + - [bbox3DWS](#bbox3dws) = 0 0 0 0 0 0 + {: style="list-style-image: url('/gmc/assets/icons/spacer-misc.png');"} + - [trafoOSToWSRot](#trafoostowsrot) = 0 + {: style="list-style-image: url('/gmc/assets/icons/spacer-misc.png');"} + - [trafoOSToWSPos](#trafoostowspos) = 0 0 200 + {: style="list-style-image: url('/gmc/assets/icons/spacer-vec.png');"} + - Vob + {: style="list-style-image: url('/gmc/assets/icons/spacer-folder.png');"} + - [vobName](#vobname) = "" + {: style="list-style-image: url('/gmc/assets/icons/spacer-string.png');"} + - [visual](#visual) = "" + {: style="list-style-image: url('/gmc/assets/icons/spacer-string.png');"} + - [showVisual](#showvisual) = TRUE + {: style="list-style-image: url('/gmc/assets/icons/spacer-bool.png');"} + - [visualCamAlign](#visualcamalign) = NONE + {: style="list-style-image: url('/gmc/assets/icons/spacer-enum.png');"} + - [visualAniMode](#visualanimode) = NONE + {: style="list-style-image: url('/gmc/assets/icons/spacer-enum.png');"} + - [visualAniModeStrength](#visualanimodestrength) = 0.0 + {: style="list-style-image: url('/gmc/assets/icons/spacer-float.png');"} + - [vobFarClipZScale](#vobfarclipzscale) = 1.0 + {: style="list-style-image: url('/gmc/assets/icons/spacer-float.png');"} + - [CdStatic](#cdstatic) = FALSE + {: style="list-style-image: url('/gmc/assets/icons/spacer-bool.png');"} + - [CdDyn](#cddyn) = FALSE + {: style="list-style-image: url('/gmc/assets/icons/spacer-bool.png');"} + - [staticVob](#staticvob) = FALSE + {: style="list-style-image: url('/gmc/assets/icons/spacer-bool.png');"} + - [dynShadow](#dynshadow) = DS_NONE + {: style="list-style-image: url('/gmc/assets/icons/spacer-enum.png');"} + - [zbias](#zbias) = 1 + {: style="list-style-image: url('/gmc/assets/icons/spacer-int.png');"} + - [isAmbient](#isambient) = FALSE + {: style="list-style-image: url('/gmc/assets/icons/spacer-bool.png');"} + - visual = NULL + {: style="list-style-image: url('/gmc/assets/icons/spacer-class.png');"} + - ai = NULL + {: style="list-style-image: url('/gmc/assets/icons/spacer-class.png');"} -=== "G2A" -
- ![zCVob properties in spacer2](../../../assets/images/zCVob_G2A.png){ width="300" } -
- - Properties of a zCVob class are split into two parts. The **Internals** are hardly ever needed to be edited manually, they are changeed by e.g. moving an object in [Spacer](../spacer.md). On the other hand the **Vob** properties can only be changed by the Objects context menu in [Spacer](../spacer.md). - - **Internals** - - - [pack](#pack) - - [presetName](#presetname) - - [bbox3DWS](#bbox3dws) - - [trafoOSToWSRot](#trafoostowsrot) - - [trafoOSToWSPos](#trafoostowspos) - - **Vob** - - - [vobName](#vobname) - - [visual](#visual) - - [showVisual](#showvisual) - - [visualCamAlign](#visualcamalign) - - [visualAniMode](#visualanimode) - - [visualAniModeStrength](#visualanimodestrength) - - [vobFarClipZScale](#vobfarclipzscale) - - [CdStatic](#cdstatic) - - [CdDyn](#cddyn) - - [staticVob](#staticvob) - - [dynShadow](#dynshadow) - - [zbias](#zbias) - - [isAmbient](#isambient) + ## Class member overview ### pack -No Information provided. +Internal property which indicates how the data associated with this virtual object is stored. ### presetName -The name of the template that was used to create the item. +The name of the template that was used to create this virtual object. ### bbox3DWS -Volume of virtual object. Defined by two opposite diagonal points of the BoundingBox (`1x, 1y, 1z`, `2x, 2y, 2z`). The volume is needed to calculate collisions and interactions with other game objects. For example, with dynamic objects, which include characters (class C_NPC), items (class [C_ITEM](../../scripts/classes/c_item.md) ), etc. +The 3-dimensional bounding box of this virtual object. Defined by two opposite diagonal points (`1x, 1y, 1z`, `2x, 2y, 2z`). This is used in conjunction with [cdStatic](#cdstatic) and [cdDyn](#cddyn) calculate collisions and interactions with other game objects (NPCs, items, etc.). Interaction processing begins when object volumes intersect. For example, when the player enters the world change trigger area, the engine loads another game level based on the parameters this trigger. All this happens when the main character's BoundingBox intersects with the trigger's BoundingBox. -The BoundingBox can only be changed using the `Edit the Bbox` button in Spcaer. +The BoundingBox can only be changed using the `Edit the Bbox` button in Spacer. ### trafoOSToWSRot -Orientation relative to the coordinate center. +The rotation of this virtual object in world space, represented by a 3x3 rotation matrix. -!!! Note - This refers to the center of coordinates of the `.3DS` file of the game world on which the `ZEN` file is built. ### trafoOSToWSPos -Coordinates of the position in space relative to the center of coordinates. +Coordinates of the object in world space relative to the center. + +!!! Note + This refers to the center of coordinates of the `.3DS` file of the game world on which the `ZEN` file is built. The coordinates are set automatically the first time an instance of the class is inserted into the game world. You can change them either directly by entering numerical values ​​in the corresponding fields of the parameter, by [moving the vob](../spacer.md#viewport-controls) in spacer. ### vobName An identifier of a zCVob shown in the editor and sometimes used in scripts. The name can be left blank. -For some object classes, entering a name is required: zCVobSpot , zCVobWaypoint , zCTrigger , etc. +For some object classes, entering a name is required: zCVobSpot, zCVobWaypoint, zCTrigger etc. !!! Danger Setting a name for every static and insignificant object can lead to an error when parsing the game world. ### visual -The name of the file that will be responsible for the visual display of the object. +The name of the visual component associated with this object, usually a name of a file. -Different file formats are used for different object classes: +Following formats are supported: - `*.3DS` - Static objects - `*.PFX` - Particle effects @@ -110,7 +142,7 @@ Different file formats are used for different object classes: ### showVisual -This option is responsible for displaying the object. +Indicates whether this object should display its visual. **Accepted values:** @@ -128,7 +160,7 @@ Option to align objects relative to the camera. - **FULL** - The object is aligned relative to the world axes. !!! Note - For example, in order for the grass model to always face the character, you need to set this parameter to **YAW**. + This may be used with grass or flowers which only consist of a 2-dimensional sprite to have it always face the camera. ### visualAniMode Wind simulation option. Used in conjunction with the [visualAniModeStrength](#visualanimodestrength) parameter. @@ -140,42 +172,42 @@ Wind simulation option. Used in conjunction with the [visualAniModeStrength](#vi - **WIND2** - Light wind effect. Acceptable for trees. !!! Warning - This option is only available in Gothic 2 (Spacer2). + This option is only available in Gothic II (Spacer2). ### visualAniModeStrength Wind power animation multiplier. Small values such as `0.001` are typically used. Used in conjunction with the [visualAniMode](#visualanimode) parameter. !!! Warning - This option is only available in Gothic 2 (Spacer2). + This option is only available in Gothic II (Spacer2). ### vobFarClipZScale Sets the loading range of the VOB object. Depends on the VOB drawing distance specified using the `zCZoneVobFarPlane` object. The range of values is from `0.0` to `2.0`. -With a value of `0.0`, the object is not visible, but collisions are calculated. With a value of `2.0`, the VOB drawing range is identical to the VOB drawing range of objects specified by the `zCZoneVobFarPlane` object. +With a value of `0.0`, the object is not visible, but collisions are calculated. With a value of `2.0`, the `zCVob` drawing range is the same as the draw distance specified in `zCZoneVobFarPlane` object. !!! Warning - This option is only available in Gothic 2 (Spacer2). + This option is only available in Gothic II (Spacer2). ### CdStatic -Determines if the VOB will collide with the static objects (world mesh and other VOBs with **cdStatic** on). +Determines if the virtual object will collide with the static objects (world mesh and other VOBs with **cdStatic** on). **Accepted values:** -- TRUE - Collision handling for static objects is enabled. -- FALSE - Collision handling for static objects is disabled. +- TRUE - Collide with static objects. +- FALSE - Don't collide static objects. !!! Tip A situation often arises when objects “refuse” to move beyond a certain point on the surface. This happens when **cdStatic** is set to **TRUE**, i.e. the object cannot cross the surface another static object. In this case, it is enough to disable the **cdStatic** parameter for the duration of the move, and turn it on again after the move. ### CdDyn -Determines if the VOB will collide with dynamic objects (NPCs, items, etc.). This basically determines if the object has collision during gameplay. +Determines if the virtual object will collide with dynamic objects (NPCs, items, etc.). This basically determines if the object has collision during gameplay. **Accepted values:** -- **TRUE** - Collision handling for dynamic objects is enabled. -- **FALSE** - Collision handling for dynamic objects is disabled. +- **TRUE** - Collide with dynamic objects. +- **FALSE** - Don't collide with dynamic objects. ### staticVob @@ -190,7 +222,7 @@ Determines if the VOB is taken into consideration in static lighting calculation The shadow is calculated when compiling light in Low, Middle or High mode. ### dynShadow -Determine if the object will cast a shadow when affected by dynamic light (e.g. torches). +Indicates whether the object will cast a shadow when affected by dynamic light (e.g. torches). **Accepted values:** @@ -198,18 +230,21 @@ Determine if the object will cast a shadow when affected by dynamic light (e.g. - **DS_BLOB** - Casts a circular shadow. ### zbias -Option to remove texture flickering if a `.TGA` file is used as rendering. +The depth-bias for this virtual object. + +Can be used remove texture flickering if a `.TGA` file is used as rendering. !!! Warning - This option is only available in Gothic 2 (Spacer2). + This option is only available in Gothic II (Spacer2). ### isAmbient -Sets the calculation of refracted lighting of objects. +Indicates that this virtual object is ambient. It looks like this 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 virtual objects 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. -**Accepted values:** +!!! Warning + This option is only available in Gothic II (Spacer2). -- TRUE - Calculate the refraction of light. -- FALSE - Do not calculate light refraction. +[^1]: + Heavily inspired by the zCVob article at [gothic-library](http://www.gothic-library.ru/publ/class_zcvob/1-1-0-467). -!!! Warning - This option is only available in Gothic 2 (Spacer2). +[^2]: + Corrected with information found in [ZenKit ZenGin Reference](https://zk.gothickit.dev/engine/objects/zCVob/). diff --git a/overrides/assets/icons/spacer-bool.png b/overrides/assets/icons/spacer-bool.png new file mode 100644 index 0000000000..693a514bfc Binary files /dev/null and b/overrides/assets/icons/spacer-bool.png differ diff --git a/overrides/assets/icons/spacer-class.png b/overrides/assets/icons/spacer-class.png new file mode 100644 index 0000000000..71a64637b5 Binary files /dev/null and b/overrides/assets/icons/spacer-class.png differ diff --git a/overrides/assets/icons/spacer-color.png b/overrides/assets/icons/spacer-color.png new file mode 100644 index 0000000000..efd9bf2514 Binary files /dev/null and b/overrides/assets/icons/spacer-color.png differ diff --git a/overrides/assets/icons/spacer-enum.png b/overrides/assets/icons/spacer-enum.png new file mode 100644 index 0000000000..86871d444a Binary files /dev/null and b/overrides/assets/icons/spacer-enum.png differ diff --git a/overrides/assets/icons/spacer-float.png b/overrides/assets/icons/spacer-float.png new file mode 100644 index 0000000000..18278ed923 Binary files /dev/null and b/overrides/assets/icons/spacer-float.png differ diff --git a/overrides/assets/icons/spacer-folder.png b/overrides/assets/icons/spacer-folder.png new file mode 100644 index 0000000000..6a1236d820 Binary files /dev/null and b/overrides/assets/icons/spacer-folder.png differ diff --git a/overrides/assets/icons/spacer-int.png b/overrides/assets/icons/spacer-int.png new file mode 100644 index 0000000000..beb3f0bea8 Binary files /dev/null and b/overrides/assets/icons/spacer-int.png differ diff --git a/overrides/assets/icons/spacer-misc.png b/overrides/assets/icons/spacer-misc.png new file mode 100644 index 0000000000..f03426fcce Binary files /dev/null and b/overrides/assets/icons/spacer-misc.png differ diff --git a/overrides/assets/icons/spacer-string.png b/overrides/assets/icons/spacer-string.png new file mode 100644 index 0000000000..7c6f70fbb3 Binary files /dev/null and b/overrides/assets/icons/spacer-string.png differ diff --git a/overrides/assets/icons/spacer-vec.png b/overrides/assets/icons/spacer-vec.png new file mode 100644 index 0000000000..0f88b1d306 Binary files /dev/null and b/overrides/assets/icons/spacer-vec.png differ diff --git a/overrides/assets/images/zCVob_G1.png b/overrides/assets/images/zCVob_G1.png deleted file mode 100644 index 5485e78615..0000000000 Binary files a/overrides/assets/images/zCVob_G1.png and /dev/null differ diff --git a/overrides/assets/images/zCVob_G2A.png b/overrides/assets/images/zCVob_G2A.png deleted file mode 100644 index b7a7c805a4..0000000000 Binary files a/overrides/assets/images/zCVob_G2A.png and /dev/null differ