You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [Worlds] zCVobWaypoint class article
* [Worlds] Mention water and add links to vob classes in index
* [Worlds] Remove "ZenKit Class:" field in vob classes infos
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.
13
+
14
+
!!! Warning
15
+
`zCVobWaypoint` objects aren't saved in `.ZEN` files. Their `zCWaypoint` representations are used instead.
Copy file name to clipboardExpand all lines: docs/zengin/worlds/index.md
+16-10Lines changed: 16 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -3,32 +3,34 @@
3
3
!!! example "Acknowledgment"
4
4
This article is heavily inspired by various tutorials from the polish [TheModders forums](https://themodders.org/index.php#c13).
5
5
6
-
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.
6
+
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.
7
7
8
8
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.
9
9
10
10
## World contents
11
11
12
12
The content of worlds in Gothic can be roughly separated in the following way:
13
13
14
-
- Base level mesh: terrain and buildings, sometimes also trees
15
-
- VOBs: all interactive objects, items, foliage, small rocks, huts, furniture, ramps etc.
14
+
- Base level mesh - terrain and buildings, sometimes also trees.
15
+
- VOBs ([`zCVob`](Classes/zCVob/index.md) and subclasses) - all interactive objects, items, foliage, small rocks, huts, furniture, ramps etc.
16
16
17
17
Asides from those elements, there are also many invisible VOBs, such as:
18
18
19
-
- Waypoints - used for NPC navigation
20
-
- Freepoints (zCVobSpot) - used mainly for NPC routines and roaming behavior for monsters
21
-
- 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.
19
+
- Waypoints ([`zCVobWaypoint`](Classes/zCVob/zCVobWaypoint.md)) - used for NPC navigation.
20
+
- Freepoints ([`zCVobSpot`](Classes/zCVob/zCVobSpot.md)) - used mainly for NPC routines and roaming behavior for monsters.
21
+
- 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.
22
22
- Sound emitters
23
-
- Music zones
24
-
-oCZoneMusic - music which plays inside the bounding box of this zone
25
-
-oCZoneMusicDefault - default music which plays whenever the player is not inside some oCZoneMusic
26
-
- 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.
23
+
- Music zones
24
+
-[`oCZoneMusic`](Classes/zCVob/zCZone/oCZoneMusic/index.md) - music which plays inside the bounding box of this zone.
25
+
-[`oCZoneMusicDefault`](Classes/zCVob/zCZone/oCZoneMusic/oCZoneMusicDefault.md) - default music which plays whenever the player is not inside some `oCZoneMusic`.
26
+
- 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.
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.
33
+
32
34
## Creating a ZEN file
33
35
34
36
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.
53
55
54
56
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).
55
57
58
+
## Water
59
+
60
+
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).
61
+
56
62
## Optimisation
57
63
58
64
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.
0 commit comments