From 5e315c15f7427eb8f72ce13936a22cdd6e29c387 Mon Sep 17 00:00:00 2001
From: muczc1wek <110698397+muczc1wek@users.noreply.github.com>
Date: Wed, 3 Jul 2024 18:06:15 +0200
Subject: [PATCH 1/3] [Worlds] zCVobWaypoint class article
---
.../worlds/Classes/zCVob/zCVobWaypoint.md | 35 +++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 docs/zengin/worlds/Classes/zCVob/zCVobWaypoint.md
diff --git a/docs/zengin/worlds/Classes/zCVob/zCVobWaypoint.md b/docs/zengin/worlds/Classes/zCVob/zCVobWaypoint.md
new file mode 100644
index 0000000000..541a84af22
--- /dev/null
+++ b/docs/zengin/worlds/Classes/zCVob/zCVobWaypoint.md
@@ -0,0 +1,35 @@
+# zCVobWaypoint
+
+!!! abstract inline end "Quick Infos"
+ **Class Name:** `zCVobWaypoint`
+ **Version Identifiers:**
+ — Gothic I: Unknown
+ — Gothic II: Unknown
+ **Sources:**
+ — [spacerhilfedatei.sph](https://wiki.worldofgothic.de/doku.php?id=spacer:hilfedatei)
+ — [gothic-library.ru](https://gothic-library-mirror.piotrmacha.pl/publ/1-1-0-501)
+
+Waypoints are used to mark a position and orientation in virtual space like [`zCVobSpot`](zCVobSpot.md), but are combined into a path network through which NPCs will perform pathfinding. Waypoints can be used in scripts to spawn other objects at their location.
+
+!!! Warning
+ `zCVobWaypoint` objects aren't saved in `.ZEN` files. Their `zCWaypoint` representations are used instead.
+
+## Class members
+
+=== "Gothic 1"
+
+ - [zCVob](index.md)
+ {: .sp-class}
+ - zCVobWaypoint
+ {: .sp-class}
+ - <empty>
+ {: .sp-none}
+
+=== "Gothic 2"
+
+ - [zCVob](index.md)
+ {: .sp-class}
+ - zCVobWaypoint
+ {: .sp-class}
+ - <empty>
+ {: .sp-none}
\ No newline at end of file
From e8644465f4b9a8ba6fd35e98297e6ce22cb0bc48 Mon Sep 17 00:00:00 2001
From: muczc1wek <110698397+muczc1wek@users.noreply.github.com>
Date: Mon, 8 Jul 2024 23:04:24 +0200
Subject: [PATCH 2/3] [Worlds] Mention water and add links to vob classes in
index
---
docs/zengin/worlds/index.md | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/docs/zengin/worlds/index.md b/docs/zengin/worlds/index.md
index 0c79b380c3..d4392b1538 100644
--- a/docs/zengin/worlds/index.md
+++ b/docs/zengin/worlds/index.md
@@ -3,7 +3,7 @@
!!! example "Acknowledgment"
This article is heavily inspired by various tutorials from the polish [TheModders forums](https://themodders.org/index.php#c13).
-Worlds, saved as `.ZEN` files in ZenGin, are archives that contain the world mesh (model), BSP tree and the information of all objects in the world. These objects are called VOBs ("virtual objects"). ZEN files can be saved in two ways; compiled and uncompiled. The compiled version is a full-fledged level with a terrain model. Uncompiled ZENs only save the VOB tree and are meant for specific use-cases.
+Worlds, saved as `.ZEN` files in ZenGin, are archives that contain the world mesh (model), BSP tree, materials and the information of all objects in the world. These objects are called VOBs ("virtual objects"). ZEN files can be saved in two ways; compiled and uncompiled. The compiled version is a full-fledged level with a terrain model. Uncompiled ZENs only save the VOB tree and are meant for specific use-cases.
Spacer is used to create these `.ZEN` files. There are also [other world editors](../tools/index.md). The way of doing things can vary between these editors, so the specifics will be discussed in separate articles for those tools; at the same time, a lot of knowledge carries over between them. Also have in mind that Spacer is the least comfortable of the editors.
@@ -11,24 +11,26 @@ Spacer is used to create these `.ZEN` files. There are also [other world editors
The content of worlds in Gothic can be roughly separated in the following way:
-- Base level mesh: terrain and buildings, sometimes also trees
-- VOBs: all interactive objects, items, foliage, small rocks, huts, furniture, ramps etc.
+- Base level mesh - terrain and buildings, sometimes also trees.
+- VOBs ([`zCVob`](Classes/zCVob/index.md) and subclasses) - all interactive objects, items, foliage, small rocks, huts, furniture, ramps etc.
Asides from those elements, there are also many invisible VOBs, such as:
-- Waypoints - used for NPC navigation
-- Freepoints (zCVobSpot) - used mainly for NPC routines and roaming behavior for monsters
-- Startpoints - used only to spawn the player when starting a new game. Teleporting between levels is handled with scripts and uses freepoints to determine where the player will appear.
+- Waypoints ([`zCVobWaypoint`](Classes/zCVob/zCVobWaypoint.md)) - used for NPC navigation.
+- Freepoints ([`zCVobSpot`](Classes/zCVob/zCVobSpot.md)) - used mainly for NPC routines and roaming behavior for monsters.
+- Startpoints ([`zCVobStartpoint`](Classes/zCVob/zCVobStartpoint.md)) - used only to spawn the player when starting a new game. Teleporting between levels is handled with scripts and uses freepoints to determine where the player will appear.
- Sound emitters
-- Music zones
- - oCZoneMusic - music which plays inside the bounding box of this zone
- - oCZoneMusicDefault - default music which plays whenever the player is not inside some oCZoneMusic
-- Fog zones (zCZoneZFog) - areas which add fog, e.g. like in swamp areas where the sky is not visible. The setting to fade out the sky is optional though.
+- Music zones
+ - [`oCZoneMusic`](Classes/zCVob/zCZone/oCZoneMusic/index.md) - music which plays inside the bounding box of this zone.
+ - [`oCZoneMusicDefault`](Classes/zCVob/zCZone/oCZoneMusic/oCZoneMusicDefault.md) - default music which plays whenever the player is not inside some `oCZoneMusic`.
+- Fog zones ([`zCZoneZFog`](Classes/zCVob/zCZone/zCZoneZFog/index.md)) - areas which add fog, e.g. like in swamp areas where the sky is not visible. The setting to fade out the sky is optional though.
- PFX - particle effects (fire, smoke, fireflies, falling leaves etc.)
!!! note
This list isn't exhaustive.
+World also contains information about all materials used by level mesh and VOBs. They are stored in the form of [`zCMaterial`](Classes/zCMaterial.md) instances.
+
## Creating a ZEN file
Before VOBs can be added to a world model, the world needs to be compiled.
@@ -53,6 +55,10 @@ It is generally advised to use static lights whenever possible.
Portals are special parts of outdoor world meshes which separate interiors from exteriors. This allows the level to have dark areas: otherwise interiors are lit the same way as any outside area. Additionally, portals help with performance (interiors aren't rendered unless the player is nearby). Creation of portals has many caveats and will be discussed in a separate article. Portals are also related to NPC behavior (e.g. setting ownership of a room).
+## Water
+
+Water is a special surface in the world. It has to be properly modelled, and its material has to be set up correctly. You can read more about it in the [dedicated article](../meshes/water.md).
+
## Optimisation
The game uses occlusion culling, which means that if an object is covered by another object, it is not rendered and saves performance. This means that the performance in a level can be boosted by a lot by creating city walls and mountains and valleys which separate areas.
From 89712221f9557dd59fb7bfe23aa4d8797e7ba0b9 Mon Sep 17 00:00:00 2001
From: muczc1wek <110698397+muczc1wek@users.noreply.github.com>
Date: Mon, 8 Jul 2024 23:12:41 +0200
Subject: [PATCH 3/3] [Worlds] Remove "ZenKit Class:" field in vob classes
infos
---
.../worlds/Classes/zCVob/oCVob/oCMOB/oCMobInter/oCMobBed.md | 1 -
docs/zengin/worlds/Classes/zCVob/zCCSCamera.md | 1 -
docs/zengin/worlds/Classes/zCVob/zCCamTrj_KeyFrame.md | 1 -
.../worlds/Classes/zCVob/zCEffect/zCTouchDamage/oCTouchDamage.md | 1 -
docs/zengin/worlds/Classes/zCVob/zCVobLight.md | 1 -
5 files changed, 5 deletions(-)
diff --git a/docs/zengin/worlds/Classes/zCVob/oCVob/oCMOB/oCMobInter/oCMobBed.md b/docs/zengin/worlds/Classes/zCVob/oCVob/oCMOB/oCMobInter/oCMobBed.md
index 8788dcaf21..d3e74b30ca 100644
--- a/docs/zengin/worlds/Classes/zCVob/oCVob/oCMOB/oCMobInter/oCMobBed.md
+++ b/docs/zengin/worlds/Classes/zCVob/oCVob/oCMOB/oCMobInter/oCMobBed.md
@@ -8,7 +8,6 @@
**Version Identifiers:**
— Gothic I: `35585`
— Gothic II: `35585`
- **ZenKit Class:** `VBed`
**Sources:**
— [spacerhilfedatei.sph](https://wiki.worldofgothic.de/doku.php?id=spacer:hilfedatei)
— [zk.gothickit.dev](https://zk.gothickit.dev/engine/objects/oCMobBed/)
diff --git a/docs/zengin/worlds/Classes/zCVob/zCCSCamera.md b/docs/zengin/worlds/Classes/zCVob/zCCSCamera.md
index cd7ea282e9..22b2fba958 100644
--- a/docs/zengin/worlds/Classes/zCVob/zCCSCamera.md
+++ b/docs/zengin/worlds/Classes/zCVob/zCCSCamera.md
@@ -8,7 +8,6 @@
**Version Identifiers:**
— Gothic I: `30720`
— Gothic II: `33793`
- **ZenKit Class:** `VCutsceneCamera`
**Sources:**
— [gothic-library.ru](http://www.gothic-library.ru/publ/zccscamera/1-1-0-494)
— [zk.gothickit.dev](https://zk.gothickit.dev/engine/objects/zCCSCamera/)
diff --git a/docs/zengin/worlds/Classes/zCVob/zCCamTrj_KeyFrame.md b/docs/zengin/worlds/Classes/zCVob/zCCamTrj_KeyFrame.md
index 10089679d0..b430778151 100644
--- a/docs/zengin/worlds/Classes/zCVob/zCCamTrj_KeyFrame.md
+++ b/docs/zengin/worlds/Classes/zCVob/zCCamTrj_KeyFrame.md
@@ -8,7 +8,6 @@
**Version Identifiers:**
— Gothic I: `12289`
— Gothic II: `52224`
- **ZenKit Class:** `VCameraTrajectoryFrame`
**Sources:**
— [gothic-library.ru](http://www.gothic-library.ru/publ/zccamtrj_keyframe/1-1-0-495)
— [zk.gothickit.dev](https://zk.gothickit.dev/engine/objects/zCCamTrj_KeyFrame/)
diff --git a/docs/zengin/worlds/Classes/zCVob/zCEffect/zCTouchDamage/oCTouchDamage.md b/docs/zengin/worlds/Classes/zCVob/zCEffect/zCTouchDamage/oCTouchDamage.md
index 1b9f3054ba..8beae9e2c8 100644
--- a/docs/zengin/worlds/Classes/zCVob/zCEffect/zCTouchDamage/oCTouchDamage.md
+++ b/docs/zengin/worlds/Classes/zCVob/zCEffect/zCTouchDamage/oCTouchDamage.md
@@ -5,7 +5,6 @@
**Version Identifiers:**
— Gothic I: `36865`
— Gothic II: `36865`
- **ZenKit Class:** `VTouchDamage`
**Sources:**
— [zk.gothickit.dev](https://zk.gothickit.dev/engine/objects/oCTouchDamage/)
diff --git a/docs/zengin/worlds/Classes/zCVob/zCVobLight.md b/docs/zengin/worlds/Classes/zCVob/zCVobLight.md
index 3707b27959..6c67be1364 100644
--- a/docs/zengin/worlds/Classes/zCVob/zCVobLight.md
+++ b/docs/zengin/worlds/Classes/zCVob/zCVobLight.md
@@ -8,7 +8,6 @@
**Version Identifiers:**
— Gothic I: `46080`
— Gothic II: `39168`
- **ZenKit Class:** `VLight`
**Sources:**
— [spacerhilfedatei.sph](https://wiki.worldofgothic.de/doku.php?id=spacer:hilfedatei)
— [gothic-library.ru](http://www.gothic-library.ru/publ/class_zcvoblight/1-1-0-497)